@gofynd/fdk-client-javascript 1.3.2 → 1.3.3-beta.1
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 +1 -1
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.d.ts +3 -2
- package/sdk/platform/Catalog/CatalogPlatformApplicationClient.js +6 -5
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +143 -1
- package/sdk/platform/Catalog/CatalogPlatformModel.js +148 -0
- package/sdk/platform/OAuthClient.js +3 -1
package/package.json
CHANGED
|
@@ -246,12 +246,13 @@ declare class Catalog {
|
|
|
246
246
|
* @param {CatalogPlatformApplicationValidator.GetAppProductsParam} arg - Arg object
|
|
247
247
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
248
248
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
249
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
249
|
+
* @returns {Promise<CatalogPlatformModel.RawProductListingResponse>} -
|
|
250
|
+
* Success response
|
|
250
251
|
* @name getAppProducts
|
|
251
252
|
* @summary: Get applicationwise products
|
|
252
253
|
* @description: Products are the core resource of an application. Products can be associated by categories, collections, brands and more. If successful, returns a Product resource in the response body specified in `ApplicationProductListingResponseDatabasePowered` - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getAppProducts/).
|
|
253
254
|
*/
|
|
254
|
-
getAppProducts({ brandIds, categoryIds, departmentIds, tags, itemIds, pageNo, pageSize, q, requestHeaders, }?: CatalogPlatformApplicationValidator.GetAppProductsParam, { responseHeaders }?: object): Promise<CatalogPlatformModel.
|
|
255
|
+
getAppProducts({ brandIds, categoryIds, departmentIds, tags, itemIds, pageNo, pageSize, q, requestHeaders, }?: CatalogPlatformApplicationValidator.GetAppProductsParam, { responseHeaders }?: object): Promise<CatalogPlatformModel.RawProductListingResponse>;
|
|
255
256
|
/**
|
|
256
257
|
* @param {CatalogPlatformApplicationValidator.GetAppicationProductsParam} arg
|
|
257
258
|
* - Arg object
|
|
@@ -1532,7 +1532,8 @@ class Catalog {
|
|
|
1532
1532
|
* @param {CatalogPlatformApplicationValidator.GetAppProductsParam} arg - Arg object
|
|
1533
1533
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
1534
1534
|
* @param {import("../PlatformAPIClient").Options} - Options
|
|
1535
|
-
* @returns {Promise<CatalogPlatformModel.
|
|
1535
|
+
* @returns {Promise<CatalogPlatformModel.RawProductListingResponse>} -
|
|
1536
|
+
* Success response
|
|
1536
1537
|
* @name getAppProducts
|
|
1537
1538
|
* @summary: Get applicationwise products
|
|
1538
1539
|
* @description: Products are the core resource of an application. Products can be associated by categories, collections, brands and more. If successful, returns a Product resource in the response body specified in `ApplicationProductListingResponseDatabasePowered` - Check out [method documentation](https://partners.fynd.com/help/docs/sdk/platform/catalog/getAppProducts/).
|
|
@@ -1620,10 +1621,10 @@ class Catalog {
|
|
|
1620
1621
|
|
|
1621
1622
|
const {
|
|
1622
1623
|
error: res_error,
|
|
1623
|
-
} = CatalogPlatformModel.
|
|
1624
|
-
|
|
1625
|
-
allowUnknown: false
|
|
1626
|
-
|
|
1624
|
+
} = CatalogPlatformModel.RawProductListingResponse().validate(
|
|
1625
|
+
responseData,
|
|
1626
|
+
{ abortEarly: false, allowUnknown: false }
|
|
1627
|
+
);
|
|
1627
1628
|
|
|
1628
1629
|
if (res_error) {
|
|
1629
1630
|
Logger({
|
|
@@ -2462,6 +2462,76 @@ export = CatalogPlatformModel;
|
|
|
2462
2462
|
* @property {number} [count]
|
|
2463
2463
|
* @property {string} [updated_at]
|
|
2464
2464
|
*/
|
|
2465
|
+
/**
|
|
2466
|
+
* @typedef RawProduct
|
|
2467
|
+
* @property {Object} [_custom_json]
|
|
2468
|
+
* @property {number[]} [all_company_ids]
|
|
2469
|
+
* @property {string[]} [all_identifiers]
|
|
2470
|
+
* @property {Object[]} [all_sizes]
|
|
2471
|
+
* @property {Object} [attributes]
|
|
2472
|
+
* @property {Brand} [brand]
|
|
2473
|
+
* @property {number} [brand_uid]
|
|
2474
|
+
* @property {Object} [category]
|
|
2475
|
+
* @property {string} [category_slug]
|
|
2476
|
+
* @property {number} [category_uid]
|
|
2477
|
+
* @property {string} [color]
|
|
2478
|
+
* @property {number} [company_id]
|
|
2479
|
+
* @property {string} [country_of_origin]
|
|
2480
|
+
* @property {Object} [created_by]
|
|
2481
|
+
* @property {string} [created_on]
|
|
2482
|
+
* @property {string} [currency]
|
|
2483
|
+
* @property {Object} [custom_order]
|
|
2484
|
+
* @property {number[]} [departments]
|
|
2485
|
+
* @property {string} [description]
|
|
2486
|
+
* @property {string[]} [highlights]
|
|
2487
|
+
* @property {string} [hsn_code]
|
|
2488
|
+
* @property {string} [id]
|
|
2489
|
+
* @property {string} [image_nature]
|
|
2490
|
+
* @property {string[]} [images]
|
|
2491
|
+
* @property {boolean} [is_active]
|
|
2492
|
+
* @property {boolean} [is_dependent]
|
|
2493
|
+
* @property {boolean} [is_expirable]
|
|
2494
|
+
* @property {boolean} [is_image_less_product]
|
|
2495
|
+
* @property {boolean} [is_physical]
|
|
2496
|
+
* @property {boolean} [is_set]
|
|
2497
|
+
* @property {string} [item_code]
|
|
2498
|
+
* @property {string} [item_type]
|
|
2499
|
+
* @property {string[]} [l3_mapping]
|
|
2500
|
+
* @property {Media[]} [media]
|
|
2501
|
+
* @property {Object} [modified_by]
|
|
2502
|
+
* @property {string} [modified_on]
|
|
2503
|
+
* @property {Object} [moq]
|
|
2504
|
+
* @property {boolean} [multi_size]
|
|
2505
|
+
* @property {string} [name]
|
|
2506
|
+
* @property {NetQuantityResponse} [net_quantity]
|
|
2507
|
+
* @property {number} [no_of_boxes]
|
|
2508
|
+
* @property {string} [pending]
|
|
2509
|
+
* @property {string} [primary_color]
|
|
2510
|
+
* @property {string[]} [product_group_tag]
|
|
2511
|
+
* @property {ProductPublished} [product_publish]
|
|
2512
|
+
* @property {ReturnConfigResponse} [return_config]
|
|
2513
|
+
* @property {string} [short_description]
|
|
2514
|
+
* @property {string} [size_guide]
|
|
2515
|
+
* @property {Object[]} [sizes]
|
|
2516
|
+
* @property {string} [slug]
|
|
2517
|
+
* @property {string} [stage]
|
|
2518
|
+
* @property {string[]} [tags]
|
|
2519
|
+
* @property {Object} [tax_identifier]
|
|
2520
|
+
* @property {Object} [teaser_tag]
|
|
2521
|
+
* @property {string} [template_tag]
|
|
2522
|
+
* @property {Trader[]} [trader]
|
|
2523
|
+
* @property {number} [uid]
|
|
2524
|
+
* @property {Object} [variant_group]
|
|
2525
|
+
* @property {Object} [variant_media]
|
|
2526
|
+
* @property {Object} [variants]
|
|
2527
|
+
* @property {VerifiedBy} [verified_by]
|
|
2528
|
+
* @property {string} [verified_on]
|
|
2529
|
+
*/
|
|
2530
|
+
/**
|
|
2531
|
+
* @typedef RawProductListingResponse
|
|
2532
|
+
* @property {RawProduct[]} [items]
|
|
2533
|
+
* @property {Page} [page]
|
|
2534
|
+
*/
|
|
2465
2535
|
/**
|
|
2466
2536
|
* @typedef ReturnConfig
|
|
2467
2537
|
* @property {boolean} returnable
|
|
@@ -2861,7 +2931,7 @@ export = CatalogPlatformModel;
|
|
|
2861
2931
|
declare class CatalogPlatformModel {
|
|
2862
2932
|
}
|
|
2863
2933
|
declare namespace CatalogPlatformModel {
|
|
2864
|
-
export { Action, ActionPage, AllowSingleRequest, AllSizes, AppCatalogConfiguration, AppConfiguration, AppConfigurationDetail, AppConfigurationsSort, ApplicationBrandJson, ApplicationCategoryJson, ApplicationDepartment, ApplicationDepartmentJson, ApplicationDepartmentListingResponse, ApplicationItemMeta, ApplicationItemMOQ, ApplicationItemSEO, ApplicationProductListingResponse, ApplicationStoreJson, ArticleAssignment, ArticleAssignment1, ArticleQuery, ArticleStoreResponse, AssignStore, AssignStoreArticle, AttributeDetailsGroup, AttributeMaster, AttributeMasterDetails, AttributeMasterFilter, AttributeMasterMandatoryDetails, AttributeMasterMeta, AttributeMasterSerializer, AttributeSchemaRange, AutocompleteAction, AutoCompleteMedia, AutocompletePageAction, AutocompleteResult, BannerImage, Brand, BrandItem, BrandListingResponse, BrandMeta, BrandMeta1, BulkAssetResponse, BulkHsnResponse, BulkHsnUpsert, BulkInventoryGet, BulkInventoryGetItems, BulkJob, BulkProductRequest, BulkResponse, CatalogInsightBrand, CatalogInsightItem, CatalogInsightResponse, CategoriesResponse, Category, CategoryCreateResponse, CategoryItems, CategoryListingResponse, CategoryMapping, CategoryMappingValues, CategoryRequestBody, CategoryResponse, CategoryUpdateResponse, Child, CollectionBadge, CollectionBanner, CollectionCreateResponse, CollectionDetailResponse, CollectionImage, CollectionItem, CollectionItemUpdate, CollectionListingFilter, CollectionListingFilterTag, CollectionListingFilterType, CollectionQuery, CollectionSchedule, CompanyBrandDetail, CompanyMeta, CompanyMeta1, CompanyOptIn, ConfigErrorResponse, ConfigSuccessResponse, ConfigurationBucketPoints, ConfigurationListing, ConfigurationListingFilter, ConfigurationListingFilterConfig, ConfigurationListingFilterValue, ConfigurationListingSort, ConfigurationListingSortConfig, ConfigurationProduct, ConfigurationProductConfig, ConfigurationProductSimilar, ConfigurationProductVariant, ConfigurationProductVariantConfig, CreateAutocompleteKeyword, CreateAutocompleteWordsResponse, CreateCollection, CreateSearchKeyword, CrossSellingData, CrossSellingResponse, CustomOrder, DateMeta, DefaultKeyRequest, DeleteResponse, Department, DepartmentCategoryTree, DepartmentCreateErrorResponse, DepartmentCreateResponse, DepartmentCreateUpdate, DepartmentErrorResponse, DepartmentIdentifier, DepartmentModel, DepartmentResponse, DepartmentsResponse, DimensionResponse, DimensionResponse1, Document, EntityConfiguration, ErrorResponse, FilerList, GenderDetail, GetAddressSerializer, GetAllSizes, GetAppCatalogConfiguration, GetAppCatalogEntityConfiguration, GetAutocompleteWordsData, GetAutocompleteWordsResponse, GetCatalogConfigurationDetailsProduct, GetCatalogConfigurationDetailsSchemaListing, GetCatalogConfigurationMetaData, GetCollectionDetailNest, GetCollectionItemsResponse, GetCollectionListingResponse, GetCollectionQueryOptionResponse, GetCompanySerializer, GetConfigMetadataResponse, GetConfigResponse, GetDepartment, GetInventories, GetInventoriesResponse, GetLocationSerializer, GetOptInPlatform, GetProductBundleCreateResponse, GetProductBundleListingResponse, GetProductBundleResponse, GetProducts, GetSearchWordsData, GetSearchWordsDetailResponse, GetSearchWordsResponse, GlobalValidation, GTIN, Guide, Hierarchy, HsnCode, HsnCodesListingResponseSchemaV2, HsnCodesObject, HSNCodesResponse, HSNData, HSNDataInsertV2, HsnUpsert, Image, ImageUrls, InventoryBulkRequest, InventoryConfig, InventoryCreateRequest, InventoryExportAdvanceOption, InventoryExportFilter, InventoryExportJob, InventoryExportJobListResponse, InventoryExportQuantityFilter, InventoryExportRequest, InventoryExportResponse, InventoryFailedReason, InventoryJobDetailResponse, InventoryJobFilters, InventoryJobPayload, InventoryPage, InventoryPayload, InventoryRequest, InventoryRequestSchemaV2, InventoryResponse, InventoryResponseItem, InventoryResponsePaginated, InventorySellerIdentifierResponsePaginated, InventorySellerResponse, InventorySet, InventoryStockResponse, InventoryUpdateResponse, InventoryValidationResponse, InvoiceCredSerializer, InvoiceDetailsSerializer, InvSize, ItemQuery, Items, LimitedProductData, ListSizeGuide, LocationDayWiseSerializer, LocationIntegrationType, LocationListSerializer, LocationManagerSerializer, LocationTimingSerializer, Logo, ManufacturerResponse, ManufacturerResponse1, Media, Media1, Media2, Meta, MetaDataListingFilterMetaResponse, MetaDataListingFilterResponse, MetaDataListingResponse, MetaDataListingSortMetaResponse, MetaDataListingSortResponse, MetaFields, MOQData, NetQuantity, NetQuantityResponse, NextSchedule, OptinCompanyBrandDetailsView, OptinCompanyDetail, OptinCompanyMetrics, OptInPostRequest, OptinStoreDetails, OwnerAppItemResponse, Page, PageResponse, PageResponseType, Price, Price1, PriceArticle, PriceMeta, ProdcutTemplateCategoriesResponse, Product, ProductAttributesResponse, ProductBrand, ProductBulkAssets, ProductBulkRequest, ProductBulkRequestList, ProductBundleItem, ProductBundleRequest, ProductBundleUpdateRequest, ProductConfigurationDownloads, ProductCreateUpdateSchemaV2, ProductDetail, ProductDetailAttribute, ProductDetailGroupedAttribute, ProductDownloadsResponse, ProductFilters, ProductFiltersKey, ProductFiltersValue, ProductListingDetail, ProductListingPrice, ProductListingResponse, ProductListingResponseV2, ProductPublish, ProductPublish1, ProductPublished, ProductReturnConfigSerializer, ProductSchemaV2, ProductSize, ProductSizeDeleteDataResponse, ProductSizeDeleteResponse, ProductSortOn, ProductTagsViewResponse, ProductTemplate, ProductTemplateDownloadsExport, ProductTemplateExportFilterRequest, ProductTemplateExportResponse, ProductVariants, ProductVariantsResponse, Properties, PTErrorResponse, Quantities, QuantitiesArticle, Quantity, QuantityBase, ReturnConfig, ReturnConfig1, ReturnConfig2, ReturnConfigResponse, SearchKeywordResult, SecondLevelChild, SellerPhoneNumber, SEOData, SeoDetail, SetSize, SingleCategoryResponse, SingleProductResponse, Size, SizeDistribution, SizeGuideResponse, StoreAssignResponse, StoreDetail, StoreMeta, SuccessResponse, SuccessResponse1, TaxIdentifier, TaxSlab, TeaserTag, TemplateDetails, TemplatesResponse, TemplatesValidationResponse, TemplateValidationData, ThirdLevelChild, Trader, Trader1, Trader2, UpdateCollection, UpdatedResponse, UserCommon, UserDetail, UserDetail1, UserInfo, UserInfo1, UserSerializer, UserSerializer1, UserSerializer2, ValidateIdentifier, ValidateProduct, ValidateSizeGuide, VerifiedBy, WeightResponse, WeightResponse1, PageType };
|
|
2934
|
+
export { Action, ActionPage, AllowSingleRequest, AllSizes, AppCatalogConfiguration, AppConfiguration, AppConfigurationDetail, AppConfigurationsSort, ApplicationBrandJson, ApplicationCategoryJson, ApplicationDepartment, ApplicationDepartmentJson, ApplicationDepartmentListingResponse, ApplicationItemMeta, ApplicationItemMOQ, ApplicationItemSEO, ApplicationProductListingResponse, ApplicationStoreJson, ArticleAssignment, ArticleAssignment1, ArticleQuery, ArticleStoreResponse, AssignStore, AssignStoreArticle, AttributeDetailsGroup, AttributeMaster, AttributeMasterDetails, AttributeMasterFilter, AttributeMasterMandatoryDetails, AttributeMasterMeta, AttributeMasterSerializer, AttributeSchemaRange, AutocompleteAction, AutoCompleteMedia, AutocompletePageAction, AutocompleteResult, BannerImage, Brand, BrandItem, BrandListingResponse, BrandMeta, BrandMeta1, BulkAssetResponse, BulkHsnResponse, BulkHsnUpsert, BulkInventoryGet, BulkInventoryGetItems, BulkJob, BulkProductRequest, BulkResponse, CatalogInsightBrand, CatalogInsightItem, CatalogInsightResponse, CategoriesResponse, Category, CategoryCreateResponse, CategoryItems, CategoryListingResponse, CategoryMapping, CategoryMappingValues, CategoryRequestBody, CategoryResponse, CategoryUpdateResponse, Child, CollectionBadge, CollectionBanner, CollectionCreateResponse, CollectionDetailResponse, CollectionImage, CollectionItem, CollectionItemUpdate, CollectionListingFilter, CollectionListingFilterTag, CollectionListingFilterType, CollectionQuery, CollectionSchedule, CompanyBrandDetail, CompanyMeta, CompanyMeta1, CompanyOptIn, ConfigErrorResponse, ConfigSuccessResponse, ConfigurationBucketPoints, ConfigurationListing, ConfigurationListingFilter, ConfigurationListingFilterConfig, ConfigurationListingFilterValue, ConfigurationListingSort, ConfigurationListingSortConfig, ConfigurationProduct, ConfigurationProductConfig, ConfigurationProductSimilar, ConfigurationProductVariant, ConfigurationProductVariantConfig, CreateAutocompleteKeyword, CreateAutocompleteWordsResponse, CreateCollection, CreateSearchKeyword, CrossSellingData, CrossSellingResponse, CustomOrder, DateMeta, DefaultKeyRequest, DeleteResponse, Department, DepartmentCategoryTree, DepartmentCreateErrorResponse, DepartmentCreateResponse, DepartmentCreateUpdate, DepartmentErrorResponse, DepartmentIdentifier, DepartmentModel, DepartmentResponse, DepartmentsResponse, DimensionResponse, DimensionResponse1, Document, EntityConfiguration, ErrorResponse, FilerList, GenderDetail, GetAddressSerializer, GetAllSizes, GetAppCatalogConfiguration, GetAppCatalogEntityConfiguration, GetAutocompleteWordsData, GetAutocompleteWordsResponse, GetCatalogConfigurationDetailsProduct, GetCatalogConfigurationDetailsSchemaListing, GetCatalogConfigurationMetaData, GetCollectionDetailNest, GetCollectionItemsResponse, GetCollectionListingResponse, GetCollectionQueryOptionResponse, GetCompanySerializer, GetConfigMetadataResponse, GetConfigResponse, GetDepartment, GetInventories, GetInventoriesResponse, GetLocationSerializer, GetOptInPlatform, GetProductBundleCreateResponse, GetProductBundleListingResponse, GetProductBundleResponse, GetProducts, GetSearchWordsData, GetSearchWordsDetailResponse, GetSearchWordsResponse, GlobalValidation, GTIN, Guide, Hierarchy, HsnCode, HsnCodesListingResponseSchemaV2, HsnCodesObject, HSNCodesResponse, HSNData, HSNDataInsertV2, HsnUpsert, Image, ImageUrls, InventoryBulkRequest, InventoryConfig, InventoryCreateRequest, InventoryExportAdvanceOption, InventoryExportFilter, InventoryExportJob, InventoryExportJobListResponse, InventoryExportQuantityFilter, InventoryExportRequest, InventoryExportResponse, InventoryFailedReason, InventoryJobDetailResponse, InventoryJobFilters, InventoryJobPayload, InventoryPage, InventoryPayload, InventoryRequest, InventoryRequestSchemaV2, InventoryResponse, InventoryResponseItem, InventoryResponsePaginated, InventorySellerIdentifierResponsePaginated, InventorySellerResponse, InventorySet, InventoryStockResponse, InventoryUpdateResponse, InventoryValidationResponse, InvoiceCredSerializer, InvoiceDetailsSerializer, InvSize, ItemQuery, Items, LimitedProductData, ListSizeGuide, LocationDayWiseSerializer, LocationIntegrationType, LocationListSerializer, LocationManagerSerializer, LocationTimingSerializer, Logo, ManufacturerResponse, ManufacturerResponse1, Media, Media1, Media2, Meta, MetaDataListingFilterMetaResponse, MetaDataListingFilterResponse, MetaDataListingResponse, MetaDataListingSortMetaResponse, MetaDataListingSortResponse, MetaFields, MOQData, NetQuantity, NetQuantityResponse, NextSchedule, OptinCompanyBrandDetailsView, OptinCompanyDetail, OptinCompanyMetrics, OptInPostRequest, OptinStoreDetails, OwnerAppItemResponse, Page, PageResponse, PageResponseType, Price, Price1, PriceArticle, PriceMeta, ProdcutTemplateCategoriesResponse, Product, ProductAttributesResponse, ProductBrand, ProductBulkAssets, ProductBulkRequest, ProductBulkRequestList, ProductBundleItem, ProductBundleRequest, ProductBundleUpdateRequest, ProductConfigurationDownloads, ProductCreateUpdateSchemaV2, ProductDetail, ProductDetailAttribute, ProductDetailGroupedAttribute, ProductDownloadsResponse, ProductFilters, ProductFiltersKey, ProductFiltersValue, ProductListingDetail, ProductListingPrice, ProductListingResponse, ProductListingResponseV2, ProductPublish, ProductPublish1, ProductPublished, ProductReturnConfigSerializer, ProductSchemaV2, ProductSize, ProductSizeDeleteDataResponse, ProductSizeDeleteResponse, ProductSortOn, ProductTagsViewResponse, ProductTemplate, ProductTemplateDownloadsExport, ProductTemplateExportFilterRequest, ProductTemplateExportResponse, ProductVariants, ProductVariantsResponse, Properties, PTErrorResponse, Quantities, QuantitiesArticle, Quantity, QuantityBase, RawProduct, RawProductListingResponse, ReturnConfig, ReturnConfig1, ReturnConfig2, ReturnConfigResponse, SearchKeywordResult, SecondLevelChild, SellerPhoneNumber, SEOData, SeoDetail, SetSize, SingleCategoryResponse, SingleProductResponse, Size, SizeDistribution, SizeGuideResponse, StoreAssignResponse, StoreDetail, StoreMeta, SuccessResponse, SuccessResponse1, TaxIdentifier, TaxSlab, TeaserTag, TemplateDetails, TemplatesResponse, TemplatesValidationResponse, TemplateValidationData, ThirdLevelChild, Trader, Trader1, Trader2, UpdateCollection, UpdatedResponse, UserCommon, UserDetail, UserDetail1, UserInfo, UserInfo1, UserSerializer, UserSerializer1, UserSerializer2, ValidateIdentifier, ValidateProduct, ValidateSizeGuide, VerifiedBy, WeightResponse, WeightResponse1, PageType };
|
|
2865
2935
|
}
|
|
2866
2936
|
/** @returns {Action} */
|
|
2867
2937
|
declare function Action(): Action;
|
|
@@ -6424,6 +6494,78 @@ type QuantityBase = {
|
|
|
6424
6494
|
count?: number;
|
|
6425
6495
|
updated_at?: string;
|
|
6426
6496
|
};
|
|
6497
|
+
/** @returns {RawProduct} */
|
|
6498
|
+
declare function RawProduct(): RawProduct;
|
|
6499
|
+
type RawProduct = {
|
|
6500
|
+
_custom_json?: any;
|
|
6501
|
+
all_company_ids?: number[];
|
|
6502
|
+
all_identifiers?: string[];
|
|
6503
|
+
all_sizes?: any[];
|
|
6504
|
+
attributes?: any;
|
|
6505
|
+
brand?: Brand;
|
|
6506
|
+
brand_uid?: number;
|
|
6507
|
+
category?: any;
|
|
6508
|
+
category_slug?: string;
|
|
6509
|
+
category_uid?: number;
|
|
6510
|
+
color?: string;
|
|
6511
|
+
company_id?: number;
|
|
6512
|
+
country_of_origin?: string;
|
|
6513
|
+
created_by?: any;
|
|
6514
|
+
created_on?: string;
|
|
6515
|
+
currency?: string;
|
|
6516
|
+
custom_order?: any;
|
|
6517
|
+
departments?: number[];
|
|
6518
|
+
description?: string;
|
|
6519
|
+
highlights?: string[];
|
|
6520
|
+
hsn_code?: string;
|
|
6521
|
+
id?: string;
|
|
6522
|
+
image_nature?: string;
|
|
6523
|
+
images?: string[];
|
|
6524
|
+
is_active?: boolean;
|
|
6525
|
+
is_dependent?: boolean;
|
|
6526
|
+
is_expirable?: boolean;
|
|
6527
|
+
is_image_less_product?: boolean;
|
|
6528
|
+
is_physical?: boolean;
|
|
6529
|
+
is_set?: boolean;
|
|
6530
|
+
item_code?: string;
|
|
6531
|
+
item_type?: string;
|
|
6532
|
+
l3_mapping?: string[];
|
|
6533
|
+
media?: Media[];
|
|
6534
|
+
modified_by?: any;
|
|
6535
|
+
modified_on?: string;
|
|
6536
|
+
moq?: any;
|
|
6537
|
+
multi_size?: boolean;
|
|
6538
|
+
name?: string;
|
|
6539
|
+
net_quantity?: NetQuantityResponse;
|
|
6540
|
+
no_of_boxes?: number;
|
|
6541
|
+
pending?: string;
|
|
6542
|
+
primary_color?: string;
|
|
6543
|
+
product_group_tag?: string[];
|
|
6544
|
+
product_publish?: ProductPublished;
|
|
6545
|
+
return_config?: ReturnConfigResponse;
|
|
6546
|
+
short_description?: string;
|
|
6547
|
+
size_guide?: string;
|
|
6548
|
+
sizes?: any[];
|
|
6549
|
+
slug?: string;
|
|
6550
|
+
stage?: string;
|
|
6551
|
+
tags?: string[];
|
|
6552
|
+
tax_identifier?: any;
|
|
6553
|
+
teaser_tag?: any;
|
|
6554
|
+
template_tag?: string;
|
|
6555
|
+
trader?: Trader[];
|
|
6556
|
+
uid?: number;
|
|
6557
|
+
variant_group?: any;
|
|
6558
|
+
variant_media?: any;
|
|
6559
|
+
variants?: any;
|
|
6560
|
+
verified_by?: VerifiedBy;
|
|
6561
|
+
verified_on?: string;
|
|
6562
|
+
};
|
|
6563
|
+
/** @returns {RawProductListingResponse} */
|
|
6564
|
+
declare function RawProductListingResponse(): RawProductListingResponse;
|
|
6565
|
+
type RawProductListingResponse = {
|
|
6566
|
+
items?: RawProduct[];
|
|
6567
|
+
page?: Page;
|
|
6568
|
+
};
|
|
6427
6569
|
/** @returns {ReturnConfig} */
|
|
6428
6570
|
declare function ReturnConfig(): ReturnConfig;
|
|
6429
6571
|
type ReturnConfig = {
|
|
@@ -2739,6 +2739,78 @@ const Joi = require("joi");
|
|
|
2739
2739
|
* @property {string} [updated_at]
|
|
2740
2740
|
*/
|
|
2741
2741
|
|
|
2742
|
+
/**
|
|
2743
|
+
* @typedef RawProduct
|
|
2744
|
+
* @property {Object} [_custom_json]
|
|
2745
|
+
* @property {number[]} [all_company_ids]
|
|
2746
|
+
* @property {string[]} [all_identifiers]
|
|
2747
|
+
* @property {Object[]} [all_sizes]
|
|
2748
|
+
* @property {Object} [attributes]
|
|
2749
|
+
* @property {Brand} [brand]
|
|
2750
|
+
* @property {number} [brand_uid]
|
|
2751
|
+
* @property {Object} [category]
|
|
2752
|
+
* @property {string} [category_slug]
|
|
2753
|
+
* @property {number} [category_uid]
|
|
2754
|
+
* @property {string} [color]
|
|
2755
|
+
* @property {number} [company_id]
|
|
2756
|
+
* @property {string} [country_of_origin]
|
|
2757
|
+
* @property {Object} [created_by]
|
|
2758
|
+
* @property {string} [created_on]
|
|
2759
|
+
* @property {string} [currency]
|
|
2760
|
+
* @property {Object} [custom_order]
|
|
2761
|
+
* @property {number[]} [departments]
|
|
2762
|
+
* @property {string} [description]
|
|
2763
|
+
* @property {string[]} [highlights]
|
|
2764
|
+
* @property {string} [hsn_code]
|
|
2765
|
+
* @property {string} [id]
|
|
2766
|
+
* @property {string} [image_nature]
|
|
2767
|
+
* @property {string[]} [images]
|
|
2768
|
+
* @property {boolean} [is_active]
|
|
2769
|
+
* @property {boolean} [is_dependent]
|
|
2770
|
+
* @property {boolean} [is_expirable]
|
|
2771
|
+
* @property {boolean} [is_image_less_product]
|
|
2772
|
+
* @property {boolean} [is_physical]
|
|
2773
|
+
* @property {boolean} [is_set]
|
|
2774
|
+
* @property {string} [item_code]
|
|
2775
|
+
* @property {string} [item_type]
|
|
2776
|
+
* @property {string[]} [l3_mapping]
|
|
2777
|
+
* @property {Media[]} [media]
|
|
2778
|
+
* @property {Object} [modified_by]
|
|
2779
|
+
* @property {string} [modified_on]
|
|
2780
|
+
* @property {Object} [moq]
|
|
2781
|
+
* @property {boolean} [multi_size]
|
|
2782
|
+
* @property {string} [name]
|
|
2783
|
+
* @property {NetQuantityResponse} [net_quantity]
|
|
2784
|
+
* @property {number} [no_of_boxes]
|
|
2785
|
+
* @property {string} [pending]
|
|
2786
|
+
* @property {string} [primary_color]
|
|
2787
|
+
* @property {string[]} [product_group_tag]
|
|
2788
|
+
* @property {ProductPublished} [product_publish]
|
|
2789
|
+
* @property {ReturnConfigResponse} [return_config]
|
|
2790
|
+
* @property {string} [short_description]
|
|
2791
|
+
* @property {string} [size_guide]
|
|
2792
|
+
* @property {Object[]} [sizes]
|
|
2793
|
+
* @property {string} [slug]
|
|
2794
|
+
* @property {string} [stage]
|
|
2795
|
+
* @property {string[]} [tags]
|
|
2796
|
+
* @property {Object} [tax_identifier]
|
|
2797
|
+
* @property {Object} [teaser_tag]
|
|
2798
|
+
* @property {string} [template_tag]
|
|
2799
|
+
* @property {Trader[]} [trader]
|
|
2800
|
+
* @property {number} [uid]
|
|
2801
|
+
* @property {Object} [variant_group]
|
|
2802
|
+
* @property {Object} [variant_media]
|
|
2803
|
+
* @property {Object} [variants]
|
|
2804
|
+
* @property {VerifiedBy} [verified_by]
|
|
2805
|
+
* @property {string} [verified_on]
|
|
2806
|
+
*/
|
|
2807
|
+
|
|
2808
|
+
/**
|
|
2809
|
+
* @typedef RawProductListingResponse
|
|
2810
|
+
* @property {RawProduct[]} [items]
|
|
2811
|
+
* @property {Page} [page]
|
|
2812
|
+
*/
|
|
2813
|
+
|
|
2742
2814
|
/**
|
|
2743
2815
|
* @typedef ReturnConfig
|
|
2744
2816
|
* @property {boolean} returnable
|
|
@@ -6470,6 +6542,82 @@ class CatalogPlatformModel {
|
|
|
6470
6542
|
});
|
|
6471
6543
|
}
|
|
6472
6544
|
|
|
6545
|
+
/** @returns {RawProduct} */
|
|
6546
|
+
static RawProduct() {
|
|
6547
|
+
return Joi.object({
|
|
6548
|
+
_custom_json: Joi.any(),
|
|
6549
|
+
all_company_ids: Joi.array().items(Joi.number()),
|
|
6550
|
+
all_identifiers: Joi.array().items(Joi.string().allow("")),
|
|
6551
|
+
all_sizes: Joi.array().items(Joi.any()),
|
|
6552
|
+
attributes: Joi.any(),
|
|
6553
|
+
brand: CatalogPlatformModel.Brand(),
|
|
6554
|
+
brand_uid: Joi.number(),
|
|
6555
|
+
category: Joi.any(),
|
|
6556
|
+
category_slug: Joi.string().allow(""),
|
|
6557
|
+
category_uid: Joi.number(),
|
|
6558
|
+
color: Joi.string().allow(""),
|
|
6559
|
+
company_id: Joi.number(),
|
|
6560
|
+
country_of_origin: Joi.string().allow(""),
|
|
6561
|
+
created_by: Joi.any(),
|
|
6562
|
+
created_on: Joi.string().allow(""),
|
|
6563
|
+
currency: Joi.string().allow(""),
|
|
6564
|
+
custom_order: Joi.any(),
|
|
6565
|
+
departments: Joi.array().items(Joi.number()),
|
|
6566
|
+
description: Joi.string().allow(""),
|
|
6567
|
+
highlights: Joi.array().items(Joi.string().allow("")),
|
|
6568
|
+
hsn_code: Joi.string().allow(""),
|
|
6569
|
+
id: Joi.string().allow(""),
|
|
6570
|
+
image_nature: Joi.string().allow(""),
|
|
6571
|
+
images: Joi.array().items(Joi.string().allow("")),
|
|
6572
|
+
is_active: Joi.boolean(),
|
|
6573
|
+
is_dependent: Joi.boolean(),
|
|
6574
|
+
is_expirable: Joi.boolean(),
|
|
6575
|
+
is_image_less_product: Joi.boolean(),
|
|
6576
|
+
is_physical: Joi.boolean(),
|
|
6577
|
+
is_set: Joi.boolean(),
|
|
6578
|
+
item_code: Joi.string().allow(""),
|
|
6579
|
+
item_type: Joi.string().allow(""),
|
|
6580
|
+
l3_mapping: Joi.array().items(Joi.string().allow("")),
|
|
6581
|
+
media: Joi.array().items(CatalogPlatformModel.Media()),
|
|
6582
|
+
modified_by: Joi.any(),
|
|
6583
|
+
modified_on: Joi.string().allow(""),
|
|
6584
|
+
moq: Joi.any(),
|
|
6585
|
+
multi_size: Joi.boolean(),
|
|
6586
|
+
name: Joi.string().allow(""),
|
|
6587
|
+
net_quantity: CatalogPlatformModel.NetQuantityResponse(),
|
|
6588
|
+
no_of_boxes: Joi.number(),
|
|
6589
|
+
pending: Joi.string().allow(""),
|
|
6590
|
+
primary_color: Joi.string().allow(""),
|
|
6591
|
+
product_group_tag: Joi.array().items(Joi.string().allow("")),
|
|
6592
|
+
product_publish: CatalogPlatformModel.ProductPublished(),
|
|
6593
|
+
return_config: CatalogPlatformModel.ReturnConfigResponse(),
|
|
6594
|
+
short_description: Joi.string().allow(""),
|
|
6595
|
+
size_guide: Joi.string().allow(""),
|
|
6596
|
+
sizes: Joi.array().items(Joi.any()),
|
|
6597
|
+
slug: Joi.string().allow(""),
|
|
6598
|
+
stage: Joi.string().allow(""),
|
|
6599
|
+
tags: Joi.array().items(Joi.string().allow("")),
|
|
6600
|
+
tax_identifier: Joi.any(),
|
|
6601
|
+
teaser_tag: Joi.any(),
|
|
6602
|
+
template_tag: Joi.string().allow(""),
|
|
6603
|
+
trader: Joi.array().items(CatalogPlatformModel.Trader()),
|
|
6604
|
+
uid: Joi.number(),
|
|
6605
|
+
variant_group: Joi.any(),
|
|
6606
|
+
variant_media: Joi.any(),
|
|
6607
|
+
variants: Joi.any(),
|
|
6608
|
+
verified_by: CatalogPlatformModel.VerifiedBy(),
|
|
6609
|
+
verified_on: Joi.string().allow(""),
|
|
6610
|
+
});
|
|
6611
|
+
}
|
|
6612
|
+
|
|
6613
|
+
/** @returns {RawProductListingResponse} */
|
|
6614
|
+
static RawProductListingResponse() {
|
|
6615
|
+
return Joi.object({
|
|
6616
|
+
items: Joi.array().items(CatalogPlatformModel.RawProduct()),
|
|
6617
|
+
page: CatalogPlatformModel.Page(),
|
|
6618
|
+
});
|
|
6619
|
+
}
|
|
6620
|
+
|
|
6473
6621
|
/** @returns {ReturnConfig} */
|
|
6474
6622
|
static ReturnConfig() {
|
|
6475
6623
|
return Joi.object({
|
|
@@ -202,7 +202,9 @@ class OAuthClient {
|
|
|
202
202
|
scope: scopes,
|
|
203
203
|
code: code,
|
|
204
204
|
};
|
|
205
|
-
const token =
|
|
205
|
+
const token = convertStringToBase64(
|
|
206
|
+
`${this.config.apiKey}:${this.config.apiSecret}`
|
|
207
|
+
);
|
|
206
208
|
const rawRequest = {
|
|
207
209
|
method: "post",
|
|
208
210
|
url: url,
|