@applite/js-sdk 0.0.17 → 0.0.18

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/index.js CHANGED
@@ -569,6 +569,78 @@ var _TestimonyApi = class _TestimonyApi {
569
569
  __name(_TestimonyApi, "TestimonyApi");
570
570
  var TestimonyApi = _TestimonyApi;
571
571
 
572
+ // src/modules/common/review.ts
573
+ var _ReviewApi = class _ReviewApi {
574
+ constructor(http) {
575
+ this.http = http;
576
+ }
577
+ /**
578
+ * Customer: Submit a new review
579
+ */
580
+ async submit(params) {
581
+ const { appId, appApiKey, ...rest } = params;
582
+ return this.http.post(`/app/${appId}/review/submit`, {
583
+ appApiKey,
584
+ ...rest
585
+ });
586
+ }
587
+ /**
588
+ * Admin: List reviews with filters and pagination
589
+ */
590
+ async list(params) {
591
+ const { appId, apiKey, ...rest } = params;
592
+ return this.http.post(`/app/${appId}/review/list`, {
593
+ apiKey,
594
+ ...rest
595
+ });
596
+ }
597
+ /**
598
+ * Public: List verified reviews
599
+ */
600
+ async listPublic(params) {
601
+ const { appId, ...rest } = params;
602
+ return this.http.post(`/app/${appId}/review/public`, rest);
603
+ }
604
+ /**
605
+ * Get a single review by ID
606
+ */
607
+ async getById(params) {
608
+ const { appId, apiKey, id } = params;
609
+ return this.http.post(`/app/${appId}/review/${id}`, { apiKey });
610
+ }
611
+ /**
612
+ * Edit a review
613
+ */
614
+ async update(params) {
615
+ const { appId, apiKey, id, ...rest } = params;
616
+ return this.http.post(`/app/${appId}/review/${id}/edit`, {
617
+ apiKey,
618
+ ...rest
619
+ });
620
+ }
621
+ /**
622
+ * Delete a review
623
+ */
624
+ async delete(params) {
625
+ const { appId, apiKey, id } = params;
626
+ return this.http.post(`/app/${appId}/review/${id}/delete`, {
627
+ apiKey
628
+ });
629
+ }
630
+ /**
631
+ * Admin: Verify/approve a review
632
+ */
633
+ async verify(params) {
634
+ const { appId, apiKey, id, isVerified } = params;
635
+ return this.http.post(`/app/${appId}/review/${id}/verify`, {
636
+ apiKey,
637
+ isVerified
638
+ });
639
+ }
640
+ };
641
+ __name(_ReviewApi, "ReviewApi");
642
+ var ReviewApi = _ReviewApi;
643
+
572
644
  // src/modules/store/badge.ts
573
645
  var _BadgeApi = class _BadgeApi {
574
646
  constructor(http) {
@@ -801,6 +873,10 @@ var _ProductApi = class _ProductApi {
801
873
  const { appId, id, ...body } = params;
802
874
  return this.http.post(`/app/${appId}/store/product/${id}/delete`, body);
803
875
  }
876
+ bulkDelete(params) {
877
+ const { appId, ...body } = params;
878
+ return this.http.post(`/app/${appId}/store/product/bulk-delete`, body);
879
+ }
804
880
  };
805
881
  __name(_ProductApi, "ProductApi");
806
882
  var ProductApi = _ProductApi;
@@ -1478,6 +1554,7 @@ var _AppliteUI = class _AppliteUI {
1478
1554
  this.webhook = new WebhookApi(this.http);
1479
1555
  this.user = new UserApi(this.http);
1480
1556
  this.testimony = new TestimonyApi(this.http);
1557
+ this.review = new ReviewApi(this.http);
1481
1558
  this.store = new StoreApi(this.http);
1482
1559
  this.multiService = new MultiServiceApi(this.http);
1483
1560
  this.superAdmin = new SuperAdminApi(this.http);
@@ -1520,6 +1597,7 @@ exports.NotificationTokenApi = NotificationTokenApi;
1520
1597
  exports.OptionApi = OptionApi;
1521
1598
  exports.OrderApi = OrderApi;
1522
1599
  exports.ProductApi = ProductApi;
1600
+ exports.ReviewApi = ReviewApi;
1523
1601
  exports.SellerApi = SellerApi;
1524
1602
  exports.ServiceApi = ServiceApi;
1525
1603
  exports.ShippingApi = ShippingApi;