@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.mjs
CHANGED
|
@@ -485,6 +485,88 @@ 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 { appId, appApiKey, ...rest } = params;
|
|
554
|
+
return this.http.post(`/app/${appId}/testimony/submit`, {
|
|
555
|
+
appApiKey,
|
|
556
|
+
...rest
|
|
557
|
+
});
|
|
558
|
+
}
|
|
559
|
+
/**
|
|
560
|
+
* Public: List approved testimonies
|
|
561
|
+
*/
|
|
562
|
+
async listPublic(params) {
|
|
563
|
+
const { appId, ...rest } = params;
|
|
564
|
+
return this.http.post(`/app/${appId}/testimony/public`, rest);
|
|
565
|
+
}
|
|
566
|
+
};
|
|
567
|
+
__name(_TestimonyApi, "TestimonyApi");
|
|
568
|
+
var TestimonyApi = _TestimonyApi;
|
|
569
|
+
|
|
488
570
|
// src/modules/store/badge.ts
|
|
489
571
|
var _BadgeApi = class _BadgeApi {
|
|
490
572
|
constructor(http) {
|
|
@@ -514,6 +596,39 @@ var _BadgeApi = class _BadgeApi {
|
|
|
514
596
|
__name(_BadgeApi, "BadgeApi");
|
|
515
597
|
var BadgeApi = _BadgeApi;
|
|
516
598
|
|
|
599
|
+
// src/modules/store/cart.ts
|
|
600
|
+
var _CartApi = class _CartApi {
|
|
601
|
+
constructor(http) {
|
|
602
|
+
this.http = http;
|
|
603
|
+
}
|
|
604
|
+
create(params) {
|
|
605
|
+
const { appId, ...body } = params;
|
|
606
|
+
return this.http.post(`/app/${appId}/store/cart/create`, body);
|
|
607
|
+
}
|
|
608
|
+
get(params) {
|
|
609
|
+
const { appId, id, ...body } = params;
|
|
610
|
+
return this.http.post(`/app/${appId}/store/cart/${id}`, body);
|
|
611
|
+
}
|
|
612
|
+
addItem(params) {
|
|
613
|
+
const { appId, id, ...body } = params;
|
|
614
|
+
return this.http.post(`/app/${appId}/store/cart/${id}/add-item`, body);
|
|
615
|
+
}
|
|
616
|
+
updateItem(params) {
|
|
617
|
+
const { appId, id, ...body } = params;
|
|
618
|
+
return this.http.post(`/app/${appId}/store/cart/${id}/update-item`, body);
|
|
619
|
+
}
|
|
620
|
+
removeItem(params) {
|
|
621
|
+
const { appId, id, ...body } = params;
|
|
622
|
+
return this.http.post(`/app/${appId}/store/cart/${id}/remove-item`, body);
|
|
623
|
+
}
|
|
624
|
+
calculateTotals(params) {
|
|
625
|
+
const { appId, id, ...body } = params;
|
|
626
|
+
return this.http.post(`/app/${appId}/store/cart/${id}/calculate-totals`, body);
|
|
627
|
+
}
|
|
628
|
+
};
|
|
629
|
+
__name(_CartApi, "CartApi");
|
|
630
|
+
var CartApi = _CartApi;
|
|
631
|
+
|
|
517
632
|
// src/modules/store/category.ts
|
|
518
633
|
var _CategoryApi = class _CategoryApi {
|
|
519
634
|
constructor(http) {
|
|
@@ -809,6 +924,7 @@ var _StoreApi = class _StoreApi {
|
|
|
809
924
|
constructor(http) {
|
|
810
925
|
this.http = http;
|
|
811
926
|
this.badge = new BadgeApi(http);
|
|
927
|
+
this.cart = new CartApi(http);
|
|
812
928
|
this.category = new CategoryApi(http);
|
|
813
929
|
this.collection = new CollectionApi(http);
|
|
814
930
|
this.discount = new DiscountApi(http);
|
|
@@ -1359,6 +1475,7 @@ var _AppliteUI = class _AppliteUI {
|
|
|
1359
1475
|
this.notification = new NotificationApi(this.http);
|
|
1360
1476
|
this.webhook = new WebhookApi(this.http);
|
|
1361
1477
|
this.user = new UserApi(this.http);
|
|
1478
|
+
this.testimony = new TestimonyApi(this.http);
|
|
1362
1479
|
this.store = new StoreApi(this.http);
|
|
1363
1480
|
this.multiService = new MultiServiceApi(this.http);
|
|
1364
1481
|
this.superAdmin = new SuperAdminApi(this.http);
|
|
@@ -1370,6 +1487,6 @@ var _AppliteUI = class _AppliteUI {
|
|
|
1370
1487
|
__name(_AppliteUI, "AppliteUI");
|
|
1371
1488
|
var AppliteUI = _AppliteUI;
|
|
1372
1489
|
|
|
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 };
|
|
1490
|
+
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
1491
|
//# sourceMappingURL=index.mjs.map
|
|
1375
1492
|
//# sourceMappingURL=index.mjs.map
|