@applite/js-sdk 0.0.13 → 0.0.14
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 +13 -0
- package/dist/index.d.mts +824 -614
- package/dist/index.d.ts +824 -614
- package/dist/index.js +118 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +117 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -487,6 +487,87 @@ var _UserApi = class _UserApi {
|
|
|
487
487
|
__name(_UserApi, "UserApi");
|
|
488
488
|
var UserApi = _UserApi;
|
|
489
489
|
|
|
490
|
+
// src/modules/common/testimony.ts
|
|
491
|
+
var _TestimonyApi = class _TestimonyApi {
|
|
492
|
+
constructor(http) {
|
|
493
|
+
this.http = http;
|
|
494
|
+
}
|
|
495
|
+
/**
|
|
496
|
+
* Admin: Create a new testimony
|
|
497
|
+
*/
|
|
498
|
+
async create(params) {
|
|
499
|
+
const { appId, apiKey, ...rest } = params;
|
|
500
|
+
return this.http.post(`/app/${appId}/testimony/create`, {
|
|
501
|
+
apiKey,
|
|
502
|
+
...rest
|
|
503
|
+
});
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* Admin: List testimonies with filters and pagination
|
|
507
|
+
*/
|
|
508
|
+
async list(params) {
|
|
509
|
+
const { appId, apiKey, ...rest } = params;
|
|
510
|
+
return this.http.post(`/app/${appId}/testimony/list`, {
|
|
511
|
+
apiKey,
|
|
512
|
+
...rest
|
|
513
|
+
});
|
|
514
|
+
}
|
|
515
|
+
/**
|
|
516
|
+
* Admin: Get a single testimony by ID
|
|
517
|
+
*/
|
|
518
|
+
async getById(params) {
|
|
519
|
+
const { appId, apiKey, id } = params;
|
|
520
|
+
return this.http.post(`/app/${appId}/testimony/${id}`, { apiKey });
|
|
521
|
+
}
|
|
522
|
+
/**
|
|
523
|
+
* Admin: Update a testimony
|
|
524
|
+
*/
|
|
525
|
+
async update(params) {
|
|
526
|
+
const { appId, apiKey, id, ...rest } = params;
|
|
527
|
+
return this.http.post(`/app/${appId}/testimony/${id}/edit`, {
|
|
528
|
+
apiKey,
|
|
529
|
+
...rest
|
|
530
|
+
});
|
|
531
|
+
}
|
|
532
|
+
/**
|
|
533
|
+
* Admin: Delete a testimony
|
|
534
|
+
*/
|
|
535
|
+
async delete(params) {
|
|
536
|
+
const { appId, apiKey, id } = params;
|
|
537
|
+
return this.http.post(`/app/${appId}/testimony/${id}/delete`, {
|
|
538
|
+
apiKey
|
|
539
|
+
});
|
|
540
|
+
}
|
|
541
|
+
/**
|
|
542
|
+
* Admin: Update testimony status (approve/reject)
|
|
543
|
+
*/
|
|
544
|
+
async updateStatus(params) {
|
|
545
|
+
const { appId, apiKey, id, status } = params;
|
|
546
|
+
return this.http.post(`/app/${appId}/testimony/${id}/status`, {
|
|
547
|
+
apiKey,
|
|
548
|
+
status
|
|
549
|
+
});
|
|
550
|
+
}
|
|
551
|
+
/**
|
|
552
|
+
* Customer: Submit a new testimony (status will be PENDING)
|
|
553
|
+
*/
|
|
554
|
+
async submit(params) {
|
|
555
|
+
const { appApiKey, ...rest } = params;
|
|
556
|
+
return this.http.post(`/testimony/submit`, {
|
|
557
|
+
appApiKey,
|
|
558
|
+
...rest
|
|
559
|
+
});
|
|
560
|
+
}
|
|
561
|
+
/**
|
|
562
|
+
* Public: List approved testimonies
|
|
563
|
+
*/
|
|
564
|
+
async listPublic(params) {
|
|
565
|
+
return this.http.post(`/testimony/public`, params);
|
|
566
|
+
}
|
|
567
|
+
};
|
|
568
|
+
__name(_TestimonyApi, "TestimonyApi");
|
|
569
|
+
var TestimonyApi = _TestimonyApi;
|
|
570
|
+
|
|
490
571
|
// src/modules/store/badge.ts
|
|
491
572
|
var _BadgeApi = class _BadgeApi {
|
|
492
573
|
constructor(http) {
|
|
@@ -516,6 +597,39 @@ var _BadgeApi = class _BadgeApi {
|
|
|
516
597
|
__name(_BadgeApi, "BadgeApi");
|
|
517
598
|
var BadgeApi = _BadgeApi;
|
|
518
599
|
|
|
600
|
+
// src/modules/store/cart.ts
|
|
601
|
+
var _CartApi = class _CartApi {
|
|
602
|
+
constructor(http) {
|
|
603
|
+
this.http = http;
|
|
604
|
+
}
|
|
605
|
+
create(params) {
|
|
606
|
+
const { appId, ...body } = params;
|
|
607
|
+
return this.http.post(`/app/${appId}/store/cart/create`, body);
|
|
608
|
+
}
|
|
609
|
+
get(params) {
|
|
610
|
+
const { appId, id, ...body } = params;
|
|
611
|
+
return this.http.post(`/app/${appId}/store/cart/${id}`, body);
|
|
612
|
+
}
|
|
613
|
+
addItem(params) {
|
|
614
|
+
const { appId, id, ...body } = params;
|
|
615
|
+
return this.http.post(`/app/${appId}/store/cart/${id}/add-item`, body);
|
|
616
|
+
}
|
|
617
|
+
updateItem(params) {
|
|
618
|
+
const { appId, id, ...body } = params;
|
|
619
|
+
return this.http.post(`/app/${appId}/store/cart/${id}/update-item`, body);
|
|
620
|
+
}
|
|
621
|
+
removeItem(params) {
|
|
622
|
+
const { appId, id, ...body } = params;
|
|
623
|
+
return this.http.post(`/app/${appId}/store/cart/${id}/remove-item`, body);
|
|
624
|
+
}
|
|
625
|
+
calculateTotals(params) {
|
|
626
|
+
const { appId, id, ...body } = params;
|
|
627
|
+
return this.http.post(`/app/${appId}/store/cart/${id}/calculate-totals`, body);
|
|
628
|
+
}
|
|
629
|
+
};
|
|
630
|
+
__name(_CartApi, "CartApi");
|
|
631
|
+
var CartApi = _CartApi;
|
|
632
|
+
|
|
519
633
|
// src/modules/store/category.ts
|
|
520
634
|
var _CategoryApi = class _CategoryApi {
|
|
521
635
|
constructor(http) {
|
|
@@ -811,6 +925,7 @@ var _StoreApi = class _StoreApi {
|
|
|
811
925
|
constructor(http) {
|
|
812
926
|
this.http = http;
|
|
813
927
|
this.badge = new BadgeApi(http);
|
|
928
|
+
this.cart = new CartApi(http);
|
|
814
929
|
this.category = new CategoryApi(http);
|
|
815
930
|
this.collection = new CollectionApi(http);
|
|
816
931
|
this.discount = new DiscountApi(http);
|
|
@@ -1361,6 +1476,7 @@ var _AppliteUI = class _AppliteUI {
|
|
|
1361
1476
|
this.notification = new NotificationApi(this.http);
|
|
1362
1477
|
this.webhook = new WebhookApi(this.http);
|
|
1363
1478
|
this.user = new UserApi(this.http);
|
|
1479
|
+
this.testimony = new TestimonyApi(this.http);
|
|
1364
1480
|
this.store = new StoreApi(this.http);
|
|
1365
1481
|
this.multiService = new MultiServiceApi(this.http);
|
|
1366
1482
|
this.superAdmin = new SuperAdminApi(this.http);
|
|
@@ -1377,6 +1493,7 @@ exports.AgentApi = AgentApi;
|
|
|
1377
1493
|
exports.AppliteUI = AppliteUI;
|
|
1378
1494
|
exports.AppointmentApi = AppointmentApi;
|
|
1379
1495
|
exports.BadgeApi = BadgeApi;
|
|
1496
|
+
exports.CartApi = CartApi;
|
|
1380
1497
|
exports.CategoryApi = CategoryApi;
|
|
1381
1498
|
exports.CollectionApi = CollectionApi;
|
|
1382
1499
|
exports.CompanyApi = CompanyApi;
|
|
@@ -1416,6 +1533,7 @@ exports.SuperAdminNotificationApi = SuperAdminNotificationApi;
|
|
|
1416
1533
|
exports.SuperAdminStatsApi = SuperAdminStatsApi;
|
|
1417
1534
|
exports.TagApi = TagApi;
|
|
1418
1535
|
exports.TaxApi = TaxApi;
|
|
1536
|
+
exports.TestimonyApi = TestimonyApi;
|
|
1419
1537
|
exports.UserApi = UserApi;
|
|
1420
1538
|
exports.WebhookApi = WebhookApi;
|
|
1421
1539
|
exports.WelcomeItemApi = WelcomeItemApi;
|