@commercengine/pos 0.1.3 → 0.3.0

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/dist/index.d.ts CHANGED
@@ -643,6 +643,66 @@ interface paths {
643
643
  patch?: never;
644
644
  trace?: never;
645
645
  };
646
+ "/pos/devices": {
647
+ parameters: {
648
+ query?: never;
649
+ header?: never;
650
+ path?: never;
651
+ cookie?: never;
652
+ };
653
+ /**
654
+ * List all available devices
655
+ * @description List all available devices.
656
+ */
657
+ get: operations["list-pos-devices"];
658
+ put?: never;
659
+ post?: never;
660
+ delete?: never;
661
+ options?: never;
662
+ head?: never;
663
+ patch?: never;
664
+ trace?: never;
665
+ };
666
+ "/pos/devices/{id}/claim": {
667
+ parameters: {
668
+ query?: never;
669
+ header?: never;
670
+ path?: never;
671
+ cookie?: never;
672
+ };
673
+ get?: never;
674
+ put?: never;
675
+ /**
676
+ * Claim device
677
+ * @description Claim device
678
+ */
679
+ post: operations["claim-pos-device"];
680
+ delete?: never;
681
+ options?: never;
682
+ head?: never;
683
+ patch?: never;
684
+ trace?: never;
685
+ };
686
+ "/pos/devices/{id}/unclaim": {
687
+ parameters: {
688
+ query?: never;
689
+ header?: never;
690
+ path?: never;
691
+ cookie?: never;
692
+ };
693
+ get?: never;
694
+ put?: never;
695
+ /**
696
+ * Unclaim device
697
+ * @description Unclaim device
698
+ */
699
+ post: operations["unclaim-pos-device"];
700
+ delete?: never;
701
+ options?: never;
702
+ head?: never;
703
+ patch?: never;
704
+ trace?: never;
705
+ };
646
706
  "/pos/fulfillment-options": {
647
707
  parameters: {
648
708
  query?: never;
@@ -663,6 +723,26 @@ interface paths {
663
723
  patch?: never;
664
724
  trace?: never;
665
725
  };
726
+ "/pos/locations": {
727
+ parameters: {
728
+ query?: never;
729
+ header?: never;
730
+ path?: never;
731
+ cookie?: never;
732
+ };
733
+ /**
734
+ * List all locations
735
+ * @description List all locations.
736
+ */
737
+ get: operations["list-pos-locations"];
738
+ put?: never;
739
+ post?: never;
740
+ delete?: never;
741
+ options?: never;
742
+ head?: never;
743
+ patch?: never;
744
+ trace?: never;
745
+ };
666
746
  "/pos/orders": {
667
747
  parameters: {
668
748
  query?: never;
@@ -683,6 +763,46 @@ interface paths {
683
763
  patch?: never;
684
764
  trace?: never;
685
765
  };
766
+ "/pos/orders/{order_number}/payment-status": {
767
+ parameters: {
768
+ query?: never;
769
+ header?: never;
770
+ path?: never;
771
+ cookie?: never;
772
+ };
773
+ /**
774
+ * Retrieve payment status
775
+ * @description Retrieve payment status of a paricular order.
776
+ */
777
+ get: operations["pos-get-payment-status"];
778
+ put?: never;
779
+ post?: never;
780
+ delete?: never;
781
+ options?: never;
782
+ head?: never;
783
+ patch?: never;
784
+ trace?: never;
785
+ };
786
+ "/pos/payments/payment-options": {
787
+ parameters: {
788
+ query?: never;
789
+ header?: never;
790
+ path?: never;
791
+ cookie?: never;
792
+ };
793
+ /**
794
+ * List all payment options
795
+ * @description List all payment options
796
+ */
797
+ get: operations["pos-list-payment-options"];
798
+ put?: never;
799
+ post?: never;
800
+ delete?: never;
801
+ options?: never;
802
+ head?: never;
803
+ patch?: never;
804
+ trace?: never;
805
+ };
686
806
  }
687
807
  interface components {
688
808
  schemas: {
@@ -1499,6 +1619,28 @@ interface components {
1499
1619
  associated_options: components["schemas"]["AssociatedOption"] | null;
1500
1620
  shipping?: components["schemas"]["ProductShipping"];
1501
1621
  };
1622
+ /** JuspayPaymentGatewayParams */
1623
+ JuspayPaymentGatewayParams: {
1624
+ /**
1625
+ * @description discriminator enum property added by openapi-typescript
1626
+ * @enum {string}
1627
+ */
1628
+ payment_gateway: "JUSPAY";
1629
+ /**
1630
+ * @description `paymentPage` is the default option that you should select when using hyper-checkout
1631
+ * @enum {string}
1632
+ */
1633
+ action: "paymentPage" | "paymentManagement";
1634
+ /**
1635
+ * @description Use `hyper-checkout` for Juspay hosted checkout
1636
+ * @enum {string}
1637
+ */
1638
+ integration_type: "hyper-checkout" | "express-checkout";
1639
+ /** @description This is the URL that the gateway will redirect to once payment processing is complete. This will be a GET request by default */
1640
+ return_url: string;
1641
+ /** @description The exact gateway reference ID that was set up in the integration */
1642
+ gateway_reference_id: string;
1643
+ };
1502
1644
  /**
1503
1645
  * MultiSelectAttribute
1504
1646
  * @description Attribute for multi-select values
@@ -1779,6 +1921,9 @@ interface components {
1779
1921
  limit: number;
1780
1922
  next_page: number | null;
1781
1923
  };
1924
+ /** @enum {string} */
1925
+ PaymentGateway: "PAYU" | "JUSPAY";
1926
+ PaymentGatewayParams: components["schemas"]["PayuPaymentGatewayParams"] | components["schemas"]["JuspayPaymentGatewayParams"];
1782
1927
  /**
1783
1928
  * PaymentInfo
1784
1929
  * @description Common fields in all types of payments.
@@ -1797,6 +1942,38 @@ interface components {
1797
1942
  payment_method?: string | null;
1798
1943
  icon_url?: string | null;
1799
1944
  };
1945
+ /** PayuPaymentGatewayParams */
1946
+ PayuPaymentGatewayParams: {
1947
+ /**
1948
+ * @description discriminator enum property added by openapi-typescript
1949
+ * @enum {string}
1950
+ */
1951
+ payment_gateway: "PAYU";
1952
+ furl: string;
1953
+ surl: string;
1954
+ };
1955
+ /** PayWithCard */
1956
+ PayWithCard: {
1957
+ /** @constant */
1958
+ payment_mode: "CARD";
1959
+ };
1960
+ /** PayWithCash */
1961
+ PayWithCash: {
1962
+ /** @constant */
1963
+ payment_mode: "CASH";
1964
+ };
1965
+ /** PayWithPaymentGateway */
1966
+ PayWithPaymentGateway: {
1967
+ /** @constant */
1968
+ payment_mode: "PG";
1969
+ payment_gateway: components["schemas"]["PaymentGateway"];
1970
+ payment_gateway_params: components["schemas"]["PaymentGatewayParams"];
1971
+ };
1972
+ /** PayWithUPI */
1973
+ PayWithUpi: {
1974
+ /** @constant */
1975
+ payment_mode: "UPI";
1976
+ };
1800
1977
  /** PercentageDiscountRule */
1801
1978
  PercentageDiscountRule: {
1802
1979
  /** @constant */
@@ -1844,15 +2021,49 @@ interface components {
1844
2021
  readonly id?: string;
1845
2022
  name?: string;
1846
2023
  /** @enum {unknown} */
1847
- device_type?: "POS Terminal";
1848
- /** @description A Device ID for an app. */
2024
+ device_type?: "pos-terminal";
2025
+ /** @description A Device ID shared by POS device provider. */
1849
2026
  readonly external_device_id?: string;
1850
- manufacturer?: string;
2027
+ vendor?: string;
1851
2028
  model_number?: string;
1852
2029
  mac_address?: string | null;
1853
2030
  location_id?: string;
1854
2031
  readonly location_name?: string;
1855
2032
  };
2033
+ /** PosLocation */
2034
+ PosLocation: {
2035
+ /** @description warehouse id */
2036
+ readonly id?: string;
2037
+ /** @description legal name */
2038
+ name: string;
2039
+ /** @enum {unknown} */
2040
+ warehouse_type: "retail-store" | "distribution-center";
2041
+ /** @default true */
2042
+ active: boolean;
2043
+ gstin?: string | null;
2044
+ city: string;
2045
+ address_line1: string;
2046
+ address_line2?: string | null;
2047
+ landmark?: string | null;
2048
+ pincode: string;
2049
+ state: string;
2050
+ country: string;
2051
+ /** @default +91 */
2052
+ country_code: string;
2053
+ /** @description 10 digit number without country code. */
2054
+ contact_phone: number;
2055
+ contact_email: string;
2056
+ is_default?: boolean;
2057
+ image_url?: string | null;
2058
+ seller_warehouse_id?: string | null;
2059
+ can_receive_stock: boolean;
2060
+ can_ship_parcel: boolean;
2061
+ can_collect: boolean;
2062
+ /** @description this field will be always true for warehouse_type = retail-store. */
2063
+ is_checkout_point: boolean;
2064
+ accepts_returns: boolean;
2065
+ opening_hours?: string | null;
2066
+ };
1856
2067
  /** UpdateCustomerWithEmail */
1857
2068
  PosUpdateCustomerWithEmail: {
1858
2069
  /** Format: email */
@@ -1900,15 +2111,17 @@ interface components {
1900
2111
  device?: {
1901
2112
  id?: string;
1902
2113
  name?: string;
1903
- };
2114
+ } | null;
1904
2115
  location?: {
1905
2116
  id?: string;
1906
2117
  name?: string;
1907
2118
  };
1908
- role?: {
1909
- id?: string;
1910
- name?: string;
1911
- };
2119
+ roles?: {
2120
+ location_id?: string;
2121
+ location_name?: string;
2122
+ role_id?: string;
2123
+ role_name?: string;
2124
+ }[];
1912
2125
  };
1913
2126
  /** Product */
1914
2127
  Product: {
@@ -2454,10 +2667,10 @@ interface operations {
2454
2667
  path?: never;
2455
2668
  cookie?: never;
2456
2669
  };
2457
- requestBody?: {
2670
+ requestBody: {
2458
2671
  content: {
2459
2672
  "application/json": {
2460
- device_id: string;
2673
+ location_id: string;
2461
2674
  email: string;
2462
2675
  };
2463
2676
  };
@@ -2491,10 +2704,10 @@ interface operations {
2491
2704
  path?: never;
2492
2705
  cookie?: never;
2493
2706
  };
2494
- requestBody?: {
2707
+ requestBody: {
2495
2708
  content: {
2496
2709
  "application/json": {
2497
- device_id: string;
2710
+ location_id: string;
2498
2711
  /** @description 10 digit phone number without country code. */
2499
2712
  phone: string;
2500
2713
  /**
@@ -2534,10 +2747,10 @@ interface operations {
2534
2747
  path?: never;
2535
2748
  cookie?: never;
2536
2749
  };
2537
- requestBody?: {
2750
+ requestBody: {
2538
2751
  content: {
2539
2752
  "application/json": {
2540
- device_id: string;
2753
+ location_id: string;
2541
2754
  /** @description 10 digit phone number without country code linked with WhatsApp. */
2542
2755
  phone: string;
2543
2756
  /**
@@ -2601,7 +2814,7 @@ interface operations {
2601
2814
  path?: never;
2602
2815
  cookie?: never;
2603
2816
  };
2604
- requestBody?: {
2817
+ requestBody: {
2605
2818
  content: {
2606
2819
  "application/json": {
2607
2820
  pairing_code: string;
@@ -2616,10 +2829,10 @@ interface operations {
2616
2829
  };
2617
2830
  content: {
2618
2831
  "application/json": {
2619
- message?: string;
2620
- success?: boolean;
2621
- content?: {
2622
- device?: components["schemas"]["PosDevice"];
2832
+ message: string;
2833
+ success: boolean;
2834
+ content: {
2835
+ device: components["schemas"]["PosDevice"];
2623
2836
  };
2624
2837
  };
2625
2838
  };
@@ -2635,7 +2848,7 @@ interface operations {
2635
2848
  path?: never;
2636
2849
  cookie?: never;
2637
2850
  };
2638
- requestBody?: {
2851
+ requestBody: {
2639
2852
  content: {
2640
2853
  "application/json": {
2641
2854
  refresh_token: string;
@@ -2650,11 +2863,11 @@ interface operations {
2650
2863
  };
2651
2864
  content: {
2652
2865
  "application/json": {
2653
- message?: string;
2654
- success?: boolean;
2655
- content?: {
2656
- access_token?: string;
2657
- refresh_token?: string;
2866
+ message: string;
2867
+ success: boolean;
2868
+ content: {
2869
+ access_token: string;
2870
+ refresh_token: string;
2658
2871
  };
2659
2872
  };
2660
2873
  };
@@ -2669,7 +2882,7 @@ interface operations {
2669
2882
  path?: never;
2670
2883
  cookie?: never;
2671
2884
  };
2672
- requestBody?: {
2885
+ requestBody: {
2673
2886
  content: {
2674
2887
  "application/json": {
2675
2888
  /** @description A string representing the one-time password. */
@@ -2763,10 +2976,10 @@ interface operations {
2763
2976
  };
2764
2977
  content: {
2765
2978
  "application/json": {
2766
- message?: string;
2767
- success?: boolean;
2768
- content?: {
2769
- coupons?: components["schemas"]["Coupon"][];
2979
+ message: string;
2980
+ success: boolean;
2981
+ content: {
2982
+ coupons: components["schemas"]["Coupon"][];
2770
2983
  };
2771
2984
  };
2772
2985
  };
@@ -2795,10 +3008,10 @@ interface operations {
2795
3008
  };
2796
3009
  content: {
2797
3010
  "application/json": {
2798
- message?: string;
2799
- success?: boolean;
2800
- content?: {
2801
- promotions?: components["schemas"]["Promotion"][];
3011
+ message: string;
3012
+ success: boolean;
3013
+ content: {
3014
+ promotions: components["schemas"]["Promotion"][];
2802
3015
  };
2803
3016
  };
2804
3017
  };
@@ -3086,11 +3299,11 @@ interface operations {
3086
3299
  };
3087
3300
  content: {
3088
3301
  "application/json": {
3089
- message?: string;
3090
- success?: boolean;
3091
- content?: {
3092
- applicable_coupons?: components["schemas"]["ApplicableCoupon"][];
3093
- inapplicable_coupons?: components["schemas"]["InapplicableCoupon"][];
3302
+ message: string;
3303
+ success: boolean;
3304
+ content: {
3305
+ applicable_coupons: components["schemas"]["ApplicableCoupon"][];
3306
+ inapplicable_coupons: components["schemas"]["InapplicableCoupon"][];
3094
3307
  };
3095
3308
  };
3096
3309
  };
@@ -3117,11 +3330,11 @@ interface operations {
3117
3330
  };
3118
3331
  content: {
3119
3332
  "application/json": {
3120
- message?: string;
3121
- success?: boolean;
3122
- content?: {
3123
- applicable_promotions?: components["schemas"]["ApplicablePromotion"][];
3124
- inapplicable_promotions?: components["schemas"]["InapplicablePromotion"][];
3333
+ message: string;
3334
+ success: boolean;
3335
+ content: {
3336
+ applicable_promotions: components["schemas"]["ApplicablePromotion"][];
3337
+ inapplicable_promotions: components["schemas"]["InapplicablePromotion"][];
3125
3338
  };
3126
3339
  };
3127
3340
  };
@@ -3284,7 +3497,7 @@ interface operations {
3284
3497
  };
3285
3498
  cookie?: never;
3286
3499
  };
3287
- requestBody?: {
3500
+ requestBody: {
3288
3501
  content: {
3289
3502
  "application/json": components["schemas"]["PosUpdateCustomerWithId"] | components["schemas"]["PosUpdateCustomerWithPhone"] | components["schemas"]["PosUpdateCustomerWithEmail"];
3290
3503
  };
@@ -3297,10 +3510,10 @@ interface operations {
3297
3510
  };
3298
3511
  content: {
3299
3512
  "application/json": {
3300
- message?: string;
3301
- success?: boolean;
3302
- content?: {
3303
- cart?: components["schemas"]["Cart"];
3513
+ message: string;
3514
+ success: boolean;
3515
+ content: {
3516
+ cart: components["schemas"]["Cart"];
3304
3517
  };
3305
3518
  };
3306
3519
  };
@@ -3761,18 +3974,14 @@ interface operations {
3761
3974
  404: components["responses"]["NotFound"];
3762
3975
  };
3763
3976
  };
3764
- "get-pos-fulfillment-options": {
3977
+ "list-pos-devices": {
3765
3978
  parameters: {
3766
3979
  query?: never;
3767
3980
  header?: never;
3768
3981
  path?: never;
3769
3982
  cookie?: never;
3770
3983
  };
3771
- requestBody: {
3772
- content: {
3773
- "application/json": components["schemas"]["CartBasedServiceabilityCheck"];
3774
- };
3775
- };
3984
+ requestBody?: never;
3776
3985
  responses: {
3777
3986
  /** @description OK */
3778
3987
  200: {
@@ -3784,38 +3993,53 @@ interface operations {
3784
3993
  message: string;
3785
3994
  success: boolean;
3786
3995
  content: {
3787
- summary: {
3788
- collect_available: boolean;
3789
- deliver_available: boolean;
3790
- /** @enum {unknown} */
3791
- recommended_fulfillment_type: "collect-in-store" | "delivery";
3792
- recommended_store?: components["schemas"]["CollectInStore"];
3793
- };
3794
- collect?: components["schemas"]["CollectInStore"][];
3795
- deliver?: components["schemas"]["PincodeServiceability"];
3996
+ devices?: components["schemas"]["PosDevice"];
3796
3997
  };
3797
3998
  };
3798
3999
  };
3799
4000
  };
3800
- 400: components["responses"]["BadRequest"];
3801
4001
  401: components["responses"]["Unauthorized"];
3802
- 404: components["responses"]["NotFound"];
3803
4002
  };
3804
4003
  };
3805
- "create-pos-order": {
4004
+ "claim-pos-device": {
3806
4005
  parameters: {
3807
4006
  query?: never;
3808
4007
  header?: never;
3809
- path?: never;
4008
+ path: {
4009
+ /** @description device id */
4010
+ id: string;
4011
+ };
3810
4012
  cookie?: never;
3811
4013
  };
3812
- requestBody: {
3813
- content: {
3814
- "application/json": {
3815
- cart_id: string;
4014
+ requestBody?: never;
4015
+ responses: {
4016
+ /** @description OK */
4017
+ 200: {
4018
+ headers: {
4019
+ [name: string]: unknown;
4020
+ };
4021
+ content: {
4022
+ "application/json": {
4023
+ message: string;
4024
+ success: boolean;
4025
+ };
3816
4026
  };
3817
4027
  };
4028
+ 401: components["responses"]["Unauthorized"];
4029
+ 404: components["responses"]["NotFound"];
4030
+ };
4031
+ };
4032
+ "unclaim-pos-device": {
4033
+ parameters: {
4034
+ query?: never;
4035
+ header?: never;
4036
+ path: {
4037
+ /** @description device id */
4038
+ id: string;
4039
+ };
4040
+ cookie?: never;
3818
4041
  };
4042
+ requestBody?: never;
3819
4043
  responses: {
3820
4044
  /** @description OK */
3821
4045
  200: {
@@ -3826,19 +4050,185 @@ interface operations {
3826
4050
  "application/json": {
3827
4051
  message: string;
3828
4052
  success: boolean;
3829
- content: {
3830
- order: components["schemas"]["Order"];
3831
- /** @description true if to_be_paid > 0, otherwise false for zero value order. */
3832
- payment_required: boolean;
3833
- };
3834
4053
  };
3835
4054
  };
3836
4055
  };
3837
- 400: components["responses"]["BadRequest"];
3838
4056
  401: components["responses"]["Unauthorized"];
4057
+ 404: components["responses"]["NotFound"];
3839
4058
  };
3840
4059
  };
3841
- "order-created": {
4060
+ "get-pos-fulfillment-options": {
4061
+ parameters: {
4062
+ query?: never;
4063
+ header?: never;
4064
+ path?: never;
4065
+ cookie?: never;
4066
+ };
4067
+ requestBody: {
4068
+ content: {
4069
+ "application/json": components["schemas"]["CartBasedServiceabilityCheck"];
4070
+ };
4071
+ };
4072
+ responses: {
4073
+ /** @description OK */
4074
+ 200: {
4075
+ headers: {
4076
+ [name: string]: unknown;
4077
+ };
4078
+ content: {
4079
+ "application/json": {
4080
+ message: string;
4081
+ success: boolean;
4082
+ content: {
4083
+ summary: {
4084
+ collect_available: boolean;
4085
+ deliver_available: boolean;
4086
+ /** @enum {unknown} */
4087
+ recommended_fulfillment_type: "collect-in-store" | "delivery";
4088
+ recommended_store?: components["schemas"]["CollectInStore"];
4089
+ };
4090
+ collect?: components["schemas"]["CollectInStore"][];
4091
+ deliver?: components["schemas"]["PincodeServiceability"];
4092
+ };
4093
+ };
4094
+ };
4095
+ };
4096
+ 400: components["responses"]["BadRequest"];
4097
+ 401: components["responses"]["Unauthorized"];
4098
+ 404: components["responses"]["NotFound"];
4099
+ };
4100
+ };
4101
+ "list-pos-locations": {
4102
+ parameters: {
4103
+ query?: never;
4104
+ header?: never;
4105
+ path?: never;
4106
+ cookie?: never;
4107
+ };
4108
+ requestBody?: never;
4109
+ responses: {
4110
+ /** @description OK */
4111
+ 200: {
4112
+ headers: {
4113
+ [name: string]: unknown;
4114
+ };
4115
+ content: {
4116
+ "application/json": {
4117
+ message: string;
4118
+ success: boolean;
4119
+ content: {
4120
+ locations?: components["schemas"]["PosLocation"][];
4121
+ };
4122
+ };
4123
+ };
4124
+ };
4125
+ 401: components["responses"]["Unauthorized"];
4126
+ };
4127
+ };
4128
+ "create-pos-order": {
4129
+ parameters: {
4130
+ query?: never;
4131
+ header?: never;
4132
+ path?: never;
4133
+ cookie?: never;
4134
+ };
4135
+ requestBody: {
4136
+ content: {
4137
+ "application/json": {
4138
+ cart_id: string;
4139
+ /** @description Optional. if provided, this device will be used for the payment of this order. Otherwise, already claimed device will be used for the payment purpose. */
4140
+ device_id?: string;
4141
+ } & (components["schemas"]["PayWithCash"] | components["schemas"]["PayWithUpi"] | components["schemas"]["PayWithCard"] | components["schemas"]["PayWithPaymentGateway"]);
4142
+ };
4143
+ };
4144
+ responses: {
4145
+ /** @description OK */
4146
+ 200: {
4147
+ headers: {
4148
+ [name: string]: unknown;
4149
+ };
4150
+ content: {
4151
+ "application/json": {
4152
+ message: string;
4153
+ success: boolean;
4154
+ content: {
4155
+ order: components["schemas"]["Order"];
4156
+ /** @description true if to_be_paid > 0, otherwise false for zero value order. */
4157
+ payment_required: boolean;
4158
+ };
4159
+ };
4160
+ };
4161
+ };
4162
+ 400: components["responses"]["BadRequest"];
4163
+ 401: components["responses"]["Unauthorized"];
4164
+ };
4165
+ };
4166
+ "pos-get-payment-status": {
4167
+ parameters: {
4168
+ query?: never;
4169
+ header?: never;
4170
+ path: {
4171
+ /** @description order number */
4172
+ order_number: string;
4173
+ };
4174
+ cookie?: never;
4175
+ };
4176
+ requestBody?: never;
4177
+ responses: {
4178
+ /** @description OK */
4179
+ 200: {
4180
+ headers: {
4181
+ [name: string]: unknown;
4182
+ };
4183
+ content: {
4184
+ "application/json": {
4185
+ /** @default order details */
4186
+ readonly message: string;
4187
+ readonly success: boolean;
4188
+ content: {
4189
+ /** @enum {string} */
4190
+ status: "pending" | "success" | "failed" | "partially_paid";
4191
+ /** Format: double */
4192
+ amount_paid: number;
4193
+ /** Format: double */
4194
+ amount_unpaid: number;
4195
+ is_retry_available: boolean;
4196
+ };
4197
+ };
4198
+ };
4199
+ };
4200
+ 401: components["responses"]["Unauthorized"];
4201
+ 404: components["responses"]["NotFound"];
4202
+ };
4203
+ };
4204
+ "pos-list-payment-options": {
4205
+ parameters: {
4206
+ query?: never;
4207
+ header?: never;
4208
+ path?: never;
4209
+ cookie?: never;
4210
+ };
4211
+ requestBody?: never;
4212
+ responses: {
4213
+ /** @description OK */
4214
+ 200: {
4215
+ headers: {
4216
+ [name: string]: unknown;
4217
+ };
4218
+ content: {
4219
+ "application/json": {
4220
+ message?: string;
4221
+ success?: boolean;
4222
+ content?: {
4223
+ payment_options?: ("CASH" | "UPI" | "CARD" | "PG")[];
4224
+ };
4225
+ };
4226
+ };
4227
+ };
4228
+ 401: components["responses"]["Unauthorized"];
4229
+ };
4230
+ };
4231
+ "order-created": {
3842
4232
  parameters: {
3843
4233
  query?: never;
3844
4234
  header?: never;
@@ -4058,64 +4448,1818 @@ interface operations {
4058
4448
  "5XX": components["responses"]["WebhookServerError"];
4059
4449
  };
4060
4450
  };
4061
- "payment-refund-created": {
4451
+ "payment-refund-created": {
4452
+ parameters: {
4453
+ query?: never;
4454
+ header?: never;
4455
+ path?: never;
4456
+ cookie?: never;
4457
+ };
4458
+ requestBody: {
4459
+ content: {
4460
+ "application/json": components["schemas"]["OrderRefund"];
4461
+ };
4462
+ };
4463
+ responses: {
4464
+ 400: components["responses"]["BadRequest"];
4465
+ 401: components["responses"]["Unauthorized"];
4466
+ 410: components["responses"]["WebhookGone"];
4467
+ "2XX": components["responses"]["WebhookAccepted"];
4468
+ "5XX": components["responses"]["WebhookServerError"];
4469
+ };
4470
+ };
4471
+ "payment-refund-success": {
4472
+ parameters: {
4473
+ query?: never;
4474
+ header?: never;
4475
+ path?: never;
4476
+ cookie?: never;
4477
+ };
4478
+ requestBody: {
4479
+ content: {
4480
+ "application/json": components["schemas"]["OrderRefund"];
4481
+ };
4482
+ };
4483
+ responses: {
4484
+ 400: components["responses"]["BadRequest"];
4485
+ 401: components["responses"]["Unauthorized"];
4486
+ 410: components["responses"]["WebhookGone"];
4487
+ "2XX": components["responses"]["WebhookAccepted"];
4488
+ "5XX": components["responses"]["WebhookServerError"];
4489
+ };
4490
+ };
4491
+ "payment-refund-failed": {
4492
+ parameters: {
4493
+ query?: never;
4494
+ header?: never;
4495
+ path?: never;
4496
+ cookie?: never;
4497
+ };
4498
+ requestBody: {
4499
+ content: {
4500
+ "application/json": components["schemas"]["OrderRefund"];
4501
+ };
4502
+ };
4503
+ responses: {
4504
+ 400: components["responses"]["BadRequest"];
4505
+ 401: components["responses"]["Unauthorized"];
4506
+ 410: components["responses"]["WebhookGone"];
4507
+ "2XX": components["responses"]["WebhookAccepted"];
4508
+ "5XX": components["responses"]["WebhookServerError"];
4509
+ };
4510
+ };
4511
+ }
4512
+ //#endregion
4513
+ //#region src/types/admin-pos.d.ts
4514
+ /**
4515
+ * This file was auto-generated by openapi-typescript.
4516
+ * Do not make direct changes to the file.
4517
+ */
4518
+
4519
+ interface paths$1 {
4520
+ "/pos/catalog/inventories": {
4521
+ parameters: {
4522
+ query?: never;
4523
+ header?: never;
4524
+ path?: never;
4525
+ cookie?: never;
4526
+ };
4527
+ /**
4528
+ * List all inventories
4529
+ * @description List all inventories
4530
+ */
4531
+ get: operations$1["pos-list-inventory"];
4532
+ put?: never;
4533
+ post?: never;
4534
+ delete?: never;
4535
+ options?: never;
4536
+ head?: never;
4537
+ patch?: never;
4538
+ trace?: never;
4539
+ };
4540
+ "/pos/catalog/inventories/activites": {
4541
+ parameters: {
4542
+ query?: never;
4543
+ header?: never;
4544
+ path?: never;
4545
+ cookie?: never;
4546
+ };
4547
+ /**
4548
+ * List all inventories activities
4549
+ * @description Lists all inventory related activities of stock movements. This provides a comprehensive audit trail of inventory operations such as receiving, reservations, adjustments, transfers, and sales.
4550
+ */
4551
+ get: operations$1["pos-list-inventory-activity"];
4552
+ put?: never;
4553
+ post?: never;
4554
+ delete?: never;
4555
+ options?: never;
4556
+ head?: never;
4557
+ patch?: never;
4558
+ trace?: never;
4559
+ };
4560
+ "/pos/catalog/inventories/detail": {
4561
+ parameters: {
4562
+ query?: never;
4563
+ header?: never;
4564
+ path?: never;
4565
+ cookie?: never;
4566
+ };
4567
+ /**
4568
+ * Retrieve inventory detail
4569
+ * @description Retrieves inventory details for a specific product, product variant, or lot/batch based on the parameters provided.
4570
+ */
4571
+ get: operations$1["pos-list-inventory-detail"];
4572
+ put?: never;
4573
+ post?: never;
4574
+ delete?: never;
4575
+ options?: never;
4576
+ head?: never;
4577
+ patch?: never;
4578
+ trace?: never;
4579
+ };
4580
+ "/pos/customers": {
4581
+ parameters: {
4582
+ query?: never;
4583
+ header?: never;
4584
+ path?: never;
4585
+ cookie?: never;
4586
+ };
4587
+ /**
4588
+ * List all customers
4589
+ * @description List all customers
4590
+ */
4591
+ get: operations$1["pos-list-customers"];
4592
+ put?: never;
4593
+ post?: never;
4594
+ delete?: never;
4595
+ options?: never;
4596
+ head?: never;
4597
+ patch?: never;
4598
+ trace?: never;
4599
+ };
4600
+ "/pos/customers/{id}": {
4601
+ parameters: {
4602
+ query?: never;
4603
+ header?: never;
4604
+ path?: never;
4605
+ cookie?: never;
4606
+ };
4607
+ /**
4608
+ * Retrieve customer detail
4609
+ * @description Retrieve customer detail
4610
+ */
4611
+ get: operations$1["pos-get-customer-detail"];
4612
+ put?: never;
4613
+ post?: never;
4614
+ delete?: never;
4615
+ options?: never;
4616
+ head?: never;
4617
+ patch?: never;
4618
+ trace?: never;
4619
+ };
4620
+ "/pos/orders": {
4621
+ parameters: {
4622
+ query?: never;
4623
+ header?: never;
4624
+ path?: never;
4625
+ cookie?: never;
4626
+ };
4627
+ /**
4628
+ * List all orders
4629
+ * @description List all orders
4630
+ */
4631
+ get: operations$1["pos-list-orders"];
4632
+ put?: never;
4633
+ post?: never;
4634
+ delete?: never;
4635
+ options?: never;
4636
+ head?: never;
4637
+ patch?: never;
4638
+ trace?: never;
4639
+ };
4640
+ "/pos/orders/{order_number}": {
4641
+ parameters: {
4642
+ query?: never;
4643
+ header?: never;
4644
+ path?: never;
4645
+ cookie?: never;
4646
+ };
4647
+ /**
4648
+ * Retrieve order details
4649
+ * @description Retrieve order details
4650
+ */
4651
+ get: operations$1["pos-get-order-detail"];
4652
+ put?: never;
4653
+ post?: never;
4654
+ delete?: never;
4655
+ options?: never;
4656
+ head?: never;
4657
+ patch?: never;
4658
+ trace?: never;
4659
+ };
4660
+ "/pos/orders/{order_number}/activity": {
4661
+ parameters: {
4662
+ query?: never;
4663
+ header?: never;
4664
+ path?: never;
4665
+ cookie?: never;
4666
+ };
4667
+ /**
4668
+ * List all order activity
4669
+ * @description List all order activity
4670
+ */
4671
+ get: operations$1["pos-list-order-activity"];
4672
+ put?: never;
4673
+ post?: never;
4674
+ delete?: never;
4675
+ options?: never;
4676
+ head?: never;
4677
+ patch?: never;
4678
+ trace?: never;
4679
+ };
4680
+ "/pos/orders/{order_number}/invoice": {
4681
+ parameters: {
4682
+ query?: never;
4683
+ header?: never;
4684
+ path?: never;
4685
+ cookie?: never;
4686
+ };
4687
+ /**
4688
+ * Retrieve order invoice
4689
+ * @description Retrieve order invoice
4690
+ */
4691
+ get: operations$1["pos-get-order-invoice"];
4692
+ put?: never;
4693
+ post?: never;
4694
+ delete?: never;
4695
+ options?: never;
4696
+ head?: never;
4697
+ patch?: never;
4698
+ trace?: never;
4699
+ };
4700
+ "/pos/orders/{order_number}/receipt": {
4701
+ parameters: {
4702
+ query?: never;
4703
+ header?: never;
4704
+ path?: never;
4705
+ cookie?: never;
4706
+ };
4707
+ /**
4708
+ * Retrieve order receipt
4709
+ * @description Retrieves a printable receipt for a specific order using the order number. This endpoint returns either structured JSON data or a formatted PDF, suitable for customer presentation. Response format (JSON or PDF) is determined by an optional query parameter (e.g. format=pdf or format=json).
4710
+ */
4711
+ get: operations$1["pos-get-order-receipt"];
4712
+ put?: never;
4713
+ post?: never;
4714
+ delete?: never;
4715
+ options?: never;
4716
+ head?: never;
4717
+ patch?: never;
4718
+ trace?: never;
4719
+ };
4720
+ "/pos/orders/{order_number}/shipments": {
4721
+ parameters: {
4722
+ query?: never;
4723
+ header?: never;
4724
+ path?: never;
4725
+ cookie?: never;
4726
+ };
4727
+ /**
4728
+ * Retrieve order shipments
4729
+ * @description Retrieve order shipments
4730
+ */
4731
+ get: operations$1["pos-list-order-shipments"];
4732
+ put?: never;
4733
+ post?: never;
4734
+ delete?: never;
4735
+ options?: never;
4736
+ head?: never;
4737
+ patch?: never;
4738
+ trace?: never;
4739
+ };
4740
+ "/pos/shipping/shipments": {
4741
+ parameters: {
4742
+ query?: never;
4743
+ header?: never;
4744
+ path?: never;
4745
+ cookie?: never;
4746
+ };
4747
+ /**
4748
+ * List all shipments
4749
+ * @description List all shipments
4750
+ */
4751
+ get: operations$1["pos-list-shipments"];
4752
+ put?: never;
4753
+ post?: never;
4754
+ delete?: never;
4755
+ options?: never;
4756
+ head?: never;
4757
+ patch?: never;
4758
+ trace?: never;
4759
+ };
4760
+ "/pos/shipping/shipments/{order_number}/check-inventory": {
4761
+ parameters: {
4762
+ query?: never;
4763
+ header?: never;
4764
+ path?: never;
4765
+ cookie?: never;
4766
+ };
4767
+ /**
4768
+ * Check Inventory
4769
+ * @description Check Inventory
4770
+ */
4771
+ get: operations$1["pos-check-order-inventory"];
4772
+ put?: never;
4773
+ post?: never;
4774
+ delete?: never;
4775
+ options?: never;
4776
+ head?: never;
4777
+ patch?: never;
4778
+ trace?: never;
4779
+ };
4780
+ "/pos/shipping/shipments/{order_number}/refund-shortfall": {
4781
+ parameters: {
4782
+ query?: never;
4783
+ header?: never;
4784
+ path?: never;
4785
+ cookie?: never;
4786
+ };
4787
+ get?: never;
4788
+ put?: never;
4789
+ /**
4790
+ * Refund shortfall
4791
+ * @description Refund shortfall
4792
+ */
4793
+ post: operations$1["pos-refund-shortfall"];
4794
+ delete?: never;
4795
+ options?: never;
4796
+ head?: never;
4797
+ patch?: never;
4798
+ trace?: never;
4799
+ };
4800
+ "/pos/shipping/shipments/{reference_number}": {
4801
+ parameters: {
4802
+ query?: never;
4803
+ header?: never;
4804
+ path?: never;
4805
+ cookie?: never;
4806
+ };
4807
+ /**
4808
+ * Retrieve shipment detail
4809
+ * @description Retrieve shipment detail
4810
+ */
4811
+ get: operations$1["pos-get-shipment-detail"];
4812
+ put?: never;
4813
+ post?: never;
4814
+ delete?: never;
4815
+ options?: never;
4816
+ head?: never;
4817
+ patch?: never;
4818
+ trace?: never;
4819
+ };
4820
+ "/pos/shipping/shipments/{reference_number}/invoice": {
4821
+ parameters: {
4822
+ query?: never;
4823
+ header?: never;
4824
+ path?: never;
4825
+ cookie?: never;
4826
+ };
4827
+ /**
4828
+ * Retrieve shipment invoice
4829
+ * @description Retrieve shipment invoice
4830
+ */
4831
+ get: operations$1["pos-get-shipment-invoice"];
4832
+ put?: never;
4833
+ post?: never;
4834
+ delete?: never;
4835
+ options?: never;
4836
+ head?: never;
4837
+ patch?: never;
4838
+ trace?: never;
4839
+ };
4840
+ "/pos/shipping/shipments/{reference_number}/manual-update": {
4841
+ parameters: {
4842
+ query?: never;
4843
+ header?: never;
4844
+ path?: never;
4845
+ cookie?: never;
4846
+ };
4847
+ get?: never;
4848
+ /**
4849
+ * Update shipment detail
4850
+ * @description Update shipment detail
4851
+ */
4852
+ put: operations$1["pos-update-shipment"];
4853
+ post?: never;
4854
+ delete?: never;
4855
+ options?: never;
4856
+ head?: never;
4857
+ patch?: never;
4858
+ trace?: never;
4859
+ };
4860
+ }
4861
+ interface components$1 {
4862
+ schemas: {
4863
+ /**
4864
+ * BankTransfer
4865
+ * @description Bank transfer payment - IMPS, NEFT, RTGS
4866
+ */
4867
+ BankTransfer: components$1["schemas"]["OrderPaymentInfo"] & {
4868
+ /** @description masked account number
4869
+ * e.g. ************1234 */
4870
+ bank_account_number?: string;
4871
+ bank_name?: string;
4872
+ };
4873
+ /** BusinessInfo */
4874
+ BusinessInfo: {
4875
+ name?: string;
4876
+ business_type?: string;
4877
+ pan_number?: string;
4878
+ gstin?: string;
4879
+ is_registered_under_gst?: boolean;
4880
+ };
4881
+ /**
4882
+ * CardPayment
4883
+ * @description Payments using credit card, debit card
4884
+ */
4885
+ CardPayment: components$1["schemas"]["OrderPaymentInfo"] & {
4886
+ /** @description masked card number
4887
+ * e.g. ************1111 */
4888
+ card_number?: string;
4889
+ /** @enum {unknown} */
4890
+ card_type?: "Visa" | "Master Card" | "Rupay";
4891
+ };
4892
+ /** Customer */
4893
+ Customer: components$1["schemas"]["CustomerInfo"] & {
4894
+ business?: components$1["schemas"]["BusinessInfo"];
4895
+ segments?: components$1["schemas"]["CustomerSegment"][];
4896
+ };
4897
+ /** CustomerAddress */
4898
+ CustomerAddress: {
4899
+ readonly id?: string;
4900
+ first_name: string;
4901
+ last_name?: string;
4902
+ /** @description Two-letter code begin with a plus sign prefix that identifies different countries. By default it will be +91 if not provided.
4903
+ * */
4904
+ country_code?: string;
4905
+ /** @description 10 digit phone number without country code. */
4906
+ phone: string;
4907
+ email: string;
4908
+ address_line1: string;
4909
+ address_line2?: string | null;
4910
+ landmark?: string | null;
4911
+ pincode: string;
4912
+ city: string;
4913
+ state: string;
4914
+ /** @enum {unknown} */
4915
+ country: "India";
4916
+ /** @description Use in shipping details only for third party. */
4917
+ gstin?: string | null;
4918
+ /** @description Use in shipping details only for third party. */
4919
+ business_name?: string | null;
4920
+ readonly is_phone_verified?: boolean;
4921
+ readonly is_email_verified?: boolean;
4922
+ };
4923
+ /** CustomerDetail */
4924
+ CustomerDetail: components$1["schemas"]["Customer"] & {
4925
+ loyalty?: components$1["schemas"]["CustomerLoyalty"];
4926
+ notification_preferences?: components$1["schemas"]["NotificationPreferences"];
4927
+ };
4928
+ /** CustomerInfo */
4929
+ CustomerInfo: {
4930
+ /** @description user id */
4931
+ readonly id?: string;
4932
+ first_name?: string;
4933
+ last_name?: string;
4934
+ readonly full_name?: string;
4935
+ readonly profile_image_url?: string;
4936
+ country_code?: string;
4937
+ phone?: string;
4938
+ email?: string;
4939
+ readonly is_phone_verified?: boolean;
4940
+ readonly is_email_verified?: boolean;
4941
+ readonly is_whatsapp_verified?: boolean;
4942
+ /** @enum {unknown} */
4943
+ status?: "active" | "inactive" | "suspended" | "blocked";
4944
+ /** Format: date-time */
4945
+ readonly created_at?: string;
4946
+ /** Format: date-time */
4947
+ readonly modified_at?: string;
4948
+ /** Format: date-time */
4949
+ readonly last_seen?: string;
4950
+ readonly kyc_status?: boolean;
4951
+ readonly is_verified?: boolean;
4952
+ tags?: string[];
4953
+ };
4954
+ /** CustomerLoyalty */
4955
+ CustomerLoyalty: {
4956
+ membership_number?: string;
4957
+ /** @description total points earned within the current loyalty program. */
4958
+ points_earned?: number;
4959
+ /** @description total points redeemed within the current loyalty program. */
4960
+ points_redeemed?: number;
4961
+ /** @description total points available. */
4962
+ points_balance?: number;
4963
+ /** @description The total amount a customer has spent within the current loyalty program, excluding taxes, promotional discounts, and redeemed loyalty points. This value is used to determine tier eligibility and earning points calculation. */
4964
+ total_spent?: number;
4965
+ /** @description The total number of completed orders counted in the current loyalty program. */
4966
+ total_orders?: number;
4967
+ /** @description The total amount a customer has spent across all time, regardless of loyalty program participation. This includes all completed orders and excludes taxes, promotional discounts, and redeemed points. */
4968
+ lifetime_spent?: number;
4969
+ /** @description The total number of completed orders across all time, regardless of loyalty program. */
4970
+ lifetime_orders?: number;
4971
+ /**
4972
+ * Format: date-time
4973
+ * @description The date and time when the customer first enrolled in the loyalty program.
4974
+ */
4975
+ date_of_join?: string;
4976
+ /**
4977
+ * Format: date-time
4978
+ * @description The date and time when the customer's current loyalty tier or program instance was assigned. This may change when tiers are upgraded, downgraded, or reassigned.
4979
+ */
4980
+ date_of_assign?: string | null;
4981
+ /**
4982
+ * Format: date-time
4983
+ * @description The date and time when the customer’s current loyalty program cycle will reset, at which points earned, points redeemed, balance points, total spent, total orders will be cleared.
4984
+ */
4985
+ date_of_reset?: string | null;
4986
+ current_tier?: {
4987
+ id?: string;
4988
+ name?: string;
4989
+ };
4990
+ next_tier?: {
4991
+ id?: string;
4992
+ name?: string;
4993
+ total_spent_threshold?: number | null;
4994
+ total_orders_threshold?: number | null;
4995
+ };
4996
+ };
4997
+ /** CustomerSegment */
4998
+ CustomerSegment: {
4999
+ id?: string;
5000
+ name?: string;
5001
+ };
5002
+ /** InventoryActivity */
5003
+ InventoryActivity: {
5004
+ product_id?: string;
5005
+ product_name?: string;
5006
+ variant_id?: string;
5007
+ variant_name?: string;
5008
+ sku?: string;
5009
+ warehouse_id?: string;
5010
+ warehouse?: components$1["schemas"]["WarehouseBasicDetail"];
5011
+ /** @enum {unknown} */
5012
+ activity_type?: "add" | "reserve" | "reduce" | "adjust" | "update";
5013
+ quantity?: number;
5014
+ reason?: string;
5015
+ lot_batch?: string;
5016
+ /** Format: date */
5017
+ mfg_date?: string;
5018
+ /** Format: date */
5019
+ exp_date?: string;
5020
+ manufacturer?: string;
5021
+ /** Format: date-time */
5022
+ created_at?: string;
5023
+ /** Format: date-time */
5024
+ modified_at?: string;
5025
+ };
5026
+ /** InventoryDetail */
5027
+ InventoryDetail: components$1["schemas"]["ItemWiseInventory"] & {
5028
+ details?: components$1["schemas"]["WarehouseWiseInventory"][];
5029
+ };
5030
+ /**
5031
+ * Invoice
5032
+ * @description Invoice model
5033
+ */
5034
+ Invoice: {
5035
+ invoice_number?: string;
5036
+ /** Format: date-time */
5037
+ invoice_date?: string;
5038
+ /** @description Invoice Reference Number */
5039
+ irn_number?: string;
5040
+ /** @description Acknowledgement Number */
5041
+ ack_number?: string;
5042
+ /**
5043
+ * Format: date-time
5044
+ * @description Acknowledgement Date
5045
+ */
5046
+ ack_date?: string;
5047
+ signed_qr_code?: string;
5048
+ gatepass_barcode?: string;
5049
+ seller_details?: components$1["schemas"]["Warehouse"];
5050
+ billing_address?: components$1["schemas"]["CustomerAddress"];
5051
+ shipping_address?: components$1["schemas"]["CustomerAddress"];
5052
+ subtotal?: number;
5053
+ shipping_amount?: number;
5054
+ coupon_code?: string;
5055
+ coupon_discount_percent?: number;
5056
+ coupon_discount_amount?: number;
5057
+ total_tax?: number;
5058
+ grand_total?: number;
5059
+ tax_summary?: {
5060
+ tax_rate?: number;
5061
+ taxable_value?: number;
5062
+ igst?: number;
5063
+ cgst?: number;
5064
+ sgst?: number;
5065
+ }[];
5066
+ /** Format: date-time */
5067
+ created_at?: string;
5068
+ /** Format: date-time */
5069
+ modified_at?: string;
5070
+ };
5071
+ /**
5072
+ * InvoiceDetail
5073
+ * @description InvoiceDetail model
5074
+ */
5075
+ InvoiceDetail: components$1["schemas"]["Invoice"] & {
5076
+ items?: components$1["schemas"]["InvoiceItem"][];
5077
+ };
5078
+ /**
5079
+ * InvoiceItem
5080
+ * @description InvoiceItem model
5081
+ */
5082
+ InvoiceItem: {
5083
+ sku?: string;
5084
+ product_name?: string;
5085
+ product_image_url?: string;
5086
+ listing_price?: number;
5087
+ selling_price?: number;
5088
+ qty?: number;
5089
+ free_qty?: number;
5090
+ tax_type?: string;
5091
+ tax_rate?: number;
5092
+ hsncode?: string;
5093
+ batch_number?: string;
5094
+ expiry?: string;
5095
+ amount?: number;
5096
+ };
5097
+ /** ItemWiseInventory */
5098
+ ItemWiseInventory: {
5099
+ product_id?: string;
5100
+ product_name?: string;
5101
+ variant_id?: string;
5102
+ variant_name?: string;
5103
+ sku?: string;
5104
+ track_quantity?: boolean;
5105
+ allow_backorder?: boolean;
5106
+ track_lot_bacth?: boolean;
5107
+ received_quantity?: number;
5108
+ reserved_quantity?: number;
5109
+ sold_quantity?: number;
5110
+ adjusted_quantity?: number;
5111
+ stock_quantity?: number;
5112
+ };
5113
+ /** LotBatchWiseInventory */
5114
+ LotBatchWiseInventory: components$1["schemas"]["ItemWiseInventory"] & {
5115
+ lot_batch?: string;
5116
+ /** Format: date */
5117
+ mfg_date?: string;
5118
+ /** Format: date */
5119
+ exp_date?: string;
5120
+ manufacturer?: string;
5121
+ };
5122
+ /**
5123
+ * LoyaltyPointPayment
5124
+ * @description Loyalty point redemption.
5125
+ */
5126
+ LoyaltyPointPayment: components$1["schemas"]["OrderPaymentInfo"];
5127
+ /**
5128
+ * NetbankingPayment
5129
+ * @description Payments using payment gateway netbanking option.
5130
+ */
5131
+ NetbankingPayment: components$1["schemas"]["OrderPaymentInfo"] & {
5132
+ bank_name?: string;
5133
+ };
5134
+ /**
5135
+ * NotificationChannelPreferences
5136
+ * @description Set specific channel preferences
5137
+ */
5138
+ NotificationChannelPreferences: {
5139
+ /**
5140
+ * @description Indicates whether the user has opted to receive notifications via email.
5141
+ * @default true
5142
+ */
5143
+ email: boolean;
5144
+ /**
5145
+ * @description Indicates whether the user has opted to receive notifications via SMS.
5146
+ * @default true
5147
+ */
5148
+ sms: boolean;
5149
+ /**
5150
+ * @description Indicates whether the user has opted to receive notifications via WhatsApp.
5151
+ * @default true
5152
+ */
5153
+ whatsapp: boolean;
5154
+ };
5155
+ /**
5156
+ * NotificationPreferences
5157
+ * @description Set channel preferences for each type of
5158
+ */
5159
+ NotificationPreferences: {
5160
+ /** @description These notifications are typically critical for user engagement, providing updates, confirmations, or alerts related to their account activities. */
5161
+ transactional?: components$1["schemas"]["NotificationChannelPreferences"];
5162
+ /** @description These notifications aim to engage users with promotional content and enhance their overall experience with the platform. */
5163
+ promotional?: components$1["schemas"]["NotificationChannelPreferences"];
5164
+ /** @description These notifications are often sent periodically as part of a subscription service.
5165
+ * */
5166
+ newsletter?: components$1["schemas"]["NotificationChannelPreferences"];
5167
+ };
5168
+ /** Order */
5169
+ Order: {
5170
+ order_number?: string;
5171
+ /** Format: date-time */
5172
+ order_date?: string;
5173
+ /** @enum {string} */
5174
+ status?: "draft" | "awaiting_approval" | "cancelled" | "shipped" | "delivered" | "awaiting_shipment";
5175
+ /** @enum {string} */
5176
+ payment_status?: "pending" | "success" | "failed" | "partially_paid" | "refunded";
5177
+ /** Format: date-time */
5178
+ payment_success_date?: string;
5179
+ customer_id?: string;
5180
+ customer_email?: string | null;
5181
+ customer_phone?: string | null;
5182
+ customer_note?: string | null;
5183
+ is_promotion_applied?: boolean;
5184
+ promotion_discount_amount?: number | null;
5185
+ is_coupon_applied?: boolean;
5186
+ coupon_code?: string | null;
5187
+ /** Format: double */
5188
+ coupon_discount_amount?: number | null;
5189
+ on_subscription?: boolean;
5190
+ /** Format: double */
5191
+ subtotal?: number;
5192
+ /** Format: double */
5193
+ item_total_tax?: number;
5194
+ /** Format: double */
5195
+ subtotal_including_tax?: number;
5196
+ /** Format: double */
5197
+ shipping_amount?: number;
5198
+ /** Format: double */
5199
+ shipping_total_tax?: number;
5200
+ /** Format: double */
5201
+ shipping_amount_including_tax?: number;
5202
+ /** Format: double */
5203
+ total_tax?: number;
5204
+ /** Format: double */
5205
+ grand_total?: number;
5206
+ loyalty_point_redeemed?: number;
5207
+ credit_balance_used?: number;
5208
+ /** Format: double */
5209
+ to_be_paid?: number;
5210
+ loyalty_point_earned?: number;
5211
+ order_items_count?: number;
5212
+ currency?: {
5213
+ name?: string;
5214
+ code?: string;
5215
+ symbol?: string;
5216
+ };
5217
+ /** Format: date-time */
5218
+ created_at?: string;
5219
+ /** Format: date-time */
5220
+ modified_at?: string;
5221
+ };
5222
+ /** OrderActivity */
5223
+ OrderActivity: {
5224
+ readonly activity_type?: string;
5225
+ readonly order_status?: string;
5226
+ comment: string;
5227
+ /** @enum {unknown} */
5228
+ readonly user_type?: "customer" | "admin" | "system";
5229
+ readonly user_name?: string;
5230
+ /** Format: date-time */
5231
+ readonly created_at?: string;
5232
+ /** Format: date-time */
5233
+ readonly modified_at?: string;
5234
+ };
5235
+ /** OrderDetail */
5236
+ OrderDetail: {
5237
+ order_number?: string;
5238
+ /** Format: date-time */
5239
+ order_date?: string;
5240
+ /** @enum {string} */
5241
+ status?: "draft" | "awaiting_approval" | "cancelled" | "shipped" | "delivered" | "awaiting_shipment";
5242
+ /** @enum {string} */
5243
+ payment_status?: "pending" | "success" | "failed" | "partially_paid" | "refunded";
5244
+ /** Format: date-time */
5245
+ payment_success_date?: string;
5246
+ customer_id?: string;
5247
+ customer_email?: string | null;
5248
+ customer_phone?: string | null;
5249
+ customer_note?: string | null;
5250
+ is_promotion_applied?: boolean;
5251
+ promotion_discount_amount?: number | null;
5252
+ is_coupon_applied?: boolean;
5253
+ coupon_code?: string | null;
5254
+ /** Format: double */
5255
+ coupon_discount_amount?: number | null;
5256
+ on_subscription?: boolean;
5257
+ /** Format: double */
5258
+ subtotal?: number;
5259
+ /** Format: double */
5260
+ item_total_tax?: number;
5261
+ /** Format: double */
5262
+ subtotal_including_tax?: number;
5263
+ /** Format: double */
5264
+ shipping_amount?: number;
5265
+ /** Format: double */
5266
+ shipping_total_tax?: number;
5267
+ /** Format: double */
5268
+ shipping_amount_including_tax?: number;
5269
+ /** Format: double */
5270
+ total_tax?: number;
5271
+ /** Format: double */
5272
+ grand_total?: number;
5273
+ loyalty_point_redeemed?: number;
5274
+ credit_balance_used?: number;
5275
+ /** Format: double */
5276
+ to_be_paid?: number;
5277
+ loyalty_point_earned?: number;
5278
+ order_items_count?: number;
5279
+ order_items?: components$1["schemas"]["OrderItem"][];
5280
+ billing_address?: components$1["schemas"]["CustomerAddress"];
5281
+ shipping_address?: components$1["schemas"]["CustomerAddress"];
5282
+ currency?: {
5283
+ name?: string;
5284
+ code?: string;
5285
+ symbol?: string;
5286
+ };
5287
+ payments?: components$1["schemas"]["OrderPayment"][];
5288
+ shipments?: components$1["schemas"]["OrderShipment"][];
5289
+ /** Format: date-time */
5290
+ created_at?: string;
5291
+ /** Format: date-time */
5292
+ modified_at?: string;
5293
+ };
5294
+ /** OrderItem */
5295
+ OrderItem: {
5296
+ readonly product_id?: string;
5297
+ readonly product_name?: string;
5298
+ readonly product_image_url?: string | null;
5299
+ sku: string;
5300
+ readonly on_offer?: boolean;
5301
+ readonly on_promotion?: boolean;
5302
+ on_subscription?: boolean;
5303
+ subscription_plan?: string | null;
5304
+ readonly subscription_interval?: number | null;
5305
+ readonly subscription_frequency?: string | null;
5306
+ quantity: number;
5307
+ readonly free_quantity?: number;
5308
+ readonly is_free_item?: boolean;
5309
+ /** Format: double */
5310
+ readonly selling_price?: number;
5311
+ /** Format: double */
5312
+ readonly listing_price?: number;
5313
+ /** Format: double */
5314
+ readonly promotion_discount_amount?: number;
5315
+ /** Format: double */
5316
+ readonly coupon_discount_amount?: number;
5317
+ /** @enum {unknown} */
5318
+ readonly tax_type?: "GST";
5319
+ /** Format: float */
5320
+ readonly tax_rate?: number;
5321
+ /** Format: double */
5322
+ readonly tax_amount?: number;
5323
+ /** Format: double */
5324
+ readonly shipping_additional_cost?: number;
5325
+ };
5326
+ /**
5327
+ * OrderList
5328
+ * @description order list model
5329
+ */
5330
+ OrderList: {
5331
+ /** @description Unique number associated with the order. */
5332
+ order_number?: string;
5333
+ /**
5334
+ * Format: date-time
5335
+ * @description Date and time when the order was placed.
5336
+ */
5337
+ order_date?: string;
5338
+ /**
5339
+ * @description Current status of the order (e.g., "pending," "processing," "shipped," etc.).
5340
+ * @enum {string}
5341
+ */
5342
+ status?: "draft" | "awaiting_approval" | "cancelled" | "shipped" | "delivered" | "awaiting_shipment" | "pending" | "payment_failed" | "schedule_requested";
5343
+ /**
5344
+ * @description Current payment status of the order (e.g., "pending," "success," "failed").
5345
+ * @enum {string}
5346
+ */
5347
+ payment_status?: "pending" | "success" | "failed" | "partially_paid" | "refunded";
5348
+ /** @description Date and time when the payment for the order was successfully processed. */
5349
+ payment_success_date?: string | null;
5350
+ /** @description Indicates whether the order has a refund associated with it or not. */
5351
+ has_refund?: boolean;
5352
+ /** @description Indicates whether the order includes subscription items. */
5353
+ on_subscription?: boolean;
5354
+ /**
5355
+ * Format: double
5356
+ * @description Total amount for the order, including all items, taxes, and discounts.
5357
+ */
5358
+ grand_total?: number;
5359
+ /** @description Number of loyalty points redeemed in the order. */
5360
+ loyalty_point_redeemed?: number;
5361
+ /** @description Amount of credit balance used in the order. */
5362
+ credit_balance_used?: number;
5363
+ /**
5364
+ * Format: double
5365
+ * @description Amount remaining to be paid for the order.
5366
+ */
5367
+ to_be_paid?: number;
5368
+ /** @description Total count of items included in the order. */
5369
+ order_items_count?: number;
5370
+ order_items?: components$1["schemas"]["OrderItem"][];
5371
+ customer_id?: string;
5372
+ customer_note?: string | null;
5373
+ billing_address?: components$1["schemas"]["CustomerAddress"];
5374
+ shipping_address?: components$1["schemas"]["CustomerAddress"];
5375
+ loyalty_point_earned?: number;
5376
+ currency?: {
5377
+ name?: string;
5378
+ code?: string;
5379
+ symbol?: string;
5380
+ };
5381
+ /** Format: date-time */
5382
+ created_at?: string;
5383
+ /** Format: date-time */
5384
+ modified_at?: string;
5385
+ };
5386
+ /**
5387
+ * OrderPayment
5388
+ * @description Order Payment
5389
+ */
5390
+ OrderPayment: components$1["schemas"]["CardPayment"] | components$1["schemas"]["NetbankingPayment"] | components$1["schemas"]["UpiPayment"] | components$1["schemas"]["WalletPayment"] | components$1["schemas"]["BankTransfer"] | components$1["schemas"]["LoyaltyPointPayment"];
5391
+ /**
5392
+ * OrderPaymentInfo
5393
+ * @description Common fields in all types of payments.
5394
+ */
5395
+ OrderPaymentInfo: {
5396
+ /** @enum {unknown} */
5397
+ transaction_type?: "payment" | "refund";
5398
+ request_number?: string;
5399
+ /** Format: double */
5400
+ amount?: number;
5401
+ /** @enum {unknown} */
5402
+ payment_status?: "pending" | "success" | "failed" | "partially_paid" | "refund_initiated";
5403
+ /** Format: date-time */
5404
+ payment_date?: string;
5405
+ payment_reference_number?: string | null;
5406
+ /** @enum {unknown} */
5407
+ payment_method?: "Credit Card" | "Debit Card" | "Netbanking" | "UPI" | "Wallet" | "Loyalty Point" | "IMPS" | "NEFT" | "RTGS";
5408
+ icon_url?: string;
5409
+ };
5410
+ /** OrderReceiptJsonFormat */
5411
+ OrderReceiptJsonFormat: components$1["schemas"]["Order"] & {
5412
+ billing_address?: components$1["schemas"]["CustomerAddress"];
5413
+ shipping_address?: components$1["schemas"]["CustomerAddress"];
5414
+ order_items?: components$1["schemas"]["OrderItem"][];
5415
+ payments?: components$1["schemas"]["OrderPayment"][];
5416
+ };
5417
+ /**
5418
+ * OrderShipment
5419
+ * @description Order shipment model
5420
+ */
5421
+ OrderShipment: {
5422
+ reference_number?: string;
5423
+ /** @enum {unknown} */
5424
+ status?: "pending" | "approved" | "shipped" | "delivered" | "cancelled";
5425
+ total_weight?: number;
5426
+ total_boxes?: number;
5427
+ shipment_items_count?: number;
5428
+ shipment_items?: components$1["schemas"]["ShipmentItem"][];
5429
+ /** Format: double */
5430
+ shipping_amount?: number;
5431
+ /** Format: double */
5432
+ shipping_tax_amount?: number;
5433
+ /** Format: double */
5434
+ shipping_amount_including_tax?: number;
5435
+ courier_company_id?: string;
5436
+ courier_company_name?: string;
5437
+ shipping_label_url?: string;
5438
+ awb_no?: string;
5439
+ eta_delivery?: string;
5440
+ /** Format: date-time */
5441
+ shipped_date?: string;
5442
+ /** Format: date-time */
5443
+ delivered_date?: string;
5444
+ cancellation_reason?: string;
5445
+ /** Format: date-time */
5446
+ created_at?: string;
5447
+ /** Format: date-time */
5448
+ modified_at?: string;
5449
+ };
5450
+ /** @description pagination metadata structure */
5451
+ Pagination: {
5452
+ total_records?: number;
5453
+ total_pages?: number;
5454
+ previous_page?: ((number | null) | null) | null;
5455
+ /** @default 25 */
5456
+ limit: number;
5457
+ next_page?: ((number | null) | null) | null;
5458
+ };
5459
+ /** Shipment */
5460
+ Shipment: components$1["schemas"]["ShipmentInfo"] & {
5461
+ shipment_items?: components$1["schemas"]["ShipmentItem"][];
5462
+ } & {
5463
+ packing?: components$1["schemas"]["ShipmentPackaging"];
5464
+ } & {
5465
+ progression?: components$1["schemas"]["ShipmentProgression"][];
5466
+ };
5467
+ /** ShipmentBox */
5468
+ ShipmentBox: {
5469
+ box_name?: string;
5470
+ box_length?: number;
5471
+ box_width?: number;
5472
+ box_height?: number;
5473
+ box_weight?: number;
5474
+ items_count?: number | null;
5475
+ box_count?: number | null;
5476
+ };
5477
+ /** ShipmentDetail */
5478
+ ShipmentDetail: {
5479
+ order_number?: string;
5480
+ /** Format: date-time */
5481
+ order_date?: string;
5482
+ order_status?: string;
5483
+ /** @enum {unknown} */
5484
+ payment_status?: "pending" | "success" | "failed";
5485
+ customer_name?: string;
5486
+ shipments?: components$1["schemas"]["Shipment"][];
5487
+ /** @description dynamic values as per current status of the shipment. */
5488
+ allowed_actions?: string[];
5489
+ };
5490
+ /** ShipmentInfo */
5491
+ ShipmentInfo: {
5492
+ order_number?: string;
5493
+ order_status?: string;
5494
+ shipment_number?: string;
5495
+ warehouse_id?: string;
5496
+ warehouse_name?: string;
5497
+ status?: string;
5498
+ total_weight?: number;
5499
+ total_boxes?: number;
5500
+ shipment_items_count?: number;
5501
+ /** Format: double */
5502
+ shipping_amount?: number;
5503
+ /** Format: double */
5504
+ shipping_tax_amount?: number;
5505
+ /** Format: double */
5506
+ shipping_amount_including_tax?: number;
5507
+ courier_company_id?: string | null;
5508
+ courier_company_name?: string | null;
5509
+ courier_company_image_url?: string | null;
5510
+ awb_no?: string | null;
5511
+ shipping_label_url?: string | null;
5512
+ eta_delivery?: string | null;
5513
+ shipped_date?: string | null;
5514
+ delivered_date?: string | null;
5515
+ slo?: {
5516
+ /** Format: date */
5517
+ expected_date?: string;
5518
+ /** Format: date */
5519
+ actual_date?: string;
5520
+ difference?: string;
5521
+ };
5522
+ cancellation_reason?: string | null;
5523
+ customer_id?: string;
5524
+ customer_name?: string;
5525
+ shipping_address_line1?: string;
5526
+ shipping_address_line2?: string;
5527
+ shipping_landmark?: string;
5528
+ shipping_pincode?: string;
5529
+ shipping_city?: string;
5530
+ shipping_state?: string;
5531
+ created_at?: string;
5532
+ modified_at?: string;
5533
+ };
5534
+ /**
5535
+ * ShipmentItem
5536
+ * @description Shipment item model
5537
+ */
5538
+ ShipmentItem: {
5539
+ product_id: string;
5540
+ readonly product_name?: string;
5541
+ variant_id: string | null;
5542
+ readonly variant_name?: string | null;
5543
+ readonly product_image_url?: string | null;
5544
+ readonly sku?: string;
5545
+ quantity: number;
5546
+ free_quantity?: number;
5547
+ readonly is_free_item?: boolean;
5548
+ };
5549
+ /** ShipmentList */
5550
+ ShipmentList: {
5551
+ order_number?: string;
5552
+ } & components$1["schemas"]["ShipmentInfo"];
5553
+ /** ShipmentPackaging */
5554
+ ShipmentPackaging: {
5555
+ /** @enum {unknown} */
5556
+ package_option?: "Automatic" | "Custom";
5557
+ boxes_count?: number;
5558
+ boxes?: components$1["schemas"]["ShipmentBox"][];
5559
+ };
5560
+ /** ShipmentProgression */
5561
+ ShipmentProgression: {
5562
+ readonly status?: string;
5563
+ readonly is_current?: boolean;
5564
+ readonly is_completed?: boolean;
5565
+ /** Format: date-time */
5566
+ readonly completion_date?: string;
5567
+ };
5568
+ /**
5569
+ * UpiPayment
5570
+ * @description UPI Payment
5571
+ */
5572
+ UpiPayment: components$1["schemas"]["OrderPaymentInfo"] & {
5573
+ upi_id?: string;
5574
+ };
5575
+ /** WalletPayment */
5576
+ WalletPayment: components$1["schemas"]["OrderPaymentInfo"] & {
5577
+ wallet_name?: string;
5578
+ };
5579
+ /**
5580
+ * Warehouse
5581
+ * @description Validations:
5582
+ *
5583
+ * 1) Either 'can_receive_stock' or 'accepts_returns' must be set to true.
5584
+ * 2) 'can_receive_stock' cannot be set to false while the warehouse has existing inventory.
5585
+ * 3) 'is_checkout_point' must be true when the warehouse type is 'retail-store'.
5586
+ * 4) If 'can_receive_stock' is false then 'can_ship_parcel' and 'can_collect' fields should be false.
5587
+ */
5588
+ Warehouse: {
5589
+ /** @description warehouse id */
5590
+ readonly id?: string;
5591
+ /** @description legal name */
5592
+ name: string;
5593
+ /** @enum {unknown} */
5594
+ warehouse_type: "retail-store" | "distribution-center";
5595
+ /** @default true */
5596
+ active: boolean;
5597
+ gstin?: string | null;
5598
+ city: string;
5599
+ address_line1: string;
5600
+ address_line2?: string | null;
5601
+ landmark?: string | null;
5602
+ pincode: string;
5603
+ state: string;
5604
+ country: string;
5605
+ /** @default +91 */
5606
+ country_code: string;
5607
+ /** @description 10 digit number without country code. */
5608
+ contact_phone: number;
5609
+ contact_email: string;
5610
+ is_default?: boolean;
5611
+ image_url?: string | null;
5612
+ seller_warehouse_id?: string | null;
5613
+ can_receive_stock: boolean;
5614
+ can_ship_parcel: boolean;
5615
+ can_collect: boolean;
5616
+ /** @description this field will be always true for warehouse_type = retail-store. */
5617
+ is_checkout_point: boolean;
5618
+ accepts_returns: boolean;
5619
+ opening_hours?: string | null;
5620
+ };
5621
+ /** WarehouseBasicDetail */
5622
+ WarehouseBasicDetail: {
5623
+ id?: string;
5624
+ name?: string;
5625
+ address_line1?: string;
5626
+ pincode?: string;
5627
+ city?: string;
5628
+ state?: string;
5629
+ is_default?: boolean;
5630
+ };
5631
+ /** WarehouseWiseInventory */
5632
+ WarehouseWiseInventory: {
5633
+ lot_bacth?: string;
5634
+ /** Format: date */
5635
+ mfg_date?: string;
5636
+ /** Format: date */
5637
+ exp_date?: string;
5638
+ manufacturer?: string;
5639
+ warehouse_id?: string;
5640
+ warehouse?: components$1["schemas"]["WarehouseBasicDetail"];
5641
+ received_quantity?: number;
5642
+ reserved_quantity?: number;
5643
+ sold_quantity?: number;
5644
+ adjusted_quantity?: number;
5645
+ stock_quantity?: number;
5646
+ };
5647
+ };
5648
+ responses: never;
5649
+ parameters: {
5650
+ /** @description JSON object */
5651
+ columnBasedFilters: string;
5652
+ /** @description no of rows per page */
5653
+ pageLimit: number;
5654
+ /** @description page number of pagination list */
5655
+ pageNumber: number;
5656
+ /** @description search keyword */
5657
+ searchKeyword: string;
5658
+ /** @description JSON string format: {"field1":"asc", "field2":"desc"} */
5659
+ sortByOptions: string;
5660
+ };
5661
+ requestBodies: never;
5662
+ headers: never;
5663
+ pathItems: never;
5664
+ }
5665
+ interface operations$1 {
5666
+ "pos-list-inventory": {
5667
+ parameters: {
5668
+ query?: {
5669
+ /** @description page number of pagination list */
5670
+ page?: components$1["parameters"]["pageNumber"];
5671
+ /** @description no of rows per page */
5672
+ limit?: components$1["parameters"]["pageLimit"];
5673
+ /** @description JSON string format: {"field1":"asc", "field2":"desc"} */
5674
+ sort_by?: components$1["parameters"]["sortByOptions"];
5675
+ /** @description JSON object */
5676
+ filters?: components$1["parameters"]["columnBasedFilters"];
5677
+ };
5678
+ header?: never;
5679
+ path?: never;
5680
+ cookie?: never;
5681
+ };
5682
+ requestBody?: never;
5683
+ responses: {
5684
+ /** @description OK */
5685
+ 200: {
5686
+ headers: {
5687
+ [name: string]: unknown;
5688
+ };
5689
+ content: {
5690
+ "application/json": {
5691
+ message?: string;
5692
+ success?: boolean;
5693
+ content?: {
5694
+ inventories?: (components$1["schemas"]["ItemWiseInventory"] | components$1["schemas"]["LotBatchWiseInventory"])[];
5695
+ };
5696
+ };
5697
+ };
5698
+ };
5699
+ };
5700
+ };
5701
+ "pos-list-inventory-activity": {
5702
+ parameters: {
5703
+ query?: {
5704
+ /** @description page number of pagination list */
5705
+ page?: components$1["parameters"]["pageNumber"];
5706
+ /** @description no of rows per page */
5707
+ limit?: components$1["parameters"]["pageLimit"];
5708
+ /** @description JSON string format: {"field1":"asc", "field2":"desc"} */
5709
+ sort_by?: components$1["parameters"]["sortByOptions"];
5710
+ /** @description JSON object */
5711
+ filters?: components$1["parameters"]["columnBasedFilters"];
5712
+ };
5713
+ header?: never;
5714
+ path?: never;
5715
+ cookie?: never;
5716
+ };
5717
+ requestBody?: never;
5718
+ responses: {
5719
+ /** @description OK */
5720
+ 200: {
5721
+ headers: {
5722
+ [name: string]: unknown;
5723
+ };
5724
+ content: {
5725
+ "application/json": {
5726
+ message?: string;
5727
+ success?: boolean;
5728
+ content?: {
5729
+ activities?: components$1["schemas"]["InventoryActivity"][];
5730
+ };
5731
+ };
5732
+ };
5733
+ };
5734
+ };
5735
+ };
5736
+ "pos-list-inventory-detail": {
5737
+ parameters: {
5738
+ query: {
5739
+ /** @description lot batch of selected productor or variant. */
5740
+ lot_batch?: string;
5741
+ /** @description Product Id */
5742
+ product_id: string;
5743
+ /** @description Variant Id */
5744
+ variant_id?: string;
5745
+ };
5746
+ header?: never;
5747
+ path?: never;
5748
+ cookie?: never;
5749
+ };
5750
+ requestBody?: never;
5751
+ responses: {
5752
+ /** @description OK */
5753
+ 200: {
5754
+ headers: {
5755
+ [name: string]: unknown;
5756
+ };
5757
+ content: {
5758
+ "application/json": {
5759
+ message?: string;
5760
+ success?: boolean;
5761
+ content?: {
5762
+ inventory?: components$1["schemas"]["InventoryDetail"];
5763
+ };
5764
+ };
5765
+ };
5766
+ };
5767
+ };
5768
+ };
5769
+ "pos-list-customers": {
5770
+ parameters: {
5771
+ query?: {
5772
+ /** @description page number of pagination list */
5773
+ page?: components$1["parameters"]["pageNumber"];
5774
+ /** @description no of rows per page */
5775
+ limit?: components$1["parameters"]["pageLimit"];
5776
+ /** @description JSON object */
5777
+ filters?: components$1["parameters"]["columnBasedFilters"];
5778
+ /** @description JSON string format: {"field1":"asc", "field2":"desc"} */
5779
+ sort_by?: components$1["parameters"]["sortByOptions"];
5780
+ /** @description search keyword */
5781
+ search?: components$1["parameters"]["searchKeyword"];
5782
+ };
5783
+ header?: never;
5784
+ path?: never;
5785
+ cookie?: never;
5786
+ };
5787
+ requestBody?: never;
5788
+ responses: {
5789
+ /** @description OK */
5790
+ 200: {
5791
+ headers: {
5792
+ [name: string]: unknown;
5793
+ };
5794
+ content: {
5795
+ "application/json": {
5796
+ message?: string;
5797
+ success?: boolean;
5798
+ content?: {
5799
+ customers?: components$1["schemas"]["Customer"][];
5800
+ pagination?: components$1["schemas"]["Pagination"];
5801
+ };
5802
+ };
5803
+ };
5804
+ };
5805
+ };
5806
+ };
5807
+ "pos-get-customer-detail": {
5808
+ parameters: {
5809
+ query?: never;
5810
+ header?: never;
5811
+ path: {
5812
+ /** @description Customer Id */
5813
+ id: string;
5814
+ };
5815
+ cookie?: never;
5816
+ };
5817
+ requestBody?: never;
5818
+ responses: {
5819
+ /** @description OK */
5820
+ 200: {
5821
+ headers: {
5822
+ [name: string]: unknown;
5823
+ };
5824
+ content: {
5825
+ "application/json": {
5826
+ message?: string;
5827
+ success?: boolean;
5828
+ content?: {
5829
+ customer?: components$1["schemas"]["CustomerDetail"];
5830
+ };
5831
+ };
5832
+ };
5833
+ };
5834
+ };
5835
+ };
5836
+ "pos-list-orders": {
5837
+ parameters: {
5838
+ query?: {
5839
+ /** @description page number of pagination list */
5840
+ page?: components$1["parameters"]["pageNumber"];
5841
+ /** @description no of rows per page */
5842
+ limit?: components$1["parameters"]["pageLimit"];
5843
+ /** @description JSON object */
5844
+ filters?: components$1["parameters"]["columnBasedFilters"];
5845
+ /** @description JSON string format: {"field1":"asc", "field2":"desc"} */
5846
+ sort_by?: components$1["parameters"]["sortByOptions"];
5847
+ /** @description search keyword */
5848
+ search?: components$1["parameters"]["searchKeyword"];
5849
+ };
5850
+ header?: never;
5851
+ path?: never;
5852
+ cookie?: never;
5853
+ };
5854
+ requestBody?: never;
5855
+ responses: {
5856
+ /** @description OK */
5857
+ 200: {
5858
+ headers: {
5859
+ [name: string]: unknown;
5860
+ };
5861
+ content: {
5862
+ "application/json": {
5863
+ message?: string;
5864
+ success?: boolean;
5865
+ content?: {
5866
+ orders?: components$1["schemas"]["OrderList"][];
5867
+ pagination?: components$1["schemas"]["Pagination"];
5868
+ };
5869
+ };
5870
+ };
5871
+ };
5872
+ };
5873
+ };
5874
+ "pos-get-order-detail": {
5875
+ parameters: {
5876
+ query?: never;
5877
+ header?: never;
5878
+ path: {
5879
+ /** @description order number */
5880
+ order_number: string;
5881
+ };
5882
+ cookie?: never;
5883
+ };
5884
+ requestBody?: never;
5885
+ responses: {
5886
+ /** @description OK */
5887
+ 200: {
5888
+ headers: {
5889
+ [name: string]: unknown;
5890
+ };
5891
+ content: {
5892
+ "application/json": {
5893
+ message?: string;
5894
+ success?: boolean;
5895
+ content?: {
5896
+ order?: components$1["schemas"]["OrderDetail"];
5897
+ };
5898
+ };
5899
+ };
5900
+ };
5901
+ };
5902
+ };
5903
+ "pos-list-order-activity": {
5904
+ parameters: {
5905
+ query?: never;
5906
+ header?: never;
5907
+ path: {
5908
+ /** @description order number */
5909
+ order_number: string;
5910
+ };
5911
+ cookie?: never;
5912
+ };
5913
+ requestBody?: never;
5914
+ responses: {
5915
+ /** @description OK */
5916
+ 200: {
5917
+ headers: {
5918
+ [name: string]: unknown;
5919
+ };
5920
+ content: {
5921
+ "application/json": {
5922
+ message?: string;
5923
+ success?: boolean;
5924
+ content?: {
5925
+ activity?: components$1["schemas"]["OrderActivity"][];
5926
+ pagination?: components$1["schemas"]["Pagination"];
5927
+ };
5928
+ };
5929
+ };
5930
+ };
5931
+ };
5932
+ };
5933
+ "pos-get-order-invoice": {
5934
+ parameters: {
5935
+ query?: {
5936
+ /** @description Response data format */
5937
+ format?: "json" | "pdf";
5938
+ };
5939
+ header?: never;
5940
+ path: {
5941
+ /** @description order number */
5942
+ order_number: string;
5943
+ };
5944
+ cookie?: never;
5945
+ };
5946
+ requestBody?: never;
5947
+ responses: {
5948
+ /** @description OK */
5949
+ 200: {
5950
+ headers: {
5951
+ [name: string]: unknown;
5952
+ };
5953
+ content: {
5954
+ "application/json": {
5955
+ message?: string;
5956
+ success?: boolean;
5957
+ content?: {
5958
+ invoices?: components$1["schemas"]["InvoiceDetail"][];
5959
+ };
5960
+ };
5961
+ "application/pdf": Record<string, never>;
5962
+ };
5963
+ };
5964
+ };
5965
+ };
5966
+ "pos-get-order-receipt": {
5967
+ parameters: {
5968
+ query?: {
5969
+ /** @description Response data format */
5970
+ format?: "json" | "pdf";
5971
+ };
5972
+ header?: never;
5973
+ path: {
5974
+ /** @description order number */
5975
+ order_number: string;
5976
+ };
5977
+ cookie?: never;
5978
+ };
5979
+ requestBody?: never;
5980
+ responses: {
5981
+ /** @description OK */
5982
+ 200: {
5983
+ headers: {
5984
+ [name: string]: unknown;
5985
+ };
5986
+ content: {
5987
+ "application/json": {
5988
+ message?: string;
5989
+ success?: boolean;
5990
+ content?: {
5991
+ order_receipt?: components$1["schemas"]["OrderReceiptJsonFormat"];
5992
+ };
5993
+ };
5994
+ "application/pdf": Record<string, never>;
5995
+ };
5996
+ };
5997
+ };
5998
+ };
5999
+ "pos-list-order-shipments": {
6000
+ parameters: {
6001
+ query?: never;
6002
+ header?: never;
6003
+ path: {
6004
+ /** @description order number */
6005
+ order_number: string;
6006
+ };
6007
+ cookie?: never;
6008
+ };
6009
+ requestBody?: never;
6010
+ responses: {
6011
+ /** @description OK */
6012
+ 200: {
6013
+ headers: {
6014
+ [name: string]: unknown;
6015
+ };
6016
+ content: {
6017
+ "application/json": {
6018
+ message?: string;
6019
+ success?: boolean;
6020
+ content?: {
6021
+ shipment?: components$1["schemas"]["ShipmentDetail"];
6022
+ };
6023
+ };
6024
+ };
6025
+ };
6026
+ };
6027
+ };
6028
+ "pos-list-shipments": {
6029
+ parameters: {
6030
+ query?: {
6031
+ /** @description page number of pagination list */
6032
+ page?: components$1["parameters"]["pageNumber"];
6033
+ /** @description no of rows per page */
6034
+ limit?: components$1["parameters"]["pageLimit"];
6035
+ /** @description JSON object */
6036
+ filters?: components$1["parameters"]["columnBasedFilters"];
6037
+ /** @description JSON string format: {"field1":"asc", "field2":"desc"} */
6038
+ sort_by?: components$1["parameters"]["sortByOptions"];
6039
+ /** @description search keyword */
6040
+ search?: components$1["parameters"]["searchKeyword"];
6041
+ };
6042
+ header?: never;
6043
+ path?: never;
6044
+ cookie?: never;
6045
+ };
6046
+ requestBody?: never;
6047
+ responses: {
6048
+ /** @description OK */
6049
+ 200: {
6050
+ headers: {
6051
+ [name: string]: unknown;
6052
+ };
6053
+ content: {
6054
+ "application/json": {
6055
+ message?: string;
6056
+ success?: boolean;
6057
+ content?: {
6058
+ shipments?: components$1["schemas"]["ShipmentList"][];
6059
+ pagination?: components$1["schemas"]["Pagination"];
6060
+ };
6061
+ };
6062
+ };
6063
+ };
6064
+ };
6065
+ };
6066
+ "pos-check-order-inventory": {
6067
+ parameters: {
6068
+ query?: never;
6069
+ header?: never;
6070
+ path: {
6071
+ /** @description Order number */
6072
+ order_number: string;
6073
+ };
6074
+ cookie?: never;
6075
+ };
6076
+ requestBody?: never;
6077
+ responses: {
6078
+ /** @description OK */
6079
+ 200: {
6080
+ headers: {
6081
+ [name: string]: unknown;
6082
+ };
6083
+ content: {
6084
+ "application/json": {
6085
+ message?: string;
6086
+ success?: boolean;
6087
+ content?: {
6088
+ /** @enum {unknown} */
6089
+ inventory_status?: "fulfilled" | "partially-fulfilled" | "not-fulfilled";
6090
+ shipment_items?: components$1["schemas"]["ShipmentItem"][];
6091
+ recommended_warehouses?: {
6092
+ id?: string;
6093
+ name?: string;
6094
+ /** @enum {unknown} */
6095
+ inventory_status?: "fulfilled" | "partially-fulfilled" | "not-fulfilled";
6096
+ }[];
6097
+ inventory_detail?: {
6098
+ sku?: string;
6099
+ total_quantity?: number;
6100
+ warehouses?: {
6101
+ warehouse_id?: string;
6102
+ warehouse_name?: string;
6103
+ quantity?: number;
6104
+ }[];
6105
+ }[];
6106
+ allowed_action?: string[];
6107
+ };
6108
+ };
6109
+ };
6110
+ };
6111
+ };
6112
+ };
6113
+ "pos-refund-shortfall": {
6114
+ parameters: {
6115
+ query?: never;
6116
+ header?: never;
6117
+ path: {
6118
+ /** @description Order Number */
6119
+ order_number: string;
6120
+ };
6121
+ cookie?: never;
6122
+ };
6123
+ requestBody?: {
6124
+ content: {
6125
+ "application/json": {
6126
+ items: {
6127
+ sku: string;
6128
+ quantity: number;
6129
+ /** @default 0 */
6130
+ free_quantity?: number;
6131
+ }[];
6132
+ /** @enum {unknown} */
6133
+ payment_method: "original-payment-mode" | "bank-transfer";
6134
+ /** @description required if payment_method = bank-transfer */
6135
+ bank_account_id?: string | null;
6136
+ };
6137
+ };
6138
+ };
6139
+ responses: {
6140
+ /** @description OK */
6141
+ 200: {
6142
+ headers: {
6143
+ [name: string]: unknown;
6144
+ };
6145
+ content: {
6146
+ "application/json": {
6147
+ message?: string;
6148
+ success?: boolean;
6149
+ };
6150
+ };
6151
+ };
6152
+ };
6153
+ };
6154
+ "pos-get-shipment-detail": {
4062
6155
  parameters: {
4063
6156
  query?: never;
4064
6157
  header?: never;
4065
- path?: never;
4066
- cookie?: never;
4067
- };
4068
- requestBody: {
4069
- content: {
4070
- "application/json": components["schemas"]["OrderRefund"];
6158
+ path: {
6159
+ /** @description Shipment reference number */
6160
+ reference_number: string;
4071
6161
  };
6162
+ cookie?: never;
4072
6163
  };
6164
+ requestBody?: never;
4073
6165
  responses: {
4074
- 400: components["responses"]["BadRequest"];
4075
- 401: components["responses"]["Unauthorized"];
4076
- 410: components["responses"]["WebhookGone"];
4077
- "2XX": components["responses"]["WebhookAccepted"];
4078
- "5XX": components["responses"]["WebhookServerError"];
6166
+ /** @description OK */
6167
+ 200: {
6168
+ headers: {
6169
+ [name: string]: unknown;
6170
+ };
6171
+ content: {
6172
+ "application/json": {
6173
+ message?: string;
6174
+ success?: boolean;
6175
+ content?: {
6176
+ shipment?: components$1["schemas"]["ShipmentDetail"];
6177
+ };
6178
+ };
6179
+ };
6180
+ };
4079
6181
  };
4080
6182
  };
4081
- "payment-refund-success": {
6183
+ "pos-get-shipment-invoice": {
4082
6184
  parameters: {
4083
- query?: never;
6185
+ query?: {
6186
+ /** @description Response data format */
6187
+ format?: "json" | "pdf";
6188
+ };
4084
6189
  header?: never;
4085
- path?: never;
4086
- cookie?: never;
4087
- };
4088
- requestBody: {
4089
- content: {
4090
- "application/json": components["schemas"]["OrderRefund"];
6190
+ path: {
6191
+ /** @description Shipment reference number */
6192
+ reference_number: string;
4091
6193
  };
6194
+ cookie?: never;
4092
6195
  };
6196
+ requestBody?: never;
4093
6197
  responses: {
4094
- 400: components["responses"]["BadRequest"];
4095
- 401: components["responses"]["Unauthorized"];
4096
- 410: components["responses"]["WebhookGone"];
4097
- "2XX": components["responses"]["WebhookAccepted"];
4098
- "5XX": components["responses"]["WebhookServerError"];
6198
+ /** @description OK */
6199
+ 200: {
6200
+ headers: {
6201
+ [name: string]: unknown;
6202
+ };
6203
+ content: {
6204
+ "application/json": {
6205
+ message?: string;
6206
+ success?: boolean;
6207
+ content?: {
6208
+ invoice?: components$1["schemas"]["InvoiceDetail"];
6209
+ };
6210
+ };
6211
+ "application/pdf": Record<string, never>;
6212
+ };
6213
+ };
4099
6214
  };
4100
6215
  };
4101
- "payment-refund-failed": {
6216
+ "pos-update-shipment": {
4102
6217
  parameters: {
4103
6218
  query?: never;
4104
6219
  header?: never;
4105
- path?: never;
6220
+ path: {
6221
+ /** @description Shipment reference number */
6222
+ reference_number: string;
6223
+ };
4106
6224
  cookie?: never;
4107
6225
  };
4108
- requestBody: {
6226
+ requestBody?: {
4109
6227
  content: {
4110
- "application/json": components["schemas"]["OrderRefund"];
6228
+ "application/json": {
6229
+ status?: string;
6230
+ warehouse_id?: string;
6231
+ awb_no?: string;
6232
+ courier_company_name?: string;
6233
+ shipping_label_url?: string;
6234
+ tracking_url?: string;
6235
+ manual_shipping_charges?: number;
6236
+ /** Format: date-time */
6237
+ eta_delivery?: string;
6238
+ /** Format: date-time */
6239
+ shipped_date?: string;
6240
+ /** Format: date-time */
6241
+ out_for_delivery_date?: string;
6242
+ /** Format: date-time */
6243
+ delivered_date?: string;
6244
+ };
4111
6245
  };
4112
6246
  };
4113
6247
  responses: {
4114
- 400: components["responses"]["BadRequest"];
4115
- 401: components["responses"]["Unauthorized"];
4116
- 410: components["responses"]["WebhookGone"];
4117
- "2XX": components["responses"]["WebhookAccepted"];
4118
- "5XX": components["responses"]["WebhookServerError"];
6248
+ /** @description OK */
6249
+ 200: {
6250
+ headers: {
6251
+ [name: string]: unknown;
6252
+ };
6253
+ content: {
6254
+ "application/json": {
6255
+ message?: string;
6256
+ success?: boolean;
6257
+ content?: {
6258
+ shipment?: components$1["schemas"]["ShipmentDetail"];
6259
+ };
6260
+ };
6261
+ };
6262
+ };
4119
6263
  };
4120
6264
  };
4121
6265
  }
@@ -4274,6 +6418,13 @@ declare class BaseAPIClient<TPaths extends Record<string, any>, THeaders extends
4274
6418
  * @returns Current default headers
4275
6419
  */
4276
6420
  getDefaultHeaders(): THeaders | undefined;
6421
+ /**
6422
+ * Add middleware to the client
6423
+ * This allows SDK extensions to add custom middleware like authentication
6424
+ *
6425
+ * @param middleware - Middleware to add to the client
6426
+ */
6427
+ use(middleware: any): void;
4277
6428
  }
4278
6429
  //#endregion
4279
6430
  //#region src/utils/url.d.ts
@@ -4449,11 +6600,12 @@ declare function mergeAndTransformHeaders<T extends Record<string, any> = Record
4449
6600
  //#endregion
4450
6601
  //#endregion
4451
6602
  //#region src/lib/client.d.ts
6603
+ type CombinedPaths = paths & paths$1;
4452
6604
  /**
4453
6605
  * POS API client that extends the generic BaseAPIClient
4454
6606
  * Adds Commerce Engine POS specific authentication and token management
4455
6607
  */
4456
- declare class PosAPIClient extends BaseAPIClient<paths, SupportedDefaultHeaders> {
6608
+ declare class PosAPIClient extends BaseAPIClient<CombinedPaths, SupportedDefaultHeaders> {
4457
6609
  protected config: PosSDKOptions;
4458
6610
  private initializationPromise;
4459
6611
  /**
@@ -4515,6 +6667,16 @@ declare class PosAPIClient extends BaseAPIClient<paths, SupportedDefaultHeaders>
4515
6667
  * Initialize tokens in storage (private helper method)
4516
6668
  */
4517
6669
  private initializeTokens;
6670
+ /**
6671
+ * Get client typed for storefront POS operations (paths schema)
6672
+ * This provides proper typing for storefront POS endpoints
6673
+ */
6674
+ get storefrontClient(): BaseAPIClient<paths, SupportedDefaultHeaders>["client"];
6675
+ /**
6676
+ * Get client typed for admin POS operations (AdminPaths schema)
6677
+ * This provides proper typing for admin POS endpoints
6678
+ */
6679
+ get adminClient(): BaseAPIClient<paths$1, SupportedDefaultHeaders>["client"];
4518
6680
  }
4519
6681
  //#endregion
4520
6682
  //#region src/lib/utils/url.d.ts
@@ -4581,6 +6743,7 @@ type FreeShipingCouponPromotion = components['schemas']['FreeShipingCouponPromot
4581
6743
  type InapplicableCoupon = components['schemas']['InapplicableCoupon'];
4582
6744
  type InapplicablePromotion = components['schemas']['InapplicablePromotion'];
4583
6745
  type Item = components['schemas']['Item'];
6746
+ type JuspayPaymentGatewayParams = components['schemas']['JuspayPaymentGatewayParams'];
4584
6747
  type MultiSelectAttribute = components['schemas']['MultiSelectAttribute'];
4585
6748
  type NetbankingPayment = components['schemas']['NetbankingPayment'];
4586
6749
  type NumberAttribute = components['schemas']['NumberAttribute'];
@@ -4591,10 +6754,18 @@ type OrderPayment = components['schemas']['OrderPayment'];
4591
6754
  type OrderRefund = components['schemas']['OrderRefund'];
4592
6755
  type OrderShipment = components['schemas']['OrderShipment'];
4593
6756
  type Pagination = components['schemas']['Pagination'];
6757
+ type PayWithCard = components['schemas']['PayWithCard'];
6758
+ type PayWithCash = components['schemas']['PayWithCash'];
6759
+ type PayWithPaymentGateway = components['schemas']['PayWithPaymentGateway'];
6760
+ type PayWithUpi = components['schemas']['PayWithUpi'];
6761
+ type PaymentGateway = components['schemas']['PaymentGateway'];
6762
+ type PaymentGatewayParams = components['schemas']['PaymentGatewayParams'];
4594
6763
  type PaymentInfo = components['schemas']['PaymentInfo'];
6764
+ type PayuPaymentGatewayParams = components['schemas']['PayuPaymentGatewayParams'];
4595
6765
  type PercentageDiscountRule = components['schemas']['PercentageDiscountRule'];
4596
6766
  type PincodeServiceability = components['schemas']['PincodeServiceability'];
4597
6767
  type PosDevice = components['schemas']['PosDevice'];
6768
+ type PosLocation = components['schemas']['PosLocation'];
4598
6769
  type PosUpdateCustomerWithEmail = components['schemas']['PosUpdateCustomerWithEmail'];
4599
6770
  type PosUpdateCustomerWithId = components['schemas']['PosUpdateCustomerWithId'];
4600
6771
  type PosUpdateCustomerWithPhone = components['schemas']['PosUpdateCustomerWithPhone'];
@@ -4746,12 +6917,82 @@ type PosListSkusResponse = paths['/pos/catalog/skus']['get']['responses'][200]['
4746
6917
  type PosListSkusContent = PosListSkusResponse['content'];
4747
6918
  type PosListSkusQuery = paths['/pos/catalog/skus']['get']['parameters']['query'];
4748
6919
  type PosListSkusHeaderParams = paths['/pos/catalog/skus']['get']['parameters']['header'];
6920
+ type ListPosDevicesResponse = paths['/pos/devices']['get']['responses'][200]['content']['application/json'];
6921
+ type ListPosDevicesContent = ListPosDevicesResponse['content'];
6922
+ type ClaimPosDeviceResponse = paths['/pos/devices/{id}/claim']['post']['responses'][200]['content']['application/json'];
6923
+ type ClaimPosDevicePathParams = paths['/pos/devices/{id}/claim']['post']['parameters']['path'];
6924
+ type UnclaimPosDeviceResponse = paths['/pos/devices/{id}/unclaim']['post']['responses'][200]['content']['application/json'];
6925
+ type UnclaimPosDevicePathParams = paths['/pos/devices/{id}/unclaim']['post']['parameters']['path'];
4749
6926
  type GetPosFulfillmentOptionsResponse = paths['/pos/fulfillment-options']['post']['responses'][200]['content']['application/json'];
4750
6927
  type GetPosFulfillmentOptionsContent = GetPosFulfillmentOptionsResponse['content'];
4751
6928
  type GetPosFulfillmentOptionsBody = NonNullable<paths['/pos/fulfillment-options']['post']['requestBody']>['content']['application/json'];
6929
+ type ListPosLocationsResponse = paths['/pos/locations']['get']['responses'][200]['content']['application/json'];
6930
+ type ListPosLocationsContent = ListPosLocationsResponse['content'];
4752
6931
  type CreatePosOrderResponse = paths['/pos/orders']['post']['responses'][200]['content']['application/json'];
4753
6932
  type CreatePosOrderContent = CreatePosOrderResponse['content'];
4754
6933
  type CreatePosOrderBody = NonNullable<paths['/pos/orders']['post']['requestBody']>['content']['application/json'];
6934
+ type PosGetPaymentStatusResponse = paths['/pos/orders/{order_number}/payment-status']['get']['responses'][200]['content']['application/json'];
6935
+ type PosGetPaymentStatusContent = PosGetPaymentStatusResponse['content'];
6936
+ type PosGetPaymentStatusPathParams = paths['/pos/orders/{order_number}/payment-status']['get']['parameters']['path'];
6937
+ type PosListPaymentOptionsResponse = paths['/pos/payments/payment-options']['get']['responses'][200]['content']['application/json'];
6938
+ type PosListPaymentOptionsContent = PosListPaymentOptionsResponse['content'];
6939
+ //#endregion
6940
+ //#region src/types/admin-pos-api-types.d.ts
6941
+ type PosListInventoryResponse = paths$1["/pos/catalog/inventories"]["get"]["responses"][200]["content"]["application/json"];
6942
+ type PosListInventoryContent = PosListInventoryResponse["content"];
6943
+ type PosListInventoryQuery = paths$1["/pos/catalog/inventories"]["get"]["parameters"]["query"];
6944
+ type PosListInventoryActivityResponse = paths$1["/pos/catalog/inventories/activites"]["get"]["responses"][200]["content"]["application/json"];
6945
+ type PosListInventoryActivityContent = PosListInventoryActivityResponse["content"];
6946
+ type PosListInventoryActivityQuery = paths$1["/pos/catalog/inventories/activites"]["get"]["parameters"]["query"];
6947
+ type PosListInventoryDetailResponse = paths$1["/pos/catalog/inventories/detail"]["get"]["responses"][200]["content"]["application/json"];
6948
+ type PosListInventoryDetailContent = PosListInventoryDetailResponse["content"];
6949
+ type PosListInventoryDetailQuery = paths$1["/pos/catalog/inventories/detail"]["get"]["parameters"]["query"];
6950
+ type PosListCustomersResponse = paths$1["/pos/customers"]["get"]["responses"][200]["content"]["application/json"];
6951
+ type PosListCustomersContent = PosListCustomersResponse["content"];
6952
+ type PosListCustomersQuery = paths$1["/pos/customers"]["get"]["parameters"]["query"];
6953
+ type PosGetCustomerDetailResponse = paths$1["/pos/customers/{id}"]["get"]["responses"][200]["content"]["application/json"];
6954
+ type PosGetCustomerDetailContent = PosGetCustomerDetailResponse["content"];
6955
+ type PosGetCustomerDetailPathParams = paths$1["/pos/customers/{id}"]["get"]["parameters"]["path"];
6956
+ type PosListOrdersResponse = paths$1["/pos/orders"]["get"]["responses"][200]["content"]["application/json"];
6957
+ type PosListOrdersContent = PosListOrdersResponse["content"];
6958
+ type PosListOrdersQuery = paths$1["/pos/orders"]["get"]["parameters"]["query"];
6959
+ type PosGetOrderDetailResponse = paths$1["/pos/orders/{order_number}"]["get"]["responses"][200]["content"]["application/json"];
6960
+ type PosGetOrderDetailContent = PosGetOrderDetailResponse["content"];
6961
+ type PosGetOrderDetailPathParams = paths$1["/pos/orders/{order_number}"]["get"]["parameters"]["path"];
6962
+ type PosListOrderActivityResponse = paths$1["/pos/orders/{order_number}/activity"]["get"]["responses"][200]["content"]["application/json"];
6963
+ type PosListOrderActivityContent = PosListOrderActivityResponse["content"];
6964
+ type PosListOrderActivityPathParams = paths$1["/pos/orders/{order_number}/activity"]["get"]["parameters"]["path"];
6965
+ type PosGetOrderInvoiceResponse = paths$1["/pos/orders/{order_number}/invoice"]["get"]["responses"][200]["content"]["application/json"];
6966
+ type PosGetOrderInvoiceContent = PosGetOrderInvoiceResponse["content"];
6967
+ type PosGetOrderInvoiceQuery = paths$1["/pos/orders/{order_number}/invoice"]["get"]["parameters"]["query"];
6968
+ type PosGetOrderInvoicePathParams = paths$1["/pos/orders/{order_number}/invoice"]["get"]["parameters"]["path"];
6969
+ type PosGetOrderReceiptResponse = paths$1["/pos/orders/{order_number}/receipt"]["get"]["responses"][200]["content"]["application/json"];
6970
+ type PosGetOrderReceiptContent = PosGetOrderReceiptResponse["content"];
6971
+ type PosGetOrderReceiptQuery = paths$1["/pos/orders/{order_number}/receipt"]["get"]["parameters"]["query"];
6972
+ type PosGetOrderReceiptPathParams = paths$1["/pos/orders/{order_number}/receipt"]["get"]["parameters"]["path"];
6973
+ type PosListOrderShipmentsResponse = paths$1["/pos/orders/{order_number}/shipments"]["get"]["responses"][200]["content"]["application/json"];
6974
+ type PosListOrderShipmentsContent = PosListOrderShipmentsResponse["content"];
6975
+ type PosListOrderShipmentsPathParams = paths$1["/pos/orders/{order_number}/shipments"]["get"]["parameters"]["path"];
6976
+ type PosListShipmentsResponse = paths$1["/pos/shipping/shipments"]["get"]["responses"][200]["content"]["application/json"];
6977
+ type PosListShipmentsContent = PosListShipmentsResponse["content"];
6978
+ type PosListShipmentsQuery = paths$1["/pos/shipping/shipments"]["get"]["parameters"]["query"];
6979
+ type PosCheckOrderInventoryResponse = paths$1["/pos/shipping/shipments/{order_number}/check-inventory"]["get"]["responses"][200]["content"]["application/json"];
6980
+ type PosCheckOrderInventoryContent = PosCheckOrderInventoryResponse["content"];
6981
+ type PosCheckOrderInventoryPathParams = paths$1["/pos/shipping/shipments/{order_number}/check-inventory"]["get"]["parameters"]["path"];
6982
+ type PosRefundShortfallResponse = paths$1["/pos/shipping/shipments/{order_number}/refund-shortfall"]["post"]["responses"][200]["content"]["application/json"];
6983
+ type PosRefundShortfallPathParams = paths$1["/pos/shipping/shipments/{order_number}/refund-shortfall"]["post"]["parameters"]["path"];
6984
+ type PosRefundShortfallBody = NonNullable<paths$1["/pos/shipping/shipments/{order_number}/refund-shortfall"]["post"]["requestBody"]>["content"]["application/json"];
6985
+ type PosGetShipmentDetailResponse = paths$1["/pos/shipping/shipments/{reference_number}"]["get"]["responses"][200]["content"]["application/json"];
6986
+ type PosGetShipmentDetailContent = PosGetShipmentDetailResponse["content"];
6987
+ type PosGetShipmentDetailPathParams = paths$1["/pos/shipping/shipments/{reference_number}"]["get"]["parameters"]["path"];
6988
+ type PosGetShipmentInvoiceResponse = paths$1["/pos/shipping/shipments/{reference_number}/invoice"]["get"]["responses"][200]["content"]["application/json"];
6989
+ type PosGetShipmentInvoiceContent = PosGetShipmentInvoiceResponse["content"];
6990
+ type PosGetShipmentInvoiceQuery = paths$1["/pos/shipping/shipments/{reference_number}/invoice"]["get"]["parameters"]["query"];
6991
+ type PosGetShipmentInvoicePathParams = paths$1["/pos/shipping/shipments/{reference_number}/invoice"]["get"]["parameters"]["path"];
6992
+ type PosUpdateShipmentResponse = paths$1["/pos/shipping/shipments/{reference_number}/manual-update"]["put"]["responses"][200]["content"]["application/json"];
6993
+ type PosUpdateShipmentContent = PosUpdateShipmentResponse["content"];
6994
+ type PosUpdateShipmentPathParams = paths$1["/pos/shipping/shipments/{reference_number}/manual-update"]["put"]["parameters"]["path"];
6995
+ type PosUpdateShipmentBody = NonNullable<paths$1["/pos/shipping/shipments/{reference_number}/manual-update"]["put"]["requestBody"]>["content"]["application/json"];
4755
6996
  //#endregion
4756
6997
  //#region src/lib/pos.d.ts
4757
6998
  /**
@@ -4760,62 +7001,284 @@ type CreatePosOrderBody = NonNullable<paths['/pos/orders']['post']['requestBody'
4760
7001
  */
4761
7002
  declare class PosClient extends PosAPIClient {
4762
7003
  /**
4763
- * Login with email address for POS device
4764
- * @param body - Login credentials containing device ID and email
7004
+ * Login with email address
7005
+ * @param body - Login credentials containing location ID and email
4765
7006
  * @returns Promise with OTP token and action
7007
+ * @example
7008
+ * ```typescript
7009
+ * const { data, error } = await pos.loginWithEmail({
7010
+ * location_id: "pos-location-123",
7011
+ * email: "staff@example.com"
7012
+ * });
7013
+ *
7014
+ * if (error) {
7015
+ * console.error("Login failed:", error.message);
7016
+ * } else {
7017
+ * console.log("OTP sent:", data.otp_token);
7018
+ * console.log("Action:", data.otp_action);
7019
+ * // Use the otp_token to verify OTP
7020
+ * }
7021
+ * ```
4766
7022
  */
4767
7023
  loginWithEmail(body: LoginPosDeviceWithEmailBody): Promise<ApiResult<LoginPosDeviceWithEmailContent>>;
4768
7024
  /**
4769
- * Login with phone number for POS device
4770
- * @param body - Login credentials containing device ID and phone
7025
+ * Login with phone number
7026
+ * @param body - Login credentials containing location ID and phone
4771
7027
  * @returns Promise with OTP token and action
7028
+ * @example
7029
+ * ```typescript
7030
+ * const { data, error } = await pos.loginWithPhone({
7031
+ * location_id: "pos-location-123",
7032
+ * phone: "234567890",
7033
+ * country_code: "+91" // default is +91
7034
+ * });
7035
+ *
7036
+ * if (error) {
7037
+ * console.error("Login failed:", error.message);
7038
+ * } else {
7039
+ * console.log("OTP sent:", data.otp_token);
7040
+ * console.log("Action:", data.otp_action);
7041
+ * // Use the otp_token to verify OTP
7042
+ * }
7043
+ * ```
4772
7044
  */
4773
7045
  loginWithPhone(body: LoginPosDeviceWithPhoneBody): Promise<ApiResult<LoginPosDeviceWithPhoneContent>>;
4774
7046
  /**
4775
- * Login with WhatsApp for POS device
4776
- * @param body - Login credentials containing device ID and phone
7047
+ * Login with WhatsApp
7048
+ * @param body - Login credentials containing location ID and phone
4777
7049
  * @returns Promise with OTP token and action
7050
+ * @example
7051
+ * ```typescript
7052
+ * const { data, error } = await pos.loginWithWhatsapp({
7053
+ * location_id: "pos-location-123",
7054
+ * phone: "234567890",
7055
+ * country_code: "+91" // default is +91
7056
+ * });
7057
+ *
7058
+ * if (error) {
7059
+ * console.error("WhatsApp login failed:", error.message);
7060
+ * } else {
7061
+ * console.log("WhatsApp OTP sent:", data.otp_token);
7062
+ * console.log("Action:", data.otp_action);
7063
+ * // Use the otp_token to verify OTP
7064
+ * }
7065
+ * ```
4778
7066
  */
4779
7067
  loginWithWhatsapp(body: LoginPosDeviceWithWhatsappBody): Promise<ApiResult<LoginPosDeviceWithWhatsappContent>>;
4780
7068
  /**
4781
- * Pair POS device with pairing code
4782
- * @param body - Pairing code received via phone/email
4783
- * @returns Promise with device information
4784
- */
4785
- pairDevice(body: PairPosDeviceBody): Promise<ApiResult<PairPosDeviceContent>>;
4786
- /**
4787
- * Verify OTP for POS login
7069
+ * Verify OTP
4788
7070
  * @param body - OTP verification data
4789
7071
  * @returns Promise with user info and tokens
7072
+ * @example
7073
+ * ```typescript
7074
+ * const { data, error } = await pos.verifyOtp({
7075
+ * otp_token: "otp-token-from-login",
7076
+ * otp: "123456",
7077
+ * otp_action: "login"
7078
+ * });
7079
+ *
7080
+ * if (error) {
7081
+ * console.error("OTP verification failed:", error.message);
7082
+ * } else {
7083
+ * console.log("Login successful:", data.user);
7084
+ * console.log("Access token:", data.access_token);
7085
+ * console.log("Refresh token:", data.refresh_token);
7086
+ * // Tokens are automatically stored by the SDK
7087
+ * }
7088
+ * ```
4790
7089
  */
4791
7090
  verifyOtp(body: VerifyPosLoginOtpBody): Promise<ApiResult<VerifyPosLoginOtpContent>>;
4792
7091
  /**
4793
7092
  * Refresh POS access token
4794
7093
  * @param body - Refresh token data
4795
7094
  * @returns Promise with new tokens
7095
+ * @example
7096
+ * ```typescript
7097
+ * const { data, error } = await pos.refreshAccessToken({
7098
+ * refresh_token: "refresh-token-here"
7099
+ * });
7100
+ *
7101
+ * if (error) {
7102
+ * console.error("Token refresh failed:", error.message);
7103
+ * } else {
7104
+ * console.log("New access token:", data.access_token);
7105
+ * console.log("New refresh token:", data.refresh_token);
7106
+ * // New tokens are automatically stored by the SDK
7107
+ * }
7108
+ * ```
4796
7109
  */
4797
7110
  refreshAccessToken(body: RefreshPosAccessTokenBody): Promise<ApiResult<RefreshPosAccessTokenContent>>;
4798
7111
  /**
4799
- * Logout from POS device
7112
+ * Logout
4800
7113
  * @returns Promise with logout confirmation
7114
+ * @example
7115
+ * ```typescript
7116
+ * const { data, error } = await pos.logout();
7117
+ *
7118
+ * if (error) {
7119
+ * console.error("Logout failed:", error.message);
7120
+ * } else {
7121
+ * console.log("Logout message:", data.message);
7122
+ * console.log("Success:", data.success);
7123
+ * // Tokens are automatically cleared by the SDK
7124
+ * }
7125
+ * ```
4801
7126
  */
4802
7127
  logout(): Promise<ApiResult<LogoutFromPosDeviceResponse>>;
7128
+ /**
7129
+ * List store locations
7130
+ * @returns Promise with list of locations
7131
+ * @example
7132
+ * ```typescript
7133
+ * const { data, error } = await pos.listLocations();
7134
+ * if (error) {
7135
+ * console.error("Failed to list locations:", error.message);
7136
+ * } else {
7137
+ * console.log("Locations:", data.locations);
7138
+ * }
7139
+ * ```
7140
+ */
7141
+ listLocations(): Promise<ApiResult<ListPosLocationsContent>>;
7142
+ /**
7143
+ * List devices
7144
+ * @returns Promise with list of devices
7145
+ * @example
7146
+ * ```typescript
7147
+ * const { data, error } = await pos.listDevices();
7148
+ * if (error) {
7149
+ * console.error("Failed to list devices:", error.message);
7150
+ * } else {
7151
+ * console.log("Devices:", data.devices);
7152
+ * }
7153
+ * ```
7154
+ */
7155
+ listDevices(): Promise<ApiResult<ListPosDevicesContent>>;
7156
+ /**
7157
+ * Pair POS device with pairing code
7158
+ * @param body - Pairing code received via phone/email
7159
+ * @returns Promise with device information
7160
+ * @example
7161
+ * ```typescript
7162
+ * const { data, error } = await pos.pairDevice({
7163
+ * pairing_code: "ABC123"
7164
+ * });
7165
+ *
7166
+ * if (error) {
7167
+ * console.error("Device pairing failed:", error.message);
7168
+ * } else {
7169
+ * console.log("Device paired:", data.device.id);
7170
+ * console.log("Device name:", data.device.name);
7171
+ * // Store device_id for future use
7172
+ * }
7173
+ * ```
7174
+ */
7175
+ pairDevice(body: PairPosDeviceBody): Promise<ApiResult<PairPosDeviceContent>>;
7176
+ /**
7177
+ * Unclaim POS device - Unlinks a device from the user session
7178
+ * @param pathParams - Device ID
7179
+ * @returns Promise with unclaim confirmation
7180
+ * @example
7181
+ * ```typescript
7182
+ * const { data, error } = await pos.unclaimDevice({
7183
+ * id: "01H9DEVICE12345ABCDE"
7184
+ * });
7185
+ *
7186
+ * if (error) {
7187
+ * console.error("Failed to unclaim device:", error.message);
7188
+ * } else {
7189
+ * console.log("Device unclaimed:", data.message);
7190
+ * }
7191
+ * ```
7192
+ */
7193
+ unclaimDevice(pathParams: UnclaimPosDevicePathParams): Promise<ApiResult<UnclaimPosDeviceResponse>>;
7194
+ /**
7195
+ * Claim POS device - Links a device to the user session
7196
+ * @param pathParams - Device ID
7197
+ * @returns Promise with claim confirmation
7198
+ * @example
7199
+ * ```typescript
7200
+ * const { data, error } = await pos.claimDevice({
7201
+ * id: "01H9DEVICE12345ABCDE"
7202
+ * });
7203
+ *
7204
+ * if (error) {
7205
+ * console.error("Failed to claim device:", error.message);
7206
+ * } else {
7207
+ * console.log("Device claimed:", data.message);
7208
+ * }
7209
+ * ```
7210
+ */
7211
+ claimDevice(pathParams: ClaimPosDevicePathParams): Promise<ApiResult<ClaimPosDeviceResponse>>;
4803
7212
  /**
4804
7213
  * Create a new cart
4805
7214
  * @param body - Cart creation data with items
4806
7215
  * @returns Promise with created cart
7216
+ * @example
7217
+ * ```typescript
7218
+ * const { data, error } = await pos.createCart({
7219
+ * items: [
7220
+ * {
7221
+ * product_id: "01H9XYZ12345ABCDE",
7222
+ * variant_id: null,
7223
+ * quantity: 2
7224
+ * },
7225
+ * {
7226
+ * product_id: "01H9ABC67890FGHIJ",
7227
+ * variant_id: "01H9XYZ67890KLMNO",
7228
+ * quantity: 1
7229
+ * }
7230
+ * ],
7231
+ * metadata: {
7232
+ * "source": "pos-terminal-1",
7233
+ * "staff_id": "staff-123"
7234
+ * }
7235
+ * });
7236
+ *
7237
+ * if (error) {
7238
+ * console.error("Failed to create cart:", error.message);
7239
+ * } else {
7240
+ * console.log("Cart created:", data.cart.id);
7241
+ * console.log("Cart total:", data.cart.grand_total);
7242
+ * }
7243
+ * ```
4807
7244
  */
4808
7245
  createCart(body: PosCreateCartBody): Promise<ApiResult<PosCreateCartContent>>;
4809
7246
  /**
4810
7247
  * Get cart details
4811
7248
  * @param pathParams - Cart ID
4812
7249
  * @returns Promise with cart details
7250
+ * @example
7251
+ * ```typescript
7252
+ * const { data, error } = await pos.getCart({
7253
+ * id: "01H9CART12345ABCDE"
7254
+ * });
7255
+ *
7256
+ * if (error) {
7257
+ * console.error("Failed to get cart:", error.message);
7258
+ * } else {
7259
+ * const cart = data.cart;
7260
+ * console.log("Cart total:", cart.grand_total);
7261
+ * console.log("Items count:", cart.cart_items.length);
7262
+ * }
7263
+ * ```
4813
7264
  */
4814
7265
  getCart(pathParams: PosGetCartPathParams): Promise<ApiResult<PosGetCartContent>>;
4815
7266
  /**
4816
7267
  * Delete cart (remove all items)
4817
7268
  * @param pathParams - Cart ID
4818
7269
  * @returns Promise with deletion confirmation
7270
+ * @example
7271
+ * ```typescript
7272
+ * const { data, error } = await pos.deleteCart({
7273
+ * id: "01H9CART12345ABCDE"
7274
+ * });
7275
+ *
7276
+ * if (error) {
7277
+ * console.error("Failed to delete cart:", error.message);
7278
+ * } else {
7279
+ * console.log("Cart deleted:", data.message);
7280
+ * }
7281
+ * ```
4819
7282
  */
4820
7283
  deleteCart(pathParams: PosDeleteCartPathParams): Promise<ApiResult<PosDeleteCartResponse>>;
4821
7284
  /**
@@ -4823,6 +7286,34 @@ declare class PosClient extends PosAPIClient {
4823
7286
  * @param pathParams - Cart ID
4824
7287
  * @param body - Item update data
4825
7288
  * @returns Promise with updated cart
7289
+ * @example
7290
+ * ```typescript
7291
+ * // Add item to cart
7292
+ * const { data, error } = await pos.updateCart(
7293
+ * { id: "01H9CART12345ABCDE" },
7294
+ * {
7295
+ * product_id: "01H9XYZ12345ABCDE",
7296
+ * variant_id: null,
7297
+ * quantity: 3
7298
+ * }
7299
+ * );
7300
+ *
7301
+ * if (error) {
7302
+ * console.error("Failed to update cart:", error.message);
7303
+ * } else {
7304
+ * console.log("Cart updated:", data.cart.cart_items.length);
7305
+ * }
7306
+ *
7307
+ * // Remove item from cart (set quantity to 0)
7308
+ * const { data: removeData, error: removeError } = await pos.updateCart(
7309
+ * { id: "01H9CART12345ABCDE" },
7310
+ * {
7311
+ * product_id: "01H9XYZ12345ABCDE",
7312
+ * variant_id: null,
7313
+ * quantity: 0
7314
+ * }
7315
+ * );
7316
+ * ```
4826
7317
  */
4827
7318
  updateCart(pathParams: PosUpdateCartPathParams, body: PosUpdateCartBody): Promise<ApiResult<PosUpdateCartContent>>;
4828
7319
  /**
@@ -4830,18 +7321,114 @@ declare class PosClient extends PosAPIClient {
4830
7321
  * @param pathParams - Cart ID
4831
7322
  * @param body - Address data (registered user IDs or guest addresses)
4832
7323
  * @returns Promise with updated cart
7324
+ * @example
7325
+ * ```typescript
7326
+ * // For registered users with saved addresses
7327
+ * const { data, error } = await pos.createCartAddress(
7328
+ * { id: "01H9CART12345ABCDE" },
7329
+ * {
7330
+ * billing_address_id: "01H9ADDR12345BILL",
7331
+ * shipping_address_id: "01H9ADDR12345SHIP"
7332
+ * }
7333
+ * );
7334
+ *
7335
+ * if (error) {
7336
+ * console.error("Failed to update cart address:", error.message);
7337
+ * } else {
7338
+ * console.log("Addresses updated:", data.message);
7339
+ * }
7340
+ *
7341
+ * // For guest checkout with new addresses
7342
+ * const { data: guestData, error: guestError } = await pos.createCartAddress(
7343
+ * { id: "01H9CART12345ABCDE" },
7344
+ * {
7345
+ * billing_address: {
7346
+ * first_name: "John",
7347
+ * last_name: "Doe",
7348
+ * email: "john@example.com",
7349
+ * phone: "9876543210",
7350
+ * country_code: "+91",
7351
+ * address_line1: "123 Main Street",
7352
+ * address_line2: "Apt 4B",
7353
+ * city: "Mumbai",
7354
+ * state: "Maharashtra",
7355
+ * pincode: "400001",
7356
+ * country: "India",
7357
+ * landmark: "Near Station",
7358
+ * tax_identification_number: null,
7359
+ * business_name: null
7360
+ * },
7361
+ * shipping_address: {
7362
+ * first_name: "John",
7363
+ * last_name: "Doe",
7364
+ * email: "john@example.com",
7365
+ * phone: "9876543210",
7366
+ * country_code: "+91",
7367
+ * address_line1: "456 Oak Avenue",
7368
+ * address_line2: null,
7369
+ * city: "Pune",
7370
+ * state: "Maharashtra",
7371
+ * pincode: "411001",
7372
+ * country: "India",
7373
+ * landmark: "Near Mall",
7374
+ * tax_identification_number: null,
7375
+ * business_name: null
7376
+ * }
7377
+ * }
7378
+ * );
7379
+ * ```
4833
7380
  */
4834
7381
  createCartAddress(pathParams: PosCreateCartAddressPathParams, body: PosCreateCartAddressBody): Promise<ApiResult<PosCreateCartAddressContent>>;
4835
7382
  /**
4836
7383
  * List all available coupons
4837
7384
  * @param headers - Optional header parameters (customer_group_id, etc.)
4838
7385
  * @returns Promise with available coupons
7386
+ * @example
7387
+ * ```typescript
7388
+ * // Get all available coupons
7389
+ * const { data, error } = await pos.listCoupons();
7390
+ *
7391
+ * if (error) {
7392
+ * console.error("Failed to get available coupons:", error.message);
7393
+ * } else {
7394
+ * const coupons = data.coupons || [];
7395
+ * console.log("Available coupons:", coupons.length);
7396
+ * coupons.forEach(coupon => {
7397
+ * console.log("Coupon:", coupon.code, "Discount:", coupon.discount_amount);
7398
+ * });
7399
+ * }
7400
+ *
7401
+ * // Override customer group ID for this specific request
7402
+ * const { data: overrideData, error: overrideError } = await pos.listCoupons({
7403
+ * "x-customer-group-id": "01H9GROUP12345ABC" // Override default SDK config
7404
+ * });
7405
+ * ```
4839
7406
  */
4840
7407
  listCoupons(headers?: PosListCouponsHeaderParams): Promise<ApiResult<PosListCouponsContent>>;
4841
7408
  /**
4842
7409
  * List all available promotions
4843
7410
  * @param headers - Optional header parameters (customer_group_id, etc.)
4844
7411
  * @returns Promise with available promotions
7412
+ * @example
7413
+ * ```typescript
7414
+ * // Get all available promotions
7415
+ * const { data, error } = await pos.listPromotions();
7416
+ *
7417
+ * if (error) {
7418
+ * console.error("Failed to get available promotions:", error.message);
7419
+ * } else {
7420
+ * const promotions = data.promotions || [];
7421
+ * console.log("Available promotions:", promotions.length);
7422
+ * promotions.forEach(promotion => {
7423
+ * console.log("Promotion:", promotion.name, "Type:", promotion.promotion_type);
7424
+ * });
7425
+ * }
7426
+ *
7427
+ * // Override customer group ID for this specific request
7428
+ * const { data: overrideData, error: overrideError } = await pos.listPromotions({
7429
+ * "x-customer-group-id": "01H9GROUP12345ABC" // Override default SDK config
7430
+ * });
7431
+ * ```
4845
7432
  */
4846
7433
  listPromotions(headers?: PosListPromotionsHeaderParams): Promise<ApiResult<PosListPromotionsContent>>;
4847
7434
  /**
@@ -4849,24 +7436,96 @@ declare class PosClient extends PosAPIClient {
4849
7436
  * @param pathParams - Cart ID
4850
7437
  * @param body - Coupon code
4851
7438
  * @returns Promise with updated cart
7439
+ * @example
7440
+ * ```typescript
7441
+ * const { data, error } = await pos.applyCoupon(
7442
+ * { id: "01H9CART12345ABCDE" },
7443
+ * { coupon_code: "FLAT100OFF" }
7444
+ * );
7445
+ *
7446
+ * if (error) {
7447
+ * console.error("Failed to apply coupon:", error.message);
7448
+ * } else {
7449
+ * console.log("Coupon applied, new total:", data.cart.grand_total);
7450
+ * console.log("Discount amount:", data.cart.coupon_discount_amount);
7451
+ * }
7452
+ * ```
4852
7453
  */
4853
7454
  applyCoupon(pathParams: PosApplyCouponPathParams, body: PosApplyCouponBody): Promise<ApiResult<PosApplyCouponContent>>;
4854
7455
  /**
4855
7456
  * Remove coupon from cart
4856
7457
  * @param pathParams - Cart ID
4857
7458
  * @returns Promise with updated cart
7459
+ * @example
7460
+ * ```typescript
7461
+ * const { data, error } = await pos.removeCoupon({
7462
+ * id: "01H9CART12345ABCDE"
7463
+ * });
7464
+ *
7465
+ * if (error) {
7466
+ * console.error("Failed to remove coupon:", error.message);
7467
+ * } else {
7468
+ * console.log("Coupon removed, new total:", data.cart.grand_total);
7469
+ * }
7470
+ * ```
4858
7471
  */
4859
7472
  removeCoupon(pathParams: PosRemoveCouponPathParams): Promise<ApiResult<PosRemoveCouponContent>>;
4860
7473
  /**
4861
7474
  * Evaluate applicable/inapplicable coupons for cart
4862
7475
  * @param pathParams - Cart ID
4863
7476
  * @returns Promise with coupon evaluation results
7477
+ * @example
7478
+ * ```typescript
7479
+ * const { data, error } = await pos.evaluateCoupons({
7480
+ * id: "01H9CART12345ABCDE"
7481
+ * });
7482
+ *
7483
+ * if (error) {
7484
+ * console.error("Failed to evaluate coupons:", error.message);
7485
+ * } else {
7486
+ * const applicable = data.applicable_coupons || [];
7487
+ * const inapplicable = data.inapplicable_coupons || [];
7488
+ *
7489
+ * console.log("Applicable coupons:", applicable.length);
7490
+ * applicable.forEach(coupon => {
7491
+ * console.log(`- ${coupon.code}: Save $${coupon.estimated_discount}`);
7492
+ * });
7493
+ *
7494
+ * console.log("Inapplicable coupons:", inapplicable.length);
7495
+ * inapplicable.forEach(coupon => {
7496
+ * console.log(`- ${coupon.code}: ${coupon.reason}`);
7497
+ * });
7498
+ * }
7499
+ * ```
4864
7500
  */
4865
7501
  evaluateCoupons(pathParams: PosEvaluateCouponsPathParams): Promise<ApiResult<PosEvaluateCouponsContent>>;
4866
7502
  /**
4867
7503
  * Evaluate applicable/inapplicable promotions for cart
4868
7504
  * @param pathParams - Cart ID
4869
7505
  * @returns Promise with promotion evaluation results
7506
+ * @example
7507
+ * ```typescript
7508
+ * const { data, error } = await pos.evaluatePromotions({
7509
+ * id: "01H9CART12345ABCDE"
7510
+ * });
7511
+ *
7512
+ * if (error) {
7513
+ * console.error("Failed to evaluate promotions:", error.message);
7514
+ * } else {
7515
+ * const applicable = data.applicable_promotions || [];
7516
+ * const inapplicable = data.inapplicable_promotions || [];
7517
+ *
7518
+ * console.log("Applicable promotions:", applicable.length);
7519
+ * applicable.forEach(promo => {
7520
+ * console.log(`- ${promo.name}: ${promo.savings_message}`);
7521
+ * });
7522
+ *
7523
+ * console.log("Inapplicable promotions:", inapplicable.length);
7524
+ * inapplicable.forEach(promo => {
7525
+ * console.log(`- ${promo.name}: ${promo.reason}`);
7526
+ * });
7527
+ * }
7528
+ * ```
4870
7529
  */
4871
7530
  evaluatePromotions(pathParams: PosEvaluatePromotionsPathParams): Promise<ApiResult<PosEvaluatePromotionsContent>>;
4872
7531
  /**
@@ -4874,12 +7533,38 @@ declare class PosClient extends PosAPIClient {
4874
7533
  * @param pathParams - Cart ID
4875
7534
  * @param body - Credit balance amount to use
4876
7535
  * @returns Promise with updated cart
7536
+ * @example
7537
+ * ```typescript
7538
+ * const { data, error } = await pos.redeemCreditBalance(
7539
+ * { id: "01H9CART12345ABCDE" },
7540
+ * { credit_balance_used: 250.00 }
7541
+ * );
7542
+ *
7543
+ * if (error) {
7544
+ * console.error("Failed to redeem credit balance:", error.message);
7545
+ * } else {
7546
+ * console.log("Credit applied, new total:", data.cart.grand_total);
7547
+ * console.log("Credit used:", data.cart.credit_balance_used);
7548
+ * }
7549
+ * ```
4877
7550
  */
4878
7551
  redeemCreditBalance(pathParams: PosRedeemCreditBalancePathParams, body: PosRedeemCreditBalanceBody): Promise<ApiResult<PosRedeemCreditBalanceContent>>;
4879
7552
  /**
4880
7553
  * Remove credit balance from cart
4881
7554
  * @param pathParams - Cart ID
4882
7555
  * @returns Promise with updated cart
7556
+ * @example
7557
+ * ```typescript
7558
+ * const { data, error } = await pos.removeCreditBalance({
7559
+ * id: "01H9CART12345ABCDE"
7560
+ * });
7561
+ *
7562
+ * if (error) {
7563
+ * console.error("Failed to remove credit balance:", error.message);
7564
+ * } else {
7565
+ * console.log("Credit balance removed, new total:", data.cart.grand_total);
7566
+ * }
7567
+ * ```
4883
7568
  */
4884
7569
  removeCreditBalance(pathParams: PosRemoveCreditBalancePathParams): Promise<ApiResult<PosRemoveCreditBalanceContent>>;
4885
7570
  /**
@@ -4887,12 +7572,38 @@ declare class PosClient extends PosAPIClient {
4887
7572
  * @param pathParams - Cart ID
4888
7573
  * @param body - Loyalty points to redeem
4889
7574
  * @returns Promise with updated cart
7575
+ * @example
7576
+ * ```typescript
7577
+ * const { data, error } = await pos.redeemLoyaltyPoints(
7578
+ * { id: "01H9CART12345ABCDE" },
7579
+ * { loyalty_point_redeemed: 500 }
7580
+ * );
7581
+ *
7582
+ * if (error) {
7583
+ * console.error("Failed to redeem loyalty points:", error.message);
7584
+ * } else {
7585
+ * console.log("Points redeemed, new total:", data.cart.grand_total);
7586
+ * console.log("Points redeemed:", data.cart.loyalty_points_redeemed);
7587
+ * }
7588
+ * ```
4890
7589
  */
4891
7590
  redeemLoyaltyPoints(pathParams: PosRedeemLoyaltyPointsPathParams, body: PosRedeemLoyaltyPointsBody): Promise<ApiResult<PosRedeemLoyaltyPointsContent>>;
4892
7591
  /**
4893
7592
  * Remove loyalty points from cart
4894
7593
  * @param pathParams - Cart ID
4895
7594
  * @returns Promise with updated cart
7595
+ * @example
7596
+ * ```typescript
7597
+ * const { data, error } = await pos.removeLoyaltyPoints({
7598
+ * id: "01H9CART12345ABCDE"
7599
+ * });
7600
+ *
7601
+ * if (error) {
7602
+ * console.error("Failed to remove loyalty points:", error.message);
7603
+ * } else {
7604
+ * console.log("Loyalty points removed, new total:", data.cart.grand_total);
7605
+ * }
7606
+ * ```
4896
7607
  */
4897
7608
  removeLoyaltyPoints(pathParams: PosRemoveLoyaltyPointsPathParams): Promise<ApiResult<PosRemoveLoyaltyPointsContent>>;
4898
7609
  /**
@@ -4900,12 +7611,51 @@ declare class PosClient extends PosAPIClient {
4900
7611
  * @param pathParams - Cart ID
4901
7612
  * @param body - Fulfillment preference data
4902
7613
  * @returns Promise with confirmation
7614
+ * @example
7615
+ * ```typescript
7616
+ * const { data, error } = await pos.updateFulfillmentPreference(
7617
+ * { id: "01H9CART12345ABCDE" },
7618
+ * {
7619
+ * fulfillment_type: "delivery",
7620
+ * delivery_address_id: "01H9ADDR12345ABCDE"
7621
+ * }
7622
+ * );
7623
+ *
7624
+ * if (error) {
7625
+ * console.error("Failed to update fulfillment preference:", error.message);
7626
+ * } else {
7627
+ * console.log("Fulfillment preference updated:", data.message);
7628
+ * console.log("Success:", data.success);
7629
+ * }
7630
+ * ```
4903
7631
  */
4904
7632
  updateFulfillmentPreference(pathParams: PosUpdateFulfillmentPreferencePathParams, body: PosUpdateFulfillmentPreferenceBody): Promise<ApiResult<PosUpdateFulfillmentPreferenceResponse>>;
4905
7633
  /**
4906
7634
  * Get fulfillment options for cart
4907
7635
  * @param body - Cart data for fulfillment calculation
4908
7636
  * @returns Promise with fulfillment options
7637
+ * @example
7638
+ * ```typescript
7639
+ * const { data, error } = await pos.getFulfillmentOptions({
7640
+ * cart_id: "01H9CART12345ABCDE",
7641
+ * delivery_address: {
7642
+ * street: "123 Main St",
7643
+ * city: "New York",
7644
+ * state: "NY",
7645
+ * zip_code: "10001",
7646
+ * country: "US"
7647
+ * }
7648
+ * });
7649
+ *
7650
+ * if (error) {
7651
+ * console.error("Failed to get fulfillment options:", error.message);
7652
+ * } else {
7653
+ * console.log("Available fulfillment options:", data.options.length);
7654
+ * data.options.forEach(option => {
7655
+ * console.log(`${option.type}: ${option.name} - $${option.cost}`);
7656
+ * });
7657
+ * }
7658
+ * ```
4909
7659
  */
4910
7660
  getFulfillmentOptions(body: GetPosFulfillmentOptionsBody): Promise<ApiResult<GetPosFulfillmentOptionsContent>>;
4911
7661
  /**
@@ -4913,18 +7663,103 @@ declare class PosClient extends PosAPIClient {
4913
7663
  * @param pathParams - Cart ID
4914
7664
  * @param body - Customer update data
4915
7665
  * @returns Promise with updated cart
7666
+ * @example
7667
+ * ```typescript
7668
+ * const { data, error } = await pos.updateCartCustomer(
7669
+ * { id: "01H9CART12345ABCDE" },
7670
+ * {
7671
+ * customer_id: "01H9CUST12345ABCDE",
7672
+ * customer_group_id: "01H9GROUP12345ABCDE"
7673
+ * }
7674
+ * );
7675
+ *
7676
+ * if (error) {
7677
+ * console.error("Failed to update cart customer:", error.message);
7678
+ * } else {
7679
+ * console.log("Cart customer updated:", data.cart.id);
7680
+ * console.log("Customer ID:", data.cart.customer_id);
7681
+ * console.log("Customer group:", data.cart.customer_group_id);
7682
+ * }
7683
+ * ```
4916
7684
  */
4917
7685
  updateCartCustomer(pathParams: UpdatePosCartCustomerPathParams, body: UpdatePosCartCustomerBody): Promise<ApiResult<UpdatePosCartCustomerContent>>;
4918
7686
  /**
4919
7687
  * Create order from cart
4920
7688
  * @param body - Order creation data
4921
7689
  * @returns Promise with created order
7690
+ * @example
7691
+ * ```typescript
7692
+ * const { data, error } = await pos.createOrder({
7693
+ * cart_id: "01H9CART12345ABCDE"
7694
+ * });
7695
+ *
7696
+ * if (error) {
7697
+ * console.error("Failed to create order:", error.message);
7698
+ * } else {
7699
+ * console.log("Order created:", data.order.id);
7700
+ * console.log("Payment required:", data.payment_required);
7701
+ * }
7702
+ * ```
4922
7703
  */
4923
7704
  createOrder(body: CreatePosOrderBody): Promise<ApiResult<CreatePosOrderContent>>;
7705
+ /**
7706
+ * List payment options
7707
+ * @returns Promise with list of payment options
7708
+ * @example
7709
+ * ```typescript
7710
+ * const { data, error } = await pos.listPaymentOptions();
7711
+ *
7712
+ * if (error) {
7713
+ * console.error("Failed to list payment options:", error.message);
7714
+ * } else {
7715
+ * console.log("Payment options:", data.payment_options);
7716
+ * }
7717
+ * ```
7718
+ */
7719
+ listPaymentOptions(): Promise<ApiResult<PosListPaymentOptionsContent>>;
7720
+ /**
7721
+ * Get payment status
7722
+ * @param pathParams - Order number
7723
+ * @returns Promise with payment status
7724
+ * @example
7725
+ * ```typescript
7726
+ * const { data, error } = await pos.getPaymentStatus({ order_number: "1234567890" });
7727
+ *
7728
+ * if (error) {
7729
+ * console.error("Failed to get payment status:", error.message);
7730
+ * } else {
7731
+ * console.log("Payment status:", data.status);
7732
+ * console.log("Amount paid:", data.amount_paid);
7733
+ * console.log("Amount unpaid:", data.amount_unpaid);
7734
+ * console.log("Retry available:", data.is_retry_available);
7735
+ * }
7736
+ * ```
7737
+ */
7738
+ getPaymentStatus(pathParams: PosGetPaymentStatusPathParams): Promise<ApiResult<PosGetPaymentStatusContent>>;
4924
7739
  /**
4925
7740
  * List all categories
4926
7741
  * @param query - Optional query parameters for filtering categories
4927
7742
  * @returns Promise with list of categories
7743
+ * @example
7744
+ * ```typescript
7745
+ * // Basic category listing
7746
+ * const { data, error } = await pos.listCategories();
7747
+ *
7748
+ * if (error) {
7749
+ * console.error("Failed to list categories:", error.message);
7750
+ * } else {
7751
+ * console.log("Categories found:", data.categories?.length || 0);
7752
+ * data.categories?.forEach(category => {
7753
+ * console.log(`Category: ${category.name} - ${category.description}`);
7754
+ * });
7755
+ * }
7756
+ *
7757
+ * // With pagination
7758
+ * const { data: catData, error: catError } = await pos.listCategories({
7759
+ * page: 1,
7760
+ * limit: 10
7761
+ * });
7762
+ * ```
4928
7763
  */
4929
7764
  listCategories(query?: PosListCategoriesQuery): Promise<ApiResult<PosListCategoriesContent>>;
4930
7765
  /**
@@ -4932,6 +7767,42 @@ declare class PosClient extends PosAPIClient {
4932
7767
  * @param query - Optional query parameters for filtering products
4933
7768
  * @param headers - Optional header parameters
4934
7769
  * @returns Promise with list of products
7770
+ * @example
7771
+ * ```typescript
7772
+ * // Basic product listing
7773
+ * const { data, error } = await pos.listProducts();
7774
+ *
7775
+ * if (error) {
7776
+ * console.error("Failed to list products:", error.message);
7777
+ * } else {
7778
+ * console.log("Products found:", data.products?.length || 0);
7779
+ * console.log("Pagination:", data.pagination);
7780
+ * data.products?.forEach(product => {
7781
+ * console.log(`Product: ${product.name} - $${product.price}`);
7782
+ * });
7783
+ * }
7784
+ *
7785
+ * // With filtering and pagination
7786
+ * const { data: filteredData, error: filteredError } = await pos.listProducts({
7787
+ * page: 1,
7788
+ * limit: 20,
7789
+ * sort_by: JSON.stringify({ "created_at": "desc" }),
7790
+ * category_slug: ["electronics", "smartphones"]
7791
+ * });
7792
+ *
7793
+ * // Override customer group ID for this specific request
7794
+ * const { data: overrideData, error: overrideError } = await pos.listProducts(
7795
+ * {
7796
+ * page: 1,
7797
+ * limit: 20,
7798
+ * sort_by: JSON.stringify({ "created_at": "desc" }),
7799
+ * category_slug: ["electronics", "smartphones"]
7800
+ * },
7801
+ * {
7802
+ * "x-customer-group-id": "01H9XYZ12345USERID" // Override default SDK config
7803
+ * }
7804
+ * );
7805
+ * ```
4935
7806
  */
4936
7807
  listProducts(query?: PosListProductsQuery, headers?: PosListProductsHeaderParams): Promise<ApiResult<PosListProductsContent>>;
4937
7808
  /**
@@ -4939,6 +7810,43 @@ declare class PosClient extends PosAPIClient {
4939
7810
  * @param query - Query parameters with product IDs for cross-sell recommendations
4940
7811
  * @param headers - Optional header parameters
4941
7812
  * @returns Promise with cross-sell products
7813
+ * @example
7814
+ * ```typescript
7815
+ * // Basic usage - get cross-sell products for cart items
7816
+ * const { data, error } = await pos.listCrosssellProducts({
7817
+ * product_ids: ["prod_01H9XYZ12345ABCDE", "prod_01H9ABC67890FGHIJ"]
7818
+ * });
7819
+ *
7820
+ * // Advanced usage with pagination and custom sorting
7821
+ * const { data, error } = await pos.listCrosssellProducts({
7822
+ * product_ids: ["prod_01H9XYZ12345ABCDE"],
7823
+ * page: 1,
7824
+ * limit: 10,
7825
+ * sort_by: '{"price":"asc"}'
7826
+ * });
7827
+ *
7828
+ * // Override customer group ID for this specific request
7829
+ * const { data, error } = await pos.listCrosssellProducts(
7830
+ * {
7831
+ * product_ids: ["prod_01H9XYZ12345ABCDE"],
7832
+ * page: 1,
7833
+ * limit: 10
7834
+ * },
7835
+ * {
7836
+ * "x-customer-group-id": "01H9XYZ12345USERID" // Override default SDK config
7837
+ * }
7838
+ * );
7839
+ *
7840
+ * if (error) {
7841
+ * console.error("Failed to get cross-sell products:", error.message);
7842
+ * } else {
7843
+ * console.log("Cross-sell products found:", data.products.length);
7844
+ * console.log("Pagination:", data.pagination);
7845
+ * data.products.forEach(product => {
7846
+ * console.log(`Product: ${product.name} - ${product.price}`);
7847
+ * });
7848
+ * }
7849
+ * ```
4942
7850
  */
4943
7851
  listCrosssellProducts(query: PosListCrosssellProductsQuery, headers?: PosListCrosssellProductsHeaderParams): Promise<ApiResult<PosListCrosssellProductsContent>>;
4944
7852
  /**
@@ -4946,6 +7854,41 @@ declare class PosClient extends PosAPIClient {
4946
7854
  * @param body - Search criteria and parameters
4947
7855
  * @param headers - Optional header parameters
4948
7856
  * @returns Promise with search results
7857
+ * @example
7858
+ * ```typescript
7859
+ * const { data, error } = await pos.searchProducts({
7860
+ * query: "smartphone",
7861
+ * filters: {
7862
+ * category: ["electronics", "mobile"],
7863
+ * price_range: { min: 100, max: 1000 },
7864
+ * brand: ["Apple", "Samsung"] // facet names depend on product configuration
7865
+ * },
7866
+ * page: 1,
7867
+ * limit: 20
7868
+ * });
7869
+ *
7870
+ * if (error) {
7871
+ * console.error("Failed to search products:", error.message);
7872
+ * } else {
7873
+ * console.log("Search results:", data.skus?.length || 0, "products found");
7874
+ * console.log("Facet distribution:", data.facet_distribution);
7875
+ * console.log("Price range:", data.facet_stats.price_range);
7876
+ * data.skus?.forEach(sku => {
7877
+ * console.log(`Found: ${sku.name} - ${sku.price}`);
7878
+ * });
7879
+ * }
7880
+ *
7881
+ * // Override customer group ID for this specific request
7882
+ * const { data: overrideData, error: overrideError } = await pos.searchProducts(
7883
+ * {
7884
+ * query: "laptop",
7885
+ * filters: { category: ["computers"] }
7886
+ * },
7887
+ * {
7888
+ * "x-customer-group-id": "01H9XYZ12345USERID" // Override default SDK config
7889
+ * }
7890
+ * );
7891
+ * ```
4949
7892
  */
4950
7893
  searchProducts(body: PosSearchProductsBody, headers?: PosSearchProductsHeaderParams): Promise<ApiResult<PosSearchProductsContent>>;
4951
7894
  /**
@@ -4953,6 +7896,43 @@ declare class PosClient extends PosAPIClient {
4953
7896
  * @param query - Query parameters with product ID for similarity recommendations
4954
7897
  * @param headers - Optional header parameters
4955
7898
  * @returns Promise with similar products
7899
+ * @example
7900
+ * ```typescript
7901
+ * // Basic usage - get similar products for a specific product
7902
+ * const { data, error } = await pos.listSimilarProducts({
7903
+ * product_id: "prod_01H9XYZ12345ABCDE"
7904
+ * });
7905
+ *
7906
+ * // Advanced usage with pagination and custom sorting
7907
+ * const { data, error } = await pos.listSimilarProducts({
7908
+ * product_id: "prod_01H9XYZ12345ABCDE",
7909
+ * page: 1,
7910
+ * limit: 20,
7911
+ * sort_by: '{"relevance":"desc"}'
7912
+ * });
7913
+ *
7914
+ * // Override customer group ID for this specific request
7915
+ * const { data, error } = await pos.listSimilarProducts(
7916
+ * {
7917
+ * product_id: "prod_01H9XYZ12345ABCDE",
7918
+ * page: 1,
7919
+ * limit: 20
7920
+ * },
7921
+ * {
7922
+ * "x-customer-group-id": "01H9XYZ12345USERID" // Override default SDK config
7923
+ * }
7924
+ * );
7925
+ *
7926
+ * if (error) {
7927
+ * console.error("Failed to get similar products:", error.message);
7928
+ * } else {
7929
+ * console.log("Similar products found:", data.products.length);
7930
+ * console.log("Pagination:", data.pagination);
7931
+ * data.products.forEach(product => {
7932
+ * console.log(`Similar: ${product.name} - ${product.price}`);
7933
+ * });
7934
+ * }
7935
+ * ```
4956
7936
  */
4957
7937
  listSimilarProducts(query: PosListSimilarProductsQuery, headers?: PosListSimilarProductsHeaderParams): Promise<ApiResult<PosListSimilarProductsContent>>;
4958
7938
  /**
@@ -4960,6 +7940,43 @@ declare class PosClient extends PosAPIClient {
4960
7940
  * @param query - Query parameters with product IDs for up-sell recommendations
4961
7941
  * @param headers - Optional header parameters
4962
7942
  * @returns Promise with up-sell products
7943
+ * @example
7944
+ * ```typescript
7945
+ * // Basic usage - get up-sell products for cart items
7946
+ * const { data, error } = await pos.listUpsellProducts({
7947
+ * product_ids: ["prod_01H9XYZ12345ABCDE"]
7948
+ * });
7949
+ *
7950
+ * // Advanced usage with pagination and custom sorting
7951
+ * const { data, error } = await pos.listUpsellProducts({
7952
+ * product_ids: ["prod_01H9XYZ12345ABCDE"],
7953
+ * page: 1,
7954
+ * limit: 15,
7955
+ * sort_by: '{"relevance":"desc"}'
7956
+ * });
7957
+ *
7958
+ * // Override customer group ID for this specific request
7959
+ * const { data, error } = await pos.listUpsellProducts(
7960
+ * {
7961
+ * product_ids: ["prod_01H9XYZ12345ABCDE"],
7962
+ * page: 1,
7963
+ * limit: 15
7964
+ * },
7965
+ * {
7966
+ * "x-customer-group-id": "01H9XYZ12345USERID" // Override default SDK config
7967
+ * }
7968
+ * );
7969
+ *
7970
+ * if (error) {
7971
+ * console.error("Failed to get up-sell products:", error.message);
7972
+ * } else {
7973
+ * console.log("Up-sell products found:", data.products.length);
7974
+ * console.log("Pagination:", data.pagination);
7975
+ * data.products.forEach(product => {
7976
+ * console.log(`Up-sell: ${product.name} - ${product.price}`);
7977
+ * });
7978
+ * }
7979
+ * ```
4963
7980
  */
4964
7981
  listUpsellProducts(query: PosListUpsellProductsQuery, headers?: PosListUpsellProductsHeaderParams): Promise<ApiResult<PosListUpsellProductsContent>>;
4965
7982
  /**
@@ -4967,6 +7984,34 @@ declare class PosClient extends PosAPIClient {
4967
7984
  * @param pathParams - Product ID or slug
4968
7985
  * @param headers - Optional header parameters
4969
7986
  * @returns Promise with product details
7987
+ * @example
7988
+ * ```typescript
7989
+ * // Get product by ID
7990
+ * const { data, error } = await pos.getProductDetail(
7991
+ * { product_id_or_slug: "prod_123" }
7992
+ * );
7993
+ *
7994
+ * if (error) {
7995
+ * console.error("Failed to get product details:", error.message);
7996
+ * } else {
7997
+ * console.log("Product:", data.product.name);
7998
+ * console.log("Price:", data.product.price);
7999
+ * console.log("Description:", data.product.description);
8000
+ * }
8001
+ *
8002
+ * // Get product by slug
8003
+ * const { data: slugData, error: slugError } = await pos.getProductDetail({
8004
+ * product_id_or_slug: "detox-candy"
8005
+ * });
8006
+ *
8007
+ * // Override customer group ID for this specific request
8008
+ * const { data: overrideData, error: overrideError } = await pos.getProductDetail(
8009
+ * { product_id_or_slug: "detox-candy" },
8010
+ * {
8011
+ * "x-customer-group-id": "premium_customers" // Override default SDK config
8012
+ * }
8013
+ * );
8014
+ * ```
4970
8015
  */
4971
8016
  getProductDetail(pathParams: PosGetProductDetailPathParams, headers?: PosGetProductDetailHeaderParams): Promise<ApiResult<PosGetProductDetailContent>>;
4972
8017
  /**
@@ -4974,6 +8019,31 @@ declare class PosClient extends PosAPIClient {
4974
8019
  * @param pathParams - Product ID
4975
8020
  * @param query - Optional query parameters for filtering reviews
4976
8021
  * @returns Promise with product reviews
8022
+ * @example
8023
+ * ```typescript
8024
+ * const { data, error } = await pos.listProductReviews(
8025
+ * { product_id: "prod_123" }
8026
+ * );
8027
+ *
8028
+ * if (error) {
8029
+ * console.error("Failed to list product reviews:", error.message);
8030
+ * } else {
8031
+ * console.log("Reviews found:", data.reviews?.length || 0);
8032
+ * data.reviews?.forEach(review => {
8033
+ * console.log(`Review by ${review.customer_name}: ${review.rating}/5`);
8034
+ * console.log("Comment:", review.comment);
8035
+ * });
8036
+ * }
8037
+ *
8038
+ * // With pagination
8039
+ * const { data: reviewData, error: reviewError } = await pos.listProductReviews(
8040
+ * { product_id: "prod_123" },
8041
+ * {
8042
+ * page: 1,
8043
+ * limit: 5
8044
+ * }
8045
+ * );
8046
+ * ```
4977
8047
  */
4978
8048
  listProductReviews(pathParams: PosListProductReviewsPathParams, query?: PosListProductReviewsQuery): Promise<ApiResult<PosListProductReviewsContent>>;
4979
8049
  /**
@@ -4981,6 +8051,29 @@ declare class PosClient extends PosAPIClient {
4981
8051
  * @param pathParams - Product ID
4982
8052
  * @param headers - Optional header parameters
4983
8053
  * @returns Promise with product variants
8054
+ * @example
8055
+ * ```typescript
8056
+ * const { data, error } = await pos.listProductVariants(
8057
+ * { product_id: "prod_123" }
8058
+ * );
8059
+ *
8060
+ * if (error) {
8061
+ * console.error("Failed to list product variants:", error.message);
8062
+ * } else {
8063
+ * console.log("Variants found:", data.variants?.length || 0);
8064
+ * data.variants?.forEach(variant => {
8065
+ * console.log(`Variant: ${variant.name} - SKU: ${variant.sku} - Price: ${variant.price}`);
8066
+ * });
8067
+ * }
8068
+ *
8069
+ * // Override customer group ID for this specific request
8070
+ * const { data: overrideData, error: overrideError } = await pos.listProductVariants(
8071
+ * { product_id: "prod_123" },
8072
+ * {
8073
+ * "x-customer-group-id": "wholesale_customers" // Override default SDK config
8074
+ * }
8075
+ * );
8076
+ * ```
4984
8077
  */
4985
8078
  listProductVariants(pathParams: PosListProductVariantsPathParams, headers?: PosListProductVariantsHeaderParams): Promise<ApiResult<PosListProductVariantsContent>>;
4986
8079
  /**
@@ -4988,6 +8081,35 @@ declare class PosClient extends PosAPIClient {
4988
8081
  * @param pathParams - Product ID and variant ID
4989
8082
  * @param headers - Optional header parameters
4990
8083
  * @returns Promise with variant details
8084
+ * @example
8085
+ * ```typescript
8086
+ * const { data, error } = await pos.getVariantDetail(
8087
+ * {
8088
+ * product_id: "prod_123",
8089
+ * variant_id: "var_456"
8090
+ * }
8091
+ * );
8092
+ *
8093
+ * if (error) {
8094
+ * console.error("Failed to get variant details:", error.message);
8095
+ * } else {
8096
+ * console.log("Variant:", data.variant.name);
8097
+ * console.log("SKU:", data.variant.sku);
8098
+ * console.log("Price:", data.variant.price);
8099
+ * console.log("Stock:", data.variant.stock);
8100
+ * }
8101
+ *
8102
+ * // Override customer group ID for this specific request
8103
+ * const { data: overrideData, error: overrideError } = await pos.getVariantDetail(
8104
+ * {
8105
+ * product_id: "prod_123",
8106
+ * variant_id: "var_456"
8107
+ * },
8108
+ * {
8109
+ * "x-customer-group-id": "wholesale_customers" // Override default SDK config
8110
+ * }
8111
+ * );
8112
+ * ```
4991
8113
  */
4992
8114
  getVariantDetail(pathParams: PosGetVariantDetailPathParams, headers?: PosGetVariantDetailHeaderParams): Promise<ApiResult<PosGetVariantDetailContent>>;
4993
8115
  /**
@@ -4995,8 +8117,536 @@ declare class PosClient extends PosAPIClient {
4995
8117
  * @param query - Optional query parameters for filtering SKUs
4996
8118
  * @param headers - Optional header parameters
4997
8119
  * @returns Promise with list of SKUs
8120
+ * @example
8121
+ * ```typescript
8122
+ * // Basic SKU listing
8123
+ * const { data, error } = await pos.listSkus();
8124
+ *
8125
+ * if (error) {
8126
+ * console.error("Failed to list SKUs:", error.message);
8127
+ * } else {
8128
+ * console.log("SKUs found:", data.skus?.length || 0);
8129
+ * console.log("Pagination:", data.pagination);
8130
+ * data.skus?.forEach(sku => {
8131
+ * console.log(`SKU: ${sku.sku} - Price: ${sku.price}`);
8132
+ * });
8133
+ * }
8134
+ *
8135
+ * // With pagination
8136
+ * const { data: skuData, error: skuError } = await pos.listSkus({
8137
+ * page: 1,
8138
+ * limit: 50
8139
+ * });
8140
+ *
8141
+ * // Override customer group ID for this specific request
8142
+ * const { data: overrideData, error: overrideError } = await pos.listSkus(
8143
+ * {
8144
+ * page: 1,
8145
+ * limit: 50
8146
+ * },
8147
+ * {
8148
+ * "x-customer-group-id": "01H9XYZ12345USERID" // Override default SDK config
8149
+ * }
8150
+ * );
8151
+ * ```
4998
8152
  */
4999
8153
  listSkus(query?: PosListSkusQuery, headers?: PosListSkusHeaderParams): Promise<ApiResult<PosListSkusContent>>;
8154
+ /**
8155
+ * List all inventories (Admin)
8156
+ * @param query - Optional query parameters for filtering inventories
8157
+ * @returns Promise with list of inventories
8158
+ * @example
8159
+ * ```typescript
8160
+ * // Basic inventory listing
8161
+ * const { data, error } = await pos.listInventories();
8162
+ *
8163
+ * if (error) {
8164
+ * console.error("Failed to list inventories:", error.message);
8165
+ * } else {
8166
+ * console.log("Inventories found:", data.content?.inventories?.length || 0);
8167
+ * data.content?.inventories?.forEach(inventory => {
8168
+ * console.log(`Product: ${inventory.product_name} - Stock: ${inventory.stock_quantity}`);
8169
+ * });
8170
+ * }
8171
+ *
8172
+ * // With pagination and filters
8173
+ * const { data: filteredData, error: filteredError } = await pos.listInventories({
8174
+ * page: 1,
8175
+ * limit: 20,
8176
+ * sort_by: JSON.stringify({ "stock_quantity": "desc" }),
8177
+ * filters: JSON.stringify({ "product_name": "smartphone" })
8178
+ * });
8179
+ * ```
8180
+ */
8181
+ listInventories(query?: PosListInventoryQuery): Promise<ApiResult<PosListInventoryContent>>;
8182
+ /**
8183
+ * List all inventory activities (Admin)
8184
+ * @param query - Optional query parameters for filtering inventory activities
8185
+ * @returns Promise with list of inventory activities
8186
+ * @example
8187
+ * ```typescript
8188
+ * // Basic inventory activities listing
8189
+ * const { data, error } = await pos.listInventoryActivities();
8190
+ *
8191
+ * if (error) {
8192
+ * console.error("Failed to list inventory activities:", error.message);
8193
+ * } else {
8194
+ * console.log("Activities found:", data.content?.activities?.length || 0);
8195
+ * data.content?.activities?.forEach(activity => {
8196
+ * console.log(`Activity: ${activity.activity_type} - Product: ${activity.product_name} - Quantity: ${activity.quantity}`);
8197
+ * });
8198
+ * }
8199
+ *
8200
+ * // With pagination and filters
8201
+ * const { data: filteredData, error: filteredError } = await pos.listInventoryActivities({
8202
+ * page: 1,
8203
+ * limit: 50,
8204
+ * sort_by: JSON.stringify({ "created_at": "desc" }),
8205
+ * filters: JSON.stringify({ "activity_type": "add" })
8206
+ * });
8207
+ * ```
8208
+ */
8209
+ listInventoryActivities(query?: PosListInventoryActivityQuery): Promise<ApiResult<PosListInventoryActivityContent>>;
8210
+ /**
8211
+ * Get inventory detail (Admin)
8212
+ * @param query - Query parameters with product/variant information
8213
+ * @returns Promise with inventory details
8214
+ * @example
8215
+ * ```typescript
8216
+ * // Get inventory detail for a product
8217
+ * const { data, error } = await pos.getInventoryDetail({
8218
+ * product_id: "01H9XYZ12345ABCDE"
8219
+ * });
8220
+ *
8221
+ * if (error) {
8222
+ * console.error("Failed to get inventory detail:", error.message);
8223
+ * } else {
8224
+ * const inventory = data.content?.inventory;
8225
+ * console.log(`Product: ${inventory?.product_name}`);
8226
+ * console.log(`Stock: ${inventory?.stock_quantity}`);
8227
+ * console.log(`Warehouse details:`, inventory?.details);
8228
+ * }
8229
+ *
8230
+ * // Get inventory detail for a product variant
8231
+ * const { data: variantData, error: variantError } = await pos.getInventoryDetail({
8232
+ * product_id: "01H9XYZ12345ABCDE",
8233
+ * variant_id: "01H9ABC67890FGHIJ"
8234
+ * });
8235
+ *
8236
+ * // Get inventory detail for a specific lot/batch
8237
+ * const { data: batchData, error: batchError } = await pos.getInventoryDetail({
8238
+ * product_id: "01H9XYZ12345ABCDE",
8239
+ * lot_batch: "BATCH001"
8240
+ * });
8241
+ * ```
8242
+ */
8243
+ getInventoryDetail(query: PosListInventoryDetailQuery): Promise<ApiResult<PosListInventoryDetailContent>>;
8244
+ /**
8245
+ * List all customers (Admin)
8246
+ * @param query - Optional query parameters for filtering customers
8247
+ * @returns Promise with list of customers
8248
+ * @example
8249
+ * ```typescript
8250
+ * // Basic customer listing
8251
+ * const { data, error } = await pos.getCustomers();
8252
+ *
8253
+ * if (error) {
8254
+ * console.error("Failed to list customers:", error.message);
8255
+ * } else {
8256
+ * console.log("Customers found:", data.content?.customers?.length || 0);
8257
+ * console.log("Pagination:", data.content?.pagination);
8258
+ * data.content?.customers?.forEach(customer => {
8259
+ * console.log(`Customer: ${customer.full_name} - Email: ${customer.email}`);
8260
+ * });
8261
+ * }
8262
+ *
8263
+ * // With search and pagination
8264
+ * const { data: searchData, error: searchError } = await pos.getCustomers({
8265
+ * page: 1,
8266
+ * limit: 20,
8267
+ * search: "john@example.com",
8268
+ * sort_by: JSON.stringify({ "created_at": "desc" })
8269
+ * });
8270
+ * ```
8271
+ */
8272
+ getCustomers(query?: PosListCustomersQuery): Promise<ApiResult<PosListCustomersContent>>;
8273
+ /**
8274
+ * Get customer details (Admin)
8275
+ * @param pathParams - Customer ID
8276
+ * @returns Promise with customer details
8277
+ * @example
8278
+ * ```typescript
8279
+ * const { data, error } = await pos.getCustomer({
8280
+ * id: "01H9CUST12345ABCDE"
8281
+ * });
8282
+ *
8283
+ * if (error) {
8284
+ * console.error("Failed to get customer:", error.message);
8285
+ * } else {
8286
+ * const customer = data.content?.customer;
8287
+ * console.log(`Customer: ${customer?.full_name}`);
8288
+ * console.log(`Email: ${customer?.email}`);
8289
+ * console.log(`Phone: ${customer?.phone}`);
8290
+ * console.log(`Loyalty points: ${customer?.loyalty?.points_balance}`);
8291
+ * console.log(`Total spent: ${customer?.loyalty?.lifetime_spent}`);
8292
+ * }
8293
+ * ```
8294
+ */
8295
+ getCustomer(pathParams: PosGetCustomerDetailPathParams): Promise<ApiResult<PosGetCustomerDetailContent>>;
8296
+ /**
8297
+ * List all orders (Admin)
8298
+ * @param query - Optional query parameters for filtering orders
8299
+ * @returns Promise with list of orders
8300
+ * @example
8301
+ * ```typescript
8302
+ * // Basic order listing
8303
+ * const { data, error } = await pos.listOrders();
8304
+ *
8305
+ * if (error) {
8306
+ * console.error("Failed to list orders:", error.message);
8307
+ * } else {
8308
+ * console.log("Orders found:", data.content?.orders?.length || 0);
8309
+ * console.log("Pagination:", data.content?.pagination);
8310
+ * data.content?.orders?.forEach(order => {
8311
+ * console.log(`Order: ${order.order_number} - Status: ${order.status} - Total: ${order.grand_total}`);
8312
+ * });
8313
+ * }
8314
+ *
8315
+ * // With filters and pagination
8316
+ * const { data: filteredData, error: filteredError } = await pos.listOrders({
8317
+ * page: 1,
8318
+ * limit: 50,
8319
+ * search: "ORD-2024",
8320
+ * filters: JSON.stringify({ "status": "delivered", "payment_status": "success" }),
8321
+ * sort_by: JSON.stringify({ "order_date": "desc" })
8322
+ * });
8323
+ * ```
8324
+ */
8325
+ listOrders(query?: PosListOrdersQuery): Promise<ApiResult<PosListOrdersContent>>;
8326
+ /**
8327
+ * Get order details (Admin)
8328
+ * @param pathParams - Order number
8329
+ * @returns Promise with order details
8330
+ * @example
8331
+ * ```typescript
8332
+ * const { data, error } = await pos.getOrderDetail({
8333
+ * order_number: "ORD-2024-001234"
8334
+ * });
8335
+ *
8336
+ * if (error) {
8337
+ * console.error("Failed to get order:", error.message);
8338
+ * } else {
8339
+ * const order = data.content?.order;
8340
+ * console.log(`Order: ${order?.order_number}`);
8341
+ * console.log(`Status: ${order?.status}`);
8342
+ * console.log(`Payment Status: ${order?.payment_status}`);
8343
+ * console.log(`Total: ${order?.grand_total}`);
8344
+ * console.log(`Items:`, order?.order_items);
8345
+ * console.log(`Billing Address:`, order?.billing_address);
8346
+ * console.log(`Payments:`, order?.payments);
8347
+ * }
8348
+ * ```
8349
+ */
8350
+ getOrderDetail(pathParams: PosGetOrderDetailPathParams): Promise<ApiResult<PosGetOrderDetailContent>>;
8351
+ /**
8352
+ * List order activity (Admin)
8353
+ * @param pathParams - Order number
8354
+ * @returns Promise with order activities
8355
+ * @example
8356
+ * ```typescript
8357
+ * const { data, error } = await pos.listOrderActivity({
8358
+ * order_number: "ORD-2024-001234"
8359
+ * });
8360
+ *
8361
+ * if (error) {
8362
+ * console.error("Failed to get order activity:", error.message);
8363
+ * } else {
8364
+ * console.log("Activities found:", data.content?.activity?.length || 0);
8365
+ * data.content?.activity?.forEach(activity => {
8366
+ * console.log(`${activity.created_at}: ${activity.activity_type} - ${activity.comment}`);
8367
+ * console.log(`By: ${activity.user_name} (${activity.user_type})`);
8368
+ * });
8369
+ * }
8370
+ * ```
8371
+ */
8372
+ listOrderActivity(pathParams: PosListOrderActivityPathParams): Promise<ApiResult<PosListOrderActivityContent>>;
8373
+ /**
8374
+ * Get order invoice (Admin)
8375
+ * @param pathParams - Order number
8376
+ * @param query - Optional format parameter
8377
+ * @returns Promise with order invoice
8378
+ * @example
8379
+ * ```typescript
8380
+ * // Get invoice as JSON
8381
+ * const { data, error } = await pos.getOrderInvoice(
8382
+ * { order_number: "ORD-2024-001234" },
8383
+ * { format: "json" }
8384
+ * );
8385
+ *
8386
+ * if (error) {
8387
+ * console.error("Failed to get order invoice:", error.message);
8388
+ * } else {
8389
+ * data.content?.invoices?.forEach(invoice => {
8390
+ * console.log(`Invoice: ${invoice.invoice_number}`);
8391
+ * console.log(`Date: ${invoice.invoice_date}`);
8392
+ * console.log(`Total: ${invoice.grand_total}`);
8393
+ * console.log(`Items:`, invoice.items);
8394
+ * });
8395
+ * }
8396
+ *
8397
+ * // Get invoice as PDF
8398
+ * const { data: pdfData, error: pdfError } = await pos.getOrderInvoice(
8399
+ * { order_number: "ORD-2024-001234" },
8400
+ * { format: "pdf" }
8401
+ * );
8402
+ * ```
8403
+ */
8404
+ getOrderInvoice(pathParams: PosGetOrderInvoicePathParams, query?: PosGetOrderInvoiceQuery): Promise<ApiResult<PosGetOrderInvoiceContent>>;
8405
+ /**
8406
+ * Get order receipt (Admin)
8407
+ * @param pathParams - Order number
8408
+ * @param query - Optional format parameter
8409
+ * @returns Promise with order receipt
8410
+ * @example
8411
+ * ```typescript
8412
+ * // Get receipt as JSON
8413
+ * const { data, error } = await pos.getOrderReceipt(
8414
+ * { order_number: "ORD-2024-001234" },
8415
+ * { format: "json" }
8416
+ * );
8417
+ *
8418
+ * if (error) {
8419
+ * console.error("Failed to get order receipt:", error.message);
8420
+ * } else {
8421
+ * const receipt = data.content?.order_receipt;
8422
+ * console.log(`Order: ${receipt?.order_number}`);
8423
+ * console.log(`Date: ${receipt?.order_date}`);
8424
+ * console.log(`Total: ${receipt?.grand_total}`);
8425
+ * console.log(`Items:`, receipt?.order_items);
8426
+ * console.log(`Payments:`, receipt?.payments);
8427
+ * }
8428
+ *
8429
+ * // Get receipt as PDF
8430
+ * const { data: pdfData, error: pdfError } = await pos.getOrderReceipt(
8431
+ * { order_number: "ORD-2024-001234" },
8432
+ * { format: "pdf" }
8433
+ * );
8434
+ * ```
8435
+ */
8436
+ getOrderReceipt(pathParams: PosGetOrderReceiptPathParams, query?: PosGetOrderReceiptQuery): Promise<ApiResult<PosGetOrderReceiptContent>>;
8437
+ /**
8438
+ * Get order shipments (Admin)
8439
+ * @param pathParams - Order number
8440
+ * @returns Promise with order shipments
8441
+ * @example
8442
+ * ```typescript
8443
+ * const { data, error } = await pos.getOrderShipments({
8444
+ * order_number: "ORD-2024-001234"
8445
+ * });
8446
+ *
8447
+ * if (error) {
8448
+ * console.error("Failed to get order shipments:", error.message);
8449
+ * } else {
8450
+ * const shipment = data.content?.shipment;
8451
+ * console.log(`Order: ${shipment?.order_number}`);
8452
+ * console.log(`Order Status: ${shipment?.order_status}`);
8453
+ * console.log(`Payment Status: ${shipment?.payment_status}`);
8454
+ * console.log(`Customer: ${shipment?.customer_name}`);
8455
+ * console.log(`Shipments:`, shipment?.shipments);
8456
+ * console.log(`Allowed Actions:`, shipment?.allowed_actions);
8457
+ * }
8458
+ * ```
8459
+ */
8460
+ getOrderShipments(pathParams: PosListOrderShipmentsPathParams): Promise<ApiResult<PosListOrderShipmentsContent>>;
8461
+ /**
8462
+ * List all shipments (Admin)
8463
+ * @param query - Optional query parameters for filtering shipments
8464
+ * @returns Promise with list of shipments
8465
+ * @example
8466
+ * ```typescript
8467
+ * // Basic shipment listing
8468
+ * const { data, error } = await pos.listShipments();
8469
+ *
8470
+ * if (error) {
8471
+ * console.error("Failed to list shipments:", error.message);
8472
+ * } else {
8473
+ * console.log("Shipments found:", data.content?.shipments?.length || 0);
8474
+ * console.log("Pagination:", data.content?.pagination);
8475
+ * data.content?.shipments?.forEach(shipment => {
8476
+ * console.log(`Shipment: ${shipment.shipment_number} - Status: ${shipment.status}`);
8477
+ * console.log(`Order: ${shipment.order_number} - AWB: ${shipment.awb_no}`);
8478
+ * });
8479
+ * }
8480
+ *
8481
+ * // With filters and search
8482
+ * const { data: filteredData, error: filteredError } = await pos.listShipments({
8483
+ * page: 1,
8484
+ * limit: 25,
8485
+ * search: "SHIP-2024",
8486
+ * filters: JSON.stringify({ "status": "shipped" }),
8487
+ * sort_by: JSON.stringify({ "shipped_date": "desc" })
8488
+ * });
8489
+ * ```
8490
+ */
8491
+ listShipments(query?: PosListShipmentsQuery): Promise<ApiResult<PosListShipmentsContent>>;
8492
+ /**
8493
+ * Check inventory for order (Admin)
8494
+ * @param pathParams - Order number
8495
+ * @returns Promise with inventory check results
8496
+ * @example
8497
+ * ```typescript
8498
+ * const { data, error } = await pos.checkInventory({
8499
+ * order_number: "ORD-2024-001234"
8500
+ * });
8501
+ *
8502
+ * if (error) {
8503
+ * console.error("Failed to check inventory:", error.message);
8504
+ * } else {
8505
+ * const inventory = data.content;
8506
+ * console.log(`Inventory Status: ${inventory?.inventory_status}`);
8507
+ * console.log(`Shipment Items:`, inventory?.shipment_items);
8508
+ * console.log(`Recommended Warehouses:`, inventory?.recommended_warehouses);
8509
+ * console.log(`Inventory Detail:`, inventory?.inventory_detail);
8510
+ * console.log(`Allowed Actions:`, inventory?.allowed_action);
8511
+ * }
8512
+ * ```
8513
+ */
8514
+ checkInventory(pathParams: PosCheckOrderInventoryPathParams): Promise<ApiResult<PosCheckOrderInventoryContent>>;
8515
+ /**
8516
+ * Refund shortfall for order (Admin)
8517
+ * @param pathParams - Order number
8518
+ * @param body - Refund details
8519
+ * @returns Promise with refund confirmation
8520
+ * @example
8521
+ * ```typescript
8522
+ * const { data, error } = await pos.refundShortfall(
8523
+ * { order_number: "ORD-2024-001234" },
8524
+ * {
8525
+ * items: [
8526
+ * {
8527
+ * sku: "SKU-123",
8528
+ * quantity: 2,
8529
+ * free_quantity: 0
8530
+ * }
8531
+ * ],
8532
+ * payment_method: "original-payment-mode"
8533
+ * }
8534
+ * );
8535
+ *
8536
+ * if (error) {
8537
+ * console.error("Failed to process refund:", error.message);
8538
+ * } else {
8539
+ * console.log("Refund processed:", data.message);
8540
+ * console.log("Success:", data.success);
8541
+ * }
8542
+ *
8543
+ * // Refund to bank transfer
8544
+ * const { data: bankData, error: bankError } = await pos.refundShortfall(
8545
+ * { order_number: "ORD-2024-001234" },
8546
+ * {
8547
+ * items: [{ sku: "SKU-123", quantity: 1 }],
8548
+ * payment_method: "bank-transfer",
8549
+ * bank_account_id: "BANK_ACC_123"
8550
+ * }
8551
+ * );
8552
+ * ```
8553
+ */
8554
+ refundShortfall(pathParams: PosRefundShortfallPathParams, body: PosRefundShortfallBody): Promise<ApiResult<PosRefundShortfallResponse>>;
8555
+ /**
8556
+ * Get shipment details (Admin)
8557
+ * @param pathParams - Shipment reference number
8558
+ * @returns Promise with shipment details
8559
+ * @example
8560
+ * ```typescript
8561
+ * const { data, error } = await pos.getShipment({
8562
+ * reference_number: "SHIP-2024-001234"
8563
+ * });
8564
+ *
8565
+ * if (error) {
8566
+ * console.error("Failed to get shipment:", error.message);
8567
+ * } else {
8568
+ * const shipment = data.content?.shipment;
8569
+ * console.log(`Order: ${shipment?.order_number}`);
8570
+ * console.log(`Shipments:`, shipment?.shipments);
8571
+ * shipment?.shipments?.forEach(s => {
8572
+ * console.log(` Shipment: ${s.shipment_number} - Status: ${s.status}`);
8573
+ * console.log(` AWB: ${s.awb_no} - Courier: ${s.courier_company_name}`);
8574
+ * console.log(` Items:`, s.shipment_items);
8575
+ * });
8576
+ * }
8577
+ * ```
8578
+ */
8579
+ getShipment(pathParams: PosGetShipmentDetailPathParams): Promise<ApiResult<PosGetShipmentDetailContent>>;
8580
+ /**
8581
+ * Get shipment invoice (Admin)
8582
+ * @param pathParams - Shipment reference number
8583
+ * @param query - Optional format parameter
8584
+ * @returns Promise with shipment invoice
8585
+ * @example
8586
+ * ```typescript
8587
+ * // Get shipment invoice as JSON
8588
+ * const { data, error } = await pos.getShipmentInvoice(
8589
+ * { reference_number: "SHIP-2024-001234" },
8590
+ * { format: "json" }
8591
+ * );
8592
+ *
8593
+ * if (error) {
8594
+ * console.error("Failed to get shipment invoice:", error.message);
8595
+ * } else {
8596
+ * const invoice = data.content?.invoice;
8597
+ * console.log(`Invoice: ${invoice?.invoice_number}`);
8598
+ * console.log(`Date: ${invoice?.invoice_date}`);
8599
+ * console.log(`Total: ${invoice?.grand_total}`);
8600
+ * console.log(`Items:`, invoice?.items);
8601
+ * }
8602
+ *
8603
+ * // Get shipment invoice as PDF
8604
+ * const { data: pdfData, error: pdfError } = await pos.getShipmentInvoice(
8605
+ * { reference_number: "SHIP-2024-001234" },
8606
+ * { format: "pdf" }
8607
+ * );
8608
+ * ```
8609
+ */
8610
+ getShipmentInvoice(pathParams: PosGetShipmentInvoicePathParams, query?: PosGetShipmentInvoiceQuery): Promise<ApiResult<PosGetShipmentInvoiceContent>>;
8611
+ /**
8612
+ * Update shipment details (Admin)
8613
+ * @param pathParams - Shipment reference number
8614
+ * @param body - Shipment update data
8615
+ * @returns Promise with updated shipment
8616
+ * @example
8617
+ * ```typescript
8618
+ * const { data, error } = await pos.updateShipment(
8619
+ * { reference_number: "SHIP-2024-001234" },
8620
+ * {
8621
+ * status: "shipped",
8622
+ * awb_no: "AWB123456789",
8623
+ * courier_company_name: "BlueDart",
8624
+ * shipping_label_url: "https://example.com/label.pdf",
8625
+ * tracking_url: "https://tracking.example.com/AWB123456789",
8626
+ * eta_delivery: "2024-01-15T10:00:00Z",
8627
+ * shipped_date: "2024-01-10T14:30:00Z"
8628
+ * }
8629
+ * );
8630
+ *
8631
+ * if (error) {
8632
+ * console.error("Failed to update shipment:", error.message);
8633
+ * } else {
8634
+ * console.log("Shipment updated successfully:", data.message);
8635
+ * const shipment = data.content?.shipment;
8636
+ * console.log(`Updated shipment status:`, shipment?.shipments?.[0]?.status);
8637
+ * }
8638
+ *
8639
+ * // Update delivery status
8640
+ * const { data: deliveryData, error: deliveryError } = await pos.updateShipment(
8641
+ * { reference_number: "SHIP-2024-001234" },
8642
+ * {
8643
+ * status: "delivered",
8644
+ * delivered_date: "2024-01-15T16:45:00Z"
8645
+ * }
8646
+ * );
8647
+ * ```
8648
+ */
8649
+ updateShipment(pathParams: PosUpdateShipmentPathParams, body: PosUpdateShipmentBody): Promise<ApiResult<PosUpdateShipmentContent>>;
5000
8650
  }
5001
8651
  //#endregion
5002
8652
  //#region src/lib/middleware/auth.d.ts
@@ -5254,5 +8904,5 @@ declare class PosSDK {
5254
8904
  getTenantId(): Promise<string | null>;
5255
8905
  }
5256
8906
  //#endregion
5257
- export { AcceleratedRewardCouponPromotion, AcceleratedRewardRule, AdditionalProductDetails, ApiErrorResponse, ApiResult, ApplicableCoupon, ApplicablePromotion, AppliedCoupon, AppliedPromotion, AssociatedOption, AutoScaleBasedOnAmount, AutoScaleBasedOnQuantity, BankTransfer, BaseAPIClient, BaseSDKOptions, BooleanAttribute, BrowserTokenStorage, BuyXGetYCouponPromotion, BuyXGetYRule, BuyXGetYRuleBasedOnAmount, BuyXGetYRuleBasedOnQuantity, CardPayment, Cart, CartBasedServiceabilityCheck, CartItem, Category, CollectInStore, CollectInStoreFulfillment, ColorAttribute, ColorOption, Coupon, CouponPromotionCommonDetail, CouponType, CreatePosOrderBody, CreatePosOrderContent, CreatePosOrderResponse, Currency, CustomSlabsBasedOnAmount, CustomSlabsBasedOnQuantity, CustomerAddress, DateAttribute, DebugLogger, DebugLoggerFn, DeliveryFulfillment, DiscountBasedPromotion, DiscountCouponPromotion, DiscountRule, Environment, FixedAmountDiscountRule, FixedPriceCouponPromotion, FixedPricePromotion, FixedPriceRule, FixedPriceRuleBasedAmount, FixedPriceRuleBasedQuantity, FreeGoodCouponPromotion, FreeGoodsPromotion, FreeGoodsRule, FreeShipingCouponPromotion, GetPosFulfillmentOptionsBody, GetPosFulfillmentOptionsContent, GetPosFulfillmentOptionsResponse, HeaderConfig, InapplicableCoupon, InapplicablePromotion, Item, LoginPosDeviceWithEmailBody, LoginPosDeviceWithEmailContent, LoginPosDeviceWithEmailResponse, LoginPosDeviceWithPhoneBody, LoginPosDeviceWithPhoneContent, LoginPosDeviceWithPhoneResponse, LoginPosDeviceWithWhatsappBody, LoginPosDeviceWithWhatsappContent, LoginPosDeviceWithWhatsappResponse, LogoutFromPosDeviceResponse, MemoryTokenStorage, MultiSelectAttribute, NetbankingPayment, NumberAttribute, Order, OrderDetail, OrderItem, OrderPayment, OrderRefund, OrderShipment, Pagination, PairPosDeviceBody, PairPosDeviceContent, PairPosDeviceResponse, PaymentInfo, PercentageDiscountRule, PincodeServiceability, PosAPIClient, PosApplyCouponBody, PosApplyCouponContent, PosApplyCouponPathParams, PosApplyCouponResponse, PosClient, PosCreateCartAddressBody, PosCreateCartAddressContent, PosCreateCartAddressPathParams, PosCreateCartAddressResponse, PosCreateCartBody, PosCreateCartContent, PosCreateCartResponse, PosDeleteCartPathParams, PosDeleteCartResponse, PosDevice, PosEvaluateCouponsContent, PosEvaluateCouponsPathParams, PosEvaluateCouponsResponse, PosEvaluatePromotionsContent, PosEvaluatePromotionsPathParams, PosEvaluatePromotionsResponse, PosGetCartContent, PosGetCartPathParams, PosGetCartResponse, PosGetProductDetailContent, PosGetProductDetailHeaderParams, PosGetProductDetailPathParams, PosGetProductDetailResponse, PosGetVariantDetailContent, PosGetVariantDetailHeaderParams, PosGetVariantDetailPathParams, PosGetVariantDetailResponse, PosListCategoriesContent, PosListCategoriesQuery, PosListCategoriesResponse, PosListCouponsContent, PosListCouponsHeaderParams, PosListCouponsResponse, PosListCrosssellProductsContent, PosListCrosssellProductsHeaderParams, PosListCrosssellProductsQuery, PosListCrosssellProductsResponse, PosListProductReviewsContent, PosListProductReviewsPathParams, PosListProductReviewsQuery, PosListProductReviewsResponse, PosListProductVariantsContent, PosListProductVariantsHeaderParams, PosListProductVariantsPathParams, PosListProductVariantsResponse, PosListProductsContent, PosListProductsHeaderParams, PosListProductsQuery, PosListProductsResponse, PosListPromotionsContent, PosListPromotionsHeaderParams, PosListPromotionsResponse, PosListSimilarProductsContent, PosListSimilarProductsHeaderParams, PosListSimilarProductsQuery, PosListSimilarProductsResponse, PosListSkusContent, PosListSkusHeaderParams, PosListSkusQuery, PosListSkusResponse, PosListUpsellProductsContent, PosListUpsellProductsHeaderParams, PosListUpsellProductsQuery, PosListUpsellProductsResponse, PosRedeemCreditBalanceBody, PosRedeemCreditBalanceContent, PosRedeemCreditBalancePathParams, PosRedeemCreditBalanceResponse, PosRedeemLoyaltyPointsBody, PosRedeemLoyaltyPointsContent, PosRedeemLoyaltyPointsPathParams, PosRedeemLoyaltyPointsResponse, PosRemoveCouponContent, PosRemoveCouponPathParams, PosRemoveCouponResponse, PosRemoveCreditBalanceContent, PosRemoveCreditBalancePathParams, PosRemoveCreditBalanceResponse, PosRemoveLoyaltyPointsContent, PosRemoveLoyaltyPointsPathParams, PosRemoveLoyaltyPointsResponse, PosSDK, PosSDK as default, PosSDKOptions, PosSearchProductsBody, PosSearchProductsContent, PosSearchProductsHeaderParams, PosSearchProductsResponse, PosUpdateCartBody, PosUpdateCartContent, PosUpdateCartPathParams, PosUpdateCartResponse, PosUpdateCustomerWithEmail, PosUpdateCustomerWithId, PosUpdateCustomerWithPhone, PosUpdateFulfillmentPreferenceBody, PosUpdateFulfillmentPreferencePathParams, PosUpdateFulfillmentPreferenceResponse, PosUser, Product, ProductAttribute, ProductBundleItem, ProductCategory, ProductDetail, ProductImage, ProductPricing, ProductPromotion, ProductReview, ProductShipping, ProductSubscription, ProductVideo, Promotion, PromotionType, RefreshPosAccessTokenBody, RefreshPosAccessTokenContent, RefreshPosAccessTokenResponse, ResponseUtils, SearchProduct, Seo, ShipmentItem, SingleSelectAttribute, SingleSelectOption, SupportedDefaultHeaders, TextAttribute, type TokenStorage, UpdateCartItem, UpdatePosCartCustomerBody, UpdatePosCartCustomerContent, UpdatePosCartCustomerPathParams, UpdatePosCartCustomerResponse, UpiPayment, type UserInfo, Variant, VariantDetail, VariantOption, VerifyPosLoginOtpBody, VerifyPosLoginOtpContent, VerifyPosLoginOtpResponse, VolumeBasedCouponPromotion, VolumeBasedPromotion, VolumeBasedRule, WalletPayment, type components, createDebugMiddleware, createTimeoutMiddleware, executeRequest, extractRequestBody, getPathnameFromUrl, mergeAndTransformHeaders, mergeHeaders, type operations, type paths, transformHeaders };
8907
+ export { AcceleratedRewardCouponPromotion, AcceleratedRewardRule, AdditionalProductDetails, ApiErrorResponse, ApiResult, ApplicableCoupon, ApplicablePromotion, AppliedCoupon, AppliedPromotion, AssociatedOption, AutoScaleBasedOnAmount, AutoScaleBasedOnQuantity, BankTransfer, BaseAPIClient, BaseSDKOptions, BooleanAttribute, BrowserTokenStorage, BuyXGetYCouponPromotion, BuyXGetYRule, BuyXGetYRuleBasedOnAmount, BuyXGetYRuleBasedOnQuantity, CardPayment, Cart, CartBasedServiceabilityCheck, CartItem, Category, ClaimPosDevicePathParams, ClaimPosDeviceResponse, CollectInStore, CollectInStoreFulfillment, ColorAttribute, ColorOption, Coupon, CouponPromotionCommonDetail, CouponType, CreatePosOrderBody, CreatePosOrderContent, CreatePosOrderResponse, Currency, CustomSlabsBasedOnAmount, CustomSlabsBasedOnQuantity, CustomerAddress, DateAttribute, DebugLogger, DebugLoggerFn, DeliveryFulfillment, DiscountBasedPromotion, DiscountCouponPromotion, DiscountRule, Environment, FixedAmountDiscountRule, FixedPriceCouponPromotion, FixedPricePromotion, FixedPriceRule, FixedPriceRuleBasedAmount, FixedPriceRuleBasedQuantity, FreeGoodCouponPromotion, FreeGoodsPromotion, FreeGoodsRule, FreeShipingCouponPromotion, GetPosFulfillmentOptionsBody, GetPosFulfillmentOptionsContent, GetPosFulfillmentOptionsResponse, HeaderConfig, InapplicableCoupon, InapplicablePromotion, Item, JuspayPaymentGatewayParams, ListPosDevicesContent, ListPosDevicesResponse, ListPosLocationsContent, ListPosLocationsResponse, LoginPosDeviceWithEmailBody, LoginPosDeviceWithEmailContent, LoginPosDeviceWithEmailResponse, LoginPosDeviceWithPhoneBody, LoginPosDeviceWithPhoneContent, LoginPosDeviceWithPhoneResponse, LoginPosDeviceWithWhatsappBody, LoginPosDeviceWithWhatsappContent, LoginPosDeviceWithWhatsappResponse, LogoutFromPosDeviceResponse, MemoryTokenStorage, MultiSelectAttribute, NetbankingPayment, NumberAttribute, Order, OrderDetail, OrderItem, OrderPayment, OrderRefund, OrderShipment, Pagination, PairPosDeviceBody, PairPosDeviceContent, PairPosDeviceResponse, PayWithCard, PayWithCash, PayWithPaymentGateway, PayWithUpi, PaymentGateway, PaymentGatewayParams, PaymentInfo, PayuPaymentGatewayParams, PercentageDiscountRule, PincodeServiceability, PosAPIClient, PosApplyCouponBody, PosApplyCouponContent, PosApplyCouponPathParams, PosApplyCouponResponse, PosClient, PosCreateCartAddressBody, PosCreateCartAddressContent, PosCreateCartAddressPathParams, PosCreateCartAddressResponse, PosCreateCartBody, PosCreateCartContent, PosCreateCartResponse, PosDeleteCartPathParams, PosDeleteCartResponse, PosDevice, PosEvaluateCouponsContent, PosEvaluateCouponsPathParams, PosEvaluateCouponsResponse, PosEvaluatePromotionsContent, PosEvaluatePromotionsPathParams, PosEvaluatePromotionsResponse, PosGetCartContent, PosGetCartPathParams, PosGetCartResponse, PosGetPaymentStatusContent, PosGetPaymentStatusPathParams, PosGetPaymentStatusResponse, PosGetProductDetailContent, PosGetProductDetailHeaderParams, PosGetProductDetailPathParams, PosGetProductDetailResponse, PosGetVariantDetailContent, PosGetVariantDetailHeaderParams, PosGetVariantDetailPathParams, PosGetVariantDetailResponse, PosListCategoriesContent, PosListCategoriesQuery, PosListCategoriesResponse, PosListCouponsContent, PosListCouponsHeaderParams, PosListCouponsResponse, PosListCrosssellProductsContent, PosListCrosssellProductsHeaderParams, PosListCrosssellProductsQuery, PosListCrosssellProductsResponse, PosListPaymentOptionsContent, PosListPaymentOptionsResponse, PosListProductReviewsContent, PosListProductReviewsPathParams, PosListProductReviewsQuery, PosListProductReviewsResponse, PosListProductVariantsContent, PosListProductVariantsHeaderParams, PosListProductVariantsPathParams, PosListProductVariantsResponse, PosListProductsContent, PosListProductsHeaderParams, PosListProductsQuery, PosListProductsResponse, PosListPromotionsContent, PosListPromotionsHeaderParams, PosListPromotionsResponse, PosListSimilarProductsContent, PosListSimilarProductsHeaderParams, PosListSimilarProductsQuery, PosListSimilarProductsResponse, PosListSkusContent, PosListSkusHeaderParams, PosListSkusQuery, PosListSkusResponse, PosListUpsellProductsContent, PosListUpsellProductsHeaderParams, PosListUpsellProductsQuery, PosListUpsellProductsResponse, PosLocation, PosRedeemCreditBalanceBody, PosRedeemCreditBalanceContent, PosRedeemCreditBalancePathParams, PosRedeemCreditBalanceResponse, PosRedeemLoyaltyPointsBody, PosRedeemLoyaltyPointsContent, PosRedeemLoyaltyPointsPathParams, PosRedeemLoyaltyPointsResponse, PosRemoveCouponContent, PosRemoveCouponPathParams, PosRemoveCouponResponse, PosRemoveCreditBalanceContent, PosRemoveCreditBalancePathParams, PosRemoveCreditBalanceResponse, PosRemoveLoyaltyPointsContent, PosRemoveLoyaltyPointsPathParams, PosRemoveLoyaltyPointsResponse, PosSDK, PosSDK as default, PosSDKOptions, PosSearchProductsBody, PosSearchProductsContent, PosSearchProductsHeaderParams, PosSearchProductsResponse, PosUpdateCartBody, PosUpdateCartContent, PosUpdateCartPathParams, PosUpdateCartResponse, PosUpdateCustomerWithEmail, PosUpdateCustomerWithId, PosUpdateCustomerWithPhone, PosUpdateFulfillmentPreferenceBody, PosUpdateFulfillmentPreferencePathParams, PosUpdateFulfillmentPreferenceResponse, PosUser, Product, ProductAttribute, ProductBundleItem, ProductCategory, ProductDetail, ProductImage, ProductPricing, ProductPromotion, ProductReview, ProductShipping, ProductSubscription, ProductVideo, Promotion, PromotionType, RefreshPosAccessTokenBody, RefreshPosAccessTokenContent, RefreshPosAccessTokenResponse, ResponseUtils, SearchProduct, Seo, ShipmentItem, SingleSelectAttribute, SingleSelectOption, SupportedDefaultHeaders, TextAttribute, type TokenStorage, UnclaimPosDevicePathParams, UnclaimPosDeviceResponse, UpdateCartItem, UpdatePosCartCustomerBody, UpdatePosCartCustomerContent, UpdatePosCartCustomerPathParams, UpdatePosCartCustomerResponse, UpiPayment, type UserInfo, Variant, VariantDetail, VariantOption, VerifyPosLoginOtpBody, VerifyPosLoginOtpContent, VerifyPosLoginOtpResponse, VolumeBasedCouponPromotion, VolumeBasedPromotion, VolumeBasedRule, WalletPayment, type components, createDebugMiddleware, createTimeoutMiddleware, executeRequest, extractRequestBody, getPathnameFromUrl, mergeAndTransformHeaders, mergeHeaders, type operations, type paths, transformHeaders };
5258
8908
  //# sourceMappingURL=index.d.ts.map