@wix/metro 1.0.84 → 1.0.85

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.
@@ -1 +1,2 @@
1
- export * as products from '@wix/metro_products';
1
+ import * as products from '@wix/metro_products';
2
+ export { products };
@@ -24,5 +24,6 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.products = void 0;
27
- exports.products = __importStar(require("@wix/metro_products"));
27
+ const products = __importStar(require("@wix/metro_products"));
28
+ exports.products = products;
28
29
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gEAAgD"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8DAAgD;AAEvC,4BAAQ"}
@@ -1 +1,2 @@
1
- export * as products from '@wix/metro_products';
1
+ import * as products from '@wix/metro_products';
2
+ export { products };
package/build/es/index.js CHANGED
@@ -1,2 +1,3 @@
1
- export * as products from '@wix/metro_products';
1
+ import * as products from '@wix/metro_products';
2
+ export { products };
2
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,qBAAqB,CAAC;AAEhD,OAAO,EAAE,QAAQ,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/metro",
3
- "version": "1.0.84",
3
+ "version": "1.0.85",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -18,7 +18,7 @@
18
18
  "type-bundles"
19
19
  ],
20
20
  "dependencies": {
21
- "@wix/metro_products": "1.0.10"
21
+ "@wix/metro_products": "1.0.11"
22
22
  },
23
23
  "devDependencies": {
24
24
  "glob": "^10.4.1",
@@ -27,8 +27,9 @@
27
27
  "typescript": "^5.3.2"
28
28
  },
29
29
  "scripts": {
30
- "build": "tsc -b tsconfig.json tsconfig.esm.json && npm run build:dts-bundles",
30
+ "build": "tsc -b tsconfig.json tsconfig.esm.json && npm run build:dts-bundles && npm run build:validate-dts",
31
31
  "build:dts-bundles": "test -f config/rollup-config.js && NODE_OPTIONS=--max-old-space-size=8192 rollup --config config/rollup-config.js || echo 'Warning: config/rollup-config.js not found!'",
32
+ "build:validate-dts": "tsc type-bundles/*.d.ts --noEmit",
32
33
  "test": ":"
33
34
  },
34
35
  "wix": {
@@ -42,5 +43,5 @@
42
43
  "fqdn": ""
43
44
  }
44
45
  },
45
- "falconPackageHash": "cbff5ccc690a031dbf792273c5ed204f8603145cd4b764be0dd0ab1c"
46
+ "falconPackageHash": "2244f018730f35e98b2950b3ef73a6feafe277f978267157b96d704a"
46
47
  }
@@ -1,3 +1,37 @@
1
+ type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
2
+ interface HttpClient {
3
+ request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
4
+ fetchWithAuth: typeof fetch;
5
+ wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
6
+ }
7
+ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
8
+ type HttpResponse<T = any> = {
9
+ data: T;
10
+ status: number;
11
+ statusText: string;
12
+ headers: any;
13
+ request?: any;
14
+ };
15
+ type RequestOptions<_TResponse = any, Data = any> = {
16
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
17
+ url: string;
18
+ data?: Data;
19
+ params?: URLSearchParams;
20
+ } & APIMetadata;
21
+ type APIMetadata = {
22
+ methodFqn?: string;
23
+ entityFqdn?: string;
24
+ packageName?: string;
25
+ };
26
+ type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
27
+
28
+ declare global {
29
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
30
+ interface SymbolConstructor {
31
+ readonly observable: symbol;
32
+ }
33
+ }
34
+
1
35
  /** Physical address */
2
36
  interface Address extends AddressStreetOneOf {
3
37
  /** Street name and number. */
@@ -600,51 +634,73 @@ interface BulkUpdateProductsOptions {
600
634
  returnEntity?: boolean;
601
635
  }
602
636
 
603
- type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
604
- interface HttpClient {
605
- request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
606
- fetchWithAuth: typeof fetch;
607
- wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
637
+ declare function createProduct$1(httpClient: HttpClient): CreateProductSignature;
638
+ interface CreateProductSignature {
639
+ /**
640
+ * Creating a product
641
+ */
642
+ (options?: CreateProductOptions | undefined): Promise<Product & ProductNonNullableFields>;
608
643
  }
609
- type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
610
- type HttpResponse<T = any> = {
611
- data: T;
612
- status: number;
613
- statusText: string;
614
- headers: any;
615
- request?: any;
616
- };
617
- type RequestOptions<_TResponse = any, Data = any> = {
618
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
619
- url: string;
620
- data?: Data;
621
- params?: URLSearchParams;
622
- } & APIMetadata;
623
- type APIMetadata = {
624
- methodFqn?: string;
625
- entityFqdn?: string;
626
- packageName?: string;
627
- };
628
- type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
629
-
630
- declare global {
631
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
632
- interface SymbolConstructor {
633
- readonly observable: symbol;
634
- }
644
+ declare function deleteProduct$1(httpClient: HttpClient): DeleteProductSignature;
645
+ interface DeleteProductSignature {
646
+ /** */
647
+ (productId: string): Promise<void>;
648
+ }
649
+ declare function updateProduct$1(httpClient: HttpClient): UpdateProductSignature;
650
+ interface UpdateProductSignature {
651
+ /** */
652
+ (productId: string, options?: UpdateProductOptions | undefined): Promise<Product & ProductNonNullableFields>;
653
+ }
654
+ declare function getProduct$1(httpClient: HttpClient): GetProductSignature;
655
+ interface GetProductSignature {
656
+ /**
657
+ * override description
658
+ * @param - ## new override param 1
659
+ * @returns ## override return
660
+ */
661
+ (productId: string): Promise<Product & ProductNonNullableFields>;
662
+ }
663
+ declare function getProductsStartWith$1(httpClient: HttpClient): GetProductsStartWithSignature;
664
+ interface GetProductsStartWithSignature {
665
+ /** */
666
+ (title: string, options?: GetProductsStartWithOptions | undefined): Promise<GetProductsStartWithResponse & GetProductsStartWithResponseNonNullableFields>;
667
+ }
668
+ declare function queryProducts$1(httpClient: HttpClient): QueryProductsSignature;
669
+ interface QueryProductsSignature {
670
+ /** */
671
+ (options?: QueryProductsOptions | undefined): ProductsQueryBuilder;
672
+ }
673
+ declare function bulkCreateProducts$1(httpClient: HttpClient): BulkCreateProductsSignature;
674
+ interface BulkCreateProductsSignature {
675
+ /**
676
+ * create multiple products in a single request. Works synchronously
677
+ */
678
+ (products: Product[], options?: BulkCreateProductsOptions | undefined): Promise<BulkCreateProductsResponse & BulkCreateProductsResponseNonNullableFields>;
679
+ }
680
+ declare function bulkUpdateProducts$1(httpClient: HttpClient): BulkUpdateProductsSignature;
681
+ interface BulkUpdateProductsSignature {
682
+ /**
683
+ * update multiple products in a single request. Works synchronously.
684
+ */
685
+ (products: MaskedProduct[], options?: BulkUpdateProductsOptions | undefined): Promise<BulkUpdateProductsResponse & BulkUpdateProductsResponseNonNullableFields>;
686
+ }
687
+ declare function bulkDeleteProducts$1(httpClient: HttpClient): BulkDeleteProductsSignature;
688
+ interface BulkDeleteProductsSignature {
689
+ /**
690
+ * deletes multiple products in a single request. Works synchronously.
691
+ */
692
+ (productIds: string[]): Promise<BulkDeleteProductsResponse & BulkDeleteProductsResponseNonNullableFields>;
635
693
  }
636
694
 
637
- declare function createRESTModule<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
638
-
639
- declare const createProduct: ReturnType<typeof createRESTModule<typeof publicCreateProduct>>;
640
- declare const deleteProduct: ReturnType<typeof createRESTModule<typeof publicDeleteProduct>>;
641
- declare const updateProduct: ReturnType<typeof createRESTModule<typeof publicUpdateProduct>>;
642
- declare const getProduct: ReturnType<typeof createRESTModule<typeof publicGetProduct>>;
643
- declare const getProductsStartWith: ReturnType<typeof createRESTModule<typeof publicGetProductsStartWith>>;
644
- declare const queryProducts: ReturnType<typeof createRESTModule<typeof publicQueryProducts>>;
645
- declare const bulkCreateProducts: ReturnType<typeof createRESTModule<typeof publicBulkCreateProducts>>;
646
- declare const bulkUpdateProducts: ReturnType<typeof createRESTModule<typeof publicBulkUpdateProducts>>;
647
- declare const bulkDeleteProducts: ReturnType<typeof createRESTModule<typeof publicBulkDeleteProducts>>;
695
+ declare const createProduct: BuildRESTFunction<typeof createProduct$1> & typeof createProduct$1;
696
+ declare const deleteProduct: BuildRESTFunction<typeof deleteProduct$1> & typeof deleteProduct$1;
697
+ declare const updateProduct: BuildRESTFunction<typeof updateProduct$1> & typeof updateProduct$1;
698
+ declare const getProduct: BuildRESTFunction<typeof getProduct$1> & typeof getProduct$1;
699
+ declare const getProductsStartWith: BuildRESTFunction<typeof getProductsStartWith$1> & typeof getProductsStartWith$1;
700
+ declare const queryProducts: BuildRESTFunction<typeof queryProducts$1> & typeof queryProducts$1;
701
+ declare const bulkCreateProducts: BuildRESTFunction<typeof bulkCreateProducts$1> & typeof bulkCreateProducts$1;
702
+ declare const bulkUpdateProducts: BuildRESTFunction<typeof bulkUpdateProducts$1> & typeof bulkUpdateProducts$1;
703
+ declare const bulkDeleteProducts: BuildRESTFunction<typeof bulkDeleteProducts$1> & typeof bulkDeleteProducts$1;
648
704
 
649
705
  type context_ActionEvent = ActionEvent;
650
706
  type context_Address = Address;
@@ -1,3 +1,37 @@
1
+ type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
2
+ interface HttpClient {
3
+ request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
4
+ fetchWithAuth: typeof fetch;
5
+ wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
6
+ }
7
+ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
8
+ type HttpResponse<T = any> = {
9
+ data: T;
10
+ status: number;
11
+ statusText: string;
12
+ headers: any;
13
+ request?: any;
14
+ };
15
+ type RequestOptions<_TResponse = any, Data = any> = {
16
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
17
+ url: string;
18
+ data?: Data;
19
+ params?: URLSearchParams;
20
+ } & APIMetadata;
21
+ type APIMetadata = {
22
+ methodFqn?: string;
23
+ entityFqdn?: string;
24
+ packageName?: string;
25
+ };
26
+ type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
27
+
28
+ declare global {
29
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
30
+ interface SymbolConstructor {
31
+ readonly observable: symbol;
32
+ }
33
+ }
34
+
1
35
  /** Physical address */
2
36
  interface Address extends AddressStreetOneOf {
3
37
  /** Street name and number. */
@@ -600,51 +634,73 @@ interface BulkUpdateProductsOptions {
600
634
  returnEntity?: boolean;
601
635
  }
602
636
 
603
- type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
604
- interface HttpClient {
605
- request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
606
- fetchWithAuth: typeof fetch;
607
- wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
637
+ declare function createProduct$1(httpClient: HttpClient): CreateProductSignature;
638
+ interface CreateProductSignature {
639
+ /**
640
+ * Creating a product
641
+ */
642
+ (options?: CreateProductOptions | undefined): Promise<Product & ProductNonNullableFields>;
608
643
  }
609
- type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
610
- type HttpResponse<T = any> = {
611
- data: T;
612
- status: number;
613
- statusText: string;
614
- headers: any;
615
- request?: any;
616
- };
617
- type RequestOptions<_TResponse = any, Data = any> = {
618
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
619
- url: string;
620
- data?: Data;
621
- params?: URLSearchParams;
622
- } & APIMetadata;
623
- type APIMetadata = {
624
- methodFqn?: string;
625
- entityFqdn?: string;
626
- packageName?: string;
627
- };
628
- type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
629
-
630
- declare global {
631
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
632
- interface SymbolConstructor {
633
- readonly observable: symbol;
634
- }
644
+ declare function deleteProduct$1(httpClient: HttpClient): DeleteProductSignature;
645
+ interface DeleteProductSignature {
646
+ /** */
647
+ (productId: string): Promise<void>;
648
+ }
649
+ declare function updateProduct$1(httpClient: HttpClient): UpdateProductSignature;
650
+ interface UpdateProductSignature {
651
+ /** */
652
+ (productId: string, options?: UpdateProductOptions | undefined): Promise<Product & ProductNonNullableFields>;
653
+ }
654
+ declare function getProduct$1(httpClient: HttpClient): GetProductSignature;
655
+ interface GetProductSignature {
656
+ /**
657
+ * override description
658
+ * @param - ## new override param 1
659
+ * @returns ## override return
660
+ */
661
+ (productId: string): Promise<Product & ProductNonNullableFields>;
662
+ }
663
+ declare function getProductsStartWith$1(httpClient: HttpClient): GetProductsStartWithSignature;
664
+ interface GetProductsStartWithSignature {
665
+ /** */
666
+ (title: string, options?: GetProductsStartWithOptions | undefined): Promise<GetProductsStartWithResponse & GetProductsStartWithResponseNonNullableFields>;
667
+ }
668
+ declare function queryProducts$1(httpClient: HttpClient): QueryProductsSignature;
669
+ interface QueryProductsSignature {
670
+ /** */
671
+ (options?: QueryProductsOptions | undefined): ProductsQueryBuilder;
672
+ }
673
+ declare function bulkCreateProducts$1(httpClient: HttpClient): BulkCreateProductsSignature;
674
+ interface BulkCreateProductsSignature {
675
+ /**
676
+ * create multiple products in a single request. Works synchronously
677
+ */
678
+ (products: Product[], options?: BulkCreateProductsOptions | undefined): Promise<BulkCreateProductsResponse & BulkCreateProductsResponseNonNullableFields>;
679
+ }
680
+ declare function bulkUpdateProducts$1(httpClient: HttpClient): BulkUpdateProductsSignature;
681
+ interface BulkUpdateProductsSignature {
682
+ /**
683
+ * update multiple products in a single request. Works synchronously.
684
+ */
685
+ (products: MaskedProduct[], options?: BulkUpdateProductsOptions | undefined): Promise<BulkUpdateProductsResponse & BulkUpdateProductsResponseNonNullableFields>;
686
+ }
687
+ declare function bulkDeleteProducts$1(httpClient: HttpClient): BulkDeleteProductsSignature;
688
+ interface BulkDeleteProductsSignature {
689
+ /**
690
+ * deletes multiple products in a single request. Works synchronously.
691
+ */
692
+ (productIds: string[]): Promise<BulkDeleteProductsResponse & BulkDeleteProductsResponseNonNullableFields>;
635
693
  }
636
694
 
637
- declare function createRESTModule<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
638
-
639
- declare const createProduct: ReturnType<typeof createRESTModule<typeof publicCreateProduct>>;
640
- declare const deleteProduct: ReturnType<typeof createRESTModule<typeof publicDeleteProduct>>;
641
- declare const updateProduct: ReturnType<typeof createRESTModule<typeof publicUpdateProduct>>;
642
- declare const getProduct: ReturnType<typeof createRESTModule<typeof publicGetProduct>>;
643
- declare const getProductsStartWith: ReturnType<typeof createRESTModule<typeof publicGetProductsStartWith>>;
644
- declare const queryProducts: ReturnType<typeof createRESTModule<typeof publicQueryProducts>>;
645
- declare const bulkCreateProducts: ReturnType<typeof createRESTModule<typeof publicBulkCreateProducts>>;
646
- declare const bulkUpdateProducts: ReturnType<typeof createRESTModule<typeof publicBulkUpdateProducts>>;
647
- declare const bulkDeleteProducts: ReturnType<typeof createRESTModule<typeof publicBulkDeleteProducts>>;
695
+ declare const createProduct: BuildRESTFunction<typeof createProduct$1> & typeof createProduct$1;
696
+ declare const deleteProduct: BuildRESTFunction<typeof deleteProduct$1> & typeof deleteProduct$1;
697
+ declare const updateProduct: BuildRESTFunction<typeof updateProduct$1> & typeof updateProduct$1;
698
+ declare const getProduct: BuildRESTFunction<typeof getProduct$1> & typeof getProduct$1;
699
+ declare const getProductsStartWith: BuildRESTFunction<typeof getProductsStartWith$1> & typeof getProductsStartWith$1;
700
+ declare const queryProducts: BuildRESTFunction<typeof queryProducts$1> & typeof queryProducts$1;
701
+ declare const bulkCreateProducts: BuildRESTFunction<typeof bulkCreateProducts$1> & typeof bulkCreateProducts$1;
702
+ declare const bulkUpdateProducts: BuildRESTFunction<typeof bulkUpdateProducts$1> & typeof bulkUpdateProducts$1;
703
+ declare const bulkDeleteProducts: BuildRESTFunction<typeof bulkDeleteProducts$1> & typeof bulkDeleteProducts$1;
648
704
 
649
705
  type index_d_ActionEvent = ActionEvent;
650
706
  type index_d_Address = Address;