@wix/stores 1.0.165 → 1.0.166
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 +2 -2
- package/type-bundles/context.bundle.d.ts +109 -251
- package/type-bundles/index.bundle.d.ts +60 -192
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/stores",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.166",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"fqdn": ""
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
|
-
"falconPackageHash": "
|
|
49
|
+
"falconPackageHash": "eec694a22fe82ac20c647d37472f1ecdad586bf9a5bb139bc1463ce9"
|
|
50
50
|
}
|
|
@@ -36,31 +36,41 @@ interface GetWishlistByIdOptions {
|
|
|
36
36
|
kind?: WishlistItemKind[];
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
type RESTFunctionDescriptor
|
|
40
|
-
interface HttpClient
|
|
41
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory
|
|
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>>;
|
|
42
42
|
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
43
43
|
}
|
|
44
|
-
type RequestOptionsFactory
|
|
45
|
-
type HttpResponse
|
|
44
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
45
|
+
type HttpResponse<T = any> = {
|
|
46
46
|
data: T;
|
|
47
47
|
status: number;
|
|
48
48
|
statusText: string;
|
|
49
49
|
headers: any;
|
|
50
50
|
request?: any;
|
|
51
51
|
};
|
|
52
|
-
type RequestOptions
|
|
52
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
53
53
|
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
54
54
|
url: string;
|
|
55
55
|
data?: Data;
|
|
56
56
|
params?: URLSearchParams;
|
|
57
|
-
} & APIMetadata
|
|
58
|
-
type APIMetadata
|
|
57
|
+
} & APIMetadata;
|
|
58
|
+
type APIMetadata = {
|
|
59
59
|
methodFqn?: string;
|
|
60
60
|
entityFqdn?: string;
|
|
61
61
|
packageName?: string;
|
|
62
62
|
};
|
|
63
|
-
type BuildRESTFunction
|
|
63
|
+
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
64
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
65
|
+
__type: 'event-definition';
|
|
66
|
+
type: Type;
|
|
67
|
+
isDomainEvent?: boolean;
|
|
68
|
+
transformations?: (envelope: unknown) => Payload;
|
|
69
|
+
__payload: Payload;
|
|
70
|
+
};
|
|
71
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
72
|
+
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
73
|
+
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
64
74
|
|
|
65
75
|
declare global {
|
|
66
76
|
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
@@ -69,7 +79,7 @@ declare global {
|
|
|
69
79
|
}
|
|
70
80
|
}
|
|
71
81
|
|
|
72
|
-
declare function getWishlistById$1(httpClient: HttpClient
|
|
82
|
+
declare function getWishlistById$1(httpClient: HttpClient): (_id: string, options?: GetWishlistByIdOptions) => Promise<WishlistData & {
|
|
73
83
|
ownerId: string;
|
|
74
84
|
items: {
|
|
75
85
|
_id: string;
|
|
@@ -79,7 +89,7 @@ declare function getWishlistById$1(httpClient: HttpClient$4): (_id: string, opti
|
|
|
79
89
|
totalCount: number;
|
|
80
90
|
}>;
|
|
81
91
|
|
|
82
|
-
declare const getWishlistById: BuildRESTFunction
|
|
92
|
+
declare const getWishlistById: BuildRESTFunction<typeof getWishlistById$1>;
|
|
83
93
|
|
|
84
94
|
declare const context$4_getWishlistById: typeof getWishlistById;
|
|
85
95
|
declare namespace context$4 {
|
|
@@ -281,41 +291,8 @@ interface CollectionsQueryBuilder {
|
|
|
281
291
|
find: () => Promise<CollectionsQueryResult>;
|
|
282
292
|
}
|
|
283
293
|
|
|
284
|
-
|
|
285
|
-
|
|
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 & {
|
|
294
|
+
declare function queryCollections$1(httpClient: HttpClient): () => CollectionsQueryBuilder;
|
|
295
|
+
declare function getCollection$1(httpClient: HttpClient): (_id: string) => Promise<Collection$1 & {
|
|
319
296
|
media?: {
|
|
320
297
|
mainMedia?: {
|
|
321
298
|
image?: {
|
|
@@ -366,11 +343,11 @@ declare function getCollection$1(httpClient: HttpClient$3): (_id: string) => Pro
|
|
|
366
343
|
} | undefined;
|
|
367
344
|
numberOfProducts: number;
|
|
368
345
|
}>;
|
|
369
|
-
declare function getCollectionBySlug$3(httpClient: HttpClient
|
|
346
|
+
declare function getCollectionBySlug$3(httpClient: HttpClient): (slug: string) => Promise<GetCollectionBySlugResponse$1 & GetCollectionBySlugResponseNonNullableFields$1>;
|
|
370
347
|
|
|
371
|
-
declare const queryCollections: BuildRESTFunction
|
|
372
|
-
declare const getCollection: BuildRESTFunction
|
|
373
|
-
declare const getCollectionBySlug$2: BuildRESTFunction
|
|
348
|
+
declare const queryCollections: BuildRESTFunction<typeof queryCollections$1>;
|
|
349
|
+
declare const getCollection: BuildRESTFunction<typeof getCollection$1>;
|
|
350
|
+
declare const getCollectionBySlug$2: BuildRESTFunction<typeof getCollectionBySlug$3>;
|
|
374
351
|
|
|
375
352
|
declare const context$3_getCollection: typeof getCollection;
|
|
376
353
|
declare const context$3_queryCollections: typeof queryCollections;
|
|
@@ -2831,116 +2808,73 @@ interface QueryProductVariantsOptions {
|
|
|
2831
2808
|
includeMerchantSpecificData?: boolean;
|
|
2832
2809
|
}
|
|
2833
2810
|
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
declare
|
|
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;
|
|
2869
|
-
|
|
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">;
|
|
2811
|
+
declare function createProduct$1(httpClient: HttpClient): (product: Product) => Promise<CreateProductResponse & CreateProductResponseNonNullableFields>;
|
|
2812
|
+
declare function updateProduct$1(httpClient: HttpClient): (_id: string, product: UpdateProduct) => Promise<UpdateProductResponse & UpdateProductResponseNonNullableFields>;
|
|
2813
|
+
declare function deleteProduct$1(httpClient: HttpClient): (_id: string) => Promise<void>;
|
|
2814
|
+
declare function updateProductVariants$1(httpClient: HttpClient): (_id: string, variants: VariantOverride[]) => Promise<UpdateVariantsResponse & UpdateVariantsResponseNonNullableFields>;
|
|
2815
|
+
declare function resetAllProductVariantData$1(httpClient: HttpClient): (_id: string) => Promise<void>;
|
|
2816
|
+
declare function addProductsToCollection$1(httpClient: HttpClient): (_id: string, productIds: string[]) => Promise<void>;
|
|
2817
|
+
declare function removeProductsFromCollection$1(httpClient: HttpClient): (_id: string, productIds: string[]) => Promise<void>;
|
|
2818
|
+
declare function addProductMedia$1(httpClient: HttpClient): (_id: string, media: MediaDataForWrite[]) => Promise<void>;
|
|
2819
|
+
declare function removeProductMedia$1(httpClient: HttpClient): (_id: string, mediaIds: string[]) => Promise<void>;
|
|
2820
|
+
declare function addProductMediaToChoices$1(httpClient: HttpClient): (_id: string, media: MediaAssignmentToChoice[]) => Promise<void>;
|
|
2821
|
+
declare function removeProductMediaFromChoices$1(httpClient: HttpClient): (_id: string, media: MediaAssignmentToChoice[]) => Promise<void>;
|
|
2822
|
+
declare function deleteProductOptions$1(httpClient: HttpClient): (_id: string) => Promise<void>;
|
|
2823
|
+
declare function removeBrand$1(httpClient: HttpClient): (_id: string) => Promise<void>;
|
|
2824
|
+
declare function createCollection$1(httpClient: HttpClient): (collection: Collection) => Promise<CreateCollectionResponse & CreateCollectionResponseNonNullableFields>;
|
|
2825
|
+
declare function updateCollection$1(httpClient: HttpClient): (_id: string | null, collection: UpdateCollection) => Promise<UpdateCollectionResponse & UpdateCollectionResponseNonNullableFields>;
|
|
2826
|
+
declare function deleteCollection$1(httpClient: HttpClient): (_id: string) => Promise<void>;
|
|
2827
|
+
declare function removeRibbon$1(httpClient: HttpClient): (_id: string) => Promise<void>;
|
|
2828
|
+
declare function bulkUpdateProductsProperty$1(httpClient: HttpClient): (ids: string[], set: SetValue) => Promise<BulkUpdateProductsResponse & BulkUpdateProductsResponseNonNullableFields>;
|
|
2829
|
+
declare function bulkAdjustProductProperty$1(httpClient: HttpClient): (adjust: AdjustValue, ids: string[]) => Promise<BulkAdjustProductPropertiesResponse & BulkAdjustProductPropertiesResponseNonNullableFields>;
|
|
2830
|
+
declare function queryProducts$1(httpClient: HttpClient): () => ProductsQueryBuilder;
|
|
2831
|
+
declare function getProduct$1(httpClient: HttpClient): (_id: string, options?: GetProductOptions) => Promise<GetProductResponse & GetProductResponseNonNullableFields>;
|
|
2832
|
+
declare function getCollectionBySlug$1(httpClient: HttpClient): (slug: string) => Promise<GetCollectionBySlugResponse & GetCollectionBySlugResponseNonNullableFields>;
|
|
2833
|
+
declare function getProductOptionsAvailability$1(httpClient: HttpClient): (_id: string, options: Record<string, string>) => Promise<ProductOptionsAvailabilityResponse & ProductOptionsAvailabilityResponseNonNullableFields>;
|
|
2834
|
+
declare function queryProductVariants$1(httpClient: HttpClient): (_id: string, options?: QueryProductVariantsOptions) => Promise<QueryProductVariantsResponse & QueryProductVariantsResponseNonNullableFields>;
|
|
2835
|
+
declare function queryStoreVariants$1(httpClient: HttpClient): (query: PlatformQuery) => Promise<QueryStoreVariantsResponse & QueryStoreVariantsResponseNonNullableFields>;
|
|
2836
|
+
declare function getStoreVariant$1(httpClient: HttpClient): (_id: string) => Promise<GetStoreVariantResponse & GetStoreVariantResponseNonNullableFields>;
|
|
2837
|
+
declare const onProductCreated$1: EventDefinition<ProductCreatedEnvelope, "com.wix.ecommerce.catalog.api.v1.ProductCreated">;
|
|
2838
|
+
declare const onProductChanged$1: EventDefinition<ProductChangedEnvelope, "com.wix.ecommerce.catalog.api.v1.ProductChanged">;
|
|
2839
|
+
declare const onProductDeleted$1: EventDefinition<ProductDeletedEnvelope, "com.wix.ecommerce.catalog.api.v1.ProductDeleted">;
|
|
2840
|
+
declare const onProductCollectionCreated$1: EventDefinition<ProductCollectionCreatedEnvelope, "com.wix.ecommerce.catalog.api.v1.CollectionCreated">;
|
|
2841
|
+
declare const onProductCollectionChanged$1: EventDefinition<ProductCollectionChangedEnvelope, "com.wix.ecommerce.catalog.api.v1.CollectionChanged">;
|
|
2842
|
+
declare const onProductCollectionDeleted$1: EventDefinition<ProductCollectionDeletedEnvelope, "com.wix.ecommerce.catalog.api.v1.CollectionDeleted">;
|
|
2843
|
+
declare const onProductVariantsChanged$1: EventDefinition<ProductVariantsChangedEnvelope, "com.wix.ecommerce.catalog.api.v1.VariantsChanged">;
|
|
2910
2844
|
|
|
2911
|
-
declare const createProduct: BuildRESTFunction
|
|
2912
|
-
declare const updateProduct: BuildRESTFunction
|
|
2913
|
-
declare const deleteProduct: BuildRESTFunction
|
|
2914
|
-
declare const updateProductVariants: BuildRESTFunction
|
|
2915
|
-
declare const resetAllProductVariantData: BuildRESTFunction
|
|
2916
|
-
declare const addProductsToCollection: BuildRESTFunction
|
|
2917
|
-
declare const removeProductsFromCollection: BuildRESTFunction
|
|
2918
|
-
declare const addProductMedia: BuildRESTFunction
|
|
2919
|
-
declare const removeProductMedia: BuildRESTFunction
|
|
2920
|
-
declare const addProductMediaToChoices: BuildRESTFunction
|
|
2921
|
-
declare const removeProductMediaFromChoices: BuildRESTFunction
|
|
2922
|
-
declare const deleteProductOptions: BuildRESTFunction
|
|
2923
|
-
declare const removeBrand: BuildRESTFunction
|
|
2924
|
-
declare const createCollection: BuildRESTFunction
|
|
2925
|
-
declare const updateCollection: BuildRESTFunction
|
|
2926
|
-
declare const deleteCollection: BuildRESTFunction
|
|
2927
|
-
declare const removeRibbon: BuildRESTFunction
|
|
2928
|
-
declare const bulkUpdateProductsProperty: BuildRESTFunction
|
|
2929
|
-
declare const bulkAdjustProductProperty: BuildRESTFunction
|
|
2930
|
-
declare const queryProducts: BuildRESTFunction
|
|
2931
|
-
declare const getProduct: BuildRESTFunction
|
|
2932
|
-
declare const getCollectionBySlug: BuildRESTFunction
|
|
2933
|
-
declare const getProductOptionsAvailability: BuildRESTFunction
|
|
2934
|
-
declare const queryProductVariants: BuildRESTFunction
|
|
2935
|
-
declare const queryStoreVariants: BuildRESTFunction
|
|
2936
|
-
declare const getStoreVariant: BuildRESTFunction
|
|
2937
|
-
declare const onProductCreated: BuildEventDefinition
|
|
2938
|
-
declare const onProductChanged: BuildEventDefinition
|
|
2939
|
-
declare const onProductDeleted: BuildEventDefinition
|
|
2940
|
-
declare const onProductCollectionCreated: BuildEventDefinition
|
|
2941
|
-
declare const onProductCollectionChanged: BuildEventDefinition
|
|
2942
|
-
declare const onProductCollectionDeleted: BuildEventDefinition
|
|
2943
|
-
declare const onProductVariantsChanged: BuildEventDefinition
|
|
2845
|
+
declare const createProduct: BuildRESTFunction<typeof createProduct$1>;
|
|
2846
|
+
declare const updateProduct: BuildRESTFunction<typeof updateProduct$1>;
|
|
2847
|
+
declare const deleteProduct: BuildRESTFunction<typeof deleteProduct$1>;
|
|
2848
|
+
declare const updateProductVariants: BuildRESTFunction<typeof updateProductVariants$1>;
|
|
2849
|
+
declare const resetAllProductVariantData: BuildRESTFunction<typeof resetAllProductVariantData$1>;
|
|
2850
|
+
declare const addProductsToCollection: BuildRESTFunction<typeof addProductsToCollection$1>;
|
|
2851
|
+
declare const removeProductsFromCollection: BuildRESTFunction<typeof removeProductsFromCollection$1>;
|
|
2852
|
+
declare const addProductMedia: BuildRESTFunction<typeof addProductMedia$1>;
|
|
2853
|
+
declare const removeProductMedia: BuildRESTFunction<typeof removeProductMedia$1>;
|
|
2854
|
+
declare const addProductMediaToChoices: BuildRESTFunction<typeof addProductMediaToChoices$1>;
|
|
2855
|
+
declare const removeProductMediaFromChoices: BuildRESTFunction<typeof removeProductMediaFromChoices$1>;
|
|
2856
|
+
declare const deleteProductOptions: BuildRESTFunction<typeof deleteProductOptions$1>;
|
|
2857
|
+
declare const removeBrand: BuildRESTFunction<typeof removeBrand$1>;
|
|
2858
|
+
declare const createCollection: BuildRESTFunction<typeof createCollection$1>;
|
|
2859
|
+
declare const updateCollection: BuildRESTFunction<typeof updateCollection$1>;
|
|
2860
|
+
declare const deleteCollection: BuildRESTFunction<typeof deleteCollection$1>;
|
|
2861
|
+
declare const removeRibbon: BuildRESTFunction<typeof removeRibbon$1>;
|
|
2862
|
+
declare const bulkUpdateProductsProperty: BuildRESTFunction<typeof bulkUpdateProductsProperty$1>;
|
|
2863
|
+
declare const bulkAdjustProductProperty: BuildRESTFunction<typeof bulkAdjustProductProperty$1>;
|
|
2864
|
+
declare const queryProducts: BuildRESTFunction<typeof queryProducts$1>;
|
|
2865
|
+
declare const getProduct: BuildRESTFunction<typeof getProduct$1>;
|
|
2866
|
+
declare const getCollectionBySlug: BuildRESTFunction<typeof getCollectionBySlug$1>;
|
|
2867
|
+
declare const getProductOptionsAvailability: BuildRESTFunction<typeof getProductOptionsAvailability$1>;
|
|
2868
|
+
declare const queryProductVariants: BuildRESTFunction<typeof queryProductVariants$1>;
|
|
2869
|
+
declare const queryStoreVariants: BuildRESTFunction<typeof queryStoreVariants$1>;
|
|
2870
|
+
declare const getStoreVariant: BuildRESTFunction<typeof getStoreVariant$1>;
|
|
2871
|
+
declare const onProductCreated: BuildEventDefinition<typeof onProductCreated$1>;
|
|
2872
|
+
declare const onProductChanged: BuildEventDefinition<typeof onProductChanged$1>;
|
|
2873
|
+
declare const onProductDeleted: BuildEventDefinition<typeof onProductDeleted$1>;
|
|
2874
|
+
declare const onProductCollectionCreated: BuildEventDefinition<typeof onProductCollectionCreated$1>;
|
|
2875
|
+
declare const onProductCollectionChanged: BuildEventDefinition<typeof onProductCollectionChanged$1>;
|
|
2876
|
+
declare const onProductCollectionDeleted: BuildEventDefinition<typeof onProductCollectionDeleted$1>;
|
|
2877
|
+
declare const onProductVariantsChanged: BuildEventDefinition<typeof onProductVariantsChanged$1>;
|
|
2944
2878
|
|
|
2945
2879
|
declare const context$2_addProductMedia: typeof addProductMedia;
|
|
2946
2880
|
declare const context$2_addProductMediaToChoices: typeof addProductMediaToChoices;
|
|
@@ -3100,40 +3034,7 @@ interface AssignSubscriptionOptionsToProductOptions {
|
|
|
3100
3034
|
assignedSubscriptionOptions?: SubscriptionOptionInProduct[];
|
|
3101
3035
|
}
|
|
3102
3036
|
|
|
3103
|
-
|
|
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 & {
|
|
3037
|
+
declare function createSubscriptionOption$1(httpClient: HttpClient): (subscriptionOption: SubscriptionOption) => Promise<SubscriptionOption & {
|
|
3137
3038
|
subscriptionSettings?: {
|
|
3138
3039
|
frequency: SubscriptionFrequency;
|
|
3139
3040
|
autoRenewal: boolean;
|
|
@@ -3143,7 +3044,7 @@ declare function createSubscriptionOption$1(httpClient: HttpClient$1): (subscrip
|
|
|
3143
3044
|
value: number;
|
|
3144
3045
|
} | undefined;
|
|
3145
3046
|
}>;
|
|
3146
|
-
declare function updateSubscriptionOption$1(httpClient: HttpClient
|
|
3047
|
+
declare function updateSubscriptionOption$1(httpClient: HttpClient): (_id: string | null, subscriptionOption: UpdateSubscriptionOption) => Promise<SubscriptionOption & {
|
|
3147
3048
|
subscriptionSettings?: {
|
|
3148
3049
|
frequency: SubscriptionFrequency;
|
|
3149
3050
|
autoRenewal: boolean;
|
|
@@ -3153,21 +3054,21 @@ declare function updateSubscriptionOption$1(httpClient: HttpClient$1): (_id: str
|
|
|
3153
3054
|
value: number;
|
|
3154
3055
|
} | undefined;
|
|
3155
3056
|
}>;
|
|
3156
|
-
declare function deleteSubscriptionOption$1(httpClient: HttpClient
|
|
3157
|
-
declare function bulkCreateSubscriptionOptions$1(httpClient: HttpClient
|
|
3158
|
-
declare function bulkUpdateSubscriptionOptions$1(httpClient: HttpClient
|
|
3159
|
-
declare function bulkDeleteSubscriptionOptions$1(httpClient: HttpClient
|
|
3160
|
-
declare function assignSubscriptionOptionsToProduct$1(httpClient: HttpClient
|
|
3161
|
-
declare function allowOneTimePurchases$1(httpClient: HttpClient
|
|
3057
|
+
declare function deleteSubscriptionOption$1(httpClient: HttpClient): (_id: string) => Promise<void>;
|
|
3058
|
+
declare function bulkCreateSubscriptionOptions$1(httpClient: HttpClient): (subscriptionOptions: SubscriptionOption[]) => Promise<BulkCreateSubscriptionOptionsResponse & BulkCreateSubscriptionOptionsResponseNonNullableFields>;
|
|
3059
|
+
declare function bulkUpdateSubscriptionOptions$1(httpClient: HttpClient): (subscriptionOptions: SubscriptionOption[]) => Promise<BulkUpdateSubscriptionOptionsResponse & BulkUpdateSubscriptionOptionsResponseNonNullableFields>;
|
|
3060
|
+
declare function bulkDeleteSubscriptionOptions$1(httpClient: HttpClient): (ids: string[]) => Promise<void>;
|
|
3061
|
+
declare function assignSubscriptionOptionsToProduct$1(httpClient: HttpClient): (productId: string, options?: AssignSubscriptionOptionsToProductOptions) => Promise<void>;
|
|
3062
|
+
declare function allowOneTimePurchases$1(httpClient: HttpClient): (productId: string, allowed: boolean | null) => Promise<void>;
|
|
3162
3063
|
|
|
3163
|
-
declare const createSubscriptionOption: BuildRESTFunction
|
|
3164
|
-
declare const updateSubscriptionOption: BuildRESTFunction
|
|
3165
|
-
declare const deleteSubscriptionOption: BuildRESTFunction
|
|
3166
|
-
declare const bulkCreateSubscriptionOptions: BuildRESTFunction
|
|
3167
|
-
declare const bulkUpdateSubscriptionOptions: BuildRESTFunction
|
|
3168
|
-
declare const bulkDeleteSubscriptionOptions: BuildRESTFunction
|
|
3169
|
-
declare const assignSubscriptionOptionsToProduct: BuildRESTFunction
|
|
3170
|
-
declare const allowOneTimePurchases: BuildRESTFunction
|
|
3064
|
+
declare const createSubscriptionOption: BuildRESTFunction<typeof createSubscriptionOption$1>;
|
|
3065
|
+
declare const updateSubscriptionOption: BuildRESTFunction<typeof updateSubscriptionOption$1>;
|
|
3066
|
+
declare const deleteSubscriptionOption: BuildRESTFunction<typeof deleteSubscriptionOption$1>;
|
|
3067
|
+
declare const bulkCreateSubscriptionOptions: BuildRESTFunction<typeof bulkCreateSubscriptionOptions$1>;
|
|
3068
|
+
declare const bulkUpdateSubscriptionOptions: BuildRESTFunction<typeof bulkUpdateSubscriptionOptions$1>;
|
|
3069
|
+
declare const bulkDeleteSubscriptionOptions: BuildRESTFunction<typeof bulkDeleteSubscriptionOptions$1>;
|
|
3070
|
+
declare const assignSubscriptionOptionsToProduct: BuildRESTFunction<typeof assignSubscriptionOptionsToProduct$1>;
|
|
3071
|
+
declare const allowOneTimePurchases: BuildRESTFunction<typeof allowOneTimePurchases$1>;
|
|
3171
3072
|
|
|
3172
3073
|
declare const context$1_allowOneTimePurchases: typeof allowOneTimePurchases;
|
|
3173
3074
|
declare const context$1_assignSubscriptionOptionsToProduct: typeof assignSubscriptionOptionsToProduct;
|
|
@@ -3518,49 +3419,6 @@ interface UpdateInventoryVariantsInventoryItem {
|
|
|
3518
3419
|
preorderInfo?: PreorderInfo;
|
|
3519
3420
|
}
|
|
3520
3421
|
|
|
3521
|
-
type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
|
|
3522
|
-
interface HttpClient {
|
|
3523
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
3524
|
-
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
3525
|
-
}
|
|
3526
|
-
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
3527
|
-
type HttpResponse<T = any> = {
|
|
3528
|
-
data: T;
|
|
3529
|
-
status: number;
|
|
3530
|
-
statusText: string;
|
|
3531
|
-
headers: any;
|
|
3532
|
-
request?: any;
|
|
3533
|
-
};
|
|
3534
|
-
type RequestOptions<_TResponse = any, Data = any> = {
|
|
3535
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
3536
|
-
url: string;
|
|
3537
|
-
data?: Data;
|
|
3538
|
-
params?: URLSearchParams;
|
|
3539
|
-
} & APIMetadata;
|
|
3540
|
-
type APIMetadata = {
|
|
3541
|
-
methodFqn?: string;
|
|
3542
|
-
entityFqdn?: string;
|
|
3543
|
-
packageName?: string;
|
|
3544
|
-
};
|
|
3545
|
-
type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
|
|
3546
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
3547
|
-
__type: 'event-definition';
|
|
3548
|
-
type: Type;
|
|
3549
|
-
isDomainEvent?: boolean;
|
|
3550
|
-
transformations?: (envelope: unknown) => Payload;
|
|
3551
|
-
__payload: Payload;
|
|
3552
|
-
};
|
|
3553
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
3554
|
-
type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
|
|
3555
|
-
type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
|
|
3556
|
-
|
|
3557
|
-
declare global {
|
|
3558
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
3559
|
-
interface SymbolConstructor {
|
|
3560
|
-
readonly observable: symbol;
|
|
3561
|
-
}
|
|
3562
|
-
}
|
|
3563
|
-
|
|
3564
3422
|
declare function getInventoryVariants$1(httpClient: HttpClient): (inventoryId: string, options?: GetInventoryVariantsOptions) => Promise<GetInventoryVariantsResponse & GetInventoryVariantsResponseNonNullableFields>;
|
|
3565
3423
|
declare function queryInventory$1(httpClient: HttpClient): (options?: QueryInventoryOptions) => Promise<QueryInventoryResponse & QueryInventoryResponseNonNullableFields>;
|
|
3566
3424
|
declare function updateInventoryVariants$1(httpClient: HttpClient): (productId: string | null, inventoryItem: UpdateInventoryVariantsInventoryItem) => Promise<void>;
|
|
@@ -151,29 +151,37 @@ interface GetWishlistByIdOptions {
|
|
|
151
151
|
kind?: WishlistItemKind[];
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
-
interface HttpClient
|
|
155
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory
|
|
154
|
+
interface HttpClient {
|
|
155
|
+
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
156
156
|
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
157
157
|
}
|
|
158
|
-
type RequestOptionsFactory
|
|
159
|
-
type HttpResponse
|
|
158
|
+
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
159
|
+
type HttpResponse<T = any> = {
|
|
160
160
|
data: T;
|
|
161
161
|
status: number;
|
|
162
162
|
statusText: string;
|
|
163
163
|
headers: any;
|
|
164
164
|
request?: any;
|
|
165
165
|
};
|
|
166
|
-
type RequestOptions
|
|
166
|
+
type RequestOptions<_TResponse = any, Data = any> = {
|
|
167
167
|
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
168
168
|
url: string;
|
|
169
169
|
data?: Data;
|
|
170
170
|
params?: URLSearchParams;
|
|
171
|
-
} & APIMetadata
|
|
172
|
-
type APIMetadata
|
|
171
|
+
} & APIMetadata;
|
|
172
|
+
type APIMetadata = {
|
|
173
173
|
methodFqn?: string;
|
|
174
174
|
entityFqdn?: string;
|
|
175
175
|
packageName?: string;
|
|
176
176
|
};
|
|
177
|
+
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
178
|
+
__type: 'event-definition';
|
|
179
|
+
type: Type;
|
|
180
|
+
isDomainEvent?: boolean;
|
|
181
|
+
transformations?: (envelope: unknown) => Payload;
|
|
182
|
+
__payload: Payload;
|
|
183
|
+
};
|
|
184
|
+
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
177
185
|
|
|
178
186
|
declare global {
|
|
179
187
|
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
@@ -185,7 +193,7 @@ declare global {
|
|
|
185
193
|
declare const __metadata$4: {
|
|
186
194
|
PACKAGE_NAME: string;
|
|
187
195
|
};
|
|
188
|
-
declare function getWishlistById(httpClient: HttpClient
|
|
196
|
+
declare function getWishlistById(httpClient: HttpClient): (_id: string, options?: GetWishlistByIdOptions) => Promise<WishlistData & {
|
|
189
197
|
ownerId: string;
|
|
190
198
|
items: {
|
|
191
199
|
_id: string;
|
|
@@ -646,42 +654,11 @@ interface CollectionsQueryBuilder {
|
|
|
646
654
|
find: () => Promise<CollectionsQueryResult>;
|
|
647
655
|
}
|
|
648
656
|
|
|
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
|
-
|
|
680
657
|
declare const __metadata$3: {
|
|
681
658
|
PACKAGE_NAME: string;
|
|
682
659
|
};
|
|
683
|
-
declare function queryCollections(httpClient: HttpClient
|
|
684
|
-
declare function getCollection(httpClient: HttpClient
|
|
660
|
+
declare function queryCollections(httpClient: HttpClient): () => CollectionsQueryBuilder;
|
|
661
|
+
declare function getCollection(httpClient: HttpClient): (_id: string) => Promise<Collection$1 & {
|
|
685
662
|
media?: {
|
|
686
663
|
mainMedia?: {
|
|
687
664
|
image?: {
|
|
@@ -732,7 +709,7 @@ declare function getCollection(httpClient: HttpClient$3): (_id: string) => Promi
|
|
|
732
709
|
} | undefined;
|
|
733
710
|
numberOfProducts: number;
|
|
734
711
|
}>;
|
|
735
|
-
declare function getCollectionBySlug$1(httpClient: HttpClient
|
|
712
|
+
declare function getCollectionBySlug$1(httpClient: HttpClient): (slug: string) => Promise<GetCollectionBySlugResponse$1 & GetCollectionBySlugResponseNonNullableFields$1>;
|
|
736
713
|
|
|
737
714
|
type index_d$3_CollectionsQueryBuilder = CollectionsQueryBuilder;
|
|
738
715
|
type index_d$3_CollectionsQueryResult = CollectionsQueryResult;
|
|
@@ -3933,81 +3910,42 @@ interface QueryProductVariantsOptions {
|
|
|
3933
3910
|
includeMerchantSpecificData?: boolean;
|
|
3934
3911
|
}
|
|
3935
3912
|
|
|
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
|
-
|
|
3975
3913
|
declare const __metadata$2: {
|
|
3976
3914
|
PACKAGE_NAME: string;
|
|
3977
3915
|
};
|
|
3978
|
-
declare function createProduct(httpClient: HttpClient
|
|
3979
|
-
declare function updateProduct(httpClient: HttpClient
|
|
3980
|
-
declare function deleteProduct(httpClient: HttpClient
|
|
3981
|
-
declare function updateProductVariants(httpClient: HttpClient
|
|
3982
|
-
declare function resetAllProductVariantData(httpClient: HttpClient
|
|
3983
|
-
declare function addProductsToCollection(httpClient: HttpClient
|
|
3984
|
-
declare function removeProductsFromCollection(httpClient: HttpClient
|
|
3985
|
-
declare function addProductMedia(httpClient: HttpClient
|
|
3986
|
-
declare function removeProductMedia(httpClient: HttpClient
|
|
3987
|
-
declare function addProductMediaToChoices(httpClient: HttpClient
|
|
3988
|
-
declare function removeProductMediaFromChoices(httpClient: HttpClient
|
|
3989
|
-
declare function deleteProductOptions(httpClient: HttpClient
|
|
3990
|
-
declare function removeBrand(httpClient: HttpClient
|
|
3991
|
-
declare function createCollection(httpClient: HttpClient
|
|
3992
|
-
declare function updateCollection(httpClient: HttpClient
|
|
3993
|
-
declare function deleteCollection(httpClient: HttpClient
|
|
3994
|
-
declare function removeRibbon(httpClient: HttpClient
|
|
3995
|
-
declare function bulkUpdateProductsProperty(httpClient: HttpClient
|
|
3996
|
-
declare function bulkAdjustProductProperty(httpClient: HttpClient
|
|
3997
|
-
declare function queryProducts(httpClient: HttpClient
|
|
3998
|
-
declare function getProduct(httpClient: HttpClient
|
|
3999
|
-
declare function getCollectionBySlug(httpClient: HttpClient
|
|
4000
|
-
declare function getProductOptionsAvailability(httpClient: HttpClient
|
|
4001
|
-
declare function queryProductVariants(httpClient: HttpClient
|
|
4002
|
-
declare function queryStoreVariants(httpClient: HttpClient
|
|
4003
|
-
declare function getStoreVariant(httpClient: HttpClient
|
|
4004
|
-
declare const onProductCreated: EventDefinition
|
|
4005
|
-
declare const onProductChanged: EventDefinition
|
|
4006
|
-
declare const onProductDeleted: EventDefinition
|
|
4007
|
-
declare const onProductCollectionCreated: EventDefinition
|
|
4008
|
-
declare const onProductCollectionChanged: EventDefinition
|
|
4009
|
-
declare const onProductCollectionDeleted: EventDefinition
|
|
4010
|
-
declare const onProductVariantsChanged: EventDefinition
|
|
3916
|
+
declare function createProduct(httpClient: HttpClient): (product: Product) => Promise<CreateProductResponse & CreateProductResponseNonNullableFields>;
|
|
3917
|
+
declare function updateProduct(httpClient: HttpClient): (_id: string, product: UpdateProduct) => Promise<UpdateProductResponse & UpdateProductResponseNonNullableFields>;
|
|
3918
|
+
declare function deleteProduct(httpClient: HttpClient): (_id: string) => Promise<void>;
|
|
3919
|
+
declare function updateProductVariants(httpClient: HttpClient): (_id: string, variants: VariantOverride[]) => Promise<UpdateVariantsResponse & UpdateVariantsResponseNonNullableFields>;
|
|
3920
|
+
declare function resetAllProductVariantData(httpClient: HttpClient): (_id: string) => Promise<void>;
|
|
3921
|
+
declare function addProductsToCollection(httpClient: HttpClient): (_id: string, productIds: string[]) => Promise<void>;
|
|
3922
|
+
declare function removeProductsFromCollection(httpClient: HttpClient): (_id: string, productIds: string[]) => Promise<void>;
|
|
3923
|
+
declare function addProductMedia(httpClient: HttpClient): (_id: string, media: MediaDataForWrite[]) => Promise<void>;
|
|
3924
|
+
declare function removeProductMedia(httpClient: HttpClient): (_id: string, mediaIds: string[]) => Promise<void>;
|
|
3925
|
+
declare function addProductMediaToChoices(httpClient: HttpClient): (_id: string, media: MediaAssignmentToChoice[]) => Promise<void>;
|
|
3926
|
+
declare function removeProductMediaFromChoices(httpClient: HttpClient): (_id: string, media: MediaAssignmentToChoice[]) => Promise<void>;
|
|
3927
|
+
declare function deleteProductOptions(httpClient: HttpClient): (_id: string) => Promise<void>;
|
|
3928
|
+
declare function removeBrand(httpClient: HttpClient): (_id: string) => Promise<void>;
|
|
3929
|
+
declare function createCollection(httpClient: HttpClient): (collection: Collection) => Promise<CreateCollectionResponse & CreateCollectionResponseNonNullableFields>;
|
|
3930
|
+
declare function updateCollection(httpClient: HttpClient): (_id: string | null, collection: UpdateCollection) => Promise<UpdateCollectionResponse & UpdateCollectionResponseNonNullableFields>;
|
|
3931
|
+
declare function deleteCollection(httpClient: HttpClient): (_id: string) => Promise<void>;
|
|
3932
|
+
declare function removeRibbon(httpClient: HttpClient): (_id: string) => Promise<void>;
|
|
3933
|
+
declare function bulkUpdateProductsProperty(httpClient: HttpClient): (ids: string[], set: SetValue) => Promise<BulkUpdateProductsResponse & BulkUpdateProductsResponseNonNullableFields>;
|
|
3934
|
+
declare function bulkAdjustProductProperty(httpClient: HttpClient): (adjust: AdjustValue, ids: string[]) => Promise<BulkAdjustProductPropertiesResponse & BulkAdjustProductPropertiesResponseNonNullableFields>;
|
|
3935
|
+
declare function queryProducts(httpClient: HttpClient): () => ProductsQueryBuilder;
|
|
3936
|
+
declare function getProduct(httpClient: HttpClient): (_id: string, options?: GetProductOptions) => Promise<GetProductResponse & GetProductResponseNonNullableFields>;
|
|
3937
|
+
declare function getCollectionBySlug(httpClient: HttpClient): (slug: string) => Promise<GetCollectionBySlugResponse & GetCollectionBySlugResponseNonNullableFields>;
|
|
3938
|
+
declare function getProductOptionsAvailability(httpClient: HttpClient): (_id: string, options: Record<string, string>) => Promise<ProductOptionsAvailabilityResponse & ProductOptionsAvailabilityResponseNonNullableFields>;
|
|
3939
|
+
declare function queryProductVariants(httpClient: HttpClient): (_id: string, options?: QueryProductVariantsOptions) => Promise<QueryProductVariantsResponse & QueryProductVariantsResponseNonNullableFields>;
|
|
3940
|
+
declare function queryStoreVariants(httpClient: HttpClient): (query: PlatformQuery) => Promise<QueryStoreVariantsResponse & QueryStoreVariantsResponseNonNullableFields>;
|
|
3941
|
+
declare function getStoreVariant(httpClient: HttpClient): (_id: string) => Promise<GetStoreVariantResponse & GetStoreVariantResponseNonNullableFields>;
|
|
3942
|
+
declare const onProductCreated: EventDefinition<ProductCreatedEnvelope, "com.wix.ecommerce.catalog.api.v1.ProductCreated">;
|
|
3943
|
+
declare const onProductChanged: EventDefinition<ProductChangedEnvelope, "com.wix.ecommerce.catalog.api.v1.ProductChanged">;
|
|
3944
|
+
declare const onProductDeleted: EventDefinition<ProductDeletedEnvelope, "com.wix.ecommerce.catalog.api.v1.ProductDeleted">;
|
|
3945
|
+
declare const onProductCollectionCreated: EventDefinition<ProductCollectionCreatedEnvelope, "com.wix.ecommerce.catalog.api.v1.CollectionCreated">;
|
|
3946
|
+
declare const onProductCollectionChanged: EventDefinition<ProductCollectionChangedEnvelope, "com.wix.ecommerce.catalog.api.v1.CollectionChanged">;
|
|
3947
|
+
declare const onProductCollectionDeleted: EventDefinition<ProductCollectionDeletedEnvelope, "com.wix.ecommerce.catalog.api.v1.CollectionDeleted">;
|
|
3948
|
+
declare const onProductVariantsChanged: EventDefinition<ProductVariantsChangedEnvelope, "com.wix.ecommerce.catalog.api.v1.VariantsChanged">;
|
|
4011
3949
|
|
|
4012
3950
|
type index_d$2_AddProductMediaRequest = AddProductMediaRequest;
|
|
4013
3951
|
type index_d$2_AddProductMediaResponse = AddProductMediaResponse;
|
|
@@ -4594,41 +4532,10 @@ interface AssignSubscriptionOptionsToProductOptions {
|
|
|
4594
4532
|
assignedSubscriptionOptions?: SubscriptionOptionInProduct[];
|
|
4595
4533
|
}
|
|
4596
4534
|
|
|
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
|
-
|
|
4628
4535
|
declare const __metadata$1: {
|
|
4629
4536
|
PACKAGE_NAME: string;
|
|
4630
4537
|
};
|
|
4631
|
-
declare function createSubscriptionOption(httpClient: HttpClient
|
|
4538
|
+
declare function createSubscriptionOption(httpClient: HttpClient): (subscriptionOption: SubscriptionOption) => Promise<SubscriptionOption & {
|
|
4632
4539
|
subscriptionSettings?: {
|
|
4633
4540
|
frequency: SubscriptionFrequency;
|
|
4634
4541
|
autoRenewal: boolean;
|
|
@@ -4638,7 +4545,7 @@ declare function createSubscriptionOption(httpClient: HttpClient$1): (subscripti
|
|
|
4638
4545
|
value: number;
|
|
4639
4546
|
} | undefined;
|
|
4640
4547
|
}>;
|
|
4641
|
-
declare function updateSubscriptionOption(httpClient: HttpClient
|
|
4548
|
+
declare function updateSubscriptionOption(httpClient: HttpClient): (_id: string | null, subscriptionOption: UpdateSubscriptionOption) => Promise<SubscriptionOption & {
|
|
4642
4549
|
subscriptionSettings?: {
|
|
4643
4550
|
frequency: SubscriptionFrequency;
|
|
4644
4551
|
autoRenewal: boolean;
|
|
@@ -4648,12 +4555,12 @@ declare function updateSubscriptionOption(httpClient: HttpClient$1): (_id: strin
|
|
|
4648
4555
|
value: number;
|
|
4649
4556
|
} | undefined;
|
|
4650
4557
|
}>;
|
|
4651
|
-
declare function deleteSubscriptionOption(httpClient: HttpClient
|
|
4652
|
-
declare function bulkCreateSubscriptionOptions(httpClient: HttpClient
|
|
4653
|
-
declare function bulkUpdateSubscriptionOptions(httpClient: HttpClient
|
|
4654
|
-
declare function bulkDeleteSubscriptionOptions(httpClient: HttpClient
|
|
4655
|
-
declare function assignSubscriptionOptionsToProduct(httpClient: HttpClient
|
|
4656
|
-
declare function allowOneTimePurchases(httpClient: HttpClient
|
|
4558
|
+
declare function deleteSubscriptionOption(httpClient: HttpClient): (_id: string) => Promise<void>;
|
|
4559
|
+
declare function bulkCreateSubscriptionOptions(httpClient: HttpClient): (subscriptionOptions: SubscriptionOption[]) => Promise<BulkCreateSubscriptionOptionsResponse & BulkCreateSubscriptionOptionsResponseNonNullableFields>;
|
|
4560
|
+
declare function bulkUpdateSubscriptionOptions(httpClient: HttpClient): (subscriptionOptions: SubscriptionOption[]) => Promise<BulkUpdateSubscriptionOptionsResponse & BulkUpdateSubscriptionOptionsResponseNonNullableFields>;
|
|
4561
|
+
declare function bulkDeleteSubscriptionOptions(httpClient: HttpClient): (ids: string[]) => Promise<void>;
|
|
4562
|
+
declare function assignSubscriptionOptionsToProduct(httpClient: HttpClient): (productId: string, options?: AssignSubscriptionOptionsToProductOptions) => Promise<void>;
|
|
4563
|
+
declare function allowOneTimePurchases(httpClient: HttpClient): (productId: string, allowed: boolean | null) => Promise<void>;
|
|
4657
4564
|
|
|
4658
4565
|
type index_d$1_AllowOneTimePurchasesRequest = AllowOneTimePurchasesRequest;
|
|
4659
4566
|
type index_d$1_AllowOneTimePurchasesResponse = AllowOneTimePurchasesResponse;
|
|
@@ -5149,45 +5056,6 @@ interface UpdateInventoryVariantsInventoryItem {
|
|
|
5149
5056
|
preorderInfo?: PreorderInfo;
|
|
5150
5057
|
}
|
|
5151
5058
|
|
|
5152
|
-
interface HttpClient {
|
|
5153
|
-
request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
|
|
5154
|
-
fetchWithAuth: (url: string | URL, init?: RequestInit) => Promise<Response>;
|
|
5155
|
-
}
|
|
5156
|
-
type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
|
|
5157
|
-
type HttpResponse<T = any> = {
|
|
5158
|
-
data: T;
|
|
5159
|
-
status: number;
|
|
5160
|
-
statusText: string;
|
|
5161
|
-
headers: any;
|
|
5162
|
-
request?: any;
|
|
5163
|
-
};
|
|
5164
|
-
type RequestOptions<_TResponse = any, Data = any> = {
|
|
5165
|
-
method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
|
|
5166
|
-
url: string;
|
|
5167
|
-
data?: Data;
|
|
5168
|
-
params?: URLSearchParams;
|
|
5169
|
-
} & APIMetadata;
|
|
5170
|
-
type APIMetadata = {
|
|
5171
|
-
methodFqn?: string;
|
|
5172
|
-
entityFqdn?: string;
|
|
5173
|
-
packageName?: string;
|
|
5174
|
-
};
|
|
5175
|
-
type EventDefinition<Payload = unknown, Type extends string = string> = {
|
|
5176
|
-
__type: 'event-definition';
|
|
5177
|
-
type: Type;
|
|
5178
|
-
isDomainEvent?: boolean;
|
|
5179
|
-
transformations?: (envelope: unknown) => Payload;
|
|
5180
|
-
__payload: Payload;
|
|
5181
|
-
};
|
|
5182
|
-
declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
|
|
5183
|
-
|
|
5184
|
-
declare global {
|
|
5185
|
-
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
|
|
5186
|
-
interface SymbolConstructor {
|
|
5187
|
-
readonly observable: symbol;
|
|
5188
|
-
}
|
|
5189
|
-
}
|
|
5190
|
-
|
|
5191
5059
|
declare const __metadata: {
|
|
5192
5060
|
PACKAGE_NAME: string;
|
|
5193
5061
|
};
|