@wix/stores 1.0.268 → 1.0.270

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/stores",
3
- "version": "1.0.268",
3
+ "version": "1.0.270",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -18,19 +18,19 @@
18
18
  "type-bundles"
19
19
  ],
20
20
  "dependencies": {
21
- "@wix/stores_brands-v-3": "1.0.13",
22
- "@wix/stores_catalog-versioning": "1.0.5",
23
- "@wix/stores_collections": "1.0.38",
24
- "@wix/stores_customizations-v-3": "1.0.14",
25
- "@wix/stores_info-sections-v-3": "1.0.15",
26
- "@wix/stores_inventory": "1.0.52",
27
- "@wix/stores_inventory-items-v-3": "1.0.18",
28
- "@wix/stores_products": "1.0.73",
29
- "@wix/stores_products-v-3": "1.0.54",
30
- "@wix/stores_ribbons-v-3": "1.0.14",
31
- "@wix/stores_stores-locations-v-3": "1.0.15",
32
- "@wix/stores_subscription-options": "1.0.38",
33
- "@wix/stores_wishlist": "1.0.32"
21
+ "@wix/stores_brands-v-3": "1.0.14",
22
+ "@wix/stores_catalog-versioning": "1.0.6",
23
+ "@wix/stores_collections": "1.0.40",
24
+ "@wix/stores_customizations-v-3": "1.0.15",
25
+ "@wix/stores_info-sections-v-3": "1.0.16",
26
+ "@wix/stores_inventory": "1.0.53",
27
+ "@wix/stores_inventory-items-v-3": "1.0.19",
28
+ "@wix/stores_products": "1.0.75",
29
+ "@wix/stores_products-v-3": "1.0.56",
30
+ "@wix/stores_ribbons-v-3": "1.0.15",
31
+ "@wix/stores_stores-locations-v-3": "1.0.16",
32
+ "@wix/stores_subscription-options": "1.0.39",
33
+ "@wix/stores_wishlist": "1.0.33"
34
34
  },
35
35
  "devDependencies": {
36
36
  "glob": "^10.4.1",
@@ -55,5 +55,5 @@
55
55
  "fqdn": ""
56
56
  }
57
57
  },
58
- "falconPackageHash": "5fe1dd94e465ce0360a964c30c4b5f761c4b35b5cdd63248dea791e4"
58
+ "falconPackageHash": "b8dabc817085e0d1b92e44fbfc10586c870d98da0addc403337aaa79"
59
59
  }
@@ -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$8<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$8<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$8<Payload, Type>;
74
- type EventHandler$8<T extends EventDefinition$8> = (payload: T['__payload']) => void | Promise<void>;
75
- type BuildEventDefinition$8<T extends EventDefinition$8<any, string>> = (handler: EventHandler$8<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$8<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$8<any> ? BuildEventDefinition$8<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,
@@ -692,7 +760,7 @@ interface Keyword$2 {
692
760
  term?: string;
693
761
  /** Whether the keyword is the main focus keyword. */
694
762
  isMain?: boolean;
695
- /** Who added the keyword to the settings */
763
+ /** The source that added the keyword terms to the SEO settings. */
696
764
  origin?: string | null;
697
765
  }
698
766
  interface Tag$2 {
@@ -1406,7 +1474,7 @@ interface Keyword$1 {
1406
1474
  term?: string;
1407
1475
  /** Whether the keyword is the main focus keyword. */
1408
1476
  isMain?: boolean;
1409
- /** Who added the keyword to the settings */
1477
+ /** The source that added the keyword terms to the SEO settings. */
1410
1478
  origin?: string | null;
1411
1479
  }
1412
1480
  interface Tag$1 {
@@ -3261,33 +3329,15 @@ interface GetStoreVariantSignature {
3261
3329
  */
3262
3330
  (_id: string): Promise<GetStoreVariantResponse & GetStoreVariantResponseNonNullableFields>;
3263
3331
  }
3264
- declare const onProductCreated$3: EventDefinition$8<ProductCreatedEnvelope$1, "com.wix.ecommerce.catalog.api.v1.ProductCreated">;
3265
- declare const onProductChanged$1: EventDefinition$8<ProductChangedEnvelope, "com.wix.ecommerce.catalog.api.v1.ProductChanged">;
3266
- declare const onProductDeleted$3: EventDefinition$8<ProductDeletedEnvelope$1, "com.wix.ecommerce.catalog.api.v1.ProductDeleted">;
3267
- declare const onProductCollectionCreated$1: EventDefinition$8<ProductCollectionCreatedEnvelope, "com.wix.ecommerce.catalog.api.v1.CollectionCreated">;
3268
- declare const onProductCollectionChanged$1: EventDefinition$8<ProductCollectionChangedEnvelope, "com.wix.ecommerce.catalog.api.v1.CollectionChanged">;
3269
- declare const onProductCollectionDeleted$1: EventDefinition$8<ProductCollectionDeletedEnvelope, "com.wix.ecommerce.catalog.api.v1.CollectionDeleted">;
3270
- declare const onProductVariantsChanged$1: EventDefinition$8<ProductVariantsChangedEnvelope, "com.wix.ecommerce.catalog.api.v1.VariantsChanged">;
3271
-
3272
- type EventDefinition$7<Payload = unknown, Type extends string = string> = {
3273
- __type: 'event-definition';
3274
- type: Type;
3275
- isDomainEvent?: boolean;
3276
- transformations?: (envelope: unknown) => Payload;
3277
- __payload: Payload;
3278
- };
3279
- declare function EventDefinition$7<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$7<Payload, Type>;
3280
- type EventHandler$7<T extends EventDefinition$7> = (payload: T['__payload']) => void | Promise<void>;
3281
- type BuildEventDefinition$7<T extends EventDefinition$7<any, string>> = (handler: EventHandler$7<T>) => void;
3282
-
3283
- declare global {
3284
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
3285
- interface SymbolConstructor {
3286
- readonly observable: symbol;
3287
- }
3288
- }
3332
+ declare const onProductCreated$3: EventDefinition<ProductCreatedEnvelope$1, "com.wix.ecommerce.catalog.api.v1.ProductCreated">;
3333
+ declare const onProductChanged$1: EventDefinition<ProductChangedEnvelope, "com.wix.ecommerce.catalog.api.v1.ProductChanged">;
3334
+ declare const onProductDeleted$3: EventDefinition<ProductDeletedEnvelope$1, "com.wix.ecommerce.catalog.api.v1.ProductDeleted">;
3335
+ declare const onProductCollectionCreated$1: EventDefinition<ProductCollectionCreatedEnvelope, "com.wix.ecommerce.catalog.api.v1.CollectionCreated">;
3336
+ declare const onProductCollectionChanged$1: EventDefinition<ProductCollectionChangedEnvelope, "com.wix.ecommerce.catalog.api.v1.CollectionChanged">;
3337
+ declare const onProductCollectionDeleted$1: EventDefinition<ProductCollectionDeletedEnvelope, "com.wix.ecommerce.catalog.api.v1.CollectionDeleted">;
3338
+ declare const onProductVariantsChanged$1: EventDefinition<ProductVariantsChangedEnvelope, "com.wix.ecommerce.catalog.api.v1.VariantsChanged">;
3289
3339
 
3290
- declare function createEventModule$7<T extends EventDefinition$7<any, string>>(eventDefinition: T): BuildEventDefinition$7<T> & T;
3340
+ declare function createEventModule$7<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
3291
3341
 
3292
3342
  declare const createProduct$2: MaybeContext<BuildRESTFunction<typeof createProduct$3> & typeof createProduct$3>;
3293
3343
  declare const updateProduct$2: MaybeContext<BuildRESTFunction<typeof updateProduct$3> & typeof updateProduct$3>;
@@ -4411,29 +4461,11 @@ interface BulkDeleteBrandsSignature {
4411
4461
  */
4412
4462
  (brandIds: string[]): Promise<BulkDeleteBrandsResponse & BulkDeleteBrandsResponseNonNullableFields>;
4413
4463
  }
4414
- declare const onBrandCreated$1: EventDefinition$8<BrandCreatedEnvelope, "wix.stores.catalog.v3.brand_created">;
4415
- declare const onBrandUpdated$1: EventDefinition$8<BrandUpdatedEnvelope, "wix.stores.catalog.v3.brand_updated">;
4416
- declare const onBrandDeleted$1: EventDefinition$8<BrandDeletedEnvelope, "wix.stores.catalog.v3.brand_deleted">;
4417
-
4418
- type EventDefinition$6<Payload = unknown, Type extends string = string> = {
4419
- __type: 'event-definition';
4420
- type: Type;
4421
- isDomainEvent?: boolean;
4422
- transformations?: (envelope: unknown) => Payload;
4423
- __payload: Payload;
4424
- };
4425
- declare function EventDefinition$6<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$6<Payload, Type>;
4426
- type EventHandler$6<T extends EventDefinition$6> = (payload: T['__payload']) => void | Promise<void>;
4427
- type BuildEventDefinition$6<T extends EventDefinition$6<any, string>> = (handler: EventHandler$6<T>) => void;
4428
-
4429
- declare global {
4430
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
4431
- interface SymbolConstructor {
4432
- readonly observable: symbol;
4433
- }
4434
- }
4464
+ declare const onBrandCreated$1: EventDefinition<BrandCreatedEnvelope, "wix.stores.catalog.v3.brand_created">;
4465
+ declare const onBrandUpdated$1: EventDefinition<BrandUpdatedEnvelope, "wix.stores.catalog.v3.brand_updated">;
4466
+ declare const onBrandDeleted$1: EventDefinition<BrandDeletedEnvelope, "wix.stores.catalog.v3.brand_deleted">;
4435
4467
 
4436
- declare function createEventModule$6<T extends EventDefinition$6<any, string>>(eventDefinition: T): BuildEventDefinition$6<T> & T;
4468
+ declare function createEventModule$6<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
4437
4469
 
4438
4470
  declare const createBrand: MaybeContext<BuildRESTFunction<typeof createBrand$1> & typeof createBrand$1>;
4439
4471
  declare const getBrand: MaybeContext<BuildRESTFunction<typeof getBrand$1> & typeof getBrand$1>;
@@ -5608,29 +5640,11 @@ interface BulkUpdateCustomizationsSignature {
5608
5640
  */
5609
5641
  (customizations: MaskedCustomization[], options?: BulkUpdateCustomizationsOptions | undefined): Promise<BulkUpdateCustomizationsResponse & BulkUpdateCustomizationsResponseNonNullableFields>;
5610
5642
  }
5611
- declare const onCustomizationCreated$1: EventDefinition$8<CustomizationCreatedEnvelope, "wix.stores.catalog.v3.customization_created">;
5612
- declare const onCustomizationUpdated$1: EventDefinition$8<CustomizationUpdatedEnvelope, "wix.stores.catalog.v3.customization_updated">;
5613
- declare const onCustomizationDeleted$1: EventDefinition$8<CustomizationDeletedEnvelope, "wix.stores.catalog.v3.customization_deleted">;
5643
+ declare const onCustomizationCreated$1: EventDefinition<CustomizationCreatedEnvelope, "wix.stores.catalog.v3.customization_created">;
5644
+ declare const onCustomizationUpdated$1: EventDefinition<CustomizationUpdatedEnvelope, "wix.stores.catalog.v3.customization_updated">;
5645
+ declare const onCustomizationDeleted$1: EventDefinition<CustomizationDeletedEnvelope, "wix.stores.catalog.v3.customization_deleted">;
5614
5646
 
5615
- type EventDefinition$5<Payload = unknown, Type extends string = string> = {
5616
- __type: 'event-definition';
5617
- type: Type;
5618
- isDomainEvent?: boolean;
5619
- transformations?: (envelope: unknown) => Payload;
5620
- __payload: Payload;
5621
- };
5622
- declare function EventDefinition$5<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$5<Payload, Type>;
5623
- type EventHandler$5<T extends EventDefinition$5> = (payload: T['__payload']) => void | Promise<void>;
5624
- type BuildEventDefinition$5<T extends EventDefinition$5<any, string>> = (handler: EventHandler$5<T>) => void;
5625
-
5626
- declare global {
5627
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
5628
- interface SymbolConstructor {
5629
- readonly observable: symbol;
5630
- }
5631
- }
5632
-
5633
- declare function createEventModule$5<T extends EventDefinition$5<any, string>>(eventDefinition: T): BuildEventDefinition$5<T> & T;
5647
+ declare function createEventModule$5<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
5634
5648
 
5635
5649
  declare const createCustomization: MaybeContext<BuildRESTFunction<typeof createCustomization$1> & typeof createCustomization$1>;
5636
5650
  declare const getCustomization: MaybeContext<BuildRESTFunction<typeof getCustomization$1> & typeof getCustomization$1>;
@@ -8151,29 +8165,11 @@ interface BulkDeleteInfoSectionsSignature {
8151
8165
  */
8152
8166
  (infoSectionIds: string[]): Promise<BulkDeleteInfoSectionsResponse & BulkDeleteInfoSectionsResponseNonNullableFields>;
8153
8167
  }
8154
- declare const onInfoSectionCreated$1: EventDefinition$8<InfoSectionCreatedEnvelope, "wix.stores.catalog.v3.info_section_created">;
8155
- declare const onInfoSectionUpdated$1: EventDefinition$8<InfoSectionUpdatedEnvelope, "wix.stores.catalog.v3.info_section_updated">;
8156
- declare const onInfoSectionDeleted$1: EventDefinition$8<InfoSectionDeletedEnvelope, "wix.stores.catalog.v3.info_section_deleted">;
8157
-
8158
- type EventDefinition$4<Payload = unknown, Type extends string = string> = {
8159
- __type: 'event-definition';
8160
- type: Type;
8161
- isDomainEvent?: boolean;
8162
- transformations?: (envelope: unknown) => Payload;
8163
- __payload: Payload;
8164
- };
8165
- declare function EventDefinition$4<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$4<Payload, Type>;
8166
- type EventHandler$4<T extends EventDefinition$4> = (payload: T['__payload']) => void | Promise<void>;
8167
- type BuildEventDefinition$4<T extends EventDefinition$4<any, string>> = (handler: EventHandler$4<T>) => void;
8168
-
8169
- declare global {
8170
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
8171
- interface SymbolConstructor {
8172
- readonly observable: symbol;
8173
- }
8174
- }
8168
+ declare const onInfoSectionCreated$1: EventDefinition<InfoSectionCreatedEnvelope, "wix.stores.catalog.v3.info_section_created">;
8169
+ declare const onInfoSectionUpdated$1: EventDefinition<InfoSectionUpdatedEnvelope, "wix.stores.catalog.v3.info_section_updated">;
8170
+ declare const onInfoSectionDeleted$1: EventDefinition<InfoSectionDeletedEnvelope, "wix.stores.catalog.v3.info_section_deleted">;
8175
8171
 
8176
- declare function createEventModule$4<T extends EventDefinition$4<any, string>>(eventDefinition: T): BuildEventDefinition$4<T> & T;
8172
+ declare function createEventModule$4<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
8177
8173
 
8178
8174
  declare const createInfoSection: MaybeContext<BuildRESTFunction<typeof createInfoSection$1> & typeof createInfoSection$1>;
8179
8175
  declare const getInfoSection: MaybeContext<BuildRESTFunction<typeof getInfoSection$1> & typeof getInfoSection$1>;
@@ -10112,31 +10108,13 @@ interface BulkIncrementInventoryItemsByVariantAndLocationSignature {
10112
10108
  */
10113
10109
  (incrementData: IncrementDataByVariantAndLocation[], options?: BulkIncrementInventoryItemsByVariantAndLocationOptions | undefined): Promise<BulkIncrementInventoryItemsByVariantAndLocationResponse & BulkIncrementInventoryItemsByVariantAndLocationResponseNonNullableFields>;
10114
10110
  }
10115
- declare const onInventoryItemCreated$1: EventDefinition$8<InventoryItemCreatedEnvelope, "wix.stores.catalog.v3.inventory_item_created">;
10116
- declare const onInventoryItemUpdated$1: EventDefinition$8<InventoryItemUpdatedEnvelope, "wix.stores.catalog.v3.inventory_item_updated">;
10117
- declare const onInventoryItemStockStatusUpdated$1: EventDefinition$8<InventoryItemStockStatusUpdatedEnvelope, "wix.stores.catalog.v3.inventory_item_stock_status_updated">;
10118
- declare const onInventoryItemUpdatedWithReason$1: EventDefinition$8<InventoryItemUpdatedWithReasonEnvelope, "wix.stores.catalog.v3.inventory_item_updated_with_reason">;
10119
- declare const onInventoryItemDeleted$1: EventDefinition$8<InventoryItemDeletedEnvelope, "wix.stores.catalog.v3.inventory_item_deleted">;
10120
-
10121
- type EventDefinition$3<Payload = unknown, Type extends string = string> = {
10122
- __type: 'event-definition';
10123
- type: Type;
10124
- isDomainEvent?: boolean;
10125
- transformations?: (envelope: unknown) => Payload;
10126
- __payload: Payload;
10127
- };
10128
- declare function EventDefinition$3<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$3<Payload, Type>;
10129
- type EventHandler$3<T extends EventDefinition$3> = (payload: T['__payload']) => void | Promise<void>;
10130
- type BuildEventDefinition$3<T extends EventDefinition$3<any, string>> = (handler: EventHandler$3<T>) => void;
10131
-
10132
- declare global {
10133
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
10134
- interface SymbolConstructor {
10135
- readonly observable: symbol;
10136
- }
10137
- }
10111
+ declare const onInventoryItemCreated$1: EventDefinition<InventoryItemCreatedEnvelope, "wix.stores.catalog.v3.inventory_item_created">;
10112
+ declare const onInventoryItemUpdated$1: EventDefinition<InventoryItemUpdatedEnvelope, "wix.stores.catalog.v3.inventory_item_updated">;
10113
+ declare const onInventoryItemStockStatusUpdated$1: EventDefinition<InventoryItemStockStatusUpdatedEnvelope, "wix.stores.catalog.v3.inventory_item_stock_status_updated">;
10114
+ declare const onInventoryItemUpdatedWithReason$1: EventDefinition<InventoryItemUpdatedWithReasonEnvelope, "wix.stores.catalog.v3.inventory_item_updated_with_reason">;
10115
+ declare const onInventoryItemDeleted$1: EventDefinition<InventoryItemDeletedEnvelope, "wix.stores.catalog.v3.inventory_item_deleted">;
10138
10116
 
10139
- declare function createEventModule$3<T extends EventDefinition$3<any, string>>(eventDefinition: T): BuildEventDefinition$3<T> & T;
10117
+ declare function createEventModule$3<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
10140
10118
 
10141
10119
  declare const createInventoryItem: MaybeContext<BuildRESTFunction<typeof createInventoryItem$1> & typeof createInventoryItem$1>;
10142
10120
  declare const bulkCreateInventoryItems: MaybeContext<BuildRESTFunction<typeof bulkCreateInventoryItems$1> & typeof bulkCreateInventoryItems$1>;
@@ -11846,7 +11824,7 @@ interface Keyword {
11846
11824
  term?: string;
11847
11825
  /** Whether the keyword is the main focus keyword. */
11848
11826
  isMain?: boolean;
11849
- /** Who added the keyword to the settings */
11827
+ /** The source that added the keyword terms to the SEO settings. */
11850
11828
  origin?: string | null;
11851
11829
  }
11852
11830
  interface Tag {
@@ -17230,29 +17208,11 @@ interface BulkRemoveProductsFromCategoriesByFilterSignature {
17230
17208
  */
17231
17209
  (options?: BulkRemoveProductsFromCategoriesByFilterOptions | undefined): Promise<BulkRemoveProductsFromCategoriesByFilterResponse & BulkRemoveProductsFromCategoriesByFilterResponseNonNullableFields>;
17232
17210
  }
17233
- declare const onProductCreated$1: EventDefinition$8<ProductCreatedEnvelope, "wix.stores.catalog.v3.product_created">;
17234
- declare const onProductUpdated$1: EventDefinition$8<ProductUpdatedEnvelope, "wix.stores.catalog.v3.product_updated">;
17235
- declare const onProductDeleted$1: EventDefinition$8<ProductDeletedEnvelope, "wix.stores.catalog.v3.product_deleted">;
17211
+ declare const onProductCreated$1: EventDefinition<ProductCreatedEnvelope, "wix.stores.catalog.v3.product_created">;
17212
+ declare const onProductUpdated$1: EventDefinition<ProductUpdatedEnvelope, "wix.stores.catalog.v3.product_updated">;
17213
+ declare const onProductDeleted$1: EventDefinition<ProductDeletedEnvelope, "wix.stores.catalog.v3.product_deleted">;
17236
17214
 
17237
- type EventDefinition$2<Payload = unknown, Type extends string = string> = {
17238
- __type: 'event-definition';
17239
- type: Type;
17240
- isDomainEvent?: boolean;
17241
- transformations?: (envelope: unknown) => Payload;
17242
- __payload: Payload;
17243
- };
17244
- declare function EventDefinition$2<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$2<Payload, Type>;
17245
- type EventHandler$2<T extends EventDefinition$2> = (payload: T['__payload']) => void | Promise<void>;
17246
- type BuildEventDefinition$2<T extends EventDefinition$2<any, string>> = (handler: EventHandler$2<T>) => void;
17247
-
17248
- declare global {
17249
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
17250
- interface SymbolConstructor {
17251
- readonly observable: symbol;
17252
- }
17253
- }
17254
-
17255
- declare function createEventModule$2<T extends EventDefinition$2<any, string>>(eventDefinition: T): BuildEventDefinition$2<T> & T;
17215
+ declare function createEventModule$2<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
17256
17216
 
17257
17217
  declare const createProduct: MaybeContext<BuildRESTFunction<typeof createProduct$1> & typeof createProduct$1>;
17258
17218
  declare const createProductWithInventory: MaybeContext<BuildRESTFunction<typeof createProductWithInventory$1> & typeof createProductWithInventory$1>;
@@ -19219,29 +19179,11 @@ interface BulkDeleteRibbonsSignature {
19219
19179
  */
19220
19180
  (ribbonIds: string[]): Promise<BulkDeleteRibbonsResponse & BulkDeleteRibbonsResponseNonNullableFields>;
19221
19181
  }
19222
- declare const onRibbonCreated$1: EventDefinition$8<RibbonCreatedEnvelope, "wix.stores.catalog.v3.ribbon_created">;
19223
- declare const onRibbonUpdated$1: EventDefinition$8<RibbonUpdatedEnvelope, "wix.stores.catalog.v3.ribbon_updated">;
19224
- declare const onRibbonDeleted$1: EventDefinition$8<RibbonDeletedEnvelope, "wix.stores.catalog.v3.ribbon_deleted">;
19225
-
19226
- type EventDefinition$1<Payload = unknown, Type extends string = string> = {
19227
- __type: 'event-definition';
19228
- type: Type;
19229
- isDomainEvent?: boolean;
19230
- transformations?: (envelope: unknown) => Payload;
19231
- __payload: Payload;
19232
- };
19233
- declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
19234
- type EventHandler$1<T extends EventDefinition$1> = (payload: T['__payload']) => void | Promise<void>;
19235
- type BuildEventDefinition$1<T extends EventDefinition$1<any, string>> = (handler: EventHandler$1<T>) => void;
19182
+ declare const onRibbonCreated$1: EventDefinition<RibbonCreatedEnvelope, "wix.stores.catalog.v3.ribbon_created">;
19183
+ declare const onRibbonUpdated$1: EventDefinition<RibbonUpdatedEnvelope, "wix.stores.catalog.v3.ribbon_updated">;
19184
+ declare const onRibbonDeleted$1: EventDefinition<RibbonDeletedEnvelope, "wix.stores.catalog.v3.ribbon_deleted">;
19236
19185
 
19237
- declare global {
19238
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
19239
- interface SymbolConstructor {
19240
- readonly observable: symbol;
19241
- }
19242
- }
19243
-
19244
- declare function createEventModule$1<T extends EventDefinition$1<any, string>>(eventDefinition: T): BuildEventDefinition$1<T> & T;
19186
+ declare function createEventModule$1<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
19245
19187
 
19246
19188
  declare const createRibbon: MaybeContext<BuildRESTFunction<typeof createRibbon$1> & typeof createRibbon$1>;
19247
19189
  declare const getRibbon: MaybeContext<BuildRESTFunction<typeof getRibbon$1> & typeof getRibbon$1>;
@@ -20949,26 +20891,8 @@ interface IncrementInventorySignature {
20949
20891
  */
20950
20892
  (incrementData: IncrementData[]): Promise<void>;
20951
20893
  }
20952
- declare const onInventoryItemChanged$1: EventDefinition$8<InventoryItemChangedEnvelope, "com.wix.ecommerce.inventory.api.v1.InventoryItemChanged">;
20953
- declare const onInventoryVariantsChanged$1: EventDefinition$8<InventoryVariantsChangedEnvelope, "com.wix.ecommerce.inventory.api.v1.InventoryVariantsChanged">;
20954
-
20955
- type EventDefinition<Payload = unknown, Type extends string = string> = {
20956
- __type: 'event-definition';
20957
- type: Type;
20958
- isDomainEvent?: boolean;
20959
- transformations?: (envelope: unknown) => Payload;
20960
- __payload: Payload;
20961
- };
20962
- declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
20963
- type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
20964
- type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
20965
-
20966
- declare global {
20967
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
20968
- interface SymbolConstructor {
20969
- readonly observable: symbol;
20970
- }
20971
- }
20894
+ declare const onInventoryItemChanged$1: EventDefinition<InventoryItemChangedEnvelope, "com.wix.ecommerce.inventory.api.v1.InventoryItemChanged">;
20895
+ declare const onInventoryVariantsChanged$1: EventDefinition<InventoryVariantsChangedEnvelope, "com.wix.ecommerce.inventory.api.v1.InventoryVariantsChanged">;
20972
20896
 
20973
20897
  declare function createEventModule<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
20974
20898
 
@@ -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$8<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$8<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$8<Payload, Type>;
74
- type EventHandler$8<T extends EventDefinition$8> = (payload: T['__payload']) => void | Promise<void>;
75
- type BuildEventDefinition$8<T extends EventDefinition$8<any, string>> = (handler: EventHandler$8<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$8<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$8<any> ? BuildEventDefinition$8<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,
@@ -692,7 +760,7 @@ interface Keyword$2 {
692
760
  term?: string;
693
761
  /** Whether the keyword is the main focus keyword. */
694
762
  isMain?: boolean;
695
- /** Who added the keyword to the settings */
763
+ /** The source that added the keyword terms to the SEO settings. */
696
764
  origin?: string | null;
697
765
  }
698
766
  interface Tag$2 {
@@ -1406,7 +1474,7 @@ interface Keyword$1 {
1406
1474
  term?: string;
1407
1475
  /** Whether the keyword is the main focus keyword. */
1408
1476
  isMain?: boolean;
1409
- /** Who added the keyword to the settings */
1477
+ /** The source that added the keyword terms to the SEO settings. */
1410
1478
  origin?: string | null;
1411
1479
  }
1412
1480
  interface Tag$1 {
@@ -3261,33 +3329,15 @@ interface GetStoreVariantSignature {
3261
3329
  */
3262
3330
  (_id: string): Promise<GetStoreVariantResponse & GetStoreVariantResponseNonNullableFields>;
3263
3331
  }
3264
- declare const onProductCreated$3: EventDefinition$8<ProductCreatedEnvelope$1, "com.wix.ecommerce.catalog.api.v1.ProductCreated">;
3265
- declare const onProductChanged$1: EventDefinition$8<ProductChangedEnvelope, "com.wix.ecommerce.catalog.api.v1.ProductChanged">;
3266
- declare const onProductDeleted$3: EventDefinition$8<ProductDeletedEnvelope$1, "com.wix.ecommerce.catalog.api.v1.ProductDeleted">;
3267
- declare const onProductCollectionCreated$1: EventDefinition$8<ProductCollectionCreatedEnvelope, "com.wix.ecommerce.catalog.api.v1.CollectionCreated">;
3268
- declare const onProductCollectionChanged$1: EventDefinition$8<ProductCollectionChangedEnvelope, "com.wix.ecommerce.catalog.api.v1.CollectionChanged">;
3269
- declare const onProductCollectionDeleted$1: EventDefinition$8<ProductCollectionDeletedEnvelope, "com.wix.ecommerce.catalog.api.v1.CollectionDeleted">;
3270
- declare const onProductVariantsChanged$1: EventDefinition$8<ProductVariantsChangedEnvelope, "com.wix.ecommerce.catalog.api.v1.VariantsChanged">;
3271
-
3272
- type EventDefinition$7<Payload = unknown, Type extends string = string> = {
3273
- __type: 'event-definition';
3274
- type: Type;
3275
- isDomainEvent?: boolean;
3276
- transformations?: (envelope: unknown) => Payload;
3277
- __payload: Payload;
3278
- };
3279
- declare function EventDefinition$7<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$7<Payload, Type>;
3280
- type EventHandler$7<T extends EventDefinition$7> = (payload: T['__payload']) => void | Promise<void>;
3281
- type BuildEventDefinition$7<T extends EventDefinition$7<any, string>> = (handler: EventHandler$7<T>) => void;
3282
-
3283
- declare global {
3284
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
3285
- interface SymbolConstructor {
3286
- readonly observable: symbol;
3287
- }
3288
- }
3332
+ declare const onProductCreated$3: EventDefinition<ProductCreatedEnvelope$1, "com.wix.ecommerce.catalog.api.v1.ProductCreated">;
3333
+ declare const onProductChanged$1: EventDefinition<ProductChangedEnvelope, "com.wix.ecommerce.catalog.api.v1.ProductChanged">;
3334
+ declare const onProductDeleted$3: EventDefinition<ProductDeletedEnvelope$1, "com.wix.ecommerce.catalog.api.v1.ProductDeleted">;
3335
+ declare const onProductCollectionCreated$1: EventDefinition<ProductCollectionCreatedEnvelope, "com.wix.ecommerce.catalog.api.v1.CollectionCreated">;
3336
+ declare const onProductCollectionChanged$1: EventDefinition<ProductCollectionChangedEnvelope, "com.wix.ecommerce.catalog.api.v1.CollectionChanged">;
3337
+ declare const onProductCollectionDeleted$1: EventDefinition<ProductCollectionDeletedEnvelope, "com.wix.ecommerce.catalog.api.v1.CollectionDeleted">;
3338
+ declare const onProductVariantsChanged$1: EventDefinition<ProductVariantsChangedEnvelope, "com.wix.ecommerce.catalog.api.v1.VariantsChanged">;
3289
3339
 
3290
- declare function createEventModule$7<T extends EventDefinition$7<any, string>>(eventDefinition: T): BuildEventDefinition$7<T> & T;
3340
+ declare function createEventModule$7<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
3291
3341
 
3292
3342
  declare const createProduct$2: MaybeContext<BuildRESTFunction<typeof createProduct$3> & typeof createProduct$3>;
3293
3343
  declare const updateProduct$2: MaybeContext<BuildRESTFunction<typeof updateProduct$3> & typeof updateProduct$3>;
@@ -4411,29 +4461,11 @@ interface BulkDeleteBrandsSignature {
4411
4461
  */
4412
4462
  (brandIds: string[]): Promise<BulkDeleteBrandsResponse & BulkDeleteBrandsResponseNonNullableFields>;
4413
4463
  }
4414
- declare const onBrandCreated$1: EventDefinition$8<BrandCreatedEnvelope, "wix.stores.catalog.v3.brand_created">;
4415
- declare const onBrandUpdated$1: EventDefinition$8<BrandUpdatedEnvelope, "wix.stores.catalog.v3.brand_updated">;
4416
- declare const onBrandDeleted$1: EventDefinition$8<BrandDeletedEnvelope, "wix.stores.catalog.v3.brand_deleted">;
4417
-
4418
- type EventDefinition$6<Payload = unknown, Type extends string = string> = {
4419
- __type: 'event-definition';
4420
- type: Type;
4421
- isDomainEvent?: boolean;
4422
- transformations?: (envelope: unknown) => Payload;
4423
- __payload: Payload;
4424
- };
4425
- declare function EventDefinition$6<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$6<Payload, Type>;
4426
- type EventHandler$6<T extends EventDefinition$6> = (payload: T['__payload']) => void | Promise<void>;
4427
- type BuildEventDefinition$6<T extends EventDefinition$6<any, string>> = (handler: EventHandler$6<T>) => void;
4428
-
4429
- declare global {
4430
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
4431
- interface SymbolConstructor {
4432
- readonly observable: symbol;
4433
- }
4434
- }
4464
+ declare const onBrandCreated$1: EventDefinition<BrandCreatedEnvelope, "wix.stores.catalog.v3.brand_created">;
4465
+ declare const onBrandUpdated$1: EventDefinition<BrandUpdatedEnvelope, "wix.stores.catalog.v3.brand_updated">;
4466
+ declare const onBrandDeleted$1: EventDefinition<BrandDeletedEnvelope, "wix.stores.catalog.v3.brand_deleted">;
4435
4467
 
4436
- declare function createEventModule$6<T extends EventDefinition$6<any, string>>(eventDefinition: T): BuildEventDefinition$6<T> & T;
4468
+ declare function createEventModule$6<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
4437
4469
 
4438
4470
  declare const createBrand: MaybeContext<BuildRESTFunction<typeof createBrand$1> & typeof createBrand$1>;
4439
4471
  declare const getBrand: MaybeContext<BuildRESTFunction<typeof getBrand$1> & typeof getBrand$1>;
@@ -5608,29 +5640,11 @@ interface BulkUpdateCustomizationsSignature {
5608
5640
  */
5609
5641
  (customizations: MaskedCustomization[], options?: BulkUpdateCustomizationsOptions | undefined): Promise<BulkUpdateCustomizationsResponse & BulkUpdateCustomizationsResponseNonNullableFields>;
5610
5642
  }
5611
- declare const onCustomizationCreated$1: EventDefinition$8<CustomizationCreatedEnvelope, "wix.stores.catalog.v3.customization_created">;
5612
- declare const onCustomizationUpdated$1: EventDefinition$8<CustomizationUpdatedEnvelope, "wix.stores.catalog.v3.customization_updated">;
5613
- declare const onCustomizationDeleted$1: EventDefinition$8<CustomizationDeletedEnvelope, "wix.stores.catalog.v3.customization_deleted">;
5643
+ declare const onCustomizationCreated$1: EventDefinition<CustomizationCreatedEnvelope, "wix.stores.catalog.v3.customization_created">;
5644
+ declare const onCustomizationUpdated$1: EventDefinition<CustomizationUpdatedEnvelope, "wix.stores.catalog.v3.customization_updated">;
5645
+ declare const onCustomizationDeleted$1: EventDefinition<CustomizationDeletedEnvelope, "wix.stores.catalog.v3.customization_deleted">;
5614
5646
 
5615
- type EventDefinition$5<Payload = unknown, Type extends string = string> = {
5616
- __type: 'event-definition';
5617
- type: Type;
5618
- isDomainEvent?: boolean;
5619
- transformations?: (envelope: unknown) => Payload;
5620
- __payload: Payload;
5621
- };
5622
- declare function EventDefinition$5<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$5<Payload, Type>;
5623
- type EventHandler$5<T extends EventDefinition$5> = (payload: T['__payload']) => void | Promise<void>;
5624
- type BuildEventDefinition$5<T extends EventDefinition$5<any, string>> = (handler: EventHandler$5<T>) => void;
5625
-
5626
- declare global {
5627
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
5628
- interface SymbolConstructor {
5629
- readonly observable: symbol;
5630
- }
5631
- }
5632
-
5633
- declare function createEventModule$5<T extends EventDefinition$5<any, string>>(eventDefinition: T): BuildEventDefinition$5<T> & T;
5647
+ declare function createEventModule$5<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
5634
5648
 
5635
5649
  declare const createCustomization: MaybeContext<BuildRESTFunction<typeof createCustomization$1> & typeof createCustomization$1>;
5636
5650
  declare const getCustomization: MaybeContext<BuildRESTFunction<typeof getCustomization$1> & typeof getCustomization$1>;
@@ -8151,29 +8165,11 @@ interface BulkDeleteInfoSectionsSignature {
8151
8165
  */
8152
8166
  (infoSectionIds: string[]): Promise<BulkDeleteInfoSectionsResponse & BulkDeleteInfoSectionsResponseNonNullableFields>;
8153
8167
  }
8154
- declare const onInfoSectionCreated$1: EventDefinition$8<InfoSectionCreatedEnvelope, "wix.stores.catalog.v3.info_section_created">;
8155
- declare const onInfoSectionUpdated$1: EventDefinition$8<InfoSectionUpdatedEnvelope, "wix.stores.catalog.v3.info_section_updated">;
8156
- declare const onInfoSectionDeleted$1: EventDefinition$8<InfoSectionDeletedEnvelope, "wix.stores.catalog.v3.info_section_deleted">;
8157
-
8158
- type EventDefinition$4<Payload = unknown, Type extends string = string> = {
8159
- __type: 'event-definition';
8160
- type: Type;
8161
- isDomainEvent?: boolean;
8162
- transformations?: (envelope: unknown) => Payload;
8163
- __payload: Payload;
8164
- };
8165
- declare function EventDefinition$4<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$4<Payload, Type>;
8166
- type EventHandler$4<T extends EventDefinition$4> = (payload: T['__payload']) => void | Promise<void>;
8167
- type BuildEventDefinition$4<T extends EventDefinition$4<any, string>> = (handler: EventHandler$4<T>) => void;
8168
-
8169
- declare global {
8170
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
8171
- interface SymbolConstructor {
8172
- readonly observable: symbol;
8173
- }
8174
- }
8168
+ declare const onInfoSectionCreated$1: EventDefinition<InfoSectionCreatedEnvelope, "wix.stores.catalog.v3.info_section_created">;
8169
+ declare const onInfoSectionUpdated$1: EventDefinition<InfoSectionUpdatedEnvelope, "wix.stores.catalog.v3.info_section_updated">;
8170
+ declare const onInfoSectionDeleted$1: EventDefinition<InfoSectionDeletedEnvelope, "wix.stores.catalog.v3.info_section_deleted">;
8175
8171
 
8176
- declare function createEventModule$4<T extends EventDefinition$4<any, string>>(eventDefinition: T): BuildEventDefinition$4<T> & T;
8172
+ declare function createEventModule$4<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
8177
8173
 
8178
8174
  declare const createInfoSection: MaybeContext<BuildRESTFunction<typeof createInfoSection$1> & typeof createInfoSection$1>;
8179
8175
  declare const getInfoSection: MaybeContext<BuildRESTFunction<typeof getInfoSection$1> & typeof getInfoSection$1>;
@@ -10112,31 +10108,13 @@ interface BulkIncrementInventoryItemsByVariantAndLocationSignature {
10112
10108
  */
10113
10109
  (incrementData: IncrementDataByVariantAndLocation[], options?: BulkIncrementInventoryItemsByVariantAndLocationOptions | undefined): Promise<BulkIncrementInventoryItemsByVariantAndLocationResponse & BulkIncrementInventoryItemsByVariantAndLocationResponseNonNullableFields>;
10114
10110
  }
10115
- declare const onInventoryItemCreated$1: EventDefinition$8<InventoryItemCreatedEnvelope, "wix.stores.catalog.v3.inventory_item_created">;
10116
- declare const onInventoryItemUpdated$1: EventDefinition$8<InventoryItemUpdatedEnvelope, "wix.stores.catalog.v3.inventory_item_updated">;
10117
- declare const onInventoryItemStockStatusUpdated$1: EventDefinition$8<InventoryItemStockStatusUpdatedEnvelope, "wix.stores.catalog.v3.inventory_item_stock_status_updated">;
10118
- declare const onInventoryItemUpdatedWithReason$1: EventDefinition$8<InventoryItemUpdatedWithReasonEnvelope, "wix.stores.catalog.v3.inventory_item_updated_with_reason">;
10119
- declare const onInventoryItemDeleted$1: EventDefinition$8<InventoryItemDeletedEnvelope, "wix.stores.catalog.v3.inventory_item_deleted">;
10120
-
10121
- type EventDefinition$3<Payload = unknown, Type extends string = string> = {
10122
- __type: 'event-definition';
10123
- type: Type;
10124
- isDomainEvent?: boolean;
10125
- transformations?: (envelope: unknown) => Payload;
10126
- __payload: Payload;
10127
- };
10128
- declare function EventDefinition$3<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$3<Payload, Type>;
10129
- type EventHandler$3<T extends EventDefinition$3> = (payload: T['__payload']) => void | Promise<void>;
10130
- type BuildEventDefinition$3<T extends EventDefinition$3<any, string>> = (handler: EventHandler$3<T>) => void;
10131
-
10132
- declare global {
10133
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
10134
- interface SymbolConstructor {
10135
- readonly observable: symbol;
10136
- }
10137
- }
10111
+ declare const onInventoryItemCreated$1: EventDefinition<InventoryItemCreatedEnvelope, "wix.stores.catalog.v3.inventory_item_created">;
10112
+ declare const onInventoryItemUpdated$1: EventDefinition<InventoryItemUpdatedEnvelope, "wix.stores.catalog.v3.inventory_item_updated">;
10113
+ declare const onInventoryItemStockStatusUpdated$1: EventDefinition<InventoryItemStockStatusUpdatedEnvelope, "wix.stores.catalog.v3.inventory_item_stock_status_updated">;
10114
+ declare const onInventoryItemUpdatedWithReason$1: EventDefinition<InventoryItemUpdatedWithReasonEnvelope, "wix.stores.catalog.v3.inventory_item_updated_with_reason">;
10115
+ declare const onInventoryItemDeleted$1: EventDefinition<InventoryItemDeletedEnvelope, "wix.stores.catalog.v3.inventory_item_deleted">;
10138
10116
 
10139
- declare function createEventModule$3<T extends EventDefinition$3<any, string>>(eventDefinition: T): BuildEventDefinition$3<T> & T;
10117
+ declare function createEventModule$3<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
10140
10118
 
10141
10119
  declare const createInventoryItem: MaybeContext<BuildRESTFunction<typeof createInventoryItem$1> & typeof createInventoryItem$1>;
10142
10120
  declare const bulkCreateInventoryItems: MaybeContext<BuildRESTFunction<typeof bulkCreateInventoryItems$1> & typeof bulkCreateInventoryItems$1>;
@@ -11846,7 +11824,7 @@ interface Keyword {
11846
11824
  term?: string;
11847
11825
  /** Whether the keyword is the main focus keyword. */
11848
11826
  isMain?: boolean;
11849
- /** Who added the keyword to the settings */
11827
+ /** The source that added the keyword terms to the SEO settings. */
11850
11828
  origin?: string | null;
11851
11829
  }
11852
11830
  interface Tag {
@@ -17230,29 +17208,11 @@ interface BulkRemoveProductsFromCategoriesByFilterSignature {
17230
17208
  */
17231
17209
  (options?: BulkRemoveProductsFromCategoriesByFilterOptions | undefined): Promise<BulkRemoveProductsFromCategoriesByFilterResponse & BulkRemoveProductsFromCategoriesByFilterResponseNonNullableFields>;
17232
17210
  }
17233
- declare const onProductCreated$1: EventDefinition$8<ProductCreatedEnvelope, "wix.stores.catalog.v3.product_created">;
17234
- declare const onProductUpdated$1: EventDefinition$8<ProductUpdatedEnvelope, "wix.stores.catalog.v3.product_updated">;
17235
- declare const onProductDeleted$1: EventDefinition$8<ProductDeletedEnvelope, "wix.stores.catalog.v3.product_deleted">;
17211
+ declare const onProductCreated$1: EventDefinition<ProductCreatedEnvelope, "wix.stores.catalog.v3.product_created">;
17212
+ declare const onProductUpdated$1: EventDefinition<ProductUpdatedEnvelope, "wix.stores.catalog.v3.product_updated">;
17213
+ declare const onProductDeleted$1: EventDefinition<ProductDeletedEnvelope, "wix.stores.catalog.v3.product_deleted">;
17236
17214
 
17237
- type EventDefinition$2<Payload = unknown, Type extends string = string> = {
17238
- __type: 'event-definition';
17239
- type: Type;
17240
- isDomainEvent?: boolean;
17241
- transformations?: (envelope: unknown) => Payload;
17242
- __payload: Payload;
17243
- };
17244
- declare function EventDefinition$2<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$2<Payload, Type>;
17245
- type EventHandler$2<T extends EventDefinition$2> = (payload: T['__payload']) => void | Promise<void>;
17246
- type BuildEventDefinition$2<T extends EventDefinition$2<any, string>> = (handler: EventHandler$2<T>) => void;
17247
-
17248
- declare global {
17249
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
17250
- interface SymbolConstructor {
17251
- readonly observable: symbol;
17252
- }
17253
- }
17254
-
17255
- declare function createEventModule$2<T extends EventDefinition$2<any, string>>(eventDefinition: T): BuildEventDefinition$2<T> & T;
17215
+ declare function createEventModule$2<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
17256
17216
 
17257
17217
  declare const createProduct: MaybeContext<BuildRESTFunction<typeof createProduct$1> & typeof createProduct$1>;
17258
17218
  declare const createProductWithInventory: MaybeContext<BuildRESTFunction<typeof createProductWithInventory$1> & typeof createProductWithInventory$1>;
@@ -19219,29 +19179,11 @@ interface BulkDeleteRibbonsSignature {
19219
19179
  */
19220
19180
  (ribbonIds: string[]): Promise<BulkDeleteRibbonsResponse & BulkDeleteRibbonsResponseNonNullableFields>;
19221
19181
  }
19222
- declare const onRibbonCreated$1: EventDefinition$8<RibbonCreatedEnvelope, "wix.stores.catalog.v3.ribbon_created">;
19223
- declare const onRibbonUpdated$1: EventDefinition$8<RibbonUpdatedEnvelope, "wix.stores.catalog.v3.ribbon_updated">;
19224
- declare const onRibbonDeleted$1: EventDefinition$8<RibbonDeletedEnvelope, "wix.stores.catalog.v3.ribbon_deleted">;
19225
-
19226
- type EventDefinition$1<Payload = unknown, Type extends string = string> = {
19227
- __type: 'event-definition';
19228
- type: Type;
19229
- isDomainEvent?: boolean;
19230
- transformations?: (envelope: unknown) => Payload;
19231
- __payload: Payload;
19232
- };
19233
- declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
19234
- type EventHandler$1<T extends EventDefinition$1> = (payload: T['__payload']) => void | Promise<void>;
19235
- type BuildEventDefinition$1<T extends EventDefinition$1<any, string>> = (handler: EventHandler$1<T>) => void;
19182
+ declare const onRibbonCreated$1: EventDefinition<RibbonCreatedEnvelope, "wix.stores.catalog.v3.ribbon_created">;
19183
+ declare const onRibbonUpdated$1: EventDefinition<RibbonUpdatedEnvelope, "wix.stores.catalog.v3.ribbon_updated">;
19184
+ declare const onRibbonDeleted$1: EventDefinition<RibbonDeletedEnvelope, "wix.stores.catalog.v3.ribbon_deleted">;
19236
19185
 
19237
- declare global {
19238
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
19239
- interface SymbolConstructor {
19240
- readonly observable: symbol;
19241
- }
19242
- }
19243
-
19244
- declare function createEventModule$1<T extends EventDefinition$1<any, string>>(eventDefinition: T): BuildEventDefinition$1<T> & T;
19186
+ declare function createEventModule$1<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
19245
19187
 
19246
19188
  declare const createRibbon: MaybeContext<BuildRESTFunction<typeof createRibbon$1> & typeof createRibbon$1>;
19247
19189
  declare const getRibbon: MaybeContext<BuildRESTFunction<typeof getRibbon$1> & typeof getRibbon$1>;
@@ -20949,26 +20891,8 @@ interface IncrementInventorySignature {
20949
20891
  */
20950
20892
  (incrementData: IncrementData[]): Promise<void>;
20951
20893
  }
20952
- declare const onInventoryItemChanged$1: EventDefinition$8<InventoryItemChangedEnvelope, "com.wix.ecommerce.inventory.api.v1.InventoryItemChanged">;
20953
- declare const onInventoryVariantsChanged$1: EventDefinition$8<InventoryVariantsChangedEnvelope, "com.wix.ecommerce.inventory.api.v1.InventoryVariantsChanged">;
20954
-
20955
- type EventDefinition<Payload = unknown, Type extends string = string> = {
20956
- __type: 'event-definition';
20957
- type: Type;
20958
- isDomainEvent?: boolean;
20959
- transformations?: (envelope: unknown) => Payload;
20960
- __payload: Payload;
20961
- };
20962
- declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
20963
- type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
20964
- type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
20965
-
20966
- declare global {
20967
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
20968
- interface SymbolConstructor {
20969
- readonly observable: symbol;
20970
- }
20971
- }
20894
+ declare const onInventoryItemChanged$1: EventDefinition<InventoryItemChangedEnvelope, "com.wix.ecommerce.inventory.api.v1.InventoryItemChanged">;
20895
+ declare const onInventoryVariantsChanged$1: EventDefinition<InventoryVariantsChangedEnvelope, "com.wix.ecommerce.inventory.api.v1.InventoryVariantsChanged">;
20972
20896
 
20973
20897
  declare function createEventModule<T extends EventDefinition<any, string>>(eventDefinition: T): BuildEventDefinition<T> & T;
20974
20898
 
@@ -1025,7 +1025,7 @@ interface Keyword$3 {
1025
1025
  term?: string;
1026
1026
  /** Whether the keyword is the main focus keyword. */
1027
1027
  isMain?: boolean;
1028
- /** Who added the keyword to the settings */
1028
+ /** The source that added the keyword terms to the SEO settings. */
1029
1029
  origin?: string | null;
1030
1030
  }
1031
1031
  interface Tag$3 {
@@ -2428,7 +2428,7 @@ interface Keyword$2 {
2428
2428
  term?: string;
2429
2429
  /** Whether the keyword is the main focus keyword. */
2430
2430
  isMain?: boolean;
2431
- /** Who added the keyword to the settings */
2431
+ /** The source that added the keyword terms to the SEO settings. */
2432
2432
  origin?: string | null;
2433
2433
  }
2434
2434
  interface Tag$2 {
@@ -12752,7 +12752,7 @@ interface Keyword$1 {
12752
12752
  term?: string;
12753
12753
  /** Whether the keyword is the main focus keyword. */
12754
12754
  isMain?: boolean;
12755
- /** Who added the keyword to the settings */
12755
+ /** The source that added the keyword terms to the SEO settings. */
12756
12756
  origin?: string | null;
12757
12757
  }
12758
12758
  interface Tag$1 {
@@ -17126,7 +17126,7 @@ interface Keyword {
17126
17126
  term?: string;
17127
17127
  /** Whether the keyword is the main focus keyword. */
17128
17128
  isMain?: boolean;
17129
- /** Who added the keyword to the settings */
17129
+ /** The source that added the keyword terms to the SEO settings. */
17130
17130
  origin?: string | null;
17131
17131
  }
17132
17132
  interface Tag {