@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.mjs
CHANGED
|
@@ -485,6 +485,87 @@ var _UserApi = class _UserApi {
|
|
|
485
485
|
__name(_UserApi, "UserApi");
|
|
486
486
|
var UserApi = _UserApi;
|
|
487
487
|
|
|
488
|
+
// src/modules/common/testimony.ts
|
|
489
|
+
var _TestimonyApi = class _TestimonyApi {
|
|
490
|
+
constructor(http) {
|
|
491
|
+
this.http = http;
|
|
492
|
+
}
|
|
493
|
+
/**
|
|
494
|
+
* Admin: Create a new testimony
|
|
495
|
+
*/
|
|
496
|
+
async create(params) {
|
|
497
|
+
const { appId, apiKey, ...rest } = params;
|
|
498
|
+
return this.http.post(`/app/${appId}/testimony/create`, {
|
|
499
|
+
apiKey,
|
|
500
|
+
...rest
|
|
501
|
+
});
|
|
502
|
+
}
|
|
503
|
+
/**
|
|
504
|
+
* Admin: List testimonies with filters and pagination
|
|
505
|
+
*/
|
|
506
|
+
async list(params) {
|
|
507
|
+
const { appId, apiKey, ...rest } = params;
|
|
508
|
+
return this.http.post(`/app/${appId}/testimony/list`, {
|
|
509
|
+
apiKey,
|
|
510
|
+
...rest
|
|
511
|
+
});
|
|
512
|
+
}
|
|
513
|
+
/**
|
|
514
|
+
* Admin: Get a single testimony by ID
|
|
515
|
+
*/
|
|
516
|
+
async getById(params) {
|
|
517
|
+
const { appId, apiKey, id } = params;
|
|
518
|
+
return this.http.post(`/app/${appId}/testimony/${id}`, { apiKey });
|
|
519
|
+
}
|
|
520
|
+
/**
|
|
521
|
+
* Admin: Update a testimony
|
|
522
|
+
*/
|
|
523
|
+
async update(params) {
|
|
524
|
+
const { appId, apiKey, id, ...rest } = params;
|
|
525
|
+
return this.http.post(`/app/${appId}/testimony/${id}/edit`, {
|
|
526
|
+
apiKey,
|
|
527
|
+
...rest
|
|
528
|
+
});
|
|
529
|
+
}
|
|
530
|
+
/**
|
|
531
|
+
* Admin: Delete a testimony
|
|
532
|
+
*/
|
|
533
|
+
async delete(params) {
|
|
534
|
+
const { appId, apiKey, id } = params;
|
|
535
|
+
return this.http.post(`/app/${appId}/testimony/${id}/delete`, {
|
|
536
|
+
apiKey
|
|
537
|
+
});
|
|
538
|
+
}
|
|
539
|
+
/**
|
|
540
|
+
* Admin: Update testimony status (approve/reject)
|
|
541
|
+
*/
|
|
542
|
+
async updateStatus(params) {
|
|
543
|
+
const { appId, apiKey, id, status } = params;
|
|
544
|
+
return this.http.post(`/app/${appId}/testimony/${id}/status`, {
|
|
545
|
+
apiKey,
|
|
546
|
+
status
|
|
547
|
+
});
|
|
548
|
+
}
|
|
549
|
+
/**
|
|
550
|
+
* Customer: Submit a new testimony (status will be PENDING)
|
|
551
|
+
*/
|
|
552
|
+
async submit(params) {
|
|
553
|
+
const { appApiKey, ...rest } = params;
|
|
554
|
+
return this.http.post(`/testimony/submit`, {
|
|
555
|
+
appApiKey,
|
|
556
|
+
...rest
|
|
557
|
+
});
|
|
558
|
+
}
|
|
559
|
+
/**
|
|
560
|
+
* Public: List approved testimonies
|
|
561
|
+
*/
|
|
562
|
+
async listPublic(params) {
|
|
563
|
+
return this.http.post(`/testimony/public`, params);
|
|
564
|
+
}
|
|
565
|
+
};
|
|
566
|
+
__name(_TestimonyApi, "TestimonyApi");
|
|
567
|
+
var TestimonyApi = _TestimonyApi;
|
|
568
|
+
|
|
488
569
|
// src/modules/store/badge.ts
|
|
489
570
|
var _BadgeApi = class _BadgeApi {
|
|
490
571
|
constructor(http) {
|
|
@@ -514,6 +595,39 @@ var _BadgeApi = class _BadgeApi {
|
|
|
514
595
|
__name(_BadgeApi, "BadgeApi");
|
|
515
596
|
var BadgeApi = _BadgeApi;
|
|
516
597
|
|
|
598
|
+
// src/modules/store/cart.ts
|
|
599
|
+
var _CartApi = class _CartApi {
|
|
600
|
+
constructor(http) {
|
|
601
|
+
this.http = http;
|
|
602
|
+
}
|
|
603
|
+
create(params) {
|
|
604
|
+
const { appId, ...body } = params;
|
|
605
|
+
return this.http.post(`/app/${appId}/store/cart/create`, body);
|
|
606
|
+
}
|
|
607
|
+
get(params) {
|
|
608
|
+
const { appId, id, ...body } = params;
|
|
609
|
+
return this.http.post(`/app/${appId}/store/cart/${id}`, body);
|
|
610
|
+
}
|
|
611
|
+
addItem(params) {
|
|
612
|
+
const { appId, id, ...body } = params;
|
|
613
|
+
return this.http.post(`/app/${appId}/store/cart/${id}/add-item`, body);
|
|
614
|
+
}
|
|
615
|
+
updateItem(params) {
|
|
616
|
+
const { appId, id, ...body } = params;
|
|
617
|
+
return this.http.post(`/app/${appId}/store/cart/${id}/update-item`, body);
|
|
618
|
+
}
|
|
619
|
+
removeItem(params) {
|
|
620
|
+
const { appId, id, ...body } = params;
|
|
621
|
+
return this.http.post(`/app/${appId}/store/cart/${id}/remove-item`, body);
|
|
622
|
+
}
|
|
623
|
+
calculateTotals(params) {
|
|
624
|
+
const { appId, id, ...body } = params;
|
|
625
|
+
return this.http.post(`/app/${appId}/store/cart/${id}/calculate-totals`, body);
|
|
626
|
+
}
|
|
627
|
+
};
|
|
628
|
+
__name(_CartApi, "CartApi");
|
|
629
|
+
var CartApi = _CartApi;
|
|
630
|
+
|
|
517
631
|
// src/modules/store/category.ts
|
|
518
632
|
var _CategoryApi = class _CategoryApi {
|
|
519
633
|
constructor(http) {
|
|
@@ -809,6 +923,7 @@ var _StoreApi = class _StoreApi {
|
|
|
809
923
|
constructor(http) {
|
|
810
924
|
this.http = http;
|
|
811
925
|
this.badge = new BadgeApi(http);
|
|
926
|
+
this.cart = new CartApi(http);
|
|
812
927
|
this.category = new CategoryApi(http);
|
|
813
928
|
this.collection = new CollectionApi(http);
|
|
814
929
|
this.discount = new DiscountApi(http);
|
|
@@ -1359,6 +1474,7 @@ var _AppliteUI = class _AppliteUI {
|
|
|
1359
1474
|
this.notification = new NotificationApi(this.http);
|
|
1360
1475
|
this.webhook = new WebhookApi(this.http);
|
|
1361
1476
|
this.user = new UserApi(this.http);
|
|
1477
|
+
this.testimony = new TestimonyApi(this.http);
|
|
1362
1478
|
this.store = new StoreApi(this.http);
|
|
1363
1479
|
this.multiService = new MultiServiceApi(this.http);
|
|
1364
1480
|
this.superAdmin = new SuperAdminApi(this.http);
|
|
@@ -1370,6 +1486,6 @@ var _AppliteUI = class _AppliteUI {
|
|
|
1370
1486
|
__name(_AppliteUI, "AppliteUI");
|
|
1371
1487
|
var AppliteUI = _AppliteUI;
|
|
1372
1488
|
|
|
1373
|
-
export { AddressApi, AgentApi, AppliteUI, AppointmentApi, BadgeApi, CategoryApi, CollectionApi, CompanyApi, CustomerApi, DiscountApi, DuticotacApi, DuticotacBalanceApi, DuticotacOfferApi, DuticotacPaymentApi, DuticotacTransactionApi, FieldTemplateApi, FinanceApi, HttpClient, InfoApi, KolaboApi, KolaboAppApi, KolaboCustomerApi, KolaboPartnerApi, MaintenanceApi, MultiServiceApi, NotificationApi, NotificationTokenApi, OptionApi, OrderApi, ProductApi, SellerApi, ServiceApi, ShippingApi, StatsApi, StoreApi, SuperAdminApi, SuperAdminAppsApi, SuperAdminAuthApi, SuperAdminFinanceApi, SuperAdminModulesApi, SuperAdminNotificationApi, SuperAdminStatsApi, TagApi, TaxApi, UserApi, WebhookApi, WelcomeItemApi };
|
|
1489
|
+
export { AddressApi, AgentApi, AppliteUI, AppointmentApi, BadgeApi, CartApi, CategoryApi, CollectionApi, CompanyApi, CustomerApi, DiscountApi, DuticotacApi, DuticotacBalanceApi, DuticotacOfferApi, DuticotacPaymentApi, DuticotacTransactionApi, FieldTemplateApi, FinanceApi, HttpClient, InfoApi, KolaboApi, KolaboAppApi, KolaboCustomerApi, KolaboPartnerApi, MaintenanceApi, MultiServiceApi, NotificationApi, NotificationTokenApi, OptionApi, OrderApi, ProductApi, SellerApi, ServiceApi, ShippingApi, StatsApi, StoreApi, SuperAdminApi, SuperAdminAppsApi, SuperAdminAuthApi, SuperAdminFinanceApi, SuperAdminModulesApi, SuperAdminNotificationApi, SuperAdminStatsApi, TagApi, TaxApi, TestimonyApi, UserApi, WebhookApi, WelcomeItemApi };
|
|
1374
1490
|
//# sourceMappingURL=index.mjs.map
|
|
1375
1491
|
//# sourceMappingURL=index.mjs.map
|