@wix/stores 1.0.159 → 1.0.161

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.159",
3
+ "version": "1.0.161",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -18,14 +18,13 @@
18
18
  "type-bundles"
19
19
  ],
20
20
  "dependencies": {
21
- "@wix/stores_collections": "1.0.21",
22
- "@wix/stores_inventory": "1.0.23",
23
- "@wix/stores_products": "1.0.30",
24
- "@wix/stores_subscription-options": "1.0.18",
25
- "@wix/stores_wishlist": "1.0.17"
21
+ "@wix/stores_collections": "1.0.22",
22
+ "@wix/stores_inventory": "1.0.24",
23
+ "@wix/stores_products": "1.0.31",
24
+ "@wix/stores_subscription-options": "1.0.20",
25
+ "@wix/stores_wishlist": "1.0.18"
26
26
  },
27
27
  "devDependencies": {
28
- "@wix/sdk": "https://cdn.dev.wixpress.com/@wix/sdk/02e8069ab2fd783e0e6a080fc7d590e76cb26ab93c8389574286305b.tar.gz",
29
28
  "glob": "^10.4.1",
30
29
  "rollup": "^4.18.0",
31
30
  "rollup-plugin-dts": "^6.1.1",
@@ -47,5 +46,5 @@
47
46
  "fqdn": ""
48
47
  }
49
48
  },
50
- "falconPackageHash": "e984d779097895c4b0db8c2405d0f10b7c0d57879e16605a549df3cd"
49
+ "falconPackageHash": "7b8a533b25d82e61f5104753f57de2244c4a3490e12a40be33554f47"
51
50
  }
@@ -36,42 +36,40 @@ interface GetWishlistByIdOptions {
36
36
  kind?: WishlistItemKind[];
37
37
  }
38
38
 
39
- type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
40
- interface HttpClient {
41
- request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
39
+ type RESTFunctionDescriptor$4<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$4) => T;
40
+ interface HttpClient$4 {
41
+ request<TResponse, TData = any>(req: RequestOptionsFactory$4<TResponse, TData>): Promise<HttpResponse$4<TResponse>>;
42
+ fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
42
43
  }
43
- type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
44
- type HttpResponse<T = any> = {
44
+ type RequestOptionsFactory$4<TResponse = any, TData = any> = (context: any) => RequestOptions$4<TResponse, TData>;
45
+ type HttpResponse$4<T = any> = {
45
46
  data: T;
46
47
  status: number;
47
48
  statusText: string;
48
49
  headers: any;
49
50
  request?: any;
50
51
  };
51
- type RequestOptions<_TResponse = any, Data = any> = {
52
+ type RequestOptions$4<_TResponse = any, Data = any> = {
52
53
  method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
53
54
  url: string;
54
55
  data?: Data;
55
56
  params?: URLSearchParams;
56
- } & APIMetadata;
57
- type APIMetadata = {
57
+ } & APIMetadata$4;
58
+ type APIMetadata$4 = {
58
59
  methodFqn?: string;
59
60
  entityFqdn?: string;
60
61
  packageName?: string;
61
62
  };
62
- type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
63
- type EventDefinition<Payload = unknown, Type extends string = string> = {
64
- __type: 'event-definition';
65
- type: Type;
66
- isDomainEvent?: boolean;
67
- transformations?: unknown;
68
- __payload: Payload;
69
- };
70
- declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
71
- type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
72
- type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
63
+ type BuildRESTFunction$4<T extends RESTFunctionDescriptor$4> = T extends RESTFunctionDescriptor$4<infer U> ? U : never;
64
+
65
+ declare global {
66
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
67
+ interface SymbolConstructor {
68
+ readonly observable: symbol;
69
+ }
70
+ }
73
71
 
74
- declare function getWishlistById$1(httpClient: HttpClient): (_id: string, options?: GetWishlistByIdOptions) => Promise<WishlistData & {
72
+ declare function getWishlistById$1(httpClient: HttpClient$4): (_id: string, options?: GetWishlistByIdOptions) => Promise<WishlistData & {
75
73
  ownerId: string;
76
74
  items: {
77
75
  _id: string;
@@ -81,7 +79,7 @@ declare function getWishlistById$1(httpClient: HttpClient): (_id: string, option
81
79
  totalCount: number;
82
80
  }>;
83
81
 
84
- declare const getWishlistById: BuildRESTFunction<typeof getWishlistById$1>;
82
+ declare const getWishlistById: BuildRESTFunction$4<typeof getWishlistById$1>;
85
83
 
86
84
  declare const context$4_getWishlistById: typeof getWishlistById;
87
85
  declare namespace context$4 {
@@ -283,8 +281,41 @@ interface CollectionsQueryBuilder {
283
281
  find: () => Promise<CollectionsQueryResult>;
284
282
  }
285
283
 
286
- declare function queryCollections$1(httpClient: HttpClient): () => CollectionsQueryBuilder;
287
- declare function getCollection$1(httpClient: HttpClient): (_id: string) => Promise<Collection$1 & {
284
+ type RESTFunctionDescriptor$3<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$3) => T;
285
+ interface HttpClient$3 {
286
+ request<TResponse, TData = any>(req: RequestOptionsFactory$3<TResponse, TData>): Promise<HttpResponse$3<TResponse>>;
287
+ fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
288
+ }
289
+ type RequestOptionsFactory$3<TResponse = any, TData = any> = (context: any) => RequestOptions$3<TResponse, TData>;
290
+ type HttpResponse$3<T = any> = {
291
+ data: T;
292
+ status: number;
293
+ statusText: string;
294
+ headers: any;
295
+ request?: any;
296
+ };
297
+ type RequestOptions$3<_TResponse = any, Data = any> = {
298
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
299
+ url: string;
300
+ data?: Data;
301
+ params?: URLSearchParams;
302
+ } & APIMetadata$3;
303
+ type APIMetadata$3 = {
304
+ methodFqn?: string;
305
+ entityFqdn?: string;
306
+ packageName?: string;
307
+ };
308
+ type BuildRESTFunction$3<T extends RESTFunctionDescriptor$3> = T extends RESTFunctionDescriptor$3<infer U> ? U : never;
309
+
310
+ declare global {
311
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
312
+ interface SymbolConstructor {
313
+ readonly observable: symbol;
314
+ }
315
+ }
316
+
317
+ declare function queryCollections$1(httpClient: HttpClient$3): () => CollectionsQueryBuilder;
318
+ declare function getCollection$1(httpClient: HttpClient$3): (_id: string) => Promise<Collection$1 & {
288
319
  media?: {
289
320
  mainMedia?: {
290
321
  image?: {
@@ -335,11 +366,11 @@ declare function getCollection$1(httpClient: HttpClient): (_id: string) => Promi
335
366
  } | undefined;
336
367
  numberOfProducts: number;
337
368
  }>;
338
- declare function getCollectionBySlug$3(httpClient: HttpClient): (slug: string) => Promise<GetCollectionBySlugResponse$1 & GetCollectionBySlugResponseNonNullableFields$1>;
369
+ declare function getCollectionBySlug$3(httpClient: HttpClient$3): (slug: string) => Promise<GetCollectionBySlugResponse$1 & GetCollectionBySlugResponseNonNullableFields$1>;
339
370
 
340
- declare const queryCollections: BuildRESTFunction<typeof queryCollections$1>;
341
- declare const getCollection: BuildRESTFunction<typeof getCollection$1>;
342
- declare const getCollectionBySlug$2: BuildRESTFunction<typeof getCollectionBySlug$3>;
371
+ declare const queryCollections: BuildRESTFunction$3<typeof queryCollections$1>;
372
+ declare const getCollection: BuildRESTFunction$3<typeof getCollection$1>;
373
+ declare const getCollectionBySlug$2: BuildRESTFunction$3<typeof getCollectionBySlug$3>;
343
374
 
344
375
  declare const context$3_getCollection: typeof getCollection;
345
376
  declare const context$3_queryCollections: typeof queryCollections;
@@ -2800,73 +2831,116 @@ interface QueryProductVariantsOptions {
2800
2831
  includeMerchantSpecificData?: boolean;
2801
2832
  }
2802
2833
 
2803
- declare function createProduct$1(httpClient: HttpClient): (product: Product) => Promise<CreateProductResponse & CreateProductResponseNonNullableFields>;
2804
- declare function updateProduct$1(httpClient: HttpClient): (_id: string, product: UpdateProduct) => Promise<UpdateProductResponse & UpdateProductResponseNonNullableFields>;
2805
- declare function deleteProduct$1(httpClient: HttpClient): (_id: string) => Promise<void>;
2806
- declare function updateProductVariants$1(httpClient: HttpClient): (_id: string, variants: VariantOverride[]) => Promise<UpdateVariantsResponse & UpdateVariantsResponseNonNullableFields>;
2807
- declare function resetAllProductVariantData$1(httpClient: HttpClient): (_id: string) => Promise<void>;
2808
- declare function addProductsToCollection$1(httpClient: HttpClient): (_id: string, productIds: string[]) => Promise<void>;
2809
- declare function removeProductsFromCollection$1(httpClient: HttpClient): (_id: string, productIds: string[]) => Promise<void>;
2810
- declare function addProductMedia$1(httpClient: HttpClient): (_id: string, media: MediaDataForWrite[]) => Promise<void>;
2811
- declare function removeProductMedia$1(httpClient: HttpClient): (_id: string, mediaIds: string[]) => Promise<void>;
2812
- declare function addProductMediaToChoices$1(httpClient: HttpClient): (_id: string, media: MediaAssignmentToChoice[]) => Promise<void>;
2813
- declare function removeProductMediaFromChoices$1(httpClient: HttpClient): (_id: string, media: MediaAssignmentToChoice[]) => Promise<void>;
2814
- declare function deleteProductOptions$1(httpClient: HttpClient): (_id: string) => Promise<void>;
2815
- declare function removeBrand$1(httpClient: HttpClient): (_id: string) => Promise<void>;
2816
- declare function createCollection$1(httpClient: HttpClient): (collection: Collection) => Promise<CreateCollectionResponse & CreateCollectionResponseNonNullableFields>;
2817
- declare function updateCollection$1(httpClient: HttpClient): (_id: string | null, collection: UpdateCollection) => Promise<UpdateCollectionResponse & UpdateCollectionResponseNonNullableFields>;
2818
- declare function deleteCollection$1(httpClient: HttpClient): (_id: string) => Promise<void>;
2819
- declare function removeRibbon$1(httpClient: HttpClient): (_id: string) => Promise<void>;
2820
- declare function bulkUpdateProductsProperty$1(httpClient: HttpClient): (ids: string[], set: SetValue) => Promise<BulkUpdateProductsResponse & BulkUpdateProductsResponseNonNullableFields>;
2821
- declare function bulkAdjustProductProperty$1(httpClient: HttpClient): (adjust: AdjustValue, ids: string[]) => Promise<BulkAdjustProductPropertiesResponse & BulkAdjustProductPropertiesResponseNonNullableFields>;
2822
- declare function queryProducts$1(httpClient: HttpClient): () => ProductsQueryBuilder;
2823
- declare function getProduct$1(httpClient: HttpClient): (_id: string, options?: GetProductOptions) => Promise<GetProductResponse & GetProductResponseNonNullableFields>;
2824
- declare function getCollectionBySlug$1(httpClient: HttpClient): (slug: string) => Promise<GetCollectionBySlugResponse & GetCollectionBySlugResponseNonNullableFields>;
2825
- declare function getProductOptionsAvailability$1(httpClient: HttpClient): (_id: string, options: Record<string, string>) => Promise<ProductOptionsAvailabilityResponse & ProductOptionsAvailabilityResponseNonNullableFields>;
2826
- declare function queryProductVariants$1(httpClient: HttpClient): (_id: string, options?: QueryProductVariantsOptions) => Promise<QueryProductVariantsResponse & QueryProductVariantsResponseNonNullableFields>;
2827
- declare function queryStoreVariants$1(httpClient: HttpClient): (query: PlatformQuery) => Promise<QueryStoreVariantsResponse & QueryStoreVariantsResponseNonNullableFields>;
2828
- declare function getStoreVariant$1(httpClient: HttpClient): (_id: string) => Promise<GetStoreVariantResponse & GetStoreVariantResponseNonNullableFields>;
2829
- declare const onProductCreated$1: EventDefinition<ProductCreatedEnvelope, "com.wix.ecommerce.catalog.api.v1.ProductCreated">;
2830
- declare const onProductChanged$1: EventDefinition<ProductChangedEnvelope, "com.wix.ecommerce.catalog.api.v1.ProductChanged">;
2831
- declare const onProductDeleted$1: EventDefinition<ProductDeletedEnvelope, "com.wix.ecommerce.catalog.api.v1.ProductDeleted">;
2832
- declare const onProductCollectionCreated$1: EventDefinition<ProductCollectionCreatedEnvelope, "com.wix.ecommerce.catalog.api.v1.CollectionCreated">;
2833
- declare const onProductCollectionChanged$1: EventDefinition<ProductCollectionChangedEnvelope, "com.wix.ecommerce.catalog.api.v1.CollectionChanged">;
2834
- declare const onProductCollectionDeleted$1: EventDefinition<ProductCollectionDeletedEnvelope, "com.wix.ecommerce.catalog.api.v1.CollectionDeleted">;
2835
- declare const onProductVariantsChanged$1: EventDefinition<ProductVariantsChangedEnvelope, "com.wix.ecommerce.catalog.api.v1.VariantsChanged">;
2834
+ type RESTFunctionDescriptor$2<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$2) => T;
2835
+ interface HttpClient$2 {
2836
+ request<TResponse, TData = any>(req: RequestOptionsFactory$2<TResponse, TData>): Promise<HttpResponse$2<TResponse>>;
2837
+ fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
2838
+ }
2839
+ type RequestOptionsFactory$2<TResponse = any, TData = any> = (context: any) => RequestOptions$2<TResponse, TData>;
2840
+ type HttpResponse$2<T = any> = {
2841
+ data: T;
2842
+ status: number;
2843
+ statusText: string;
2844
+ headers: any;
2845
+ request?: any;
2846
+ };
2847
+ type RequestOptions$2<_TResponse = any, Data = any> = {
2848
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
2849
+ url: string;
2850
+ data?: Data;
2851
+ params?: URLSearchParams;
2852
+ } & APIMetadata$2;
2853
+ type APIMetadata$2 = {
2854
+ methodFqn?: string;
2855
+ entityFqdn?: string;
2856
+ packageName?: string;
2857
+ };
2858
+ type BuildRESTFunction$2<T extends RESTFunctionDescriptor$2> = T extends RESTFunctionDescriptor$2<infer U> ? U : never;
2859
+ type EventDefinition$1<Payload = unknown, Type extends string = string> = {
2860
+ __type: 'event-definition';
2861
+ type: Type;
2862
+ isDomainEvent?: boolean;
2863
+ transformations?: (envelope: unknown) => Payload;
2864
+ __payload: Payload;
2865
+ };
2866
+ declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
2867
+ type EventHandler$1<T extends EventDefinition$1> = (payload: T['__payload']) => void | Promise<void>;
2868
+ type BuildEventDefinition$1<T extends EventDefinition$1<any, string>> = (handler: EventHandler$1<T>) => void;
2836
2869
 
2837
- declare const createProduct: BuildRESTFunction<typeof createProduct$1>;
2838
- declare const updateProduct: BuildRESTFunction<typeof updateProduct$1>;
2839
- declare const deleteProduct: BuildRESTFunction<typeof deleteProduct$1>;
2840
- declare const updateProductVariants: BuildRESTFunction<typeof updateProductVariants$1>;
2841
- declare const resetAllProductVariantData: BuildRESTFunction<typeof resetAllProductVariantData$1>;
2842
- declare const addProductsToCollection: BuildRESTFunction<typeof addProductsToCollection$1>;
2843
- declare const removeProductsFromCollection: BuildRESTFunction<typeof removeProductsFromCollection$1>;
2844
- declare const addProductMedia: BuildRESTFunction<typeof addProductMedia$1>;
2845
- declare const removeProductMedia: BuildRESTFunction<typeof removeProductMedia$1>;
2846
- declare const addProductMediaToChoices: BuildRESTFunction<typeof addProductMediaToChoices$1>;
2847
- declare const removeProductMediaFromChoices: BuildRESTFunction<typeof removeProductMediaFromChoices$1>;
2848
- declare const deleteProductOptions: BuildRESTFunction<typeof deleteProductOptions$1>;
2849
- declare const removeBrand: BuildRESTFunction<typeof removeBrand$1>;
2850
- declare const createCollection: BuildRESTFunction<typeof createCollection$1>;
2851
- declare const updateCollection: BuildRESTFunction<typeof updateCollection$1>;
2852
- declare const deleteCollection: BuildRESTFunction<typeof deleteCollection$1>;
2853
- declare const removeRibbon: BuildRESTFunction<typeof removeRibbon$1>;
2854
- declare const bulkUpdateProductsProperty: BuildRESTFunction<typeof bulkUpdateProductsProperty$1>;
2855
- declare const bulkAdjustProductProperty: BuildRESTFunction<typeof bulkAdjustProductProperty$1>;
2856
- declare const queryProducts: BuildRESTFunction<typeof queryProducts$1>;
2857
- declare const getProduct: BuildRESTFunction<typeof getProduct$1>;
2858
- declare const getCollectionBySlug: BuildRESTFunction<typeof getCollectionBySlug$1>;
2859
- declare const getProductOptionsAvailability: BuildRESTFunction<typeof getProductOptionsAvailability$1>;
2860
- declare const queryProductVariants: BuildRESTFunction<typeof queryProductVariants$1>;
2861
- declare const queryStoreVariants: BuildRESTFunction<typeof queryStoreVariants$1>;
2862
- declare const getStoreVariant: BuildRESTFunction<typeof getStoreVariant$1>;
2863
- declare const onProductCreated: BuildEventDefinition<typeof onProductCreated$1>;
2864
- declare const onProductChanged: BuildEventDefinition<typeof onProductChanged$1>;
2865
- declare const onProductDeleted: BuildEventDefinition<typeof onProductDeleted$1>;
2866
- declare const onProductCollectionCreated: BuildEventDefinition<typeof onProductCollectionCreated$1>;
2867
- declare const onProductCollectionChanged: BuildEventDefinition<typeof onProductCollectionChanged$1>;
2868
- declare const onProductCollectionDeleted: BuildEventDefinition<typeof onProductCollectionDeleted$1>;
2869
- declare const onProductVariantsChanged: BuildEventDefinition<typeof onProductVariantsChanged$1>;
2870
+ declare global {
2871
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
2872
+ interface SymbolConstructor {
2873
+ readonly observable: symbol;
2874
+ }
2875
+ }
2876
+
2877
+ declare function createProduct$1(httpClient: HttpClient$2): (product: Product) => Promise<CreateProductResponse & CreateProductResponseNonNullableFields>;
2878
+ declare function updateProduct$1(httpClient: HttpClient$2): (_id: string, product: UpdateProduct) => Promise<UpdateProductResponse & UpdateProductResponseNonNullableFields>;
2879
+ declare function deleteProduct$1(httpClient: HttpClient$2): (_id: string) => Promise<void>;
2880
+ declare function updateProductVariants$1(httpClient: HttpClient$2): (_id: string, variants: VariantOverride[]) => Promise<UpdateVariantsResponse & UpdateVariantsResponseNonNullableFields>;
2881
+ declare function resetAllProductVariantData$1(httpClient: HttpClient$2): (_id: string) => Promise<void>;
2882
+ declare function addProductsToCollection$1(httpClient: HttpClient$2): (_id: string, productIds: string[]) => Promise<void>;
2883
+ declare function removeProductsFromCollection$1(httpClient: HttpClient$2): (_id: string, productIds: string[]) => Promise<void>;
2884
+ declare function addProductMedia$1(httpClient: HttpClient$2): (_id: string, media: MediaDataForWrite[]) => Promise<void>;
2885
+ declare function removeProductMedia$1(httpClient: HttpClient$2): (_id: string, mediaIds: string[]) => Promise<void>;
2886
+ declare function addProductMediaToChoices$1(httpClient: HttpClient$2): (_id: string, media: MediaAssignmentToChoice[]) => Promise<void>;
2887
+ declare function removeProductMediaFromChoices$1(httpClient: HttpClient$2): (_id: string, media: MediaAssignmentToChoice[]) => Promise<void>;
2888
+ declare function deleteProductOptions$1(httpClient: HttpClient$2): (_id: string) => Promise<void>;
2889
+ declare function removeBrand$1(httpClient: HttpClient$2): (_id: string) => Promise<void>;
2890
+ declare function createCollection$1(httpClient: HttpClient$2): (collection: Collection) => Promise<CreateCollectionResponse & CreateCollectionResponseNonNullableFields>;
2891
+ declare function updateCollection$1(httpClient: HttpClient$2): (_id: string | null, collection: UpdateCollection) => Promise<UpdateCollectionResponse & UpdateCollectionResponseNonNullableFields>;
2892
+ declare function deleteCollection$1(httpClient: HttpClient$2): (_id: string) => Promise<void>;
2893
+ declare function removeRibbon$1(httpClient: HttpClient$2): (_id: string) => Promise<void>;
2894
+ declare function bulkUpdateProductsProperty$1(httpClient: HttpClient$2): (ids: string[], set: SetValue) => Promise<BulkUpdateProductsResponse & BulkUpdateProductsResponseNonNullableFields>;
2895
+ declare function bulkAdjustProductProperty$1(httpClient: HttpClient$2): (adjust: AdjustValue, ids: string[]) => Promise<BulkAdjustProductPropertiesResponse & BulkAdjustProductPropertiesResponseNonNullableFields>;
2896
+ declare function queryProducts$1(httpClient: HttpClient$2): () => ProductsQueryBuilder;
2897
+ declare function getProduct$1(httpClient: HttpClient$2): (_id: string, options?: GetProductOptions) => Promise<GetProductResponse & GetProductResponseNonNullableFields>;
2898
+ declare function getCollectionBySlug$1(httpClient: HttpClient$2): (slug: string) => Promise<GetCollectionBySlugResponse & GetCollectionBySlugResponseNonNullableFields>;
2899
+ declare function getProductOptionsAvailability$1(httpClient: HttpClient$2): (_id: string, options: Record<string, string>) => Promise<ProductOptionsAvailabilityResponse & ProductOptionsAvailabilityResponseNonNullableFields>;
2900
+ declare function queryProductVariants$1(httpClient: HttpClient$2): (_id: string, options?: QueryProductVariantsOptions) => Promise<QueryProductVariantsResponse & QueryProductVariantsResponseNonNullableFields>;
2901
+ declare function queryStoreVariants$1(httpClient: HttpClient$2): (query: PlatformQuery) => Promise<QueryStoreVariantsResponse & QueryStoreVariantsResponseNonNullableFields>;
2902
+ declare function getStoreVariant$1(httpClient: HttpClient$2): (_id: string) => Promise<GetStoreVariantResponse & GetStoreVariantResponseNonNullableFields>;
2903
+ declare const onProductCreated$1: EventDefinition$1<ProductCreatedEnvelope, "com.wix.ecommerce.catalog.api.v1.ProductCreated">;
2904
+ declare const onProductChanged$1: EventDefinition$1<ProductChangedEnvelope, "com.wix.ecommerce.catalog.api.v1.ProductChanged">;
2905
+ declare const onProductDeleted$1: EventDefinition$1<ProductDeletedEnvelope, "com.wix.ecommerce.catalog.api.v1.ProductDeleted">;
2906
+ declare const onProductCollectionCreated$1: EventDefinition$1<ProductCollectionCreatedEnvelope, "com.wix.ecommerce.catalog.api.v1.CollectionCreated">;
2907
+ declare const onProductCollectionChanged$1: EventDefinition$1<ProductCollectionChangedEnvelope, "com.wix.ecommerce.catalog.api.v1.CollectionChanged">;
2908
+ declare const onProductCollectionDeleted$1: EventDefinition$1<ProductCollectionDeletedEnvelope, "com.wix.ecommerce.catalog.api.v1.CollectionDeleted">;
2909
+ declare const onProductVariantsChanged$1: EventDefinition$1<ProductVariantsChangedEnvelope, "com.wix.ecommerce.catalog.api.v1.VariantsChanged">;
2910
+
2911
+ declare const createProduct: BuildRESTFunction$2<typeof createProduct$1>;
2912
+ declare const updateProduct: BuildRESTFunction$2<typeof updateProduct$1>;
2913
+ declare const deleteProduct: BuildRESTFunction$2<typeof deleteProduct$1>;
2914
+ declare const updateProductVariants: BuildRESTFunction$2<typeof updateProductVariants$1>;
2915
+ declare const resetAllProductVariantData: BuildRESTFunction$2<typeof resetAllProductVariantData$1>;
2916
+ declare const addProductsToCollection: BuildRESTFunction$2<typeof addProductsToCollection$1>;
2917
+ declare const removeProductsFromCollection: BuildRESTFunction$2<typeof removeProductsFromCollection$1>;
2918
+ declare const addProductMedia: BuildRESTFunction$2<typeof addProductMedia$1>;
2919
+ declare const removeProductMedia: BuildRESTFunction$2<typeof removeProductMedia$1>;
2920
+ declare const addProductMediaToChoices: BuildRESTFunction$2<typeof addProductMediaToChoices$1>;
2921
+ declare const removeProductMediaFromChoices: BuildRESTFunction$2<typeof removeProductMediaFromChoices$1>;
2922
+ declare const deleteProductOptions: BuildRESTFunction$2<typeof deleteProductOptions$1>;
2923
+ declare const removeBrand: BuildRESTFunction$2<typeof removeBrand$1>;
2924
+ declare const createCollection: BuildRESTFunction$2<typeof createCollection$1>;
2925
+ declare const updateCollection: BuildRESTFunction$2<typeof updateCollection$1>;
2926
+ declare const deleteCollection: BuildRESTFunction$2<typeof deleteCollection$1>;
2927
+ declare const removeRibbon: BuildRESTFunction$2<typeof removeRibbon$1>;
2928
+ declare const bulkUpdateProductsProperty: BuildRESTFunction$2<typeof bulkUpdateProductsProperty$1>;
2929
+ declare const bulkAdjustProductProperty: BuildRESTFunction$2<typeof bulkAdjustProductProperty$1>;
2930
+ declare const queryProducts: BuildRESTFunction$2<typeof queryProducts$1>;
2931
+ declare const getProduct: BuildRESTFunction$2<typeof getProduct$1>;
2932
+ declare const getCollectionBySlug: BuildRESTFunction$2<typeof getCollectionBySlug$1>;
2933
+ declare const getProductOptionsAvailability: BuildRESTFunction$2<typeof getProductOptionsAvailability$1>;
2934
+ declare const queryProductVariants: BuildRESTFunction$2<typeof queryProductVariants$1>;
2935
+ declare const queryStoreVariants: BuildRESTFunction$2<typeof queryStoreVariants$1>;
2936
+ declare const getStoreVariant: BuildRESTFunction$2<typeof getStoreVariant$1>;
2937
+ declare const onProductCreated: BuildEventDefinition$1<typeof onProductCreated$1>;
2938
+ declare const onProductChanged: BuildEventDefinition$1<typeof onProductChanged$1>;
2939
+ declare const onProductDeleted: BuildEventDefinition$1<typeof onProductDeleted$1>;
2940
+ declare const onProductCollectionCreated: BuildEventDefinition$1<typeof onProductCollectionCreated$1>;
2941
+ declare const onProductCollectionChanged: BuildEventDefinition$1<typeof onProductCollectionChanged$1>;
2942
+ declare const onProductCollectionDeleted: BuildEventDefinition$1<typeof onProductCollectionDeleted$1>;
2943
+ declare const onProductVariantsChanged: BuildEventDefinition$1<typeof onProductVariantsChanged$1>;
2870
2944
 
2871
2945
  declare const context$2_addProductMedia: typeof addProductMedia;
2872
2946
  declare const context$2_addProductMediaToChoices: typeof addProductMediaToChoices;
@@ -3026,7 +3100,40 @@ interface AssignSubscriptionOptionsToProductOptions {
3026
3100
  assignedSubscriptionOptions?: SubscriptionOptionInProduct[];
3027
3101
  }
3028
3102
 
3029
- declare function createSubscriptionOption$1(httpClient: HttpClient): (subscriptionOption: SubscriptionOption) => Promise<SubscriptionOption & {
3103
+ type RESTFunctionDescriptor$1<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient$1) => T;
3104
+ interface HttpClient$1 {
3105
+ request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
3106
+ fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
3107
+ }
3108
+ type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
3109
+ type HttpResponse$1<T = any> = {
3110
+ data: T;
3111
+ status: number;
3112
+ statusText: string;
3113
+ headers: any;
3114
+ request?: any;
3115
+ };
3116
+ type RequestOptions$1<_TResponse = any, Data = any> = {
3117
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
3118
+ url: string;
3119
+ data?: Data;
3120
+ params?: URLSearchParams;
3121
+ } & APIMetadata$1;
3122
+ type APIMetadata$1 = {
3123
+ methodFqn?: string;
3124
+ entityFqdn?: string;
3125
+ packageName?: string;
3126
+ };
3127
+ type BuildRESTFunction$1<T extends RESTFunctionDescriptor$1> = T extends RESTFunctionDescriptor$1<infer U> ? U : never;
3128
+
3129
+ declare global {
3130
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
3131
+ interface SymbolConstructor {
3132
+ readonly observable: symbol;
3133
+ }
3134
+ }
3135
+
3136
+ declare function createSubscriptionOption$1(httpClient: HttpClient$1): (subscriptionOption: SubscriptionOption) => Promise<SubscriptionOption & {
3030
3137
  subscriptionSettings?: {
3031
3138
  frequency: SubscriptionFrequency;
3032
3139
  autoRenewal: boolean;
@@ -3036,7 +3143,7 @@ declare function createSubscriptionOption$1(httpClient: HttpClient): (subscripti
3036
3143
  value: number;
3037
3144
  } | undefined;
3038
3145
  }>;
3039
- declare function updateSubscriptionOption$1(httpClient: HttpClient): (_id: string | null, subscriptionOption: UpdateSubscriptionOption) => Promise<SubscriptionOption & {
3146
+ declare function updateSubscriptionOption$1(httpClient: HttpClient$1): (_id: string | null, subscriptionOption: UpdateSubscriptionOption) => Promise<SubscriptionOption & {
3040
3147
  subscriptionSettings?: {
3041
3148
  frequency: SubscriptionFrequency;
3042
3149
  autoRenewal: boolean;
@@ -3046,21 +3153,21 @@ declare function updateSubscriptionOption$1(httpClient: HttpClient): (_id: strin
3046
3153
  value: number;
3047
3154
  } | undefined;
3048
3155
  }>;
3049
- declare function deleteSubscriptionOption$1(httpClient: HttpClient): (_id: string) => Promise<void>;
3050
- declare function bulkCreateSubscriptionOptions$1(httpClient: HttpClient): (subscriptionOptions: SubscriptionOption[]) => Promise<BulkCreateSubscriptionOptionsResponse & BulkCreateSubscriptionOptionsResponseNonNullableFields>;
3051
- declare function bulkUpdateSubscriptionOptions$1(httpClient: HttpClient): (subscriptionOptions: SubscriptionOption[]) => Promise<BulkUpdateSubscriptionOptionsResponse & BulkUpdateSubscriptionOptionsResponseNonNullableFields>;
3052
- declare function bulkDeleteSubscriptionOptions$1(httpClient: HttpClient): (ids: string[]) => Promise<void>;
3053
- declare function assignSubscriptionOptionsToProduct$1(httpClient: HttpClient): (productId: string, options?: AssignSubscriptionOptionsToProductOptions) => Promise<void>;
3054
- declare function allowOneTimePurchases$1(httpClient: HttpClient): (productId: string, allowed: boolean | null) => Promise<void>;
3156
+ declare function deleteSubscriptionOption$1(httpClient: HttpClient$1): (_id: string) => Promise<void>;
3157
+ declare function bulkCreateSubscriptionOptions$1(httpClient: HttpClient$1): (subscriptionOptions: SubscriptionOption[]) => Promise<BulkCreateSubscriptionOptionsResponse & BulkCreateSubscriptionOptionsResponseNonNullableFields>;
3158
+ declare function bulkUpdateSubscriptionOptions$1(httpClient: HttpClient$1): (subscriptionOptions: SubscriptionOption[]) => Promise<BulkUpdateSubscriptionOptionsResponse & BulkUpdateSubscriptionOptionsResponseNonNullableFields>;
3159
+ declare function bulkDeleteSubscriptionOptions$1(httpClient: HttpClient$1): (ids: string[]) => Promise<void>;
3160
+ declare function assignSubscriptionOptionsToProduct$1(httpClient: HttpClient$1): (productId: string, options?: AssignSubscriptionOptionsToProductOptions) => Promise<void>;
3161
+ declare function allowOneTimePurchases$1(httpClient: HttpClient$1): (productId: string, allowed: boolean | null) => Promise<void>;
3055
3162
 
3056
- declare const createSubscriptionOption: BuildRESTFunction<typeof createSubscriptionOption$1>;
3057
- declare const updateSubscriptionOption: BuildRESTFunction<typeof updateSubscriptionOption$1>;
3058
- declare const deleteSubscriptionOption: BuildRESTFunction<typeof deleteSubscriptionOption$1>;
3059
- declare const bulkCreateSubscriptionOptions: BuildRESTFunction<typeof bulkCreateSubscriptionOptions$1>;
3060
- declare const bulkUpdateSubscriptionOptions: BuildRESTFunction<typeof bulkUpdateSubscriptionOptions$1>;
3061
- declare const bulkDeleteSubscriptionOptions: BuildRESTFunction<typeof bulkDeleteSubscriptionOptions$1>;
3062
- declare const assignSubscriptionOptionsToProduct: BuildRESTFunction<typeof assignSubscriptionOptionsToProduct$1>;
3063
- declare const allowOneTimePurchases: BuildRESTFunction<typeof allowOneTimePurchases$1>;
3163
+ declare const createSubscriptionOption: BuildRESTFunction$1<typeof createSubscriptionOption$1>;
3164
+ declare const updateSubscriptionOption: BuildRESTFunction$1<typeof updateSubscriptionOption$1>;
3165
+ declare const deleteSubscriptionOption: BuildRESTFunction$1<typeof deleteSubscriptionOption$1>;
3166
+ declare const bulkCreateSubscriptionOptions: BuildRESTFunction$1<typeof bulkCreateSubscriptionOptions$1>;
3167
+ declare const bulkUpdateSubscriptionOptions: BuildRESTFunction$1<typeof bulkUpdateSubscriptionOptions$1>;
3168
+ declare const bulkDeleteSubscriptionOptions: BuildRESTFunction$1<typeof bulkDeleteSubscriptionOptions$1>;
3169
+ declare const assignSubscriptionOptionsToProduct: BuildRESTFunction$1<typeof assignSubscriptionOptionsToProduct$1>;
3170
+ declare const allowOneTimePurchases: BuildRESTFunction$1<typeof allowOneTimePurchases$1>;
3064
3171
 
3065
3172
  declare const context$1_allowOneTimePurchases: typeof allowOneTimePurchases;
3066
3173
  declare const context$1_assignSubscriptionOptionsToProduct: typeof assignSubscriptionOptionsToProduct;
@@ -3395,6 +3502,49 @@ interface UpdateInventoryVariantsInventoryItem {
3395
3502
  preorderInfo?: PreorderInfo;
3396
3503
  }
3397
3504
 
3505
+ type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
3506
+ interface HttpClient {
3507
+ request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
3508
+ fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
3509
+ }
3510
+ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
3511
+ type HttpResponse<T = any> = {
3512
+ data: T;
3513
+ status: number;
3514
+ statusText: string;
3515
+ headers: any;
3516
+ request?: any;
3517
+ };
3518
+ type RequestOptions<_TResponse = any, Data = any> = {
3519
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
3520
+ url: string;
3521
+ data?: Data;
3522
+ params?: URLSearchParams;
3523
+ } & APIMetadata;
3524
+ type APIMetadata = {
3525
+ methodFqn?: string;
3526
+ entityFqdn?: string;
3527
+ packageName?: string;
3528
+ };
3529
+ type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
3530
+ type EventDefinition<Payload = unknown, Type extends string = string> = {
3531
+ __type: 'event-definition';
3532
+ type: Type;
3533
+ isDomainEvent?: boolean;
3534
+ transformations?: (envelope: unknown) => Payload;
3535
+ __payload: Payload;
3536
+ };
3537
+ declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
3538
+ type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
3539
+ type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
3540
+
3541
+ declare global {
3542
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
3543
+ interface SymbolConstructor {
3544
+ readonly observable: symbol;
3545
+ }
3546
+ }
3547
+
3398
3548
  declare function getInventoryVariants$1(httpClient: HttpClient): (inventoryId: string, options?: GetInventoryVariantsOptions) => Promise<GetInventoryVariantsResponse & GetInventoryVariantsResponseNonNullableFields>;
3399
3549
  declare function queryInventory$1(httpClient: HttpClient): (options?: QueryInventoryOptions) => Promise<QueryInventoryResponse & QueryInventoryResponseNonNullableFields>;
3400
3550
  declare function updateInventoryVariants$1(httpClient: HttpClient): (productId: string | null, inventoryItem: UpdateInventoryVariantsInventoryItem) => Promise<void>;
@@ -151,41 +151,41 @@ interface GetWishlistByIdOptions {
151
151
  kind?: WishlistItemKind[];
152
152
  }
153
153
 
154
- interface HttpClient {
155
- request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
154
+ interface HttpClient$4 {
155
+ request<TResponse, TData = any>(req: RequestOptionsFactory$4<TResponse, TData>): Promise<HttpResponse$4<TResponse>>;
156
+ fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
156
157
  }
157
- type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
158
- type HttpResponse<T = any> = {
158
+ type RequestOptionsFactory$4<TResponse = any, TData = any> = (context: any) => RequestOptions$4<TResponse, TData>;
159
+ type HttpResponse$4<T = any> = {
159
160
  data: T;
160
161
  status: number;
161
162
  statusText: string;
162
163
  headers: any;
163
164
  request?: any;
164
165
  };
165
- type RequestOptions<_TResponse = any, Data = any> = {
166
+ type RequestOptions$4<_TResponse = any, Data = any> = {
166
167
  method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
167
168
  url: string;
168
169
  data?: Data;
169
170
  params?: URLSearchParams;
170
- } & APIMetadata;
171
- type APIMetadata = {
171
+ } & APIMetadata$4;
172
+ type APIMetadata$4 = {
172
173
  methodFqn?: string;
173
174
  entityFqdn?: string;
174
175
  packageName?: string;
175
176
  };
176
- type EventDefinition<Payload = unknown, Type extends string = string> = {
177
- __type: 'event-definition';
178
- type: Type;
179
- isDomainEvent?: boolean;
180
- transformations?: unknown;
181
- __payload: Payload;
182
- };
183
- declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, _transformations?: unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
177
+
178
+ declare global {
179
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
180
+ interface SymbolConstructor {
181
+ readonly observable: symbol;
182
+ }
183
+ }
184
184
 
185
185
  declare const __metadata$4: {
186
186
  PACKAGE_NAME: string;
187
187
  };
188
- declare function getWishlistById(httpClient: HttpClient): (_id: string, options?: GetWishlistByIdOptions) => Promise<WishlistData & {
188
+ declare function getWishlistById(httpClient: HttpClient$4): (_id: string, options?: GetWishlistByIdOptions) => Promise<WishlistData & {
189
189
  ownerId: string;
190
190
  items: {
191
191
  _id: string;
@@ -646,11 +646,42 @@ interface CollectionsQueryBuilder {
646
646
  find: () => Promise<CollectionsQueryResult>;
647
647
  }
648
648
 
649
+ interface HttpClient$3 {
650
+ request<TResponse, TData = any>(req: RequestOptionsFactory$3<TResponse, TData>): Promise<HttpResponse$3<TResponse>>;
651
+ fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
652
+ }
653
+ type RequestOptionsFactory$3<TResponse = any, TData = any> = (context: any) => RequestOptions$3<TResponse, TData>;
654
+ type HttpResponse$3<T = any> = {
655
+ data: T;
656
+ status: number;
657
+ statusText: string;
658
+ headers: any;
659
+ request?: any;
660
+ };
661
+ type RequestOptions$3<_TResponse = any, Data = any> = {
662
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
663
+ url: string;
664
+ data?: Data;
665
+ params?: URLSearchParams;
666
+ } & APIMetadata$3;
667
+ type APIMetadata$3 = {
668
+ methodFqn?: string;
669
+ entityFqdn?: string;
670
+ packageName?: string;
671
+ };
672
+
673
+ declare global {
674
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
675
+ interface SymbolConstructor {
676
+ readonly observable: symbol;
677
+ }
678
+ }
679
+
649
680
  declare const __metadata$3: {
650
681
  PACKAGE_NAME: string;
651
682
  };
652
- declare function queryCollections(httpClient: HttpClient): () => CollectionsQueryBuilder;
653
- declare function getCollection(httpClient: HttpClient): (_id: string) => Promise<Collection$1 & {
683
+ declare function queryCollections(httpClient: HttpClient$3): () => CollectionsQueryBuilder;
684
+ declare function getCollection(httpClient: HttpClient$3): (_id: string) => Promise<Collection$1 & {
654
685
  media?: {
655
686
  mainMedia?: {
656
687
  image?: {
@@ -701,7 +732,7 @@ declare function getCollection(httpClient: HttpClient): (_id: string) => Promise
701
732
  } | undefined;
702
733
  numberOfProducts: number;
703
734
  }>;
704
- declare function getCollectionBySlug$1(httpClient: HttpClient): (slug: string) => Promise<GetCollectionBySlugResponse$1 & GetCollectionBySlugResponseNonNullableFields$1>;
735
+ declare function getCollectionBySlug$1(httpClient: HttpClient$3): (slug: string) => Promise<GetCollectionBySlugResponse$1 & GetCollectionBySlugResponseNonNullableFields$1>;
705
736
 
706
737
  type index_d$3_CollectionsQueryBuilder = CollectionsQueryBuilder;
707
738
  type index_d$3_CollectionsQueryResult = CollectionsQueryResult;
@@ -3902,42 +3933,81 @@ interface QueryProductVariantsOptions {
3902
3933
  includeMerchantSpecificData?: boolean;
3903
3934
  }
3904
3935
 
3936
+ interface HttpClient$2 {
3937
+ request<TResponse, TData = any>(req: RequestOptionsFactory$2<TResponse, TData>): Promise<HttpResponse$2<TResponse>>;
3938
+ fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
3939
+ }
3940
+ type RequestOptionsFactory$2<TResponse = any, TData = any> = (context: any) => RequestOptions$2<TResponse, TData>;
3941
+ type HttpResponse$2<T = any> = {
3942
+ data: T;
3943
+ status: number;
3944
+ statusText: string;
3945
+ headers: any;
3946
+ request?: any;
3947
+ };
3948
+ type RequestOptions$2<_TResponse = any, Data = any> = {
3949
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
3950
+ url: string;
3951
+ data?: Data;
3952
+ params?: URLSearchParams;
3953
+ } & APIMetadata$2;
3954
+ type APIMetadata$2 = {
3955
+ methodFqn?: string;
3956
+ entityFqdn?: string;
3957
+ packageName?: string;
3958
+ };
3959
+ type EventDefinition$1<Payload = unknown, Type extends string = string> = {
3960
+ __type: 'event-definition';
3961
+ type: Type;
3962
+ isDomainEvent?: boolean;
3963
+ transformations?: (envelope: unknown) => Payload;
3964
+ __payload: Payload;
3965
+ };
3966
+ declare function EventDefinition$1<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition$1<Payload, Type>;
3967
+
3968
+ declare global {
3969
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
3970
+ interface SymbolConstructor {
3971
+ readonly observable: symbol;
3972
+ }
3973
+ }
3974
+
3905
3975
  declare const __metadata$2: {
3906
3976
  PACKAGE_NAME: string;
3907
3977
  };
3908
- declare function createProduct(httpClient: HttpClient): (product: Product) => Promise<CreateProductResponse & CreateProductResponseNonNullableFields>;
3909
- declare function updateProduct(httpClient: HttpClient): (_id: string, product: UpdateProduct) => Promise<UpdateProductResponse & UpdateProductResponseNonNullableFields>;
3910
- declare function deleteProduct(httpClient: HttpClient): (_id: string) => Promise<void>;
3911
- declare function updateProductVariants(httpClient: HttpClient): (_id: string, variants: VariantOverride[]) => Promise<UpdateVariantsResponse & UpdateVariantsResponseNonNullableFields>;
3912
- declare function resetAllProductVariantData(httpClient: HttpClient): (_id: string) => Promise<void>;
3913
- declare function addProductsToCollection(httpClient: HttpClient): (_id: string, productIds: string[]) => Promise<void>;
3914
- declare function removeProductsFromCollection(httpClient: HttpClient): (_id: string, productIds: string[]) => Promise<void>;
3915
- declare function addProductMedia(httpClient: HttpClient): (_id: string, media: MediaDataForWrite[]) => Promise<void>;
3916
- declare function removeProductMedia(httpClient: HttpClient): (_id: string, mediaIds: string[]) => Promise<void>;
3917
- declare function addProductMediaToChoices(httpClient: HttpClient): (_id: string, media: MediaAssignmentToChoice[]) => Promise<void>;
3918
- declare function removeProductMediaFromChoices(httpClient: HttpClient): (_id: string, media: MediaAssignmentToChoice[]) => Promise<void>;
3919
- declare function deleteProductOptions(httpClient: HttpClient): (_id: string) => Promise<void>;
3920
- declare function removeBrand(httpClient: HttpClient): (_id: string) => Promise<void>;
3921
- declare function createCollection(httpClient: HttpClient): (collection: Collection) => Promise<CreateCollectionResponse & CreateCollectionResponseNonNullableFields>;
3922
- declare function updateCollection(httpClient: HttpClient): (_id: string | null, collection: UpdateCollection) => Promise<UpdateCollectionResponse & UpdateCollectionResponseNonNullableFields>;
3923
- declare function deleteCollection(httpClient: HttpClient): (_id: string) => Promise<void>;
3924
- declare function removeRibbon(httpClient: HttpClient): (_id: string) => Promise<void>;
3925
- declare function bulkUpdateProductsProperty(httpClient: HttpClient): (ids: string[], set: SetValue) => Promise<BulkUpdateProductsResponse & BulkUpdateProductsResponseNonNullableFields>;
3926
- declare function bulkAdjustProductProperty(httpClient: HttpClient): (adjust: AdjustValue, ids: string[]) => Promise<BulkAdjustProductPropertiesResponse & BulkAdjustProductPropertiesResponseNonNullableFields>;
3927
- declare function queryProducts(httpClient: HttpClient): () => ProductsQueryBuilder;
3928
- declare function getProduct(httpClient: HttpClient): (_id: string, options?: GetProductOptions) => Promise<GetProductResponse & GetProductResponseNonNullableFields>;
3929
- declare function getCollectionBySlug(httpClient: HttpClient): (slug: string) => Promise<GetCollectionBySlugResponse & GetCollectionBySlugResponseNonNullableFields>;
3930
- declare function getProductOptionsAvailability(httpClient: HttpClient): (_id: string, options: Record<string, string>) => Promise<ProductOptionsAvailabilityResponse & ProductOptionsAvailabilityResponseNonNullableFields>;
3931
- declare function queryProductVariants(httpClient: HttpClient): (_id: string, options?: QueryProductVariantsOptions) => Promise<QueryProductVariantsResponse & QueryProductVariantsResponseNonNullableFields>;
3932
- declare function queryStoreVariants(httpClient: HttpClient): (query: PlatformQuery) => Promise<QueryStoreVariantsResponse & QueryStoreVariantsResponseNonNullableFields>;
3933
- declare function getStoreVariant(httpClient: HttpClient): (_id: string) => Promise<GetStoreVariantResponse & GetStoreVariantResponseNonNullableFields>;
3934
- declare const onProductCreated: EventDefinition<ProductCreatedEnvelope, "com.wix.ecommerce.catalog.api.v1.ProductCreated">;
3935
- declare const onProductChanged: EventDefinition<ProductChangedEnvelope, "com.wix.ecommerce.catalog.api.v1.ProductChanged">;
3936
- declare const onProductDeleted: EventDefinition<ProductDeletedEnvelope, "com.wix.ecommerce.catalog.api.v1.ProductDeleted">;
3937
- declare const onProductCollectionCreated: EventDefinition<ProductCollectionCreatedEnvelope, "com.wix.ecommerce.catalog.api.v1.CollectionCreated">;
3938
- declare const onProductCollectionChanged: EventDefinition<ProductCollectionChangedEnvelope, "com.wix.ecommerce.catalog.api.v1.CollectionChanged">;
3939
- declare const onProductCollectionDeleted: EventDefinition<ProductCollectionDeletedEnvelope, "com.wix.ecommerce.catalog.api.v1.CollectionDeleted">;
3940
- declare const onProductVariantsChanged: EventDefinition<ProductVariantsChangedEnvelope, "com.wix.ecommerce.catalog.api.v1.VariantsChanged">;
3978
+ declare function createProduct(httpClient: HttpClient$2): (product: Product) => Promise<CreateProductResponse & CreateProductResponseNonNullableFields>;
3979
+ declare function updateProduct(httpClient: HttpClient$2): (_id: string, product: UpdateProduct) => Promise<UpdateProductResponse & UpdateProductResponseNonNullableFields>;
3980
+ declare function deleteProduct(httpClient: HttpClient$2): (_id: string) => Promise<void>;
3981
+ declare function updateProductVariants(httpClient: HttpClient$2): (_id: string, variants: VariantOverride[]) => Promise<UpdateVariantsResponse & UpdateVariantsResponseNonNullableFields>;
3982
+ declare function resetAllProductVariantData(httpClient: HttpClient$2): (_id: string) => Promise<void>;
3983
+ declare function addProductsToCollection(httpClient: HttpClient$2): (_id: string, productIds: string[]) => Promise<void>;
3984
+ declare function removeProductsFromCollection(httpClient: HttpClient$2): (_id: string, productIds: string[]) => Promise<void>;
3985
+ declare function addProductMedia(httpClient: HttpClient$2): (_id: string, media: MediaDataForWrite[]) => Promise<void>;
3986
+ declare function removeProductMedia(httpClient: HttpClient$2): (_id: string, mediaIds: string[]) => Promise<void>;
3987
+ declare function addProductMediaToChoices(httpClient: HttpClient$2): (_id: string, media: MediaAssignmentToChoice[]) => Promise<void>;
3988
+ declare function removeProductMediaFromChoices(httpClient: HttpClient$2): (_id: string, media: MediaAssignmentToChoice[]) => Promise<void>;
3989
+ declare function deleteProductOptions(httpClient: HttpClient$2): (_id: string) => Promise<void>;
3990
+ declare function removeBrand(httpClient: HttpClient$2): (_id: string) => Promise<void>;
3991
+ declare function createCollection(httpClient: HttpClient$2): (collection: Collection) => Promise<CreateCollectionResponse & CreateCollectionResponseNonNullableFields>;
3992
+ declare function updateCollection(httpClient: HttpClient$2): (_id: string | null, collection: UpdateCollection) => Promise<UpdateCollectionResponse & UpdateCollectionResponseNonNullableFields>;
3993
+ declare function deleteCollection(httpClient: HttpClient$2): (_id: string) => Promise<void>;
3994
+ declare function removeRibbon(httpClient: HttpClient$2): (_id: string) => Promise<void>;
3995
+ declare function bulkUpdateProductsProperty(httpClient: HttpClient$2): (ids: string[], set: SetValue) => Promise<BulkUpdateProductsResponse & BulkUpdateProductsResponseNonNullableFields>;
3996
+ declare function bulkAdjustProductProperty(httpClient: HttpClient$2): (adjust: AdjustValue, ids: string[]) => Promise<BulkAdjustProductPropertiesResponse & BulkAdjustProductPropertiesResponseNonNullableFields>;
3997
+ declare function queryProducts(httpClient: HttpClient$2): () => ProductsQueryBuilder;
3998
+ declare function getProduct(httpClient: HttpClient$2): (_id: string, options?: GetProductOptions) => Promise<GetProductResponse & GetProductResponseNonNullableFields>;
3999
+ declare function getCollectionBySlug(httpClient: HttpClient$2): (slug: string) => Promise<GetCollectionBySlugResponse & GetCollectionBySlugResponseNonNullableFields>;
4000
+ declare function getProductOptionsAvailability(httpClient: HttpClient$2): (_id: string, options: Record<string, string>) => Promise<ProductOptionsAvailabilityResponse & ProductOptionsAvailabilityResponseNonNullableFields>;
4001
+ declare function queryProductVariants(httpClient: HttpClient$2): (_id: string, options?: QueryProductVariantsOptions) => Promise<QueryProductVariantsResponse & QueryProductVariantsResponseNonNullableFields>;
4002
+ declare function queryStoreVariants(httpClient: HttpClient$2): (query: PlatformQuery) => Promise<QueryStoreVariantsResponse & QueryStoreVariantsResponseNonNullableFields>;
4003
+ declare function getStoreVariant(httpClient: HttpClient$2): (_id: string) => Promise<GetStoreVariantResponse & GetStoreVariantResponseNonNullableFields>;
4004
+ declare const onProductCreated: EventDefinition$1<ProductCreatedEnvelope, "com.wix.ecommerce.catalog.api.v1.ProductCreated">;
4005
+ declare const onProductChanged: EventDefinition$1<ProductChangedEnvelope, "com.wix.ecommerce.catalog.api.v1.ProductChanged">;
4006
+ declare const onProductDeleted: EventDefinition$1<ProductDeletedEnvelope, "com.wix.ecommerce.catalog.api.v1.ProductDeleted">;
4007
+ declare const onProductCollectionCreated: EventDefinition$1<ProductCollectionCreatedEnvelope, "com.wix.ecommerce.catalog.api.v1.CollectionCreated">;
4008
+ declare const onProductCollectionChanged: EventDefinition$1<ProductCollectionChangedEnvelope, "com.wix.ecommerce.catalog.api.v1.CollectionChanged">;
4009
+ declare const onProductCollectionDeleted: EventDefinition$1<ProductCollectionDeletedEnvelope, "com.wix.ecommerce.catalog.api.v1.CollectionDeleted">;
4010
+ declare const onProductVariantsChanged: EventDefinition$1<ProductVariantsChangedEnvelope, "com.wix.ecommerce.catalog.api.v1.VariantsChanged">;
3941
4011
 
3942
4012
  type index_d$2_AddProductMediaRequest = AddProductMediaRequest;
3943
4013
  type index_d$2_AddProductMediaResponse = AddProductMediaResponse;
@@ -4524,10 +4594,41 @@ interface AssignSubscriptionOptionsToProductOptions {
4524
4594
  assignedSubscriptionOptions?: SubscriptionOptionInProduct[];
4525
4595
  }
4526
4596
 
4597
+ interface HttpClient$1 {
4598
+ request<TResponse, TData = any>(req: RequestOptionsFactory$1<TResponse, TData>): Promise<HttpResponse$1<TResponse>>;
4599
+ fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
4600
+ }
4601
+ type RequestOptionsFactory$1<TResponse = any, TData = any> = (context: any) => RequestOptions$1<TResponse, TData>;
4602
+ type HttpResponse$1<T = any> = {
4603
+ data: T;
4604
+ status: number;
4605
+ statusText: string;
4606
+ headers: any;
4607
+ request?: any;
4608
+ };
4609
+ type RequestOptions$1<_TResponse = any, Data = any> = {
4610
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
4611
+ url: string;
4612
+ data?: Data;
4613
+ params?: URLSearchParams;
4614
+ } & APIMetadata$1;
4615
+ type APIMetadata$1 = {
4616
+ methodFqn?: string;
4617
+ entityFqdn?: string;
4618
+ packageName?: string;
4619
+ };
4620
+
4621
+ declare global {
4622
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
4623
+ interface SymbolConstructor {
4624
+ readonly observable: symbol;
4625
+ }
4626
+ }
4627
+
4527
4628
  declare const __metadata$1: {
4528
4629
  PACKAGE_NAME: string;
4529
4630
  };
4530
- declare function createSubscriptionOption(httpClient: HttpClient): (subscriptionOption: SubscriptionOption) => Promise<SubscriptionOption & {
4631
+ declare function createSubscriptionOption(httpClient: HttpClient$1): (subscriptionOption: SubscriptionOption) => Promise<SubscriptionOption & {
4531
4632
  subscriptionSettings?: {
4532
4633
  frequency: SubscriptionFrequency;
4533
4634
  autoRenewal: boolean;
@@ -4537,7 +4638,7 @@ declare function createSubscriptionOption(httpClient: HttpClient): (subscription
4537
4638
  value: number;
4538
4639
  } | undefined;
4539
4640
  }>;
4540
- declare function updateSubscriptionOption(httpClient: HttpClient): (_id: string | null, subscriptionOption: UpdateSubscriptionOption) => Promise<SubscriptionOption & {
4641
+ declare function updateSubscriptionOption(httpClient: HttpClient$1): (_id: string | null, subscriptionOption: UpdateSubscriptionOption) => Promise<SubscriptionOption & {
4541
4642
  subscriptionSettings?: {
4542
4643
  frequency: SubscriptionFrequency;
4543
4644
  autoRenewal: boolean;
@@ -4547,12 +4648,12 @@ declare function updateSubscriptionOption(httpClient: HttpClient): (_id: string
4547
4648
  value: number;
4548
4649
  } | undefined;
4549
4650
  }>;
4550
- declare function deleteSubscriptionOption(httpClient: HttpClient): (_id: string) => Promise<void>;
4551
- declare function bulkCreateSubscriptionOptions(httpClient: HttpClient): (subscriptionOptions: SubscriptionOption[]) => Promise<BulkCreateSubscriptionOptionsResponse & BulkCreateSubscriptionOptionsResponseNonNullableFields>;
4552
- declare function bulkUpdateSubscriptionOptions(httpClient: HttpClient): (subscriptionOptions: SubscriptionOption[]) => Promise<BulkUpdateSubscriptionOptionsResponse & BulkUpdateSubscriptionOptionsResponseNonNullableFields>;
4553
- declare function bulkDeleteSubscriptionOptions(httpClient: HttpClient): (ids: string[]) => Promise<void>;
4554
- declare function assignSubscriptionOptionsToProduct(httpClient: HttpClient): (productId: string, options?: AssignSubscriptionOptionsToProductOptions) => Promise<void>;
4555
- declare function allowOneTimePurchases(httpClient: HttpClient): (productId: string, allowed: boolean | null) => Promise<void>;
4651
+ declare function deleteSubscriptionOption(httpClient: HttpClient$1): (_id: string) => Promise<void>;
4652
+ declare function bulkCreateSubscriptionOptions(httpClient: HttpClient$1): (subscriptionOptions: SubscriptionOption[]) => Promise<BulkCreateSubscriptionOptionsResponse & BulkCreateSubscriptionOptionsResponseNonNullableFields>;
4653
+ declare function bulkUpdateSubscriptionOptions(httpClient: HttpClient$1): (subscriptionOptions: SubscriptionOption[]) => Promise<BulkUpdateSubscriptionOptionsResponse & BulkUpdateSubscriptionOptionsResponseNonNullableFields>;
4654
+ declare function bulkDeleteSubscriptionOptions(httpClient: HttpClient$1): (ids: string[]) => Promise<void>;
4655
+ declare function assignSubscriptionOptionsToProduct(httpClient: HttpClient$1): (productId: string, options?: AssignSubscriptionOptionsToProductOptions) => Promise<void>;
4656
+ declare function allowOneTimePurchases(httpClient: HttpClient$1): (productId: string, allowed: boolean | null) => Promise<void>;
4556
4657
 
4557
4658
  type index_d$1_AllowOneTimePurchasesRequest = AllowOneTimePurchasesRequest;
4558
4659
  type index_d$1_AllowOneTimePurchasesResponse = AllowOneTimePurchasesResponse;
@@ -5030,6 +5131,45 @@ interface UpdateInventoryVariantsInventoryItem {
5030
5131
  preorderInfo?: PreorderInfo;
5031
5132
  }
5032
5133
 
5134
+ interface HttpClient {
5135
+ request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
5136
+ fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
5137
+ }
5138
+ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
5139
+ type HttpResponse<T = any> = {
5140
+ data: T;
5141
+ status: number;
5142
+ statusText: string;
5143
+ headers: any;
5144
+ request?: any;
5145
+ };
5146
+ type RequestOptions<_TResponse = any, Data = any> = {
5147
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
5148
+ url: string;
5149
+ data?: Data;
5150
+ params?: URLSearchParams;
5151
+ } & APIMetadata;
5152
+ type APIMetadata = {
5153
+ methodFqn?: string;
5154
+ entityFqdn?: string;
5155
+ packageName?: string;
5156
+ };
5157
+ type EventDefinition<Payload = unknown, Type extends string = string> = {
5158
+ __type: 'event-definition';
5159
+ type: Type;
5160
+ isDomainEvent?: boolean;
5161
+ transformations?: (envelope: unknown) => Payload;
5162
+ __payload: Payload;
5163
+ };
5164
+ declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
5165
+
5166
+ declare global {
5167
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
5168
+ interface SymbolConstructor {
5169
+ readonly observable: symbol;
5170
+ }
5171
+ }
5172
+
5033
5173
  declare const __metadata: {
5034
5174
  PACKAGE_NAME: string;
5035
5175
  };