@gofynd/fdk-client-javascript 3.26.0 → 3.27.0
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/README.md +1 -1
- package/package.json +1 -1
- package/sdk/platform/Catalog/CatalogPlatformClient.d.ts +10 -0
- package/sdk/platform/Catalog/CatalogPlatformClient.js +75 -0
- package/sdk/platform/Catalog/CatalogPlatformModel.d.ts +29 -1
- package/sdk/platform/Catalog/CatalogPlatformModel.js +20 -0
- package/sdk/platform/Catalog/CatalogPlatformValidator.d.ts +5 -1
- package/sdk/platform/Catalog/CatalogPlatformValidator.js +7 -0
- package/sdk/platform/PlatformApplicationClient.d.ts +0 -2
- package/sdk/platform/PlatformApplicationClient.js +0 -4
- package/sdk/platform/index.d.ts +0 -1
- package/sdk/platform/index.js +0 -2
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.d.ts +0 -44
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationClient.js +0 -263
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.d.ts +0 -42
- package/sdk/platform/Analytics/AnalyticsPlatformApplicationValidator.js +0 -45
- package/sdk/platform/Analytics/AnalyticsPlatformModel.d.ts +0 -136
- package/sdk/platform/Analytics/AnalyticsPlatformModel.js +0 -95
package/README.md
CHANGED
|
@@ -234,7 +234,7 @@ console.log("Active Theme: ", response.information.name);
|
|
|
234
234
|
The above code will log the curl command in the console
|
|
235
235
|
|
|
236
236
|
```bash
|
|
237
|
-
curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 3.
|
|
237
|
+
curl --request GET "https://api.fynd.com/service/application/theme/v1.0/applied-theme" --header 'authorization: Bearer <authorization-token>' --header 'x-fp-sdk-version: 3.27.0' --header 'x-fp-date: 20230222T115108Z' --header 'x-fp-signature: v1.1:1e3ab3b02b5bc626e3c32a37ee844266ade02bbcbaafc28fc7a0e46a76a7a1a8'
|
|
238
238
|
Active Theme: Emerge
|
|
239
239
|
```
|
|
240
240
|
|
package/package.json
CHANGED
|
@@ -32,6 +32,16 @@ declare class Catalog {
|
|
|
32
32
|
* @description: Execute bulk updates for HSN codes across multiple products. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/bulkHsnCode/).
|
|
33
33
|
*/
|
|
34
34
|
bulkHsnCode({ body, requestHeaders }?: CatalogPlatformValidator.BulkHsnCodeParam, { responseHeaders }?: object): Promise<CatalogPlatformModel.BulkHsnResponseSchema>;
|
|
35
|
+
/**
|
|
36
|
+
* @param {CatalogPlatformValidator.CbsOnboardGetParam} arg - Arg object
|
|
37
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
38
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
39
|
+
* @returns {Promise<CatalogPlatformModel.GetCompanySchema>} - Success response
|
|
40
|
+
* @name cbsOnboardGet
|
|
41
|
+
* @summary: Get company profile
|
|
42
|
+
* @description: Retrieves the seller-facing company profile for the specified company. The response includes onboarding metadata, contact and address details, legal documents, and deployment region metadata for the company. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/cbsOnboardGet/).
|
|
43
|
+
*/
|
|
44
|
+
cbsOnboardGet({ requestHeaders }?: any, { responseHeaders }?: object): Promise<CatalogPlatformModel.GetCompanySchema>;
|
|
35
45
|
/**
|
|
36
46
|
* @param {CatalogPlatformValidator.CreateBulkInventoryParam} arg - Arg object
|
|
37
47
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -251,6 +251,81 @@ class Catalog {
|
|
|
251
251
|
return response;
|
|
252
252
|
}
|
|
253
253
|
|
|
254
|
+
/**
|
|
255
|
+
* @param {CatalogPlatformValidator.CbsOnboardGetParam} arg - Arg object
|
|
256
|
+
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
257
|
+
* @param {import("../PlatformAPIClient").Options} - Options
|
|
258
|
+
* @returns {Promise<CatalogPlatformModel.GetCompanySchema>} - Success response
|
|
259
|
+
* @name cbsOnboardGet
|
|
260
|
+
* @summary: Get company profile
|
|
261
|
+
* @description: Retrieves the seller-facing company profile for the specified company. The response includes onboarding metadata, contact and address details, legal documents, and deployment region metadata for the company. - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/catalog/cbsOnboardGet/).
|
|
262
|
+
*/
|
|
263
|
+
async cbsOnboardGet(
|
|
264
|
+
{ requestHeaders } = { requestHeaders: {} },
|
|
265
|
+
{ responseHeaders } = { responseHeaders: false }
|
|
266
|
+
) {
|
|
267
|
+
const { error } = CatalogPlatformValidator.cbsOnboardGet().validate(
|
|
268
|
+
{},
|
|
269
|
+
{ abortEarly: false, allowUnknown: true }
|
|
270
|
+
);
|
|
271
|
+
if (error) {
|
|
272
|
+
return Promise.reject(new FDKClientValidationError(error));
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
// Showing warrnings if extra unknown parameters are found
|
|
276
|
+
const {
|
|
277
|
+
error: warrning,
|
|
278
|
+
} = CatalogPlatformValidator.cbsOnboardGet().validate(
|
|
279
|
+
{},
|
|
280
|
+
{ abortEarly: false, allowUnknown: false }
|
|
281
|
+
);
|
|
282
|
+
if (warrning) {
|
|
283
|
+
Logger({
|
|
284
|
+
level: "WARN",
|
|
285
|
+
message: `Parameter Validation warrnings for platform > Catalog > cbsOnboardGet \n ${warrning}`,
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
const query_params = {};
|
|
290
|
+
|
|
291
|
+
const xHeaders = {};
|
|
292
|
+
|
|
293
|
+
const response = await PlatformAPIClient.execute(
|
|
294
|
+
this.config,
|
|
295
|
+
"get",
|
|
296
|
+
`/service/platform/catalog/v2.0/company/${this.config.companyId}/`,
|
|
297
|
+
query_params,
|
|
298
|
+
undefined,
|
|
299
|
+
{ ...xHeaders, ...requestHeaders },
|
|
300
|
+
{ responseHeaders }
|
|
301
|
+
);
|
|
302
|
+
|
|
303
|
+
let responseData = response;
|
|
304
|
+
if (responseHeaders) {
|
|
305
|
+
responseData = response[0];
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
const {
|
|
309
|
+
error: res_error,
|
|
310
|
+
} = CatalogPlatformModel.GetCompanySchema().validate(responseData, {
|
|
311
|
+
abortEarly: false,
|
|
312
|
+
allowUnknown: true,
|
|
313
|
+
});
|
|
314
|
+
|
|
315
|
+
if (res_error) {
|
|
316
|
+
if (this.config.options.strictResponseCheck === true) {
|
|
317
|
+
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
318
|
+
} else {
|
|
319
|
+
Logger({
|
|
320
|
+
level: "WARN",
|
|
321
|
+
message: `Response Validation Warnings for platform > Catalog > cbsOnboardGet \n ${res_error}`,
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
return response;
|
|
327
|
+
}
|
|
328
|
+
|
|
254
329
|
/**
|
|
255
330
|
* @param {CatalogPlatformValidator.CreateBulkInventoryParam} arg - Arg object
|
|
256
331
|
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
@@ -1574,6 +1574,11 @@ export = CatalogPlatformModel;
|
|
|
1574
1574
|
* @property {string} [pincode] - The postal code or ZIP code associated with the address.
|
|
1575
1575
|
* @property {string} [state] - The state or region where the address is located.
|
|
1576
1576
|
*/
|
|
1577
|
+
/**
|
|
1578
|
+
* @typedef RegionDetailsSchema
|
|
1579
|
+
* @property {string} [slug] - Base region slug.
|
|
1580
|
+
* @property {string} [zone] - Zone or cluster slug.
|
|
1581
|
+
*/
|
|
1577
1582
|
/**
|
|
1578
1583
|
* @typedef GetAllSizes
|
|
1579
1584
|
* @property {AllSizes[]} [all_sizes]
|
|
@@ -1681,6 +1686,10 @@ export = CatalogPlatformModel;
|
|
|
1681
1686
|
* @property {string} [modified_on] - The date and time when the company record
|
|
1682
1687
|
* was last updated.
|
|
1683
1688
|
* @property {string} [name] - The registered name of the company.
|
|
1689
|
+
* @property {string} [region] - Deployment region slug for the company profile.
|
|
1690
|
+
* When the zone is default, this is the region slug; otherwise it is
|
|
1691
|
+
* formatted as region/zone.
|
|
1692
|
+
* @property {RegionDetailsSchema} [region_details]
|
|
1684
1693
|
* @property {string} [reject_reason] - If applicable, the reason why the
|
|
1685
1694
|
* company's application or status was rejected.
|
|
1686
1695
|
* @property {string} [stage] - Current operational stage of the company, such
|
|
@@ -4997,7 +5006,7 @@ export = CatalogPlatformModel;
|
|
|
4997
5006
|
declare class CatalogPlatformModel {
|
|
4998
5007
|
}
|
|
4999
5008
|
declare namespace CatalogPlatformModel {
|
|
5000
|
-
export { Action, ValidationErrors, StandardError, AllSizes, AllowSingleRequestSchema, AppCatalogConfiguration, AppCategoryReturnConfig, AppCategoryReturnConfigResponseSchema, AppConfiguration, AppConfigurationDetail, AppConfigurationsSort, SortWeights, CohortWeights, HighSpenderRepeatCustomerWeights, HyperactiveRepeatCustomerWeights, HighSpenderOccasionalCustomerWeights, StandardOccasionalCustomerWeights, DormantPremiumCustomerWeights, BudgetRegularCustomerWeights, HighSpenderRegularCustomerWeights, StandardCustomerAboutToChurnWeights, PremiumCustomerAboutToChurnWeights, HighSpenderCustomerAboutToChurnWeights, StandardDormantCustomerWeights, HighSpenderDormantCustomerWeights, PotentialCustomerWeights, NewCustomerWeights, BudgetRepeatCustomerWeights, AverageSpenderRepeatCustomerWeights, CohortSortingConfiguration, ApplicationBrandJson, ApplicationCategoryJson, ApplicationDepartment, ApplicationDepartmentJson, ApplicationDepartmentListingResponseSchema, ApplicationItemMOQ, Scores, ApplicationItemMeta, ApplicationItemSeoSitemap, ApplicationItemSEO, ApplicationProductsSchema, ApplicationProductListingResponseSchema, ApplicationStoreJson, AppReturnConfigResponseSchema, ArticleStoreResponseSchema, AttributeDetailsGroup, AttributeMaster, AttributeMasterDetails, AttributeMasterFilter, AttributeMasterMandatoryDetails, AttributeMasterMeta, AttributeMasterSchema, AttributeSchemaRange, AutoCompleteMedia, AutocompleteAction, AutocompletePageAction, AutocompleteResult, BannerImage, BaseAppCategoryReturnConfig, BaseAppCategoryReturnConfigResponseSchema, Brand, BrandItem, BrandListingResponseSchema, ApplicationBrandListingItemSchema, ApplicationBrandListingSchema, ApplicationCategoryListingSchema, ApplicationCategoryListingItemSchema, BrandMeta, InventoryBrandMeta, BulkAssetResponseSchema, BulkHsnResponseSchema, BulkHsnUpsert, BulkInventoryGet, InventoryRecord, FailedRecord, BulkInventoryGetItems, BulkMeta, BulkProductJob, BulkJob, BulkProductRequestSchema, BulkResponseSchema, CatalogInsightBrand, CatalogInsightItem, CatalogInsightResponseSchema, CategoriesResponseSchema, Category, CategoryItems, CategoryListingResponseSchema, CategoryMapping, CategoryMappingValues, CategoryResponseSchema, Child, CollectionBadge, CollectionBanner, CollectionCreateResponseSchema, CollectionDetailResponseSchema, CollectionImage, CollectionItem, CollectionItemUpdate, CollectionListingFilter, CollectionListingFilterTag, CollectionListingFilterType, CollectionQuery, CollectionSchedule, CompanyBrandDetail, CompanyMeta, InventoryCompanyMeta, CompanyOptIn, ConfigErrorResponseSchema, ConfigSuccessResponseSchema, ConfigurationBucketPoints, ConfigurationListing, ConfigurationListingFilter, ConfigurationListingFilterConfig, ConfigurationListingFilterValue, ConfigurationListingSort, ConfigurationListingSortConfig, ConfigurationProduct, ConfigurationProductConfig, ConfigurationProductSimilar, ConfigurationProductVariant, ConfigurationProductVariantConfig, CreateAutocompleteKeyword, CreateAutocompleteWordsResponseSchema, CreateCollection, CreateSearchConfigurationRequestSchema, CreateSearchConfigurationResponseSchema, CreateSearchKeyword, CreateUpdateAppReturnConfig, CrossSellingData, CrossSellingResponseSchema, CustomOrder, DateMeta, DefaultKeyRequestSchema, DeleteAppCategoryReturnConfig, DeleteResponseSchema, DeleteSearchConfigurationResponseSchema, Department, DepartmentCategoryTree, DepartmentErrorResponseSchema, DepartmentIdentifier, DepartmentResponseSchema, DepartmentsResponseSchema, DimensionResponseSchema, InventoryDimensionResponseSchema, Document, EntityConfiguration, ErrorResponseSchema, FilerList, RawProduct, RawProductListingResponseSchema, GTIN, AttributeDetail, LatLong, ApplicationLocationAddressSchema, GetAddressSchema, GetAllSizes, GetAppCatalogConfiguration, GetAppCatalogEntityConfiguration, GetAutocompleteWordsData, GetAutocompleteWordsResponseSchema, GetCatalogConfigurationDetailsProduct, GetCatalogConfigurationDetailsSchemaListing, GetCatalogConfigurationMetaData, GetCollectionDetailNest, GetCollectionListingResponseSchema, GetCollectionQueryOptionResponseSchema, GetCompanySchema, ConditionItem, DataItem, ValueTypeItem, SortTypeItem, GetConfigMetadataResponseSchema, GetConfigMetadataValues, GetConfigResponseSchema, ConfigItem, AttributeConfig, GetDepartment, GetInventories, GetInventoriesResponseSchema, GetLocationSchema, GetOptInPlatform, GetProducts, ProductDetails, GetCollectionDetailResponseSchema, CommonResponseSchemaCollection, GetQueryFiltersKeysResponseSchema, GetQueryFiltersResponseSchema, GetCollectionItemsResponseSchemaV2, CollectionItemV2, Page1, CollectionItemSchemaV2, CollectionItemUpdateSchema, CollectionQuerySchemaV2, ProductDetailV2, GetSearchConfigurationResponseSchema, GetSearchWordsData, GetSearchWordsDetailResponseSchema, GetSearchWordsResponseSchema, GlobalValidation, Guide, HSNCodesResponseSchema, HSNData, CreatedBySchema, ModifiedBySchema, HSNDataInsertV2, Hierarchy, HsnCode, HsnCodesListingResponseSchemaV2, HsnCodesObject, HsnUpsert, Image, ImageUrls, InvSize, InventoryBulkRequestSchema, InventoryConfig, InventoryCreateRequestSchema, InventoryExportAdvanceOption, InventoryExportFilter, InventoryExportJob, InventoryExportJobListResponseSchema, InventoryExportQuantityFilter, InventoryExportRequestSchema, InventoryExportResponseSchema, InventoryFailedReason, InventoryJobDetailResponseSchema, InventoryJobFilters, InventoryJobPayload, InventoryPage, AddInventoryRequestPayload, InventoryPayload, InventoryRequestSchema, InventoryRequestSchemaV2, InventoryResponseSchema, InventoryResponseItem, InventoryResponsePaginated, InventorySellerIdentifierResponsePaginated, ApplicationInventorySellerIdentifierResponsePaginated, InventorySellerResponseSchema, ApplicationInventorySellerResponseSchema, InventorySet, InventoryStockResponseSchema, InventoryUpdateResponseSchema, InventoryValidationResponseSchema, InvoiceCredSchema, InvoiceDetailsSchema, ItemQuery, Items, LimitedProductData, SizeGuideItem, ListSizeGuide, LocationDayWiseSchema, LocationIntegrationType, LocationListSchema, LocationManagerSchema, LocationTimingSchema, Logo, MOQData, ManufacturerResponseSchema, InventoryManufacturerResponseSchema, Media, Media1, DepartmentMedia, BrandMedia, BundleDetails, Meta, MetaDataListingFilterMetaResponseSchema, MetaDataListingFilterResponseSchema, MetaDataListingResponseSchema, MetaDataListingSortMetaResponseSchema, MetaDataListingSortResponseSchema, MetaFields, NetQuantity, NetQuantityResponseSchema, NextSchedule, LocationPriceRequestSchema, LocationQuantityRequestSchema, LocationPriceQuantitySuccessResponseSchema, OptInPostRequestSchema, OptinCompanyBrandDetailsView, OptinCompanyDetail, OptinCompanyMetrics, OptinStoreDetails, OwnerAppItemResponseSchema, PTErrorResponseSchema, Page, PageResponseSchema, PageResponseType, Price, ProductListingDetailPrice, PriceArticle, PriceMeta, ProdcutTemplateCategoriesResponseSchema, PriceStrategySchema, PriceFactoryResponseSchema, Product, ProductAttributesResponseSchema, ProductBrand, ProductBulkAssets, ProductBulkRequestSchema, ProductBulkRequestList, ProductConfigurationDownloads, ProductCreateSchemaV3, ProductUpdateSchemaV3, ProductPatchSchemaV3, ProductSizePatch, ProductDetail, ProductDetailAttribute, ProductDetailGroupedAttribute, ProductDownloadsResponseSchema, CollectionProductFilters, ProductFilters, GetQueryFiltersValuesResponseSchema, ProductFiltersKeysOnly, ProductFiltersKey, ProductQueryFiltersValue, CollectionProductFiltersValue, ProductFiltersValue, CollectionProductListingDetail, ProductCategory, ApplicationCategoryAction, ApplicationCategoryItem, ApplicationProductMedia, ApplicationProductCategoryItem, CategoryPageAction, CategoryQuery, CategoryImage, ProductListingDetail, ActionObject, PageAction, ProductListingPrice, ProductListingResponseSchema, ProductListingResponseV2, ProductPublish, ProductPublished, ProductReturnConfigSchema, ProductReturnConfigBaseSchema, Identifier, SizeDetails, ProductSchemaV2, ProductSize, ProductSizeDeleteDataResponseSchema, ProductSizeDeleteResponseSchema, CollectionProductSortOn, ProductSortOn, ProductTagsViewResponseSchema, CreatedBy, ModifiedBy, ProductTemplate, ProductTemplateDownloadsExport, ProductTemplateExportFilterRequestSchema, ProductTemplateExportResponseSchema, ProductVariants, ProductVariantsResponseSchema, Properties, Quantities, QuantitiesArticle, Quantity, QuantityBase, ReturnConfig, InventoryReturnConfig, ReturnConfig2, ReturnConfigResponseSchema, Sitemap, PageQuery, ApplicationCollectionItemSeoPage, ApplicationCollectionItemSeoAction, ApplicationItemSeoAction, ApplicationItemSeoBreadcrumbs, ApplicationCollectionItemSeoBreadcrumbs, ApplicationItemSeoMetaTagItem, ApplicationItemSeoMetaTags, Metatags, SizePromotionThreshold, SEOData, SearchKeywordResult, SearchableAttribute, SecondLevelChild, SellerPhoneNumber, CollectionSeoDetail, SeoDetail, SetSize, SingleCategoryResponseSchema, SingleProductResponseSchema, Size, SizeDistribution, SizeGuideResponseSchema, StoreDetail, StoreMeta, SuccessResponseSchema, SuccessResponseObject, TaxIdentifier, TaxIdentifierV3, TaxSlab, TeaserTag, TemplateDetails, TemplateGlobalValidationData, TemplateValidationData, TemplatesResponseSchema, TemplatesGlobalValidationResponseSchema, TemplatesValidationResponseSchema, ThirdLevelChild, Trader, Trader1, TraderResponseSchema, UpdateCollection, UpdateSearchConfigurationRequestSchema, UpdateSearchConfigurationResponseSchema, CreateMarketplaceOptinResponseSchema, UserCommon, UserDetail, UserDetail1, UserInfo, UserSchema, RequestUserSchema, ValidateIdentifier, ValidateProduct, ValidateSizeGuide, VerifiedBy, WeightResponseSchema, InventoryWeightResponseSchema, BulkInventoryJob, Marketplaces, GetAllMarketplaces, UpdateMarketplaceOptinRequestSchema, UpdateMarketplaceOptinResponseSchema, Filters, FollowedProducts, FollowProduct, TaxReqBodyRule, TaxThreshold, TaxComponent, TaxComponentResponseSchema, TaxComponentName, CreateTaxComponentNameRequestSchema, TaxReqBodyVersion, TaxGeoArea, AreaDetails, Country, Area, RegionReference, CreateTaxRequestBody, TaxVersion, UpdateTaxVersionRequestBody, CreateTaxVersionRequestBody, TaxRule, TaxVersionDetail, CreateTax, UpdateTaxRequestBody, TaxRuleItem, TaxRules, TaxVersionPastData, TaxRuleVersion, HSCodeItem, HSCodes, GetTaxComponents, PriceFactoryListItemsSchema, PriceFactoryListResponseSchema, CreatePriceFactoryConfigSchema, UpdatePriceFactoryConfigSchema, PriceFactoryConfigSchema, CurrencyPriceSchema, UpsertPriceFactorySizesSchema, UpsertPriceFactoryProductSchema, PriceFactoryCurrencyPriceSchema, PriceFactorySizesSchema, PriceFactoryProductResponseSchema, PriceFactoryProductListResponseSchema, PriceRange, CurrencyPrice, ProductPrice, AppProductPricesSchema, ActionPage, ValidationError, Price1, MultiCategoriesSchema, NetQuantitySchema, CustomMeta, TaxStatusEnum, TaxVersionScopeEnum, HsTypeEnum, PageType };
|
|
5009
|
+
export { Action, ValidationErrors, StandardError, AllSizes, AllowSingleRequestSchema, AppCatalogConfiguration, AppCategoryReturnConfig, AppCategoryReturnConfigResponseSchema, AppConfiguration, AppConfigurationDetail, AppConfigurationsSort, SortWeights, CohortWeights, HighSpenderRepeatCustomerWeights, HyperactiveRepeatCustomerWeights, HighSpenderOccasionalCustomerWeights, StandardOccasionalCustomerWeights, DormantPremiumCustomerWeights, BudgetRegularCustomerWeights, HighSpenderRegularCustomerWeights, StandardCustomerAboutToChurnWeights, PremiumCustomerAboutToChurnWeights, HighSpenderCustomerAboutToChurnWeights, StandardDormantCustomerWeights, HighSpenderDormantCustomerWeights, PotentialCustomerWeights, NewCustomerWeights, BudgetRepeatCustomerWeights, AverageSpenderRepeatCustomerWeights, CohortSortingConfiguration, ApplicationBrandJson, ApplicationCategoryJson, ApplicationDepartment, ApplicationDepartmentJson, ApplicationDepartmentListingResponseSchema, ApplicationItemMOQ, Scores, ApplicationItemMeta, ApplicationItemSeoSitemap, ApplicationItemSEO, ApplicationProductsSchema, ApplicationProductListingResponseSchema, ApplicationStoreJson, AppReturnConfigResponseSchema, ArticleStoreResponseSchema, AttributeDetailsGroup, AttributeMaster, AttributeMasterDetails, AttributeMasterFilter, AttributeMasterMandatoryDetails, AttributeMasterMeta, AttributeMasterSchema, AttributeSchemaRange, AutoCompleteMedia, AutocompleteAction, AutocompletePageAction, AutocompleteResult, BannerImage, BaseAppCategoryReturnConfig, BaseAppCategoryReturnConfigResponseSchema, Brand, BrandItem, BrandListingResponseSchema, ApplicationBrandListingItemSchema, ApplicationBrandListingSchema, ApplicationCategoryListingSchema, ApplicationCategoryListingItemSchema, BrandMeta, InventoryBrandMeta, BulkAssetResponseSchema, BulkHsnResponseSchema, BulkHsnUpsert, BulkInventoryGet, InventoryRecord, FailedRecord, BulkInventoryGetItems, BulkMeta, BulkProductJob, BulkJob, BulkProductRequestSchema, BulkResponseSchema, CatalogInsightBrand, CatalogInsightItem, CatalogInsightResponseSchema, CategoriesResponseSchema, Category, CategoryItems, CategoryListingResponseSchema, CategoryMapping, CategoryMappingValues, CategoryResponseSchema, Child, CollectionBadge, CollectionBanner, CollectionCreateResponseSchema, CollectionDetailResponseSchema, CollectionImage, CollectionItem, CollectionItemUpdate, CollectionListingFilter, CollectionListingFilterTag, CollectionListingFilterType, CollectionQuery, CollectionSchedule, CompanyBrandDetail, CompanyMeta, InventoryCompanyMeta, CompanyOptIn, ConfigErrorResponseSchema, ConfigSuccessResponseSchema, ConfigurationBucketPoints, ConfigurationListing, ConfigurationListingFilter, ConfigurationListingFilterConfig, ConfigurationListingFilterValue, ConfigurationListingSort, ConfigurationListingSortConfig, ConfigurationProduct, ConfigurationProductConfig, ConfigurationProductSimilar, ConfigurationProductVariant, ConfigurationProductVariantConfig, CreateAutocompleteKeyword, CreateAutocompleteWordsResponseSchema, CreateCollection, CreateSearchConfigurationRequestSchema, CreateSearchConfigurationResponseSchema, CreateSearchKeyword, CreateUpdateAppReturnConfig, CrossSellingData, CrossSellingResponseSchema, CustomOrder, DateMeta, DefaultKeyRequestSchema, DeleteAppCategoryReturnConfig, DeleteResponseSchema, DeleteSearchConfigurationResponseSchema, Department, DepartmentCategoryTree, DepartmentErrorResponseSchema, DepartmentIdentifier, DepartmentResponseSchema, DepartmentsResponseSchema, DimensionResponseSchema, InventoryDimensionResponseSchema, Document, EntityConfiguration, ErrorResponseSchema, FilerList, RawProduct, RawProductListingResponseSchema, GTIN, AttributeDetail, LatLong, ApplicationLocationAddressSchema, GetAddressSchema, RegionDetailsSchema, GetAllSizes, GetAppCatalogConfiguration, GetAppCatalogEntityConfiguration, GetAutocompleteWordsData, GetAutocompleteWordsResponseSchema, GetCatalogConfigurationDetailsProduct, GetCatalogConfigurationDetailsSchemaListing, GetCatalogConfigurationMetaData, GetCollectionDetailNest, GetCollectionListingResponseSchema, GetCollectionQueryOptionResponseSchema, GetCompanySchema, ConditionItem, DataItem, ValueTypeItem, SortTypeItem, GetConfigMetadataResponseSchema, GetConfigMetadataValues, GetConfigResponseSchema, ConfigItem, AttributeConfig, GetDepartment, GetInventories, GetInventoriesResponseSchema, GetLocationSchema, GetOptInPlatform, GetProducts, ProductDetails, GetCollectionDetailResponseSchema, CommonResponseSchemaCollection, GetQueryFiltersKeysResponseSchema, GetQueryFiltersResponseSchema, GetCollectionItemsResponseSchemaV2, CollectionItemV2, Page1, CollectionItemSchemaV2, CollectionItemUpdateSchema, CollectionQuerySchemaV2, ProductDetailV2, GetSearchConfigurationResponseSchema, GetSearchWordsData, GetSearchWordsDetailResponseSchema, GetSearchWordsResponseSchema, GlobalValidation, Guide, HSNCodesResponseSchema, HSNData, CreatedBySchema, ModifiedBySchema, HSNDataInsertV2, Hierarchy, HsnCode, HsnCodesListingResponseSchemaV2, HsnCodesObject, HsnUpsert, Image, ImageUrls, InvSize, InventoryBulkRequestSchema, InventoryConfig, InventoryCreateRequestSchema, InventoryExportAdvanceOption, InventoryExportFilter, InventoryExportJob, InventoryExportJobListResponseSchema, InventoryExportQuantityFilter, InventoryExportRequestSchema, InventoryExportResponseSchema, InventoryFailedReason, InventoryJobDetailResponseSchema, InventoryJobFilters, InventoryJobPayload, InventoryPage, AddInventoryRequestPayload, InventoryPayload, InventoryRequestSchema, InventoryRequestSchemaV2, InventoryResponseSchema, InventoryResponseItem, InventoryResponsePaginated, InventorySellerIdentifierResponsePaginated, ApplicationInventorySellerIdentifierResponsePaginated, InventorySellerResponseSchema, ApplicationInventorySellerResponseSchema, InventorySet, InventoryStockResponseSchema, InventoryUpdateResponseSchema, InventoryValidationResponseSchema, InvoiceCredSchema, InvoiceDetailsSchema, ItemQuery, Items, LimitedProductData, SizeGuideItem, ListSizeGuide, LocationDayWiseSchema, LocationIntegrationType, LocationListSchema, LocationManagerSchema, LocationTimingSchema, Logo, MOQData, ManufacturerResponseSchema, InventoryManufacturerResponseSchema, Media, Media1, DepartmentMedia, BrandMedia, BundleDetails, Meta, MetaDataListingFilterMetaResponseSchema, MetaDataListingFilterResponseSchema, MetaDataListingResponseSchema, MetaDataListingSortMetaResponseSchema, MetaDataListingSortResponseSchema, MetaFields, NetQuantity, NetQuantityResponseSchema, NextSchedule, LocationPriceRequestSchema, LocationQuantityRequestSchema, LocationPriceQuantitySuccessResponseSchema, OptInPostRequestSchema, OptinCompanyBrandDetailsView, OptinCompanyDetail, OptinCompanyMetrics, OptinStoreDetails, OwnerAppItemResponseSchema, PTErrorResponseSchema, Page, PageResponseSchema, PageResponseType, Price, ProductListingDetailPrice, PriceArticle, PriceMeta, ProdcutTemplateCategoriesResponseSchema, PriceStrategySchema, PriceFactoryResponseSchema, Product, ProductAttributesResponseSchema, ProductBrand, ProductBulkAssets, ProductBulkRequestSchema, ProductBulkRequestList, ProductConfigurationDownloads, ProductCreateSchemaV3, ProductUpdateSchemaV3, ProductPatchSchemaV3, ProductSizePatch, ProductDetail, ProductDetailAttribute, ProductDetailGroupedAttribute, ProductDownloadsResponseSchema, CollectionProductFilters, ProductFilters, GetQueryFiltersValuesResponseSchema, ProductFiltersKeysOnly, ProductFiltersKey, ProductQueryFiltersValue, CollectionProductFiltersValue, ProductFiltersValue, CollectionProductListingDetail, ProductCategory, ApplicationCategoryAction, ApplicationCategoryItem, ApplicationProductMedia, ApplicationProductCategoryItem, CategoryPageAction, CategoryQuery, CategoryImage, ProductListingDetail, ActionObject, PageAction, ProductListingPrice, ProductListingResponseSchema, ProductListingResponseV2, ProductPublish, ProductPublished, ProductReturnConfigSchema, ProductReturnConfigBaseSchema, Identifier, SizeDetails, ProductSchemaV2, ProductSize, ProductSizeDeleteDataResponseSchema, ProductSizeDeleteResponseSchema, CollectionProductSortOn, ProductSortOn, ProductTagsViewResponseSchema, CreatedBy, ModifiedBy, ProductTemplate, ProductTemplateDownloadsExport, ProductTemplateExportFilterRequestSchema, ProductTemplateExportResponseSchema, ProductVariants, ProductVariantsResponseSchema, Properties, Quantities, QuantitiesArticle, Quantity, QuantityBase, ReturnConfig, InventoryReturnConfig, ReturnConfig2, ReturnConfigResponseSchema, Sitemap, PageQuery, ApplicationCollectionItemSeoPage, ApplicationCollectionItemSeoAction, ApplicationItemSeoAction, ApplicationItemSeoBreadcrumbs, ApplicationCollectionItemSeoBreadcrumbs, ApplicationItemSeoMetaTagItem, ApplicationItemSeoMetaTags, Metatags, SizePromotionThreshold, SEOData, SearchKeywordResult, SearchableAttribute, SecondLevelChild, SellerPhoneNumber, CollectionSeoDetail, SeoDetail, SetSize, SingleCategoryResponseSchema, SingleProductResponseSchema, Size, SizeDistribution, SizeGuideResponseSchema, StoreDetail, StoreMeta, SuccessResponseSchema, SuccessResponseObject, TaxIdentifier, TaxIdentifierV3, TaxSlab, TeaserTag, TemplateDetails, TemplateGlobalValidationData, TemplateValidationData, TemplatesResponseSchema, TemplatesGlobalValidationResponseSchema, TemplatesValidationResponseSchema, ThirdLevelChild, Trader, Trader1, TraderResponseSchema, UpdateCollection, UpdateSearchConfigurationRequestSchema, UpdateSearchConfigurationResponseSchema, CreateMarketplaceOptinResponseSchema, UserCommon, UserDetail, UserDetail1, UserInfo, UserSchema, RequestUserSchema, ValidateIdentifier, ValidateProduct, ValidateSizeGuide, VerifiedBy, WeightResponseSchema, InventoryWeightResponseSchema, BulkInventoryJob, Marketplaces, GetAllMarketplaces, UpdateMarketplaceOptinRequestSchema, UpdateMarketplaceOptinResponseSchema, Filters, FollowedProducts, FollowProduct, TaxReqBodyRule, TaxThreshold, TaxComponent, TaxComponentResponseSchema, TaxComponentName, CreateTaxComponentNameRequestSchema, TaxReqBodyVersion, TaxGeoArea, AreaDetails, Country, Area, RegionReference, CreateTaxRequestBody, TaxVersion, UpdateTaxVersionRequestBody, CreateTaxVersionRequestBody, TaxRule, TaxVersionDetail, CreateTax, UpdateTaxRequestBody, TaxRuleItem, TaxRules, TaxVersionPastData, TaxRuleVersion, HSCodeItem, HSCodes, GetTaxComponents, PriceFactoryListItemsSchema, PriceFactoryListResponseSchema, CreatePriceFactoryConfigSchema, UpdatePriceFactoryConfigSchema, PriceFactoryConfigSchema, CurrencyPriceSchema, UpsertPriceFactorySizesSchema, UpsertPriceFactoryProductSchema, PriceFactoryCurrencyPriceSchema, PriceFactorySizesSchema, PriceFactoryProductResponseSchema, PriceFactoryProductListResponseSchema, PriceRange, CurrencyPrice, ProductPrice, AppProductPricesSchema, ActionPage, ValidationError, Price1, MultiCategoriesSchema, NetQuantitySchema, CustomMeta, TaxStatusEnum, TaxVersionScopeEnum, HsTypeEnum, PageType };
|
|
5001
5010
|
}
|
|
5002
5011
|
/** @returns {Action} */
|
|
5003
5012
|
declare function Action(): Action;
|
|
@@ -8191,6 +8200,18 @@ type GetAddressSchema = {
|
|
|
8191
8200
|
*/
|
|
8192
8201
|
state?: string;
|
|
8193
8202
|
};
|
|
8203
|
+
/** @returns {RegionDetailsSchema} */
|
|
8204
|
+
declare function RegionDetailsSchema(): RegionDetailsSchema;
|
|
8205
|
+
type RegionDetailsSchema = {
|
|
8206
|
+
/**
|
|
8207
|
+
* - Base region slug.
|
|
8208
|
+
*/
|
|
8209
|
+
slug?: string;
|
|
8210
|
+
/**
|
|
8211
|
+
* - Zone or cluster slug.
|
|
8212
|
+
*/
|
|
8213
|
+
zone?: string;
|
|
8214
|
+
};
|
|
8194
8215
|
/** @returns {GetAllSizes} */
|
|
8195
8216
|
declare function GetAllSizes(): GetAllSizes;
|
|
8196
8217
|
type GetAllSizes = {
|
|
@@ -8394,6 +8415,13 @@ type GetCompanySchema = {
|
|
|
8394
8415
|
* - The registered name of the company.
|
|
8395
8416
|
*/
|
|
8396
8417
|
name?: string;
|
|
8418
|
+
/**
|
|
8419
|
+
* - Deployment region slug for the company profile.
|
|
8420
|
+
* When the zone is default, this is the region slug; otherwise it is
|
|
8421
|
+
* formatted as region/zone.
|
|
8422
|
+
*/
|
|
8423
|
+
region?: string;
|
|
8424
|
+
region_details?: RegionDetailsSchema;
|
|
8397
8425
|
/**
|
|
8398
8426
|
* - If applicable, the reason why the
|
|
8399
8427
|
* company's application or status was rejected.
|
|
@@ -1731,6 +1731,12 @@ const Joi = require("joi");
|
|
|
1731
1731
|
* @property {string} [state] - The state or region where the address is located.
|
|
1732
1732
|
*/
|
|
1733
1733
|
|
|
1734
|
+
/**
|
|
1735
|
+
* @typedef RegionDetailsSchema
|
|
1736
|
+
* @property {string} [slug] - Base region slug.
|
|
1737
|
+
* @property {string} [zone] - Zone or cluster slug.
|
|
1738
|
+
*/
|
|
1739
|
+
|
|
1734
1740
|
/**
|
|
1735
1741
|
* @typedef GetAllSizes
|
|
1736
1742
|
* @property {AllSizes[]} [all_sizes]
|
|
@@ -1849,6 +1855,10 @@ const Joi = require("joi");
|
|
|
1849
1855
|
* @property {string} [modified_on] - The date and time when the company record
|
|
1850
1856
|
* was last updated.
|
|
1851
1857
|
* @property {string} [name] - The registered name of the company.
|
|
1858
|
+
* @property {string} [region] - Deployment region slug for the company profile.
|
|
1859
|
+
* When the zone is default, this is the region slug; otherwise it is
|
|
1860
|
+
* formatted as region/zone.
|
|
1861
|
+
* @property {RegionDetailsSchema} [region_details]
|
|
1852
1862
|
* @property {string} [reject_reason] - If applicable, the reason why the
|
|
1853
1863
|
* company's application or status was rejected.
|
|
1854
1864
|
* @property {string} [stage] - Current operational stage of the company, such
|
|
@@ -7280,6 +7290,14 @@ class CatalogPlatformModel {
|
|
|
7280
7290
|
});
|
|
7281
7291
|
}
|
|
7282
7292
|
|
|
7293
|
+
/** @returns {RegionDetailsSchema} */
|
|
7294
|
+
static RegionDetailsSchema() {
|
|
7295
|
+
return Joi.object({
|
|
7296
|
+
slug: Joi.string().allow(""),
|
|
7297
|
+
zone: Joi.string().allow(""),
|
|
7298
|
+
});
|
|
7299
|
+
}
|
|
7300
|
+
|
|
7283
7301
|
/** @returns {GetAllSizes} */
|
|
7284
7302
|
static GetAllSizes() {
|
|
7285
7303
|
return Joi.object({
|
|
@@ -7411,6 +7429,8 @@ class CatalogPlatformModel {
|
|
|
7411
7429
|
modified_by: CatalogPlatformModel.UserSchema(),
|
|
7412
7430
|
modified_on: Joi.string().allow(""),
|
|
7413
7431
|
name: Joi.string().allow(""),
|
|
7432
|
+
region: Joi.string().allow(""),
|
|
7433
|
+
region_details: CatalogPlatformModel.RegionDetailsSchema(),
|
|
7414
7434
|
reject_reason: Joi.string().allow(""),
|
|
7415
7435
|
stage: Joi.string().allow(""),
|
|
7416
7436
|
uid: Joi.number(),
|
|
@@ -13,6 +13,7 @@ export = CatalogPlatformValidator;
|
|
|
13
13
|
* @typedef BulkHsnCodeParam
|
|
14
14
|
* @property {CatalogPlatformModel.BulkHsnUpsert} body
|
|
15
15
|
*/
|
|
16
|
+
/** @typedef CbsOnboardGetParam */
|
|
16
17
|
/**
|
|
17
18
|
* @typedef CreateBulkInventoryParam
|
|
18
19
|
* @property {string} batchId - Batch Id of the bulk create job.
|
|
@@ -535,6 +536,8 @@ declare class CatalogPlatformValidator {
|
|
|
535
536
|
static allSizes(): AllSizesParam;
|
|
536
537
|
/** @returns {BulkHsnCodeParam} */
|
|
537
538
|
static bulkHsnCode(): BulkHsnCodeParam;
|
|
539
|
+
/** @returns {CbsOnboardGetParam} */
|
|
540
|
+
static cbsOnboardGet(): any;
|
|
538
541
|
/** @returns {CreateBulkInventoryParam} */
|
|
539
542
|
static createBulkInventory(): CreateBulkInventoryParam;
|
|
540
543
|
/** @returns {CreateBulkInventoryJobParam} */
|
|
@@ -699,7 +702,7 @@ declare class CatalogPlatformValidator {
|
|
|
699
702
|
static validateProductTemplateSchema(): ValidateProductTemplateSchemaParam;
|
|
700
703
|
}
|
|
701
704
|
declare namespace CatalogPlatformValidator {
|
|
702
|
-
export { AddInventoryParam, AllSizesParam, BulkHsnCodeParam, CreateBulkInventoryParam, CreateBulkInventoryJobParam, CreateBulkProductUploadJobParam, CreateHsCodeParam, CreateInventoryExportParam, CreateInventoryExportJobParam, CreateMarketplaceOptinParam, CreateProductParam, CreateProductAssetsInBulkParam, CreateProductExportJobParam, CreateProductsInBulkParam, CreateSizeGuideParam, CreateTaxParam, CreateTaxComponentNameParam, CreateTaxVersionParam, DeleteBulkInventoryJobParam, DeleteProductParam, DeleteProductBulkJobParam, DeleteRealtimeInventoryParam, DeleteSizeParam, DeleteTaxRuleParam, DeleteTaxVersionParam, DownloadInventoryTemplateViewParam, DownloadProductTemplateViewsParam, EditProductParam, ExportInventoryConfigParam, GetAllProductHsnCodesParam, GetAllTaxRulesParam, GetAttributeParam, GetCategoryDataParam, GetCompanyBrandDetailParam, GetCompanyDetailParam, GetCompanyMetricsParam, GetDepartmentDataParam, GetHsCodesParam, GetHsnCodeParam, GetInventoriesParam, GetInventoryBulkUploadHistoryParam, GetInventoryBySizeParam, GetInventoryBySizeIdentifierParam, GetInventoryExportParam, GetMarketplaceOptinDetailParam, GetMarketplacesParam, GetProductParam, GetProductAssetsInBulkParam, GetProductAttributesParam, GetProductBulkUploadHistoryParam, GetProductExportJobsParam, GetProductSizeParam, GetProductTagsParam, GetProductValidationParam, GetProductsParam, GetSellerInsightsParam, GetSingleProductHSNCodeParam, GetSizeGuideParam, GetSizeGuidesParam, GetStoreDetailParam, GetTaxComponentNamesParam, GetTaxVersionDetailsParam, GetVariantsOfProductsParam, ListCategoriesParam, ListDepartmentsDataParam, ListHSNCodesParam, ListInventoryExportParam, ListProductTemplateParam, ListProductTemplateCategoriesParam, ListProductTemplateExportDetailsParam, ListTemplateBrandTypeValuesParam, PartialUpdateProductParam, UpdateHsnCodeParam, UpdateInventoriesParam, UpdateLocationPriceParam, UpdateLocationQuantityParam, UpdateMarketplaceOptinParam, UpdateRealtimeInventoryParam, UpdateSizeGuideParam, UpdateTaxRuleParam, UpdateTaxVersionParam, ValidateProductGlobalTemplateParam, ValidateProductTemplateParam, ValidateProductTemplateSchemaParam };
|
|
705
|
+
export { AddInventoryParam, AllSizesParam, BulkHsnCodeParam, CbsOnboardGetParam, CreateBulkInventoryParam, CreateBulkInventoryJobParam, CreateBulkProductUploadJobParam, CreateHsCodeParam, CreateInventoryExportParam, CreateInventoryExportJobParam, CreateMarketplaceOptinParam, CreateProductParam, CreateProductAssetsInBulkParam, CreateProductExportJobParam, CreateProductsInBulkParam, CreateSizeGuideParam, CreateTaxParam, CreateTaxComponentNameParam, CreateTaxVersionParam, DeleteBulkInventoryJobParam, DeleteProductParam, DeleteProductBulkJobParam, DeleteRealtimeInventoryParam, DeleteSizeParam, DeleteTaxRuleParam, DeleteTaxVersionParam, DownloadInventoryTemplateViewParam, DownloadProductTemplateViewsParam, EditProductParam, ExportInventoryConfigParam, GetAllProductHsnCodesParam, GetAllTaxRulesParam, GetAttributeParam, GetCategoryDataParam, GetCompanyBrandDetailParam, GetCompanyDetailParam, GetCompanyMetricsParam, GetDepartmentDataParam, GetHsCodesParam, GetHsnCodeParam, GetInventoriesParam, GetInventoryBulkUploadHistoryParam, GetInventoryBySizeParam, GetInventoryBySizeIdentifierParam, GetInventoryExportParam, GetMarketplaceOptinDetailParam, GetMarketplacesParam, GetProductParam, GetProductAssetsInBulkParam, GetProductAttributesParam, GetProductBulkUploadHistoryParam, GetProductExportJobsParam, GetProductSizeParam, GetProductTagsParam, GetProductValidationParam, GetProductsParam, GetSellerInsightsParam, GetSingleProductHSNCodeParam, GetSizeGuideParam, GetSizeGuidesParam, GetStoreDetailParam, GetTaxComponentNamesParam, GetTaxVersionDetailsParam, GetVariantsOfProductsParam, ListCategoriesParam, ListDepartmentsDataParam, ListHSNCodesParam, ListInventoryExportParam, ListProductTemplateParam, ListProductTemplateCategoriesParam, ListProductTemplateExportDetailsParam, ListTemplateBrandTypeValuesParam, PartialUpdateProductParam, UpdateHsnCodeParam, UpdateInventoriesParam, UpdateLocationPriceParam, UpdateLocationQuantityParam, UpdateMarketplaceOptinParam, UpdateRealtimeInventoryParam, UpdateSizeGuideParam, UpdateTaxRuleParam, UpdateTaxVersionParam, ValidateProductGlobalTemplateParam, ValidateProductTemplateParam, ValidateProductTemplateSchemaParam };
|
|
703
706
|
}
|
|
704
707
|
type AddInventoryParam = {
|
|
705
708
|
/**
|
|
@@ -1704,6 +1707,7 @@ type ValidateProductTemplateSchemaParam = {
|
|
|
1704
1707
|
*/
|
|
1705
1708
|
schemaType?: string;
|
|
1706
1709
|
};
|
|
1710
|
+
type CbsOnboardGetParam = any;
|
|
1707
1711
|
type GetCompanyDetailParam = any;
|
|
1708
1712
|
type GetCompanyMetricsParam = any;
|
|
1709
1713
|
type GetInventoryExportParam = any;
|
|
@@ -19,6 +19,8 @@ const CatalogPlatformModel = require("./CatalogPlatformModel");
|
|
|
19
19
|
* @property {CatalogPlatformModel.BulkHsnUpsert} body
|
|
20
20
|
*/
|
|
21
21
|
|
|
22
|
+
/** @typedef CbsOnboardGetParam */
|
|
23
|
+
|
|
22
24
|
/**
|
|
23
25
|
* @typedef CreateBulkInventoryParam
|
|
24
26
|
* @property {string} batchId - Batch Id of the bulk create job.
|
|
@@ -639,6 +641,11 @@ class CatalogPlatformValidator {
|
|
|
639
641
|
}).required();
|
|
640
642
|
}
|
|
641
643
|
|
|
644
|
+
/** @returns {CbsOnboardGetParam} */
|
|
645
|
+
static cbsOnboardGet() {
|
|
646
|
+
return Joi.object({}).required();
|
|
647
|
+
}
|
|
648
|
+
|
|
642
649
|
/** @returns {CreateBulkInventoryParam} */
|
|
643
650
|
static createBulkInventory() {
|
|
644
651
|
return Joi.object({
|
|
@@ -15,7 +15,6 @@ declare class PlatformApplicationClient {
|
|
|
15
15
|
config: import("./PlatformConfig");
|
|
16
16
|
companyId: string;
|
|
17
17
|
applicationId: string;
|
|
18
|
-
analytics: Analytics;
|
|
19
18
|
cart: Cart;
|
|
20
19
|
catalog: Catalog;
|
|
21
20
|
communication: Communication;
|
|
@@ -38,7 +37,6 @@ declare class PlatformApplicationClient {
|
|
|
38
37
|
*/
|
|
39
38
|
setExtraHeaders(header: object): void;
|
|
40
39
|
}
|
|
41
|
-
import Analytics = require("./Analytics/AnalyticsPlatformApplicationClient");
|
|
42
40
|
import Cart = require("./Cart/CartPlatformApplicationClient");
|
|
43
41
|
import Catalog = require("./Catalog/CatalogPlatformApplicationClient");
|
|
44
42
|
import Communication = require("./Communication/CommunicationPlatformApplicationClient");
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
const Analytics = require("./Analytics/AnalyticsPlatformApplicationClient");
|
|
2
|
-
|
|
3
1
|
const Cart = require("./Cart/CartPlatformApplicationClient");
|
|
4
2
|
|
|
5
3
|
const Catalog = require("./Catalog/CatalogPlatformApplicationClient");
|
|
@@ -47,8 +45,6 @@ class PlatformApplicationClient {
|
|
|
47
45
|
this.companyId = config.companyId;
|
|
48
46
|
this.applicationId = applicationId;
|
|
49
47
|
|
|
50
|
-
this.analytics = new Analytics(config, applicationId);
|
|
51
|
-
|
|
52
48
|
this.cart = new Cart(config, applicationId);
|
|
53
49
|
|
|
54
50
|
this.catalog = new Catalog(config, applicationId);
|
package/sdk/platform/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export const PlatformConfig: typeof import("./PlatformConfig");
|
|
2
2
|
export const PlatformClient: typeof import("./PlatformClient");
|
|
3
3
|
export namespace PlatformModel {
|
|
4
|
-
const AnalyticsPlatformModel: typeof import("./Analytics/AnalyticsPlatformModel");
|
|
5
4
|
const AuditTrailPlatformModel: typeof import("./AuditTrail/AuditTrailPlatformModel");
|
|
6
5
|
const BillingPlatformModel: typeof import("./Billing/BillingPlatformModel");
|
|
7
6
|
const CartPlatformModel: typeof import("./Cart/CartPlatformModel");
|
package/sdk/platform/index.js
CHANGED
|
@@ -2,8 +2,6 @@ module.exports = {
|
|
|
2
2
|
PlatformConfig: require("./PlatformConfig"),
|
|
3
3
|
PlatformClient: require("./PlatformClient"),
|
|
4
4
|
PlatformModel: {
|
|
5
|
-
AnalyticsPlatformModel: require("./Analytics/AnalyticsPlatformModel"),
|
|
6
|
-
|
|
7
5
|
AuditTrailPlatformModel: require("./AuditTrail/AuditTrailPlatformModel"),
|
|
8
6
|
|
|
9
7
|
BillingPlatformModel: require("./Billing/BillingPlatformModel"),
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
export = Analytics;
|
|
2
|
-
declare class Analytics {
|
|
3
|
-
constructor(config: any, applicationId: any);
|
|
4
|
-
config: any;
|
|
5
|
-
applicationId: any;
|
|
6
|
-
/**
|
|
7
|
-
* @param {AnalyticsPlatformApplicationValidator.CheckJobStatusByNameV2Param} arg
|
|
8
|
-
* - Arg object
|
|
9
|
-
*
|
|
10
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
11
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
12
|
-
* @returns {Promise<AnalyticsPlatformModel.JobStatus>} - Success response
|
|
13
|
-
* @name checkJobStatusByNameV2
|
|
14
|
-
* @summary: Checks download job status
|
|
15
|
-
* @description: Takes job name in path param to check the status of job Returns file URL if downloading is done else returns status of job - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/analytics/checkJobStatusByNameV2/).
|
|
16
|
-
*/
|
|
17
|
-
checkJobStatusByNameV2({ fileName, requestHeaders }?: AnalyticsPlatformApplicationValidator.CheckJobStatusByNameV2Param, { responseHeaders }?: object): Promise<AnalyticsPlatformModel.JobStatus>;
|
|
18
|
-
/**
|
|
19
|
-
* @param {AnalyticsPlatformApplicationValidator.ExecuteJobForProvidedParametersV2Param} arg
|
|
20
|
-
* - Arg object
|
|
21
|
-
*
|
|
22
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
23
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
24
|
-
* @returns {Promise<AnalyticsPlatformModel.JobExecutionResult>} - Success response
|
|
25
|
-
* @name executeJobForProvidedParametersV2
|
|
26
|
-
* @summary: Executes given sql(Base64 Encoded) query
|
|
27
|
-
* @description: Query click events data - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/analytics/executeJobForProvidedParametersV2/).
|
|
28
|
-
*/
|
|
29
|
-
executeJobForProvidedParametersV2({ body, requestHeaders }?: AnalyticsPlatformApplicationValidator.ExecuteJobForProvidedParametersV2Param, { responseHeaders }?: object): Promise<AnalyticsPlatformModel.JobExecutionResult>;
|
|
30
|
-
/**
|
|
31
|
-
* @param {AnalyticsPlatformApplicationValidator.StartDownloadForQueryV2Param} arg
|
|
32
|
-
* - Arg object
|
|
33
|
-
*
|
|
34
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
35
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
36
|
-
* @returns {Promise<Object>} - Success response
|
|
37
|
-
* @name startDownloadForQueryV2
|
|
38
|
-
* @summary: Initiates download job
|
|
39
|
-
* @description: Initiates download job and returns job name - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/analytics/startDownloadForQueryV2/).
|
|
40
|
-
*/
|
|
41
|
-
startDownloadForQueryV2({ exportType, body, requestHeaders }?: AnalyticsPlatformApplicationValidator.StartDownloadForQueryV2Param, { responseHeaders }?: object): Promise<any>;
|
|
42
|
-
}
|
|
43
|
-
import AnalyticsPlatformApplicationValidator = require("./AnalyticsPlatformApplicationValidator");
|
|
44
|
-
import AnalyticsPlatformModel = require("./AnalyticsPlatformModel");
|
|
@@ -1,263 +0,0 @@
|
|
|
1
|
-
const PlatformAPIClient = require("../PlatformAPIClient");
|
|
2
|
-
const {
|
|
3
|
-
FDKClientValidationError,
|
|
4
|
-
FDKResponseValidationError,
|
|
5
|
-
} = require("../../common/FDKError");
|
|
6
|
-
const Paginator = require("../../common/Paginator");
|
|
7
|
-
const AnalyticsPlatformApplicationValidator = require("./AnalyticsPlatformApplicationValidator");
|
|
8
|
-
const AnalyticsPlatformModel = require("./AnalyticsPlatformModel");
|
|
9
|
-
const { Logger } = require("./../../common/Logger");
|
|
10
|
-
const Joi = require("joi");
|
|
11
|
-
|
|
12
|
-
class Analytics {
|
|
13
|
-
constructor(config, applicationId) {
|
|
14
|
-
this.config = config;
|
|
15
|
-
this.applicationId = applicationId;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* @param {AnalyticsPlatformApplicationValidator.CheckJobStatusByNameV2Param} arg
|
|
20
|
-
* - Arg object
|
|
21
|
-
*
|
|
22
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
23
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
24
|
-
* @returns {Promise<AnalyticsPlatformModel.JobStatus>} - Success response
|
|
25
|
-
* @name checkJobStatusByNameV2
|
|
26
|
-
* @summary: Checks download job status
|
|
27
|
-
* @description: Takes job name in path param to check the status of job Returns file URL if downloading is done else returns status of job - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/analytics/checkJobStatusByNameV2/).
|
|
28
|
-
*/
|
|
29
|
-
async checkJobStatusByNameV2(
|
|
30
|
-
{ fileName, requestHeaders } = { requestHeaders: {} },
|
|
31
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
32
|
-
) {
|
|
33
|
-
const {
|
|
34
|
-
error,
|
|
35
|
-
} = AnalyticsPlatformApplicationValidator.checkJobStatusByNameV2().validate(
|
|
36
|
-
{
|
|
37
|
-
fileName,
|
|
38
|
-
},
|
|
39
|
-
{ abortEarly: false, allowUnknown: true }
|
|
40
|
-
);
|
|
41
|
-
if (error) {
|
|
42
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// Showing warrnings if extra unknown parameters are found
|
|
46
|
-
const {
|
|
47
|
-
error: warrning,
|
|
48
|
-
} = AnalyticsPlatformApplicationValidator.checkJobStatusByNameV2().validate(
|
|
49
|
-
{
|
|
50
|
-
fileName,
|
|
51
|
-
},
|
|
52
|
-
{ abortEarly: false, allowUnknown: false }
|
|
53
|
-
);
|
|
54
|
-
if (warrning) {
|
|
55
|
-
Logger({
|
|
56
|
-
level: "WARN",
|
|
57
|
-
message: `Parameter Validation warrnings for platform > Analytics > checkJobStatusByNameV2 \n ${warrning}`,
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
const query_params = {};
|
|
62
|
-
|
|
63
|
-
const response = await PlatformAPIClient.execute(
|
|
64
|
-
this.config,
|
|
65
|
-
"get",
|
|
66
|
-
`/service/platform/insights/v2.0/company/${this.config.companyId}/application/${this.applicationId}/job/${fileName}/status`,
|
|
67
|
-
query_params,
|
|
68
|
-
undefined,
|
|
69
|
-
requestHeaders,
|
|
70
|
-
{ responseHeaders }
|
|
71
|
-
);
|
|
72
|
-
|
|
73
|
-
let responseData = response;
|
|
74
|
-
if (responseHeaders) {
|
|
75
|
-
responseData = response[0];
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
const {
|
|
79
|
-
error: res_error,
|
|
80
|
-
} = AnalyticsPlatformModel.JobStatus().validate(responseData, {
|
|
81
|
-
abortEarly: false,
|
|
82
|
-
allowUnknown: true,
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
if (res_error) {
|
|
86
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
87
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
88
|
-
} else {
|
|
89
|
-
Logger({
|
|
90
|
-
level: "WARN",
|
|
91
|
-
message: `Response Validation Warnings for platform > Analytics > checkJobStatusByNameV2 \n ${res_error}`,
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
return response;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* @param {AnalyticsPlatformApplicationValidator.ExecuteJobForProvidedParametersV2Param} arg
|
|
101
|
-
* - Arg object
|
|
102
|
-
*
|
|
103
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
104
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
105
|
-
* @returns {Promise<AnalyticsPlatformModel.JobExecutionResult>} - Success response
|
|
106
|
-
* @name executeJobForProvidedParametersV2
|
|
107
|
-
* @summary: Executes given sql(Base64 Encoded) query
|
|
108
|
-
* @description: Query click events data - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/analytics/executeJobForProvidedParametersV2/).
|
|
109
|
-
*/
|
|
110
|
-
async executeJobForProvidedParametersV2(
|
|
111
|
-
{ body, requestHeaders } = { requestHeaders: {} },
|
|
112
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
113
|
-
) {
|
|
114
|
-
const {
|
|
115
|
-
error,
|
|
116
|
-
} = AnalyticsPlatformApplicationValidator.executeJobForProvidedParametersV2().validate(
|
|
117
|
-
{
|
|
118
|
-
body,
|
|
119
|
-
},
|
|
120
|
-
{ abortEarly: false, allowUnknown: true }
|
|
121
|
-
);
|
|
122
|
-
if (error) {
|
|
123
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
// Showing warrnings if extra unknown parameters are found
|
|
127
|
-
const {
|
|
128
|
-
error: warrning,
|
|
129
|
-
} = AnalyticsPlatformApplicationValidator.executeJobForProvidedParametersV2().validate(
|
|
130
|
-
{
|
|
131
|
-
body,
|
|
132
|
-
},
|
|
133
|
-
{ abortEarly: false, allowUnknown: false }
|
|
134
|
-
);
|
|
135
|
-
if (warrning) {
|
|
136
|
-
Logger({
|
|
137
|
-
level: "WARN",
|
|
138
|
-
message: `Parameter Validation warrnings for platform > Analytics > executeJobForProvidedParametersV2 \n ${warrning}`,
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
const query_params = {};
|
|
143
|
-
|
|
144
|
-
const response = await PlatformAPIClient.execute(
|
|
145
|
-
this.config,
|
|
146
|
-
"post",
|
|
147
|
-
`/service/platform/insights/v2.0/company/${this.config.companyId}/application/${this.applicationId}/job/execute`,
|
|
148
|
-
query_params,
|
|
149
|
-
body,
|
|
150
|
-
requestHeaders,
|
|
151
|
-
{ responseHeaders }
|
|
152
|
-
);
|
|
153
|
-
|
|
154
|
-
let responseData = response;
|
|
155
|
-
if (responseHeaders) {
|
|
156
|
-
responseData = response[0];
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
const {
|
|
160
|
-
error: res_error,
|
|
161
|
-
} = AnalyticsPlatformModel.JobExecutionResult().validate(responseData, {
|
|
162
|
-
abortEarly: false,
|
|
163
|
-
allowUnknown: true,
|
|
164
|
-
});
|
|
165
|
-
|
|
166
|
-
if (res_error) {
|
|
167
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
168
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
169
|
-
} else {
|
|
170
|
-
Logger({
|
|
171
|
-
level: "WARN",
|
|
172
|
-
message: `Response Validation Warnings for platform > Analytics > executeJobForProvidedParametersV2 \n ${res_error}`,
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
return response;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* @param {AnalyticsPlatformApplicationValidator.StartDownloadForQueryV2Param} arg
|
|
182
|
-
* - Arg object
|
|
183
|
-
*
|
|
184
|
-
* @param {object} [arg.requestHeaders={}] - Request headers. Default is `{}`
|
|
185
|
-
* @param {import("../PlatformAPIClient").Options} - Options
|
|
186
|
-
* @returns {Promise<Object>} - Success response
|
|
187
|
-
* @name startDownloadForQueryV2
|
|
188
|
-
* @summary: Initiates download job
|
|
189
|
-
* @description: Initiates download job and returns job name - Check out [method documentation](https://docs.fynd.com/partners/commerce/sdk/platform/analytics/startDownloadForQueryV2/).
|
|
190
|
-
*/
|
|
191
|
-
async startDownloadForQueryV2(
|
|
192
|
-
{ exportType, body, requestHeaders } = { requestHeaders: {} },
|
|
193
|
-
{ responseHeaders } = { responseHeaders: false }
|
|
194
|
-
) {
|
|
195
|
-
const {
|
|
196
|
-
error,
|
|
197
|
-
} = AnalyticsPlatformApplicationValidator.startDownloadForQueryV2().validate(
|
|
198
|
-
{
|
|
199
|
-
exportType,
|
|
200
|
-
body,
|
|
201
|
-
},
|
|
202
|
-
{ abortEarly: false, allowUnknown: true }
|
|
203
|
-
);
|
|
204
|
-
if (error) {
|
|
205
|
-
return Promise.reject(new FDKClientValidationError(error));
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
// Showing warrnings if extra unknown parameters are found
|
|
209
|
-
const {
|
|
210
|
-
error: warrning,
|
|
211
|
-
} = AnalyticsPlatformApplicationValidator.startDownloadForQueryV2().validate(
|
|
212
|
-
{
|
|
213
|
-
exportType,
|
|
214
|
-
body,
|
|
215
|
-
},
|
|
216
|
-
{ abortEarly: false, allowUnknown: false }
|
|
217
|
-
);
|
|
218
|
-
if (warrning) {
|
|
219
|
-
Logger({
|
|
220
|
-
level: "WARN",
|
|
221
|
-
message: `Parameter Validation warrnings for platform > Analytics > startDownloadForQueryV2 \n ${warrning}`,
|
|
222
|
-
});
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
const query_params = {};
|
|
226
|
-
query_params["export_type"] = exportType;
|
|
227
|
-
|
|
228
|
-
const response = await PlatformAPIClient.execute(
|
|
229
|
-
this.config,
|
|
230
|
-
"post",
|
|
231
|
-
`/service/platform/insights/v2.0/company/${this.config.companyId}/application/${this.applicationId}/job/download`,
|
|
232
|
-
query_params,
|
|
233
|
-
body,
|
|
234
|
-
requestHeaders,
|
|
235
|
-
{ responseHeaders }
|
|
236
|
-
);
|
|
237
|
-
|
|
238
|
-
let responseData = response;
|
|
239
|
-
if (responseHeaders) {
|
|
240
|
-
responseData = response[0];
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
const { error: res_error } = Joi.any().validate(responseData, {
|
|
244
|
-
abortEarly: false,
|
|
245
|
-
allowUnknown: true,
|
|
246
|
-
});
|
|
247
|
-
|
|
248
|
-
if (res_error) {
|
|
249
|
-
if (this.config.options.strictResponseCheck === true) {
|
|
250
|
-
return Promise.reject(new FDKResponseValidationError(res_error));
|
|
251
|
-
} else {
|
|
252
|
-
Logger({
|
|
253
|
-
level: "WARN",
|
|
254
|
-
message: `Response Validation Warnings for platform > Analytics > startDownloadForQueryV2 \n ${res_error}`,
|
|
255
|
-
});
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
return response;
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
module.exports = Analytics;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
export = AnalyticsPlatformApplicationValidator;
|
|
2
|
-
/**
|
|
3
|
-
* @typedef CheckJobStatusByNameV2Param
|
|
4
|
-
* @property {string} fileName - Download job name
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* @typedef ExecuteJobForProvidedParametersV2Param
|
|
8
|
-
* @property {AnalyticsPlatformModel.JobExecute} body
|
|
9
|
-
*/
|
|
10
|
-
/**
|
|
11
|
-
* @typedef StartDownloadForQueryV2Param
|
|
12
|
-
* @property {string} exportType - Format in which to be exported(eg. CSV or excel).
|
|
13
|
-
* @property {AnalyticsPlatformModel.FileDownloadRequestBody} body
|
|
14
|
-
*/
|
|
15
|
-
declare class AnalyticsPlatformApplicationValidator {
|
|
16
|
-
/** @returns {CheckJobStatusByNameV2Param} */
|
|
17
|
-
static checkJobStatusByNameV2(): CheckJobStatusByNameV2Param;
|
|
18
|
-
/** @returns {ExecuteJobForProvidedParametersV2Param} */
|
|
19
|
-
static executeJobForProvidedParametersV2(): ExecuteJobForProvidedParametersV2Param;
|
|
20
|
-
/** @returns {StartDownloadForQueryV2Param} */
|
|
21
|
-
static startDownloadForQueryV2(): StartDownloadForQueryV2Param;
|
|
22
|
-
}
|
|
23
|
-
declare namespace AnalyticsPlatformApplicationValidator {
|
|
24
|
-
export { CheckJobStatusByNameV2Param, ExecuteJobForProvidedParametersV2Param, StartDownloadForQueryV2Param };
|
|
25
|
-
}
|
|
26
|
-
type CheckJobStatusByNameV2Param = {
|
|
27
|
-
/**
|
|
28
|
-
* - Download job name
|
|
29
|
-
*/
|
|
30
|
-
fileName: string;
|
|
31
|
-
};
|
|
32
|
-
type ExecuteJobForProvidedParametersV2Param = {
|
|
33
|
-
body: AnalyticsPlatformModel.JobExecute;
|
|
34
|
-
};
|
|
35
|
-
type StartDownloadForQueryV2Param = {
|
|
36
|
-
/**
|
|
37
|
-
* - Format in which to be exported(eg. CSV or excel).
|
|
38
|
-
*/
|
|
39
|
-
exportType: string;
|
|
40
|
-
body: AnalyticsPlatformModel.FileDownloadRequestBody;
|
|
41
|
-
};
|
|
42
|
-
import AnalyticsPlatformModel = require("./AnalyticsPlatformModel");
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
const Joi = require("joi");
|
|
2
|
-
|
|
3
|
-
const AnalyticsPlatformModel = require("./AnalyticsPlatformModel");
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @typedef CheckJobStatusByNameV2Param
|
|
7
|
-
* @property {string} fileName - Download job name
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* @typedef ExecuteJobForProvidedParametersV2Param
|
|
12
|
-
* @property {AnalyticsPlatformModel.JobExecute} body
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* @typedef StartDownloadForQueryV2Param
|
|
17
|
-
* @property {string} exportType - Format in which to be exported(eg. CSV or excel).
|
|
18
|
-
* @property {AnalyticsPlatformModel.FileDownloadRequestBody} body
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
class AnalyticsPlatformApplicationValidator {
|
|
22
|
-
/** @returns {CheckJobStatusByNameV2Param} */
|
|
23
|
-
static checkJobStatusByNameV2() {
|
|
24
|
-
return Joi.object({
|
|
25
|
-
fileName: Joi.string().allow("").required(),
|
|
26
|
-
}).required();
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/** @returns {ExecuteJobForProvidedParametersV2Param} */
|
|
30
|
-
static executeJobForProvidedParametersV2() {
|
|
31
|
-
return Joi.object({
|
|
32
|
-
body: AnalyticsPlatformModel.JobExecute().required(),
|
|
33
|
-
}).required();
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/** @returns {StartDownloadForQueryV2Param} */
|
|
37
|
-
static startDownloadForQueryV2() {
|
|
38
|
-
return Joi.object({
|
|
39
|
-
exportType: Joi.string().allow("").required(),
|
|
40
|
-
body: AnalyticsPlatformModel.FileDownloadRequestBody().required(),
|
|
41
|
-
}).required();
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
module.exports = AnalyticsPlatformApplicationValidator;
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
export = AnalyticsPlatformModel;
|
|
2
|
-
/**
|
|
3
|
-
* @typedef Page
|
|
4
|
-
* @property {number} [item_total] - The total number of all items across all pages.
|
|
5
|
-
* @property {string} [next_id] - The identifier for the next page.
|
|
6
|
-
* @property {boolean} [has_previous] - Indicates whether there is a previous page.
|
|
7
|
-
* @property {boolean} [has_next] - Indicates whether there is a next page.
|
|
8
|
-
* @property {number} [current] - The current page number.
|
|
9
|
-
* @property {string} type - The type of the page, can be 'cursor' or 'number'.
|
|
10
|
-
* @property {number} [size] - The number of items per page.
|
|
11
|
-
* @property {number} [page_size] - The number of items per page.
|
|
12
|
-
*/
|
|
13
|
-
/**
|
|
14
|
-
* @typedef FileDownloadRequestBody
|
|
15
|
-
* @property {string} query - Base64 encoded SQL query to execute on ClickHouse.
|
|
16
|
-
* @property {boolean} [split_files] - Flag indicating whether to split the
|
|
17
|
-
* files for larger datasets.
|
|
18
|
-
*/
|
|
19
|
-
/**
|
|
20
|
-
* @typedef JobExecute
|
|
21
|
-
* @property {string} query - Base64 encoded SQL query to execute on ClickHouse.
|
|
22
|
-
* @property {Page} [page]
|
|
23
|
-
*/
|
|
24
|
-
/**
|
|
25
|
-
* @typedef JobExecutionResult
|
|
26
|
-
* @property {Object[]} [rows] - Array of rows resulting from the job execution.
|
|
27
|
-
* @property {Page} [page]
|
|
28
|
-
*/
|
|
29
|
-
/**
|
|
30
|
-
* @typedef JobStatus
|
|
31
|
-
* @property {string} [start_date] - The start date and time of the job.
|
|
32
|
-
* @property {string} [end_date] - The end date and time of the job.
|
|
33
|
-
* @property {string} [status] - The current status of the job.
|
|
34
|
-
* @property {string} [message] - Message providing additional details about the
|
|
35
|
-
* job status.
|
|
36
|
-
* @property {Object[]} [file_metadata] - Metadata about files associated with
|
|
37
|
-
* the job, if any.
|
|
38
|
-
*/
|
|
39
|
-
declare class AnalyticsPlatformModel {
|
|
40
|
-
}
|
|
41
|
-
declare namespace AnalyticsPlatformModel {
|
|
42
|
-
export { Page, FileDownloadRequestBody, JobExecute, JobExecutionResult, JobStatus };
|
|
43
|
-
}
|
|
44
|
-
/** @returns {Page} */
|
|
45
|
-
declare function Page(): Page;
|
|
46
|
-
type Page = {
|
|
47
|
-
/**
|
|
48
|
-
* - The total number of all items across all pages.
|
|
49
|
-
*/
|
|
50
|
-
item_total?: number;
|
|
51
|
-
/**
|
|
52
|
-
* - The identifier for the next page.
|
|
53
|
-
*/
|
|
54
|
-
next_id?: string;
|
|
55
|
-
/**
|
|
56
|
-
* - Indicates whether there is a previous page.
|
|
57
|
-
*/
|
|
58
|
-
has_previous?: boolean;
|
|
59
|
-
/**
|
|
60
|
-
* - Indicates whether there is a next page.
|
|
61
|
-
*/
|
|
62
|
-
has_next?: boolean;
|
|
63
|
-
/**
|
|
64
|
-
* - The current page number.
|
|
65
|
-
*/
|
|
66
|
-
current?: number;
|
|
67
|
-
/**
|
|
68
|
-
* - The type of the page, can be 'cursor' or 'number'.
|
|
69
|
-
*/
|
|
70
|
-
type: string;
|
|
71
|
-
/**
|
|
72
|
-
* - The number of items per page.
|
|
73
|
-
*/
|
|
74
|
-
size?: number;
|
|
75
|
-
/**
|
|
76
|
-
* - The number of items per page.
|
|
77
|
-
*/
|
|
78
|
-
page_size?: number;
|
|
79
|
-
};
|
|
80
|
-
/** @returns {FileDownloadRequestBody} */
|
|
81
|
-
declare function FileDownloadRequestBody(): FileDownloadRequestBody;
|
|
82
|
-
type FileDownloadRequestBody = {
|
|
83
|
-
/**
|
|
84
|
-
* - Base64 encoded SQL query to execute on ClickHouse.
|
|
85
|
-
*/
|
|
86
|
-
query: string;
|
|
87
|
-
/**
|
|
88
|
-
* - Flag indicating whether to split the
|
|
89
|
-
* files for larger datasets.
|
|
90
|
-
*/
|
|
91
|
-
split_files?: boolean;
|
|
92
|
-
};
|
|
93
|
-
/** @returns {JobExecute} */
|
|
94
|
-
declare function JobExecute(): JobExecute;
|
|
95
|
-
type JobExecute = {
|
|
96
|
-
/**
|
|
97
|
-
* - Base64 encoded SQL query to execute on ClickHouse.
|
|
98
|
-
*/
|
|
99
|
-
query: string;
|
|
100
|
-
page?: Page;
|
|
101
|
-
};
|
|
102
|
-
/** @returns {JobExecutionResult} */
|
|
103
|
-
declare function JobExecutionResult(): JobExecutionResult;
|
|
104
|
-
type JobExecutionResult = {
|
|
105
|
-
/**
|
|
106
|
-
* - Array of rows resulting from the job execution.
|
|
107
|
-
*/
|
|
108
|
-
rows?: any[];
|
|
109
|
-
page?: Page;
|
|
110
|
-
};
|
|
111
|
-
/** @returns {JobStatus} */
|
|
112
|
-
declare function JobStatus(): JobStatus;
|
|
113
|
-
type JobStatus = {
|
|
114
|
-
/**
|
|
115
|
-
* - The start date and time of the job.
|
|
116
|
-
*/
|
|
117
|
-
start_date?: string;
|
|
118
|
-
/**
|
|
119
|
-
* - The end date and time of the job.
|
|
120
|
-
*/
|
|
121
|
-
end_date?: string;
|
|
122
|
-
/**
|
|
123
|
-
* - The current status of the job.
|
|
124
|
-
*/
|
|
125
|
-
status?: string;
|
|
126
|
-
/**
|
|
127
|
-
* - Message providing additional details about the
|
|
128
|
-
* job status.
|
|
129
|
-
*/
|
|
130
|
-
message?: string;
|
|
131
|
-
/**
|
|
132
|
-
* - Metadata about files associated with
|
|
133
|
-
* the job, if any.
|
|
134
|
-
*/
|
|
135
|
-
file_metadata?: any[];
|
|
136
|
-
};
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
const Joi = require("joi");
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @typedef Page
|
|
5
|
-
* @property {number} [item_total] - The total number of all items across all pages.
|
|
6
|
-
* @property {string} [next_id] - The identifier for the next page.
|
|
7
|
-
* @property {boolean} [has_previous] - Indicates whether there is a previous page.
|
|
8
|
-
* @property {boolean} [has_next] - Indicates whether there is a next page.
|
|
9
|
-
* @property {number} [current] - The current page number.
|
|
10
|
-
* @property {string} type - The type of the page, can be 'cursor' or 'number'.
|
|
11
|
-
* @property {number} [size] - The number of items per page.
|
|
12
|
-
* @property {number} [page_size] - The number of items per page.
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* @typedef FileDownloadRequestBody
|
|
17
|
-
* @property {string} query - Base64 encoded SQL query to execute on ClickHouse.
|
|
18
|
-
* @property {boolean} [split_files] - Flag indicating whether to split the
|
|
19
|
-
* files for larger datasets.
|
|
20
|
-
*/
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* @typedef JobExecute
|
|
24
|
-
* @property {string} query - Base64 encoded SQL query to execute on ClickHouse.
|
|
25
|
-
* @property {Page} [page]
|
|
26
|
-
*/
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* @typedef JobExecutionResult
|
|
30
|
-
* @property {Object[]} [rows] - Array of rows resulting from the job execution.
|
|
31
|
-
* @property {Page} [page]
|
|
32
|
-
*/
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* @typedef JobStatus
|
|
36
|
-
* @property {string} [start_date] - The start date and time of the job.
|
|
37
|
-
* @property {string} [end_date] - The end date and time of the job.
|
|
38
|
-
* @property {string} [status] - The current status of the job.
|
|
39
|
-
* @property {string} [message] - Message providing additional details about the
|
|
40
|
-
* job status.
|
|
41
|
-
* @property {Object[]} [file_metadata] - Metadata about files associated with
|
|
42
|
-
* the job, if any.
|
|
43
|
-
*/
|
|
44
|
-
|
|
45
|
-
class AnalyticsPlatformModel {
|
|
46
|
-
/** @returns {Page} */
|
|
47
|
-
static Page() {
|
|
48
|
-
return Joi.object({
|
|
49
|
-
item_total: Joi.number(),
|
|
50
|
-
next_id: Joi.string().allow(""),
|
|
51
|
-
has_previous: Joi.boolean(),
|
|
52
|
-
has_next: Joi.boolean(),
|
|
53
|
-
current: Joi.number(),
|
|
54
|
-
type: Joi.string().allow("").required(),
|
|
55
|
-
size: Joi.number(),
|
|
56
|
-
page_size: Joi.number(),
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/** @returns {FileDownloadRequestBody} */
|
|
61
|
-
static FileDownloadRequestBody() {
|
|
62
|
-
return Joi.object({
|
|
63
|
-
query: Joi.string().allow("").required(),
|
|
64
|
-
split_files: Joi.boolean(),
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/** @returns {JobExecute} */
|
|
69
|
-
static JobExecute() {
|
|
70
|
-
return Joi.object({
|
|
71
|
-
query: Joi.string().allow("").required(),
|
|
72
|
-
page: AnalyticsPlatformModel.Page(),
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/** @returns {JobExecutionResult} */
|
|
77
|
-
static JobExecutionResult() {
|
|
78
|
-
return Joi.object({
|
|
79
|
-
rows: Joi.array().items(Joi.any()),
|
|
80
|
-
page: AnalyticsPlatformModel.Page(),
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/** @returns {JobStatus} */
|
|
85
|
-
static JobStatus() {
|
|
86
|
-
return Joi.object({
|
|
87
|
-
start_date: Joi.string().allow(""),
|
|
88
|
-
end_date: Joi.string().allow("").allow(null),
|
|
89
|
-
status: Joi.string().allow(""),
|
|
90
|
-
message: Joi.string().allow(""),
|
|
91
|
-
file_metadata: Joi.array().items(Joi.any()).allow(null, ""),
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
module.exports = AnalyticsPlatformModel;
|