Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 | 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 2x 2x 1x 1x 1x 1x 1x 1x 1x 2x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 3x 3x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x | import { axiosInstance } from "./axios";
import { Bank, Customer, Generic, Product, Property, Staff, Role, Lender, Publisher, FractionalOwnership, Dividend, Shared } from '../models'
import { DividendVentureCapital, VentureCapital } from "../models/venture.model";
import { Specification } from "../models/specification";
import { Phase } from "../models/phase";
// login
export function login(urlEncode: object): Promise<object> {
return axiosInstance.post('/auth/firebase', urlEncode, {
headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
})
}
export function loginTest(urlEncode: object): Promise<object> {
return axiosInstance.post('/auth/mock', urlEncode, {
headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
})
}
//Properties
export function postProperties(properties: Property[]): Promise<any> {
return axiosInstance.post('/properties', properties);
}
export function getProperties(): Promise<any> {
return axiosInstance.get('/properties');
}
export function getProperty(code: string): Promise<any> {
return axiosInstance.get(`/properties/${code}`);
}
export function putProperties(properties: Property[]): Promise<any> {
return axiosInstance.put('/properties', properties);
}
export function deleteProperties(properties: Generic[]): Promise<any> {
return axiosInstance.delete('/properties', { data: properties });
}
export function postPropertyImage(code: string | undefined, file: any, index: number): Promise<any> {
const formData = new FormData()
formData.append("file", file)
return axiosInstance.post(`/properties/${code}/medias?index=${index}`, formData, {
headers: {
'Content-Type': 'multipart/form-data',
},
});
}
export function getVariantVillaByComplex(code: string): Promise<any> {
return axiosInstance.get(`/variant-villa/${code}/complex`);
}
export function getVariantVillaByCode(code: string): Promise<any> {
return axiosInstance.get(`/variant-villa/${code}`);
}
export function postVariantVillaByComplex(payload: any): Promise<any> {
return axiosInstance.post(`/variant-villa`, payload);
}
export function updateVariantVillaByComplex(payload: any): Promise<any> {
return axiosInstance.put(`/variant-villa`, payload);
}
export function deleteVariantVillaByComplex(code: any): Promise<any> {
return axiosInstance.delete(`/variant-villa`, {data: [
{code: code}
]});
}
export function postMediaVariantVillaByComplex(code: string, file: any, index: number): Promise<any> {
const formData = new FormData()
formData.append("file", file)
return axiosInstance.post(`variant-villa/${code}/medias?index=${index}`, formData, {
headers: {
'Content-Type': 'multipart/form-data',
},
});
}
export function getSpecsVilla(): Promise<any> {
return axiosInstance.get(`/specs`);
}
//Bank
export function getBanks(): Promise<any> {
return axiosInstance.get('/withdrawal-banks');
}
export function getBank(code: string): Promise<any> {
return axiosInstance.get(`/withdrawal-banks/${code}`);
}
export function postBanks(banks: Bank[]): Promise<any> {
return axiosInstance.post('/withdrawal-banks', banks);
}
export function putBanks(banks: Bank[]): Promise<any> {
return axiosInstance.put('/withdrawal-banks', banks);
}
export function postBankImage(code: string | undefined, file: any): Promise<any> {
const formData = new FormData()
formData.append("file", file)
return axiosInstance.post(`/withdrawal-banks/${code}/logo`, formData, {
headers: {
'Content-Type': 'multipart/form-data',
},
});
}
export function deleteBank(banks: Generic[]): Promise<any> {
return axiosInstance.delete('/withdrawal-banks', { data: banks });
}
//Investment Bank
export function getInvestmentBanks(): Promise<any> {
return axiosInstance.get('/fixed-income-banks');
}
export function getInvestmentBank(code: string): Promise<any> {
return axiosInstance.get(`/fixed-income-banks/${code}`);
}
export function postInvestmentBanks(banks: Bank[]): Promise<any> {
return axiosInstance.post('/fixed-income-banks', banks);
}
export function putInvestmentBanks(banks: Bank[]): Promise<any> {
return axiosInstance.put('/fixed-income-banks', banks);
}
export function postInvestmentBankImage(code: string | undefined, file: any): Promise<any> {
const formData = new FormData()
formData.append("file", file)
return axiosInstance.post(`/fixed-income-banks/${code}/logo`, formData, {
headers: {
'Content-Type': 'multipart/form-data',
},
});
}
export function deleteInvestmentBank(banks: Generic[]): Promise<any> {
return axiosInstance.delete('/fixed-income-banks', { data: banks });
}
// lender
export function getLenders(): Promise<any> {
return axiosInstance.get('/lenders');
}
export function getLender(code: string): Promise<any> {
return axiosInstance.get(`/lenders/${code}`);
}
export function postLender(lender: Lender[]): Promise<any> {
return axiosInstance.post('/lenders', lender);
}
export function putLender(lender: Lender[]): Promise<any> {
return axiosInstance.put('/lenders', lender);
}
export function postLenderImage(code: string | undefined, file: any): Promise<any> {
const formData = new FormData()
formData.append("file", file)
return axiosInstance.post(`/lenders/${code}/logo`, formData, {
headers: {
'Content-Type': 'multipart/form-data',
},
});
}
export function deleteLender(lender: Generic[]): Promise<any> {
return axiosInstance.delete('/lenders', { data: lender });
}
//product/properties
export function getProducts(): Promise<any> {
return axiosInstance.get('/products');
}
export function getProduct(code: string): Promise<any> {
return axiosInstance.get(`/products/${code}`);
}
export function postProducts(products: Product[]): Promise<any> {
return axiosInstance.post('/products', products);
}
export function putProducts(products: Product[]): Promise<any> {
return axiosInstance.put('/products', products);
}
export function deleteProducts(products: Generic[]): Promise<any> {
return axiosInstance.delete('/products', { data: products });
}
export function postProductImage(code: string | undefined, file: any): Promise<any> {
const formData = new FormData()
formData.append("file", file)
return axiosInstance.post(`/products/${code}/logo`, formData, {
headers: {
'Content-Type': 'multipart/form-data',
},
});
}
export function postProductProspectus(code: string | undefined, file: any): Promise<any> {
const formData = new FormData()
formData.append("file", file)
return axiosInstance.post(`/products/${code}/prospectus`, formData, {
headers: {
'Content-Type': 'multipart/form-data',
},
});
}
export function postProductFactSheet(code: string | undefined, file: any): Promise<any> {
const formData = new FormData()
formData.append("file", file)
return axiosInstance.post(`/products/${code}/fact-sheet`, formData, {
headers: {
'Content-Type': 'multipart/form-data',
},
});
}
//customer
export function getCustomers(): Promise<any> {
return axiosInstance.get('/customers');
}
export function getCustomer(code: string): Promise<any> {
return axiosInstance.get(`/customers/${code}`);
}
export function putCustomer(customers: Customer[]): Promise<any> {
return axiosInstance.put('/customers', customers);
}
export function putCustomerWhiteList(customers: Customer): Promise<any> {
return axiosInstance.put('/customers/updateWhitelist', customers);
}
//admin
export function getStaffs(): Promise<any> {
return axiosInstance.get('/staffs');
}
export function getStaff(code: string): Promise<any> {
return axiosInstance.get(`/staffs/${code}`);
}
export function postStaff(staff: Staff[]): Promise<any> {
return axiosInstance.post('/staffs', staff);
}
export function putStaff(staff: Staff[]): Promise<any> {
return axiosInstance.put('/staffs', staff);
}
export function deleteStaff(staff: Staff[]): Promise<any> {
return axiosInstance.delete('/staffs', { data: staff });
}
export function addFcmStaff(fcm: { code: string, kind: string }): Promise<void> {
return axiosInstance.post('/staffs/fcms', fcm);
}
// role
export function getRoles(): Promise<any> {
return axiosInstance.get('/roles');
}
export function getRole(code: string): Promise<any> {
return axiosInstance.get(`/roles/${code}`);
}
export function postRole(role: Role[]): Promise<any> {
return axiosInstance.post('/roles', role);
}
export function putRole(role: Role[]): Promise<any> {
return axiosInstance.put('/roles', role);
}
export function deleteRole(role: Role[]): Promise<any> {
return axiosInstance.delete('/roles', { data: role });
}
// menu auth
export function getMenuAuth(): Promise<any> {
return axiosInstance.get('/menu-authorities');
}
// transaction property
export function getTxnsProperties(): Promise<any> {
return axiosInstance.get('/txns/properties');
}
export function getTxnsProperty(code: string): Promise<any> {
return axiosInstance.get(`/txns/properties/${code}`);
}
export function getTxnsPropertyByCustomerCode(customerCode: string): Promise<any> {
return axiosInstance.get(`/txns/properties?customer=${customerCode}`);
}
export function putTxnsProperties(txnsCode: string, status: any): Promise<any> {
return axiosInstance.put(`/txns/properties/${txnsCode}`, { "status": status });
}
// installment property
export function setInstallmentProperties(txnsCode: string, mortgage: any): Promise<any> {
return axiosInstance.post(`/installment/${txnsCode}/properties`, mortgage);
}
export function getInstallmentProperties(txnsCode: string): Promise<any> {
return axiosInstance.get(`/installment/${txnsCode}/properties`);
}
export function getInstallmentCalculator(txns: Object): Promise<any> {
return axiosInstance.post("/installment/calculator", txns);
}
// txns product/fixed income
export function getTxnsProducts(): Promise<any> {
return axiosInstance.get('/txns/products');
}
export function getTxnsProduct(code: string): Promise<any> {
return axiosInstance.get(`/txns/products/${code}`);
}
export function getTxnsProductByCustomerCode(customerCode: string): Promise<any> {
return axiosInstance.get(`/txns/products?customer=${customerCode}`);
}
export function putTxnsProducts(txnsCode: string, status: any): Promise<any> {
return axiosInstance.put(`/txns/products/${txnsCode}`, { "status": status });
}
export function getTxnsVentureByCode(code: string): Promise<any> {
return axiosInstance.get(`/txns/venture-capital/${code}`);
}
export function getTxnsVentureByVCCode(code: string): Promise<any> {
return axiosInstance.get(`/txns/venture-capital/${code}/projects`);
}
// installment product/fixed income
export function getInstallmentProduct(txnsCode: string): Promise<any> {
return axiosInstance.get(`/installment/${txnsCode}/products`);
}
export function putInstallmentProduct(installmentCode: string, status: object): Promise<any> {
return axiosInstance.put(`/installment/${installmentCode}/products`, status);
}
// transaction fo
export function getTxnsFOProperties(): Promise<any> {
return axiosInstance.get('/txns/fractional-ownership');
}
export function getTxnsFOProperty(code: string): Promise<any> {
return axiosInstance.get(`/txns/fractional-ownership/${code}`);
}
export function getTxnsFOPropertyByCustomerCode(customerCode: string): Promise<any> {
return axiosInstance.get(`/txns/fractional-ownership?customer=${customerCode}`);
}
export function getTxnsFOPropertyByFOCode(foCode: string): Promise<any> {
return axiosInstance.get(`/txns/fractional-ownership/${foCode}/projects`);
}
export function putTxnsFOProperties(txnsCode: string, status: any): Promise<any> {
return axiosInstance.put(`/txns/fractional-ownership/${txnsCode}`, { "status": status });
}
export function checkAndValidateAllocationStatusFo(foCode: string, statusCode: number): Promise<any> {
return axiosInstance.put(`/txns/fractional-ownership/${foCode}`, {status: statusCode});
}
// txns venture
export function getTxnsVenture(): Promise<any> {
return axiosInstance.get('/txns/venture-capital');
}
// wallet
export function getWithdrawals(): Promise<any> {
return axiosInstance.get('/wallet/withdrawals');
}
export function getWithdrawalsId(code:string): Promise<any> {
return axiosInstance.get(`/wallet/withdrawals/${code}`);
}
export function postWithdrawals(walletTxCode: string, data: object): Promise<any> {
return axiosInstance.post(`/wallet/withdrawals/${walletTxCode}/approval`, data);
}
export function getTopup(): Promise<any> {
return axiosInstance.get('/wallet/top-ups');
}
export function getTopupId(code: string): Promise<any> {
return axiosInstance.get(`/wallet/top-ups/${code}`);
}
export function postTopup(walletTxCode: string, data: object): Promise<any> {
return axiosInstance.post(`/wallet/top-ups/${walletTxCode}/approval`, data);
}
// Loan
export function getVcLoanReq(filter:Object): Promise<any> {
return axiosInstance.post('/loan/list-vc', filter);
}
export function getPhaseLoanReq(filter:Object): Promise<any> {
return axiosInstance.post('/loan/list-phase', filter);
}
export function getLoanApproval(payload:Object): Promise<any> {
return axiosInstance.post('/loan/process', payload);
}
// Dashboard
export function getDashboardData(): Promise<any> {
return axiosInstance.get(`/dashboard`);
}
export function getDashboardCustomer(): Promise<any> {
return axiosInstance.get('/dashboard/customers');
}
export function getDashboardProduct(): Promise<any> {
return axiosInstance.get('/dashboard/txns/products-monthly');
}
export function getDashboardProperty(): Promise<any> {
return axiosInstance.get('/dashboard/txns/property-monthly');
}
export function getDashboardLocalCustomer(params:string): Promise<any> {
return axiosInstance.get(`/dashboard/customer-local/${params}`);
}
export function getDashboardForeignerCustomer(params:string): Promise<any> {
return axiosInstance.get(`/dashboard/customer-foreigner/${params}`);
}
export function getDashboardBalance(): Promise<any> {
return axiosInstance.get('/dashboard/balance');
}
export function getDashboardProductV2(): Promise<any> {
return axiosInstance.get('/dashboard/products');
}
export function getDashboardTxnFo(): Promise<any> {
return axiosInstance.get('/dashboard/txn-fo');
}
export function getDashboardTxnVc(): Promise<any> {
return axiosInstance.get('/dashboard/txn-vc');
}
export function getDashboardTxnFund(): Promise<any> {
return axiosInstance.get('/dashboard/txn-fund');
}
export function getDashboardChartBalance(params:string): Promise<any> {
return axiosInstance.get(`/dashboard/balance/${params}`);
}
export function getDashboardChartUnusedBalance(params:string): Promise<any> {
return axiosInstance.get(`/dashboard/unused-balance/${params}`);
}
export function getDashboardCharttxnFo(params:string): Promise<any> {
return axiosInstance.get(`dashboard/txns/fo/${params}`);
}
export function getDashboardCharttxnVc(params:string): Promise<any> {
return axiosInstance.get(`dashboard/txns/vc/${params}`);
}
export function getDashboardCharttxnFund(params:string): Promise<any> {
return axiosInstance.get(`dashboard/txns/fund/${params}`);
}
export function getAppDownloadCount(params:string): Promise<any> {
return axiosInstance.get(`analytic/download/${params}`);
}
// Notification
export function getNotifications(): Promise<any> {
return axiosInstance.get(`/notifications`);
}
export function readNotification(code: string): Promise<any> {
return axiosInstance.post(`/notifications/${code}/read`, { read: true });
}
// bricks (fo)
// publisher
export function getPublishers(): Promise<any> {
return axiosInstance.get('/publishers');
}
export function getPublisher(code: string): Promise<any> {
return axiosInstance.get(`/publishers/${code}`);
}
export function postPublisher(publisher: Publisher[]): Promise<any> {
return axiosInstance.post('/publishers', publisher);
}
export function putPublisher(publisher: Publisher[]): Promise<any> {
return axiosInstance.put('/publishers', publisher);
}
export function postPublisherImage(code: string | undefined, file: any): Promise<any> {
const formData = new FormData()
formData.append("file", file)
return axiosInstance.post(`/publishers/${code}/logo`, formData, {
headers: {
'Content-Type': 'multipart/form-data',
},
});
}
export function deletePublisher(publisherCode: string): Promise<any> {
return axiosInstance.delete('/publishers', { data: [{ code: publisherCode }] });
}
// Fractional Ownership
export function getFractionalOwnerships(): Promise<any> {
return axiosInstance.get(`/fractional-ownership`);
}
export function getFractionalOwnership(code: string): Promise<any> {
return axiosInstance.get(`/fractional-ownership/${code}`);
}
export function addFractionalOwnership(newFO: FractionalOwnership): Promise<any> {
return axiosInstance.post(`/fractional-ownership`, [newFO]);
}
export function updateFractionalOwnership(editedFO: object): Promise<any> {
return axiosInstance.put(`/fractional-ownership`, [editedFO]);
}
export function deleteFractionalOwnership(codeFO: string): Promise<any> {
return axiosInstance.delete(`/fractional-ownership`, { data: [{ code: codeFO }] });
}
export function addMediaFractionalOwnerhip(code: string | undefined, file: any, index: number): Promise<any> {
const formData = new FormData()
formData.append("file", file)
return axiosInstance.post(`/fractional-ownership/${code}/medias?index=${index}`, formData, {
headers: {
'Content-Type': 'multipart/form-data',
},
});
}
export function addProspectusFractionalOwnerhip(code: string | undefined, file: any): Promise<any> {
const formData = new FormData()
formData.append("file", file)
return axiosInstance.post(`/fractional-ownership/${code}/prospectus`, formData, {
headers: {
'Content-Type': 'multipart/form-data',
},
});
}
export function notificationUpdateStatusFo(foCode: string): Promise<any> {
return axiosInstance.post(`/fractional-ownership/${foCode}/notification`);
}
// Project monthly update
export function getProjectUpdates(code: string): Promise<any> {
return axiosInstance.get(`/project-updates/${code}/projects`);
}
export function getProjectUpdatesByCode(code:any): Promise<any> {
return axiosInstance.get(`/project-updates/${code}`);
}
export function addProjectUpdates(payload: Array<any>): Promise<any> {
return axiosInstance.post('/project-updates', payload);
}
export function updateProjectUpdates(payload: Array<any>): Promise<any> {
return axiosInstance.put('/project-updates', payload);
}
export function deleteProjectUpdates(payload: string): Promise<any> {
return axiosInstance.delete('/project-updates', { data: [{ code: payload }] });
}
// kyc
export function getKYCs(): Promise<any> {
return axiosInstance.get('/kyc');
}
export function getKYC(code: string): Promise<any> {
return axiosInstance.get(`/kyc/${code}`);
}
export function approveRejectKYC(kyc: object): Promise<any> {
return axiosInstance.post('/kyc', kyc);
}
// Venture Capitals
export function getVentureCapitals(): Promise<any> {
return axiosInstance.get(`/venture-capital`);
}
export function getVentureCapital(code: string): Promise<any> {
return axiosInstance.get(`/venture-capital/${code}`);
}
export function addVentureCapital(newFO: VentureCapital): Promise<any> {
return axiosInstance.post(`/venture-capital`, [newFO]);
}
export function updateVentureCapital(editedFO: object): Promise<any> {
return axiosInstance.put(`/venture-capital`, [editedFO]);
}
export function deleteVentureCapital(codeFO: string): Promise<any> {
return axiosInstance.delete(`/venture-capital`, { data: [{ code: codeFO }] });
}
export function addMediaVentureCapital(code: string | undefined, file: any, index: number): Promise<any> {
const formData = new FormData()
formData.append("file", file)
return axiosInstance.post(`/venture-capital/${code}/medias?index=${index}`, formData, {
headers: {
'Content-Type': 'multipart/form-data',
},
});
}
export function addProspectusVentureCapital(code: string | undefined, file: any): Promise<any> {
const formData = new FormData()
formData.append("file", file)
return axiosInstance.post(`/venture-capital/${code}/prospectus`, formData, {
headers: {
'Content-Type': 'multipart/form-data',
},
});
}
export function notificationUpdateStatusVC(foCode: string): Promise<any> {
return axiosInstance.post(`/venture-capital/${foCode}/notification`);
}
export function checkAndValidateAllocationStatusVC(foCode: string, statusCode: number): Promise<any> {
return axiosInstance.put(`/txns/venture-capital/${foCode}`, {status: statusCode});
}
// Dividend FO
export function getDividendFOByFO(code: string): Promise<any> {
return axiosInstance.get(`/dividend/fractional-ownership/${code}/projects`);
}
export function getDividendFO(code: string): Promise<any> {
return axiosInstance.get(`/dividend/fractional-ownership/${code}`);
}
export function postDividendFO(code: Dividend): Promise<any> {
return axiosInstance.post(`/dividend/fractional-ownership`, [code]);
}
export function putDividendFO(payload: Dividend): Promise<any> {
return axiosInstance.put('/dividend/fractional-ownership', [payload]);
}
export function addProspectusDividendFO(code: string | undefined, file: any): Promise<any> {
const formData = new FormData()
formData.append("file", file)
return axiosInstance.post(`/dividend/fractional-ownership/${code}/report`, formData, {
headers: {
'Content-Type': 'multipart/form-data',
},
});
}
// shared dividen
export function getSharedDividend(code: string): Promise<any> {
return axiosInstance.get(`/shared/fractional-ownership/${code}/dividend`);
}
export function putSharedDividend(payload: Shared[]): Promise<any> {
return axiosInstance.put(`/shared/fractional-ownership`, payload);
}
// shared fo
export function getSharedFO(code: string): Promise<any> {
return axiosInstance.get(`/shared/fractional-ownership/${code}/fo`);
}
// Dividend VC
export function getDividendVCByVC(code: string): Promise<any> {
return axiosInstance.get(`/dividend/venture-capital/${code}/projects`);
}
export function getDividendVC(code: string): Promise<any> {
return axiosInstance.get(`/dividend/venture-capital/${code}`);
}
export function postDividendVC(code: DividendVentureCapital): Promise<any> {
return axiosInstance.post(`/dividend/venture-capital`, [code]);
}
export function putDividendVC(payload: DividendVentureCapital): Promise<any> {
return axiosInstance.put('/dividend/venture-capital', [payload]);
}
export function addProspectusDividendVC(code: string | undefined, file: any): Promise<any> {
const formData = new FormData()
formData.append("file", file)
return axiosInstance.post(`/dividend/venture-capital/${code}/report`, formData, {
headers: {
'Content-Type': 'multipart/form-data',
},
});
}
// Venture Capital monthly update
export function getVentureCapitalUpdates(code: string): Promise<any> {
return axiosInstance.get(`/project-updates-vc/${code}/projects`);
}
export function getVentureCapitalUpdatesByCode(code:any): Promise<any> {
return axiosInstance.get(`/project-updates-vc/${code}`);
}
export function addVentureCapitalUpdates(payload: Array<any>): Promise<any> {
return axiosInstance.post('/project-updates-vc', payload);
}
export function updateVentureCapitalUpdates(payload: Array<any>): Promise<any> {
return axiosInstance.put('/project-updates-vc', payload);
}
export function deleteVentureCapitalUpdates(payload: string): Promise<any> {
return axiosInstance.delete('/project-updates-vc', { data: [{ code: payload }] });
}
// Shared Dividen Venture Capital
export function getSharedDividendVentureCapital(code: string): Promise<any> {
return axiosInstance.get(`/shared/venture-capital/${code}/dividend`);
}
export function putSharedDividendVentureCapital(payload: Shared[]): Promise<any> {
return axiosInstance.put(`/shared/venture-capital`, payload);
}
export function getSharedVentureCapital(code: string): Promise<any> {
return axiosInstance.get(`/shared/venture-capital/${code}/vc`);
}
// specification
export function getSpecifications(): Promise<any> {
return axiosInstance.get("/specs");
}
export function getSpecification(code: string): Promise<any> {
return axiosInstance.get(`/specs/${code}`);
}
export function postSpecification(payload: Specification): Promise<any> {
return axiosInstance.post('/specs', payload);
}
export function putSpecification(payload: Specification): Promise<any> {
return axiosInstance.put('/specs', payload);
}
export function deleteSpecification(payload: Specification[]): Promise<any> {
return axiosInstance.delete('/specs', { data: payload });
}
// Phase
export function getPhaseByComplexCode(code:string): Promise<any> {
return axiosInstance.get(`/phase/${code}/complex`);
}
export function getPhase(code:string): Promise<any> {
return axiosInstance.get(`/phase/${code}`);
}
export function postPhase(payload: Phase[]): Promise<any> {
return axiosInstance.post('/phase', payload);
}
export function putPhase(payload: Phase[]): Promise<any> {
return axiosInstance.put('/phase', payload);
}
export function deletePhase(code: string): Promise<any> {
return axiosInstance.delete('/phase', { data: [{ code: code }] });
}
export function addProspectusPhase(code: string | undefined, file: any): Promise<any> {
const formData = new FormData()
formData.append("file", file)
return axiosInstance.post(`/phase/${code}/prospectus`, formData, {
headers: {
'Content-Type': 'multipart/form-data',
},
});
}
export function addPhoto(file: any): Promise<any> {
const formData = new FormData()
formData.append("file", file)
return axiosInstance.post(`specification/medias?index=100`, formData, {
headers: {
'Content-Type': 'multipart/form-data',
},
});
}
|