@applite/js-sdk 0.0.13 → 0.0.15
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 +832 -614
- package/dist/index.d.ts +832 -614
- package/dist/index.js +119 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +118 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -487,6 +487,88 @@ 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 { appId, appApiKey, ...rest } = params;
|
|
556
|
+
return this.http.post(`/app/${appId}/testimony/submit`, {
|
|
557
|
+
appApiKey,
|
|
558
|
+
...rest
|
|
559
|
+
});
|
|
560
|
+
}
|
|
561
|
+
/**
|
|
562
|
+
* Public: List approved testimonies
|
|
563
|
+
*/
|
|
564
|
+
async listPublic(params) {
|
|
565
|
+
const { appId, ...rest } = params;
|
|
566
|
+
return this.http.post(`/app/${appId}/testimony/public`, rest);
|
|
567
|
+
}
|
|
568
|
+
};
|
|
569
|
+
__name(_TestimonyApi, "TestimonyApi");
|
|
570
|
+
var TestimonyApi = _TestimonyApi;
|
|
571
|
+
|
|
490
572
|
// src/modules/store/badge.ts
|
|
491
573
|
var _BadgeApi = class _BadgeApi {
|
|
492
574
|
constructor(http) {
|
|
@@ -516,6 +598,39 @@ var _BadgeApi = class _BadgeApi {
|
|
|
516
598
|
__name(_BadgeApi, "BadgeApi");
|
|
517
599
|
var BadgeApi = _BadgeApi;
|
|
518
600
|
|
|
601
|
+
// src/modules/store/cart.ts
|
|
602
|
+
var _CartApi = class _CartApi {
|
|
603
|
+
constructor(http) {
|
|
604
|
+
this.http = http;
|
|
605
|
+
}
|
|
606
|
+
create(params) {
|
|
607
|
+
const { appId, ...body } = params;
|
|
608
|
+
return this.http.post(`/app/${appId}/store/cart/create`, body);
|
|
609
|
+
}
|
|
610
|
+
get(params) {
|
|
611
|
+
const { appId, id, ...body } = params;
|
|
612
|
+
return this.http.post(`/app/${appId}/store/cart/${id}`, body);
|
|
613
|
+
}
|
|
614
|
+
addItem(params) {
|
|
615
|
+
const { appId, id, ...body } = params;
|
|
616
|
+
return this.http.post(`/app/${appId}/store/cart/${id}/add-item`, body);
|
|
617
|
+
}
|
|
618
|
+
updateItem(params) {
|
|
619
|
+
const { appId, id, ...body } = params;
|
|
620
|
+
return this.http.post(`/app/${appId}/store/cart/${id}/update-item`, body);
|
|
621
|
+
}
|
|
622
|
+
removeItem(params) {
|
|
623
|
+
const { appId, id, ...body } = params;
|
|
624
|
+
return this.http.post(`/app/${appId}/store/cart/${id}/remove-item`, body);
|
|
625
|
+
}
|
|
626
|
+
calculateTotals(params) {
|
|
627
|
+
const { appId, id, ...body } = params;
|
|
628
|
+
return this.http.post(`/app/${appId}/store/cart/${id}/calculate-totals`, body);
|
|
629
|
+
}
|
|
630
|
+
};
|
|
631
|
+
__name(_CartApi, "CartApi");
|
|
632
|
+
var CartApi = _CartApi;
|
|
633
|
+
|
|
519
634
|
// src/modules/store/category.ts
|
|
520
635
|
var _CategoryApi = class _CategoryApi {
|
|
521
636
|
constructor(http) {
|
|
@@ -811,6 +926,7 @@ var _StoreApi = class _StoreApi {
|
|
|
811
926
|
constructor(http) {
|
|
812
927
|
this.http = http;
|
|
813
928
|
this.badge = new BadgeApi(http);
|
|
929
|
+
this.cart = new CartApi(http);
|
|
814
930
|
this.category = new CategoryApi(http);
|
|
815
931
|
this.collection = new CollectionApi(http);
|
|
816
932
|
this.discount = new DiscountApi(http);
|
|
@@ -1361,6 +1477,7 @@ var _AppliteUI = class _AppliteUI {
|
|
|
1361
1477
|
this.notification = new NotificationApi(this.http);
|
|
1362
1478
|
this.webhook = new WebhookApi(this.http);
|
|
1363
1479
|
this.user = new UserApi(this.http);
|
|
1480
|
+
this.testimony = new TestimonyApi(this.http);
|
|
1364
1481
|
this.store = new StoreApi(this.http);
|
|
1365
1482
|
this.multiService = new MultiServiceApi(this.http);
|
|
1366
1483
|
this.superAdmin = new SuperAdminApi(this.http);
|
|
@@ -1377,6 +1494,7 @@ exports.AgentApi = AgentApi;
|
|
|
1377
1494
|
exports.AppliteUI = AppliteUI;
|
|
1378
1495
|
exports.AppointmentApi = AppointmentApi;
|
|
1379
1496
|
exports.BadgeApi = BadgeApi;
|
|
1497
|
+
exports.CartApi = CartApi;
|
|
1380
1498
|
exports.CategoryApi = CategoryApi;
|
|
1381
1499
|
exports.CollectionApi = CollectionApi;
|
|
1382
1500
|
exports.CompanyApi = CompanyApi;
|
|
@@ -1416,6 +1534,7 @@ exports.SuperAdminNotificationApi = SuperAdminNotificationApi;
|
|
|
1416
1534
|
exports.SuperAdminStatsApi = SuperAdminStatsApi;
|
|
1417
1535
|
exports.TagApi = TagApi;
|
|
1418
1536
|
exports.TaxApi = TaxApi;
|
|
1537
|
+
exports.TestimonyApi = TestimonyApi;
|
|
1419
1538
|
exports.UserApi = UserApi;
|
|
1420
1539
|
exports.WebhookApi = WebhookApi;
|
|
1421
1540
|
exports.WelcomeItemApi = WelcomeItemApi;
|