@code.store/arcxp-sdk-ts 5.0.3 → 5.1.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/dist/api/developer-retail/index.d.ts +26 -0
- package/dist/api/developer-retail/types.d.ts +259 -0
- package/dist/api/identity/types.d.ts +2 -2
- package/dist/api/index.d.ts +2 -0
- package/dist/api/sales/types.d.ts +22 -9
- package/dist/index.cjs +123 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +123 -0
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -560,6 +560,128 @@ class ArcRetailEvents {
|
|
|
560
560
|
}
|
|
561
561
|
}
|
|
562
562
|
|
|
563
|
+
class ArcDeveloperRetail extends ArcAbstractAPI {
|
|
564
|
+
constructor(options) {
|
|
565
|
+
super({ ...options, apiPath: 'retail/api/v1' });
|
|
566
|
+
}
|
|
567
|
+
// ============================================
|
|
568
|
+
// Product Methods
|
|
569
|
+
// ============================================
|
|
570
|
+
async getProductById(id, params) {
|
|
571
|
+
const { data } = await this.client.get(`/product/${id}`, { params });
|
|
572
|
+
return data;
|
|
573
|
+
}
|
|
574
|
+
async getProductBySku(sku, params) {
|
|
575
|
+
const { data } = await this.client.get(`/product/sku/${sku}`, { params });
|
|
576
|
+
return data;
|
|
577
|
+
}
|
|
578
|
+
async getProductByPriceCode(priceCode, params) {
|
|
579
|
+
const { data } = await this.client.get(`/product/pricecode/${priceCode}`, { params });
|
|
580
|
+
return data;
|
|
581
|
+
}
|
|
582
|
+
async getAllProducts(params) {
|
|
583
|
+
const { data } = await this.client.get('/product', { params });
|
|
584
|
+
return data;
|
|
585
|
+
}
|
|
586
|
+
// ============================================
|
|
587
|
+
// Pricing Strategy Methods
|
|
588
|
+
// ============================================
|
|
589
|
+
async getPricingStrategyById(id, params) {
|
|
590
|
+
const { data } = await this.client.get(`/pricing/strategy/${id}`, { params });
|
|
591
|
+
return data;
|
|
592
|
+
}
|
|
593
|
+
async getAllPricingStrategies(params) {
|
|
594
|
+
const { data } = await this.client.get('/pricing/strategy', { params });
|
|
595
|
+
return data;
|
|
596
|
+
}
|
|
597
|
+
// ============================================
|
|
598
|
+
// Pricing Rate Methods
|
|
599
|
+
// ============================================
|
|
600
|
+
async getPricingRateById(id, params) {
|
|
601
|
+
const { data } = await this.client.get(`/pricing/rate/${id}`, { params });
|
|
602
|
+
return data;
|
|
603
|
+
}
|
|
604
|
+
async getAllPricingRates(params) {
|
|
605
|
+
const { data } = await this.client.get('/pricing/rate', { params });
|
|
606
|
+
return data;
|
|
607
|
+
}
|
|
608
|
+
// ============================================
|
|
609
|
+
// Pricing Cycle Methods
|
|
610
|
+
// ============================================
|
|
611
|
+
async getPricingCycle(priceCode, cycleIndex, startDate, params) {
|
|
612
|
+
const { data } = await this.client.get(`/pricing/cycle/${priceCode}/${cycleIndex}/${startDate}`, {
|
|
613
|
+
params,
|
|
614
|
+
});
|
|
615
|
+
return data;
|
|
616
|
+
}
|
|
617
|
+
// ============================================
|
|
618
|
+
// Campaign Methods
|
|
619
|
+
// ============================================
|
|
620
|
+
async getCampaignById(id, params) {
|
|
621
|
+
const { data } = await this.client.get(`/campaign/${id}`, { params });
|
|
622
|
+
return data;
|
|
623
|
+
}
|
|
624
|
+
async getCampaignByName(campaignName, params) {
|
|
625
|
+
const { data } = await this.client.get(`/campaign/${campaignName}/get`, { params });
|
|
626
|
+
return data;
|
|
627
|
+
}
|
|
628
|
+
async getAllCampaigns(params) {
|
|
629
|
+
const { data } = await this.client.get('/campaign', { params });
|
|
630
|
+
return data;
|
|
631
|
+
}
|
|
632
|
+
// ============================================
|
|
633
|
+
// Campaign Category Methods
|
|
634
|
+
// ============================================
|
|
635
|
+
async getCampaignCategoryById(id, params) {
|
|
636
|
+
const { data } = await this.client.get(`/campaign/category/${id}`, { params });
|
|
637
|
+
return data;
|
|
638
|
+
}
|
|
639
|
+
async getAllCampaignCategories(params) {
|
|
640
|
+
const { data } = await this.client.get('/campaign/category', { params });
|
|
641
|
+
return data;
|
|
642
|
+
}
|
|
643
|
+
// ============================================
|
|
644
|
+
// Offer Methods
|
|
645
|
+
// ============================================
|
|
646
|
+
async getOfferById(id, params) {
|
|
647
|
+
const { data } = await this.client.get(`/offer/${id}`, { params });
|
|
648
|
+
return data;
|
|
649
|
+
}
|
|
650
|
+
async getAllOffers(params) {
|
|
651
|
+
const { data } = await this.client.get('/offer', { params });
|
|
652
|
+
return data;
|
|
653
|
+
}
|
|
654
|
+
// ============================================
|
|
655
|
+
// Offer Attribute Methods
|
|
656
|
+
// ============================================
|
|
657
|
+
async getOfferAttributeById(id, params) {
|
|
658
|
+
const { data } = await this.client.get(`/offer/attribute/${id}`, { params });
|
|
659
|
+
return data;
|
|
660
|
+
}
|
|
661
|
+
async getAllOfferAttributes(params) {
|
|
662
|
+
const { data } = await this.client.get('/offer/attribute', { params });
|
|
663
|
+
return data;
|
|
664
|
+
}
|
|
665
|
+
// ============================================
|
|
666
|
+
// Product Attribute Methods
|
|
667
|
+
// ============================================
|
|
668
|
+
async getProductAttributeById(id, params) {
|
|
669
|
+
const { data } = await this.client.get(`/product/attribute/${id}`, { params });
|
|
670
|
+
return data;
|
|
671
|
+
}
|
|
672
|
+
async getAllProductAttributes(params) {
|
|
673
|
+
const { data } = await this.client.get('/product/attribute', { params });
|
|
674
|
+
return data;
|
|
675
|
+
}
|
|
676
|
+
// ============================================
|
|
677
|
+
// Condition Category Methods
|
|
678
|
+
// ============================================
|
|
679
|
+
async getAllConditionCategories(params) {
|
|
680
|
+
const { data } = await this.client.get('/condition/categories', { params });
|
|
681
|
+
return data;
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
|
|
563
685
|
class ArcSales extends ArcAbstractAPI {
|
|
564
686
|
constructor(options) {
|
|
565
687
|
super({ ...options, apiPath: 'sales/api/v1' });
|
|
@@ -716,6 +838,7 @@ const ArcAPI = (options) => {
|
|
|
716
838
|
Tags: new ArcTags(options),
|
|
717
839
|
ContentOps: new ArcContentOps(options),
|
|
718
840
|
RetailEvents: new ArcRetailEvents(options),
|
|
841
|
+
DeveloperRetail: new ArcDeveloperRetail(options),
|
|
719
842
|
Custom: new Custom(options),
|
|
720
843
|
};
|
|
721
844
|
API.MigrationCenter.setMaxRPS(12);
|