@mestra-dev/contract 0.0.259 → 0.0.261

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +207 -64
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -2029,6 +2029,51 @@ declare const routes: import("hono/hono-base").HonoBase<{
2029
2029
  status: 200;
2030
2030
  };
2031
2031
  };
2032
+ } & {
2033
+ "/history/:workspace/:taskId": {
2034
+ $get: {
2035
+ input: {
2036
+ param: {
2037
+ workspace: string;
2038
+ } & {
2039
+ taskId: string;
2040
+ };
2041
+ };
2042
+ output: {
2043
+ success: false;
2044
+ error: string;
2045
+ };
2046
+ outputFormat: "json";
2047
+ status: 404;
2048
+ } | {
2049
+ input: {
2050
+ param: {
2051
+ workspace: string;
2052
+ } & {
2053
+ taskId: string;
2054
+ };
2055
+ };
2056
+ output: {
2057
+ success: true;
2058
+ history: {
2059
+ id: string;
2060
+ field: string;
2061
+ target: string | null;
2062
+ oldValue: string | null;
2063
+ newValue: string | null;
2064
+ createdAt: string;
2065
+ actor: {
2066
+ id: string;
2067
+ firstName: string | null;
2068
+ lastName: string | null;
2069
+ profilePicture: string | null;
2070
+ } | null;
2071
+ }[];
2072
+ };
2073
+ outputFormat: "json";
2074
+ status: 200;
2075
+ };
2076
+ };
2032
2077
  } & {
2033
2078
  "/update": {
2034
2079
  $post: {
@@ -3622,44 +3667,12 @@ declare const routes: import("hono/hono-base").HonoBase<{
3622
3667
  $post: {
3623
3668
  input: {
3624
3669
  json: {
3670
+ installmentNumber?: number | null | undefined;
3671
+ totalInstallments?: number | null | undefined;
3672
+ installmentGroupId?: string | null | undefined;
3625
3673
  workspace: string;
3626
3674
  invoiceId: string;
3627
- serviceId: string;
3628
- SellerFinanceAccountId: string;
3629
- customerId: string;
3630
- date: string | number;
3631
- language: "ru" | "en";
3632
- currency: "USD" | "EUR" | "RUB";
3633
- vatOption: "vat_included" | "vat_excluded";
3634
- vatRate?: number | undefined;
3635
- buyerInn?: string | undefined;
3636
- buyerKpp?: string | undefined;
3637
- unitName: string;
3638
- unitPrice: number;
3639
- unitQuantity: number;
3640
- notes?: string | undefined;
3641
- status?: "pending" | "canceled" | "paid" | "refunded" | undefined;
3642
- discount?: number | undefined;
3643
- fullPayment?: boolean | undefined;
3644
- installment?: boolean | undefined;
3645
- subscription?: boolean | undefined;
3646
- subscriptionStartDate?: string | number | undefined;
3647
- subscriptionEndDate?: string | number | undefined;
3648
- paymentMethod?: string | undefined;
3649
- };
3650
- };
3651
- output: {
3652
- success: false;
3653
- error: string;
3654
- };
3655
- outputFormat: "json";
3656
- status: 404;
3657
- } | {
3658
- input: {
3659
- json: {
3660
- workspace: string;
3661
- invoiceId: string;
3662
- serviceId: string;
3675
+ serviceId?: string | undefined;
3663
3676
  SellerFinanceAccountId: string;
3664
3677
  customerId: string;
3665
3678
  date: string | number;
@@ -3669,9 +3682,17 @@ declare const routes: import("hono/hono-base").HonoBase<{
3669
3682
  vatRate?: number | undefined;
3670
3683
  buyerInn?: string | undefined;
3671
3684
  buyerKpp?: string | undefined;
3672
- unitName: string;
3673
- unitPrice: number;
3674
- unitQuantity: number;
3685
+ services?: {
3686
+ serviceId?: string | null | undefined;
3687
+ name: string;
3688
+ unitPrice: number;
3689
+ quantity?: number | undefined;
3690
+ discount?: number | undefined;
3691
+ description?: string | undefined;
3692
+ }[] | undefined;
3693
+ unitName?: string | undefined;
3694
+ unitPrice?: number | undefined;
3695
+ unitQuantity?: number | undefined;
3675
3696
  notes?: string | undefined;
3676
3697
  status?: "pending" | "canceled" | "paid" | "refunded" | undefined;
3677
3698
  discount?: number | undefined;
@@ -3688,13 +3709,16 @@ declare const routes: import("hono/hono-base").HonoBase<{
3688
3709
  error: string;
3689
3710
  };
3690
3711
  outputFormat: "json";
3691
- status: 400;
3712
+ status: 400 | 404;
3692
3713
  } | {
3693
3714
  input: {
3694
3715
  json: {
3716
+ installmentNumber?: number | null | undefined;
3717
+ totalInstallments?: number | null | undefined;
3718
+ installmentGroupId?: string | null | undefined;
3695
3719
  workspace: string;
3696
3720
  invoiceId: string;
3697
- serviceId: string;
3721
+ serviceId?: string | undefined;
3698
3722
  SellerFinanceAccountId: string;
3699
3723
  customerId: string;
3700
3724
  date: string | number;
@@ -3704,9 +3728,17 @@ declare const routes: import("hono/hono-base").HonoBase<{
3704
3728
  vatRate?: number | undefined;
3705
3729
  buyerInn?: string | undefined;
3706
3730
  buyerKpp?: string | undefined;
3707
- unitName: string;
3708
- unitPrice: number;
3709
- unitQuantity: number;
3731
+ services?: {
3732
+ serviceId?: string | null | undefined;
3733
+ name: string;
3734
+ unitPrice: number;
3735
+ quantity?: number | undefined;
3736
+ discount?: number | undefined;
3737
+ description?: string | undefined;
3738
+ }[] | undefined;
3739
+ unitName?: string | undefined;
3740
+ unitPrice?: number | undefined;
3741
+ unitQuantity?: number | undefined;
3710
3742
  notes?: string | undefined;
3711
3743
  status?: "pending" | "canceled" | "paid" | "refunded" | undefined;
3712
3744
  discount?: number | undefined;
@@ -3736,7 +3768,9 @@ declare const routes: import("hono/hono-base").HonoBase<{
3736
3768
  installment: boolean | null;
3737
3769
  notes: string | null;
3738
3770
  currency: string;
3739
- serviceId: string;
3771
+ serviceId: string | null;
3772
+ invoiceDiscount: number;
3773
+ discount: number;
3740
3774
  SellerFinanceAccountId: string;
3741
3775
  date: string;
3742
3776
  language: string;
@@ -3744,15 +3778,30 @@ declare const routes: import("hono/hono-base").HonoBase<{
3744
3778
  unitName: string;
3745
3779
  unitPrice: number;
3746
3780
  unitQuantity: number;
3781
+ installmentNumber: number | null;
3782
+ totalInstallments: number | null;
3783
+ installmentGroupId: string | null;
3747
3784
  vatRate: number | null;
3748
3785
  paidAt: string | null;
3749
3786
  buyerInn: string | null;
3750
3787
  buyerKpp: string | null;
3751
- discount: number | null;
3752
3788
  subscription: boolean | null;
3753
3789
  subscriptionStartDate: string | null;
3754
3790
  subscriptionEndDate: string | null;
3755
3791
  paymentMethod: string | null;
3792
+ subtotal: number;
3793
+ lineDiscounts: number;
3794
+ total: number;
3795
+ services: {
3796
+ id: string;
3797
+ serviceId: string | null;
3798
+ position: number;
3799
+ name: string;
3800
+ unitPrice: number;
3801
+ quantity: number;
3802
+ discount: number;
3803
+ description: string | null;
3804
+ }[];
3756
3805
  }[];
3757
3806
  };
3758
3807
  outputFormat: "json";
@@ -3838,39 +3887,94 @@ declare const routes: import("hono/hono-base").HonoBase<{
3838
3887
  output: {
3839
3888
  success: true;
3840
3889
  cinvoices: {
3890
+ id: string;
3891
+ created_at: string;
3892
+ workspaceId: string;
3841
3893
  updated_at: string | null;
3842
3894
  deleted_at: string | null;
3843
3895
  verified_at: string | null;
3844
3896
  suspended_at: string | null;
3845
- created_at: string;
3846
- id: string;
3847
- workspaceId: string;
3848
3897
  invoiceId: string;
3849
- serviceId: string;
3850
- SellerFinanceAccountId: string;
3898
+ status: string;
3899
+ created_by: string;
3851
3900
  customerId: string;
3901
+ fullPayment: boolean | null;
3902
+ installment: boolean | null;
3903
+ notes: string | null;
3904
+ currency: string;
3905
+ serviceId: string | null;
3906
+ invoiceDiscount: number;
3907
+ discount: number;
3908
+ SellerFinanceAccountId: string;
3852
3909
  date: string;
3853
3910
  language: string;
3854
- currency: string;
3855
3911
  vatOption: string;
3856
- vatRate: number | null;
3857
- buyerInn: string | null;
3858
- buyerKpp: string | null;
3859
3912
  unitName: string;
3860
3913
  unitPrice: number;
3861
3914
  unitQuantity: number;
3862
- notes: string | null;
3863
- discount: number | null;
3864
- fullPayment: boolean | null;
3865
- installment: boolean | null;
3915
+ installmentNumber: number | null;
3916
+ totalInstallments: number | null;
3917
+ installmentGroupId: string | null;
3918
+ vatRate: number | null;
3919
+ paidAt: string | null;
3920
+ buyerInn: string | null;
3921
+ buyerKpp: string | null;
3866
3922
  subscription: boolean | null;
3867
3923
  subscriptionStartDate: string | null;
3868
3924
  subscriptionEndDate: string | null;
3869
3925
  paymentMethod: string | null;
3870
- status: string;
3871
- paidAt: string | null;
3872
- created_by: string;
3926
+ subtotal: number;
3927
+ lineDiscounts: number;
3928
+ total: number;
3929
+ services: {
3930
+ id: string;
3931
+ serviceId: string | null;
3932
+ position: number;
3933
+ name: string;
3934
+ unitPrice: number;
3935
+ quantity: number;
3936
+ discount: number;
3937
+ description: string | null;
3938
+ }[];
3939
+ }[];
3940
+ };
3941
+ outputFormat: "json";
3942
+ status: 200;
3943
+ };
3944
+ };
3945
+ } & {
3946
+ "/services/usage/:workspace": {
3947
+ $get: {
3948
+ input: {
3949
+ query: {
3950
+ from?: string | number | undefined;
3951
+ to?: string | number | undefined;
3952
+ status?: "pending" | "canceled" | "paid" | "refunded" | undefined;
3953
+ customerId?: string | undefined;
3954
+ };
3955
+ } & {
3956
+ param: {
3957
+ workspace: string;
3958
+ };
3959
+ };
3960
+ output: {
3961
+ services: {
3962
+ serviceId: string | null;
3963
+ name: string;
3964
+ invoiceCount: number;
3965
+ quantity: number;
3966
+ amounts: {
3967
+ currency: string;
3968
+ amountMinor: number;
3969
+ }[];
3873
3970
  }[];
3971
+ totals: {
3972
+ serviceCount: number;
3973
+ catalogServiceCount: number;
3974
+ invoiceCount: number;
3975
+ lineCount: number;
3976
+ };
3977
+ success: true;
3874
3978
  };
3875
3979
  outputFormat: "json";
3876
3980
  status: 200;
@@ -3881,9 +3985,20 @@ declare const routes: import("hono/hono-base").HonoBase<{
3881
3985
  $post: {
3882
3986
  input: {
3883
3987
  json: {
3988
+ installmentNumber?: number | null | undefined;
3989
+ totalInstallments?: number | null | undefined;
3990
+ installmentGroupId?: string | null | undefined;
3884
3991
  cinvoiceId: string;
3885
3992
  workspace: string;
3886
3993
  invoiceId?: string | undefined;
3994
+ services?: {
3995
+ serviceId?: string | null | undefined;
3996
+ name: string;
3997
+ unitPrice: number;
3998
+ quantity?: number | undefined;
3999
+ discount?: number | undefined;
4000
+ description?: string | undefined;
4001
+ }[] | undefined;
3887
4002
  serviceId?: string | undefined;
3888
4003
  SellerFinanceAccountId?: string | undefined;
3889
4004
  customerId?: string | undefined;
@@ -3917,9 +4032,20 @@ declare const routes: import("hono/hono-base").HonoBase<{
3917
4032
  } | {
3918
4033
  input: {
3919
4034
  json: {
4035
+ installmentNumber?: number | null | undefined;
4036
+ totalInstallments?: number | null | undefined;
4037
+ installmentGroupId?: string | null | undefined;
3920
4038
  cinvoiceId: string;
3921
4039
  workspace: string;
3922
4040
  invoiceId?: string | undefined;
4041
+ services?: {
4042
+ serviceId?: string | null | undefined;
4043
+ name: string;
4044
+ unitPrice: number;
4045
+ quantity?: number | undefined;
4046
+ discount?: number | undefined;
4047
+ description?: string | undefined;
4048
+ }[] | undefined;
3923
4049
  serviceId?: string | undefined;
3924
4050
  SellerFinanceAccountId?: string | undefined;
3925
4051
  customerId?: string | undefined;
@@ -3962,7 +4088,9 @@ declare const routes: import("hono/hono-base").HonoBase<{
3962
4088
  installment: boolean | null;
3963
4089
  notes: string | null;
3964
4090
  currency: string;
3965
- serviceId: string;
4091
+ serviceId: string | null;
4092
+ invoiceDiscount: number;
4093
+ discount: number;
3966
4094
  SellerFinanceAccountId: string;
3967
4095
  date: string;
3968
4096
  language: string;
@@ -3970,15 +4098,30 @@ declare const routes: import("hono/hono-base").HonoBase<{
3970
4098
  unitName: string;
3971
4099
  unitPrice: number;
3972
4100
  unitQuantity: number;
4101
+ installmentNumber: number | null;
4102
+ totalInstallments: number | null;
4103
+ installmentGroupId: string | null;
3973
4104
  vatRate: number | null;
3974
4105
  paidAt: string | null;
3975
4106
  buyerInn: string | null;
3976
4107
  buyerKpp: string | null;
3977
- discount: number | null;
3978
4108
  subscription: boolean | null;
3979
4109
  subscriptionStartDate: string | null;
3980
4110
  subscriptionEndDate: string | null;
3981
4111
  paymentMethod: string | null;
4112
+ subtotal: number;
4113
+ lineDiscounts: number;
4114
+ total: number;
4115
+ services: {
4116
+ id: string;
4117
+ serviceId: string | null;
4118
+ position: number;
4119
+ name: string;
4120
+ unitPrice: number;
4121
+ quantity: number;
4122
+ discount: number;
4123
+ description: string | null;
4124
+ }[];
3982
4125
  }[];
3983
4126
  };
3984
4127
  outputFormat: "json";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mestra-dev/contract",
3
- "version": "0.0.259",
3
+ "version": "0.0.261",
4
4
  "description": "Types-only Hono AppType contract for the Mestra auth API",
5
5
  "type": "module",
6
6
  "sideEffects": false,