repzo 1.0.17 → 1.0.18

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.
@@ -3452,6 +3452,132 @@ export namespace Service {
3452
3452
  }
3453
3453
  }
3454
3454
 
3455
+ export namespace Refund {
3456
+ export interface RefundSchema {
3457
+ _id: string;
3458
+ status: RefundStatus;
3459
+ remainder: number;
3460
+ amount: number;
3461
+ client_id: string;
3462
+ client_name: string;
3463
+ creator: AdminCreator | RepCreator;
3464
+ time?: number;
3465
+ serial_number: SerialNumber;
3466
+ route?: string;
3467
+ paytime: string;
3468
+ note?: string;
3469
+ currency: string;
3470
+ transaction_type: RefundType;
3471
+ check?: Check;
3472
+ LinkedTxn?: {
3473
+ Txn_serial_number: SerialNumber;
3474
+ Txn_invoice_total: number;
3475
+ TxnType: "return_invoice" | "payment" | "invoice";
3476
+ };
3477
+ company_namespace: string[];
3478
+ integration_meta?: { [key: string]: any };
3479
+ sync_id: string;
3480
+ custom_status?: string;
3481
+ visit_id?: string;
3482
+ teams?: string[];
3483
+ paymentsData: {
3484
+ amount: number;
3485
+ paid: number;
3486
+ balance: number;
3487
+ payments: PaymentData[];
3488
+ };
3489
+ createdAt: string;
3490
+ updatedAt: string;
3491
+ __v: number;
3492
+ }
3493
+ interface CreateBody {
3494
+ amount: number;
3495
+ client_id: string;
3496
+ client_name: string;
3497
+ time?: number;
3498
+ serial_number?: SerialNumber;
3499
+ route?: string;
3500
+ paytime: string;
3501
+ note?: string;
3502
+ currency: string;
3503
+ transaction_type: RefundType;
3504
+ check?: Check;
3505
+ LinkedTxn?: {
3506
+ Txn_serial_number: SerialNumber;
3507
+ Txn_invoice_total: number;
3508
+ TxnType: "return_invoice" | "payment" | "invoice";
3509
+ };
3510
+ company_namespace?: string[];
3511
+ integration_meta?: { [key: string]: any };
3512
+ sync_id: string;
3513
+ custom_status?: string;
3514
+ visit_id?: string;
3515
+ teams?: string[];
3516
+ }
3517
+ interface UpdateBody {
3518
+ integration_meta?: { [key: string]: any };
3519
+ }
3520
+
3521
+ type RefundSchemaWithPopulatedKeys = RefundSchema & {
3522
+ balance_to_refund: number;
3523
+ custom_status?: string | CustomStatus.CustomStatusSchema;
3524
+ check?: Check & { bank: Bank.BankSchema };
3525
+ invoice?: {
3526
+ invoice_serial_number: string;
3527
+ invoice_date: string;
3528
+ invoice_due_date: string;
3529
+ original_amount: number;
3530
+ refund: number;
3531
+ };
3532
+ };
3533
+ type RefundType = "check" | "cash";
3534
+ type PopulatedKeys = "custom_status";
3535
+ type RefundStatus = "consumed" | "unconsumed" | "partially_consumed";
3536
+ export namespace Find {
3537
+ export type Params = DefaultPaginationQueryParams & {
3538
+ _id?: string[] | string;
3539
+ "creator._id"?: string[] | string;
3540
+ client_id?: string[] | string;
3541
+ from_paytime?: number;
3542
+ to_paytime?: number;
3543
+ custom_status?: string[] | string;
3544
+ transaction_type?: RefundType | RefundType[];
3545
+ creator?: string[] | string;
3546
+ clients?: string[] | string;
3547
+ withPrintDetails?: boolean;
3548
+ [key: string]: any; // integration_meta.
3549
+ populatedKeys?: PopulatedKeys[];
3550
+ };
3551
+ export interface Result extends DefaultPaginationResult {
3552
+ data: RefundSchemaWithPopulatedKeys[];
3553
+ absolute_total: number;
3554
+ page_total: number;
3555
+ }
3556
+ }
3557
+
3558
+ export namespace Get {
3559
+ export type ID = string;
3560
+ export interface Params {
3561
+ withPrintDetails?: boolean;
3562
+ populatedKeys?: PopulatedKeys[];
3563
+ }
3564
+ export type Result = RefundSchemaWithPopulatedKeys & {
3565
+ custom_status: CustomStatus.CustomStatusSchema;
3566
+ };
3567
+ }
3568
+
3569
+ export namespace Create {
3570
+ export type Body = CreateBody;
3571
+ export type Result = RefundSchema;
3572
+ }
3573
+
3574
+ export namespace Update {
3575
+ export type ID = string;
3576
+ export type Body = UpdateBody;
3577
+ export type Result = RefundSchema;
3578
+ }
3579
+ }
3580
+
3455
3581
  export namespace Cycle {
3456
3582
  type CycleStatus = "pending" | "approved" | "processing" | "rejected";
3457
3583
  export interface Schema {