@wix/auto_sdk_metro_products 1.0.6 → 1.0.8
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/build/cjs/index.d.ts +10 -9
- package/build/cjs/index.js +83 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +7 -1
- package/build/cjs/index.typings.js +64 -0
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.js +6 -0
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +10 -9
- package/build/es/index.mjs +83 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +7 -1
- package/build/es/index.typings.mjs +63 -0
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.mjs +6 -0
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +10 -9
- package/build/internal/cjs/index.js +83 -1
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +7 -1
- package/build/internal/cjs/index.typings.js +64 -0
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.js +6 -0
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +10 -9
- package/build/internal/es/index.mjs +83 -1
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +7 -1
- package/build/internal/es/index.typings.mjs +63 -0
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.mjs +6 -0
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -541,6 +541,12 @@ interface ProductsQueryBuilder {
|
|
|
541
541
|
skipTo: (cursor: string) => ProductsQueryBuilder;
|
|
542
542
|
find: () => Promise<ProductsQueryResult>;
|
|
543
543
|
}
|
|
544
|
+
/**
|
|
545
|
+
* @hidden
|
|
546
|
+
* @fqn wix.coreservices.metroinspector.v1.products.ProductsService.QueryProducts
|
|
547
|
+
* @requiredField query
|
|
548
|
+
*/
|
|
549
|
+
declare function typedQueryProducts(query: QueryV2, options?: QueryProductsOptions): Promise<NonNullablePaths<QueryProductsResponse, `products` | `products.${number}._id` | `products.${number}.collectionId` | `products.${number}.address.streetAddress.number` | `products.${number}.address.streetAddress.name` | `products.${number}.pageLink.pageId` | `products.${number}.guid`, 6>>;
|
|
544
550
|
/**
|
|
545
551
|
* create multiple products in a single request. Works synchronously
|
|
546
552
|
* @public
|
|
@@ -571,4 +577,4 @@ interface BulkUpdateProductsOptions {
|
|
|
571
577
|
*/
|
|
572
578
|
declare function bulkDeleteProducts(productIds: string[]): Promise<NonNullablePaths<BulkDeleteProductsResponse, `results` | `results.${number}.itemMetadata.originalIndex` | `results.${number}.itemMetadata.success` | `results.${number}.itemMetadata.error.code` | `results.${number}.itemMetadata.error.description` | `bulkActionMetadata.totalSuccesses` | `bulkActionMetadata.totalFailures` | `bulkActionMetadata.undetailedFailures`, 6>>;
|
|
573
579
|
|
|
574
|
-
export { type Address, type AddressLocation, type AddressStreetOneOf, type ApplicationError, type BulkActionMetadata, type BulkCreateProductsOptions, type BulkCreateProductsRequest, type BulkCreateProductsResponse, type BulkDeleteProductsRequest, type BulkDeleteProductsResponse, type BulkDeleteProductsResponseBulkProductResult, type BulkProductResult, type BulkUpdateProductsOptions, type BulkUpdateProductsRequest, type BulkUpdateProductsResponse, type BulkUpdateProductsResponseBulkProductResult, type CountProductsOptions, type CountProductsRequest, type CountProductsResponse, type CreateProductApplicationErrors, type CreateProductOptions, type CreateProductRequest, type CreateProductResponse, type CursorPaging, type Cursors, type DeleteProductRequest, type DeleteProductResponse, type FocalPoint, type GetProductRequest, type GetProductResponse, type GetProductsStartWithOptions, type GetProductsStartWithRequest, type GetProductsStartWithResponse, type ItemMetadata, LinkRel, type LinkRelWithLiterals, type MaskedProduct, type MyAddress, type PageLink, type Paging, type PagingMetadataV2, type Product, type ProductsQueryBuilder, type ProductsQueryResult, type QueryProductsOptions, type QueryProductsRequest, type QueryProductsResponse, type QueryV2, type QueryV2PagingMethodOneOf, type ResetProductsDbRequest, type ResetProductsDbResponse, SortOrder, type SortOrderWithLiterals, type Sorting, type StandardDetails, type StreetAddress, type Subdivision, SubdivisionType, type SubdivisionTypeWithLiterals, type UpdateProductOptions, type UpdateProductRequest, type UpdateProductResponse, type Variant, type VideoResolution, bulkCreateProducts, bulkDeleteProducts, bulkUpdateProducts, countProducts, createProduct, deleteProduct, getProduct, getProductsStartWith, queryProducts, updateProduct };
|
|
580
|
+
export { type Address, type AddressLocation, type AddressStreetOneOf, type ApplicationError, type BulkActionMetadata, type BulkCreateProductsOptions, type BulkCreateProductsRequest, type BulkCreateProductsResponse, type BulkDeleteProductsRequest, type BulkDeleteProductsResponse, type BulkDeleteProductsResponseBulkProductResult, type BulkProductResult, type BulkUpdateProductsOptions, type BulkUpdateProductsRequest, type BulkUpdateProductsResponse, type BulkUpdateProductsResponseBulkProductResult, type CountProductsOptions, type CountProductsRequest, type CountProductsResponse, type CreateProductApplicationErrors, type CreateProductOptions, type CreateProductRequest, type CreateProductResponse, type CursorPaging, type Cursors, type DeleteProductRequest, type DeleteProductResponse, type FocalPoint, type GetProductRequest, type GetProductResponse, type GetProductsStartWithOptions, type GetProductsStartWithRequest, type GetProductsStartWithResponse, type ItemMetadata, LinkRel, type LinkRelWithLiterals, type MaskedProduct, type MyAddress, type PageLink, type Paging, type PagingMetadataV2, type Product, type ProductsQueryBuilder, type ProductsQueryResult, type QueryProductsOptions, type QueryProductsRequest, type QueryProductsResponse, type QueryV2, type QueryV2PagingMethodOneOf, type ResetProductsDbRequest, type ResetProductsDbResponse, SortOrder, type SortOrderWithLiterals, type Sorting, type StandardDetails, type StreetAddress, type Subdivision, SubdivisionType, type SubdivisionTypeWithLiterals, type UpdateProductOptions, type UpdateProductRequest, type UpdateProductResponse, type Variant, type VideoResolution, bulkCreateProducts, bulkDeleteProducts, bulkUpdateProducts, countProducts, createProduct, deleteProduct, getProduct, getProductsStartWith, queryProducts, typedQueryProducts, updateProduct };
|
|
@@ -32,6 +32,7 @@ __export(index_typings_exports, {
|
|
|
32
32
|
getProduct: () => getProduct2,
|
|
33
33
|
getProductsStartWith: () => getProductsStartWith2,
|
|
34
34
|
queryProducts: () => queryProducts2,
|
|
35
|
+
typedQueryProducts: () => typedQueryProducts,
|
|
35
36
|
updateProduct: () => updateProduct2
|
|
36
37
|
});
|
|
37
38
|
module.exports = __toCommonJS(index_typings_exports);
|
|
@@ -127,6 +128,12 @@ function resolveWixCoreservicesMetroinspectorV1ProductsProductsServiceUrl(opts)
|
|
|
127
128
|
srcPath: "/_api/metro-inspector",
|
|
128
129
|
destPath: "/api"
|
|
129
130
|
}
|
|
131
|
+
],
|
|
132
|
+
"dev._base_domain_": [
|
|
133
|
+
{
|
|
134
|
+
srcPath: "/_api/metro-inspector",
|
|
135
|
+
destPath: ""
|
|
136
|
+
}
|
|
130
137
|
]
|
|
131
138
|
};
|
|
132
139
|
return (0, import_rest_modules2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
@@ -1234,6 +1241,62 @@ function queryProducts2(options) {
|
|
|
1234
1241
|
transformationPaths: {}
|
|
1235
1242
|
});
|
|
1236
1243
|
}
|
|
1244
|
+
async function typedQueryProducts(query, options) {
|
|
1245
|
+
const { httpClient, sideEffects } = arguments[2];
|
|
1246
|
+
const payload = (0, import_rename_all_nested_keys.renameKeysFromSDKRequestToRESTRequest)({
|
|
1247
|
+
query,
|
|
1248
|
+
...options
|
|
1249
|
+
});
|
|
1250
|
+
const reqOpts = queryProducts(payload);
|
|
1251
|
+
sideEffects?.onSiteCall?.();
|
|
1252
|
+
try {
|
|
1253
|
+
const result = await httpClient.request(reqOpts);
|
|
1254
|
+
sideEffects?.onSuccess?.(result);
|
|
1255
|
+
return (0, import_rename_all_nested_keys.renameKeysFromRESTResponseToSDKResponse)(
|
|
1256
|
+
(0, import_transform_paths2.transformPaths)(result.data, [
|
|
1257
|
+
{
|
|
1258
|
+
transformFn: import_image2.transformRESTImageToSDKImage,
|
|
1259
|
+
paths: [
|
|
1260
|
+
{ path: "products.image" },
|
|
1261
|
+
{ path: "products.variants.image" },
|
|
1262
|
+
{ path: "products.mainVariant.image" }
|
|
1263
|
+
]
|
|
1264
|
+
},
|
|
1265
|
+
{
|
|
1266
|
+
transformFn: import_address2.transformRESTAddressToSDKAddress,
|
|
1267
|
+
paths: [
|
|
1268
|
+
{ path: "products.address" },
|
|
1269
|
+
{ path: "products.customAddress" }
|
|
1270
|
+
]
|
|
1271
|
+
},
|
|
1272
|
+
{
|
|
1273
|
+
transformFn: import_document2.transformRESTDocumentToSDKDocument,
|
|
1274
|
+
paths: [{ path: "products.document" }]
|
|
1275
|
+
},
|
|
1276
|
+
{
|
|
1277
|
+
transformFn: import_video_v22.transformRESTVideoV2ToSDKVideoV2,
|
|
1278
|
+
paths: [{ path: "products.video" }]
|
|
1279
|
+
},
|
|
1280
|
+
{
|
|
1281
|
+
transformFn: import_audio2.transformRESTAudioToSDKAudio,
|
|
1282
|
+
paths: [{ path: "products.audio" }]
|
|
1283
|
+
}
|
|
1284
|
+
])
|
|
1285
|
+
);
|
|
1286
|
+
} catch (err) {
|
|
1287
|
+
const transformedError = (0, import_transform_error.transformError)(
|
|
1288
|
+
err,
|
|
1289
|
+
{
|
|
1290
|
+
spreadPathsToArguments: {},
|
|
1291
|
+
explicitPathsToArguments: { query: "$[0]" },
|
|
1292
|
+
singleArgumentUnchanged: false
|
|
1293
|
+
},
|
|
1294
|
+
["query", "options"]
|
|
1295
|
+
);
|
|
1296
|
+
sideEffects?.onError?.(err);
|
|
1297
|
+
throw transformedError;
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
1237
1300
|
async function bulkCreateProducts2(products, options) {
|
|
1238
1301
|
const { httpClient, sideEffects } = arguments[2];
|
|
1239
1302
|
const payload = (0, import_transform_paths2.transformPaths)(
|
|
@@ -1453,6 +1516,7 @@ async function bulkDeleteProducts2(productIds) {
|
|
|
1453
1516
|
getProduct,
|
|
1454
1517
|
getProductsStartWith,
|
|
1455
1518
|
queryProducts,
|
|
1519
|
+
typedQueryProducts,
|
|
1456
1520
|
updateProduct
|
|
1457
1521
|
});
|
|
1458
1522
|
//# sourceMappingURL=index.typings.js.map
|