mintly-lib 2.6.0-preview → 2.7.1-preview
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/build/clients/auth-client.d.ts.map +1 -1
- package/build/clients/auth-client.js +2 -10
- package/build/clients/auth-client.js.map +1 -1
- package/build/clients/financial-account-client.d.ts +14 -3
- package/build/clients/financial-account-client.d.ts.map +1 -1
- package/build/clients/financial-account-client.js +22 -4
- package/build/clients/financial-account-client.js.map +1 -1
- package/build/clients/financial-category-client.d.ts +13 -3
- package/build/clients/financial-category-client.d.ts.map +1 -1
- package/build/clients/financial-category-client.js +22 -5
- package/build/clients/financial-category-client.js.map +1 -1
- package/build/clients/financial-movement-client.d.ts +26 -0
- package/build/clients/financial-movement-client.d.ts.map +1 -0
- package/build/clients/financial-movement-client.js +44 -0
- package/build/clients/financial-movement-client.js.map +1 -0
- package/build/clients/index.d.ts +1 -0
- package/build/clients/index.d.ts.map +1 -1
- package/build/clients/index.js +3 -1
- package/build/clients/index.js.map +1 -1
- package/build/core/client/api-error.d.ts +11 -0
- package/build/core/client/api-error.d.ts.map +1 -0
- package/build/core/client/api-error.js +18 -0
- package/build/core/client/api-error.js.map +1 -0
- package/build/core/client/base-client.d.ts +19 -1
- package/build/core/client/base-client.d.ts.map +1 -1
- package/build/core/client/create-connection.d.ts +13 -0
- package/build/core/client/create-connection.d.ts.map +1 -0
- package/build/core/client/create-connection.js +39 -0
- package/build/core/client/create-connection.js.map +1 -0
- package/build/core/client/http-base-client.d.ts +9 -1
- package/build/core/client/http-base-client.d.ts.map +1 -1
- package/build/core/client/http-base-client.js +10 -10
- package/build/core/client/http-base-client.js.map +1 -1
- package/build/core/client/master-client.d.ts +2 -1
- package/build/core/client/master-client.d.ts.map +1 -1
- package/build/core/client/master-client.js +1 -0
- package/build/core/client/master-client.js.map +1 -1
- package/build/core/data/financial/financial-account-schema.d.ts +231 -0
- package/build/core/data/financial/financial-account-schema.d.ts.map +1 -1
- package/build/core/data/financial/financial-account-schema.js +33 -3
- package/build/core/data/financial/financial-account-schema.js.map +1 -1
- package/build/core/data/financial/financial-category-schema.d.ts +157 -0
- package/build/core/data/financial/financial-category-schema.d.ts.map +1 -1
- package/build/core/data/financial/financial-category-schema.js +25 -1
- package/build/core/data/financial/financial-category-schema.js.map +1 -1
- package/build/core/data/financial/financial-movement-response.d.ts +56 -0
- package/build/core/data/financial/financial-movement-response.d.ts.map +1 -0
- package/build/core/data/financial/financial-movement-response.js +3 -0
- package/build/core/data/financial/financial-movement-response.js.map +1 -0
- package/build/core/data/financial/financial-movement-schema.d.ts +175 -0
- package/build/core/data/financial/financial-movement-schema.d.ts.map +1 -1
- package/build/core/data/financial/financial-movement-schema.js +56 -4
- package/build/core/data/financial/financial-movement-schema.js.map +1 -1
- package/build/core/data/financial/index.d.ts +4 -3
- package/build/core/data/financial/index.d.ts.map +1 -1
- package/build/core/data/financial/index.js +7 -1
- package/build/core/data/financial/index.js.map +1 -1
- package/build/core/data/request/headers.d.ts +4 -4
- package/build/core/data/request/headers.d.ts.map +1 -1
- package/build/core/index.d.ts +4 -0
- package/build/core/index.d.ts.map +1 -1
- package/build/core/index.js +7 -1
- package/build/core/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -693,4 +693,235 @@ export declare const financialAccountUpdateSchema: import("@ascendance-hub/sapph
|
|
|
693
693
|
feePercent: import("@ascendance-hub/sapphire-core").NumberField<number | undefined, number | undefined>;
|
|
694
694
|
settlementDays: import("@ascendance-hub/sapphire-core").NumberField<number | undefined, number | undefined>;
|
|
695
695
|
}>>;
|
|
696
|
+
export declare const financialAccountInsertSchema: import("@ascendance-hub/sapphire-core").UnionField<(import("@ascendance-hub/sapphire-core").ObjectField<Omit<{
|
|
697
|
+
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
698
|
+
status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
|
|
699
|
+
restaurantId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
700
|
+
audit: import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
701
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
702
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
703
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
704
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
705
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
706
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
707
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
708
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
709
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
710
|
+
}> | undefined, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
711
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
712
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
713
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
714
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
715
|
+
}> | undefined>;
|
|
716
|
+
}, "type" | "feePercent" | "settlementDays"> & {
|
|
717
|
+
type: import("@ascendance-hub/sapphire-core").LiteralField<FinancialAccountType.Platform, FinancialAccountType.Platform, FinancialAccountType.Platform>;
|
|
718
|
+
feePercent: import("@ascendance-hub/sapphire-core").NumberField<number, number>;
|
|
719
|
+
settlementDays: import("@ascendance-hub/sapphire-core").NumberField<number, number>;
|
|
720
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<Omit<{
|
|
721
|
+
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
722
|
+
status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
|
|
723
|
+
restaurantId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
724
|
+
audit: import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
725
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
726
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
727
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
728
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
729
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
730
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
731
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
732
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
733
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
734
|
+
}> | undefined, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
735
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
736
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
737
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
738
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
739
|
+
}> | undefined>;
|
|
740
|
+
}, "type" | "feePercent" | "settlementDays"> & {
|
|
741
|
+
type: import("@ascendance-hub/sapphire-core").LiteralField<FinancialAccountType.Platform, FinancialAccountType.Platform, FinancialAccountType.Platform>;
|
|
742
|
+
feePercent: import("@ascendance-hub/sapphire-core").NumberField<number, number>;
|
|
743
|
+
settlementDays: import("@ascendance-hub/sapphire-core").NumberField<number, number>;
|
|
744
|
+
}>, import("@ascendance-hub/sapphire-core").ObjectInput<Omit<{
|
|
745
|
+
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
746
|
+
status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
|
|
747
|
+
restaurantId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
748
|
+
audit: import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
749
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
750
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
751
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
752
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
753
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
754
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
755
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
756
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
757
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
758
|
+
}> | undefined, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
759
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
760
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
761
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
762
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
763
|
+
}> | undefined>;
|
|
764
|
+
}, "type" | "feePercent" | "settlementDays"> & {
|
|
765
|
+
type: import("@ascendance-hub/sapphire-core").LiteralField<FinancialAccountType.Platform, FinancialAccountType.Platform, FinancialAccountType.Platform>;
|
|
766
|
+
feePercent: import("@ascendance-hub/sapphire-core").NumberField<number, number>;
|
|
767
|
+
settlementDays: import("@ascendance-hub/sapphire-core").NumberField<number, number>;
|
|
768
|
+
}>> | import("@ascendance-hub/sapphire-core").ObjectField<Omit<{
|
|
769
|
+
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
770
|
+
status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
|
|
771
|
+
restaurantId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
772
|
+
audit: import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
773
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
774
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
775
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
776
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
777
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
778
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
779
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
780
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
781
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
782
|
+
}> | undefined, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
783
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
784
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
785
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
786
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
787
|
+
}> | undefined>;
|
|
788
|
+
}, "type"> & {
|
|
789
|
+
type: import("@ascendance-hub/sapphire-core").EnumField<FinancialAccountType.Bank | FinancialAccountType.Cash | FinancialAccountType.DigitalWallet, FinancialAccountType.Bank | FinancialAccountType.Cash | FinancialAccountType.DigitalWallet, FinancialAccountType.Bank | FinancialAccountType.Cash | FinancialAccountType.DigitalWallet>;
|
|
790
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<Omit<{
|
|
791
|
+
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
792
|
+
status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
|
|
793
|
+
restaurantId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
794
|
+
audit: import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
795
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
796
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
797
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
798
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
799
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
800
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
801
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
802
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
803
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
804
|
+
}> | undefined, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
805
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
806
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
807
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
808
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
809
|
+
}> | undefined>;
|
|
810
|
+
}, "type"> & {
|
|
811
|
+
type: import("@ascendance-hub/sapphire-core").EnumField<FinancialAccountType.Bank | FinancialAccountType.Cash | FinancialAccountType.DigitalWallet, FinancialAccountType.Bank | FinancialAccountType.Cash | FinancialAccountType.DigitalWallet, FinancialAccountType.Bank | FinancialAccountType.Cash | FinancialAccountType.DigitalWallet>;
|
|
812
|
+
}>, import("@ascendance-hub/sapphire-core").ObjectInput<Omit<{
|
|
813
|
+
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
814
|
+
status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
|
|
815
|
+
restaurantId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
816
|
+
audit: import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
817
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
818
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
819
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
820
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
821
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
822
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
823
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
824
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
825
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
826
|
+
}> | undefined, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
827
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
828
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
829
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
830
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
831
|
+
}> | undefined>;
|
|
832
|
+
}, "type"> & {
|
|
833
|
+
type: import("@ascendance-hub/sapphire-core").EnumField<FinancialAccountType.Bank | FinancialAccountType.Cash | FinancialAccountType.DigitalWallet, FinancialAccountType.Bank | FinancialAccountType.Cash | FinancialAccountType.DigitalWallet, FinancialAccountType.Bank | FinancialAccountType.Cash | FinancialAccountType.DigitalWallet>;
|
|
834
|
+
}>>)[], import("@ascendance-hub/sapphire-core").ObjectOutput<Omit<{
|
|
835
|
+
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
836
|
+
status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
|
|
837
|
+
restaurantId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
838
|
+
audit: import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
839
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
840
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
841
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
842
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
843
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
844
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
845
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
846
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
847
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
848
|
+
}> | undefined, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
849
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
850
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
851
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
852
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
853
|
+
}> | undefined>;
|
|
854
|
+
}, "type" | "feePercent" | "settlementDays"> & {
|
|
855
|
+
type: import("@ascendance-hub/sapphire-core").LiteralField<FinancialAccountType.Platform, FinancialAccountType.Platform, FinancialAccountType.Platform>;
|
|
856
|
+
feePercent: import("@ascendance-hub/sapphire-core").NumberField<number, number>;
|
|
857
|
+
settlementDays: import("@ascendance-hub/sapphire-core").NumberField<number, number>;
|
|
858
|
+
}> | import("@ascendance-hub/sapphire-core").ObjectOutput<Omit<{
|
|
859
|
+
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
860
|
+
status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
|
|
861
|
+
restaurantId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
862
|
+
audit: import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
863
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
864
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
865
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
866
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
867
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
868
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
869
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
870
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
871
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
872
|
+
}> | undefined, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
873
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
874
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
875
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
876
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
877
|
+
}> | undefined>;
|
|
878
|
+
}, "type"> & {
|
|
879
|
+
type: import("@ascendance-hub/sapphire-core").EnumField<FinancialAccountType.Bank | FinancialAccountType.Cash | FinancialAccountType.DigitalWallet, FinancialAccountType.Bank | FinancialAccountType.Cash | FinancialAccountType.DigitalWallet, FinancialAccountType.Bank | FinancialAccountType.Cash | FinancialAccountType.DigitalWallet>;
|
|
880
|
+
}>, import("@ascendance-hub/sapphire-core").ObjectInput<Omit<{
|
|
881
|
+
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
882
|
+
status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
|
|
883
|
+
restaurantId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
884
|
+
audit: import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
885
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
886
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
887
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
888
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
889
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
890
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
891
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
892
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
893
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
894
|
+
}> | undefined, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
895
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
896
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
897
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
898
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
899
|
+
}> | undefined>;
|
|
900
|
+
}, "type" | "feePercent" | "settlementDays"> & {
|
|
901
|
+
type: import("@ascendance-hub/sapphire-core").LiteralField<FinancialAccountType.Platform, FinancialAccountType.Platform, FinancialAccountType.Platform>;
|
|
902
|
+
feePercent: import("@ascendance-hub/sapphire-core").NumberField<number, number>;
|
|
903
|
+
settlementDays: import("@ascendance-hub/sapphire-core").NumberField<number, number>;
|
|
904
|
+
}> | import("@ascendance-hub/sapphire-core").ObjectInput<Omit<{
|
|
905
|
+
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
906
|
+
status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
|
|
907
|
+
restaurantId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
908
|
+
audit: import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
909
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
910
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
911
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
912
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
913
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
914
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
915
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
916
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
917
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
918
|
+
}> | undefined, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
919
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
920
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
921
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
922
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
923
|
+
}> | undefined>;
|
|
924
|
+
}, "type"> & {
|
|
925
|
+
type: import("@ascendance-hub/sapphire-core").EnumField<FinancialAccountType.Bank | FinancialAccountType.Cash | FinancialAccountType.DigitalWallet, FinancialAccountType.Bank | FinancialAccountType.Cash | FinancialAccountType.DigitalWallet, FinancialAccountType.Bank | FinancialAccountType.Cash | FinancialAccountType.DigitalWallet>;
|
|
926
|
+
}>>;
|
|
696
927
|
//# sourceMappingURL=financial-account-schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"financial-account-schema.d.ts","sourceRoot":"","sources":["../../../../src/core/data/financial/financial-account-schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAK/C,oBAAY,oBAAoB;IAC9B,IAAI,SAAS;IACb,IAAI,SAAS;IACb,aAAa,kBAAkB;IAC/B,QAAQ,aAAa;CACtB;AAED,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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exports, "__esModule", { value: true });
|
|
3
|
-
exports.financialAccountUpdateSchema = exports.financialAccountSchema = exports.baseAccountSchema = exports.FinancialAccountType = void 0;
|
|
3
|
+
exports.financialAccountInsertSchema = exports.financialAccountUpdateSchema = exports.financialAccountSchema = exports.baseAccountSchema = exports.FinancialAccountType = void 0;
|
|
4
4
|
const sapphire_core_1 = require("@ascendance-hub/sapphire-core");
|
|
5
5
|
const status_1 = require("../common/status");
|
|
6
6
|
const audit_1 = require("../common/audit");
|
|
@@ -32,7 +32,7 @@ exports.baseAccountSchema = s.object({
|
|
|
32
32
|
// O .extend() sobrescreve a base adicionando essas regras estritas
|
|
33
33
|
const platformAccountSchema = exports.baseAccountSchema.extend({
|
|
34
34
|
type: s.type().literal(FinancialAccountType.Platform), // Força a ser 'platform'
|
|
35
|
-
feePercent: s.number().
|
|
35
|
+
feePercent: s.number().min(0).max(100), // Obrigatório — taxa fracionária (ex.: 12.5%), 0..100
|
|
36
36
|
settlementDays: s.number().int().min(0), // Obrigatório
|
|
37
37
|
});
|
|
38
38
|
// 3. AS OUTRAS CONTAS (Proíbem as taxas)
|
|
@@ -66,7 +66,37 @@ exports.financialAccountUpdateSchema = s.object({
|
|
|
66
66
|
name: s.string(),
|
|
67
67
|
status: s.type().enum(status_1.RecordStatus),
|
|
68
68
|
type: s.type().enum(FinancialAccountType),
|
|
69
|
-
feePercent: s.number().
|
|
69
|
+
feePercent: s.number().min(0).max(100),
|
|
70
70
|
settlementDays: s.number().int().min(0),
|
|
71
71
|
}).partial();
|
|
72
|
+
// 6. SCHEMA DE INSERT (POST /financial-accounts)
|
|
73
|
+
// Como o de criação, é uma UNIÃO discriminada por `type` (platform exige
|
|
74
|
+
// fee/prazo; os outros proíbem). Os campos que o servidor COMPUTA/FORÇA ficam
|
|
75
|
+
// FORA do schema (objeto estrito → enviá-los é rejeitado): isDefault (sempre
|
|
76
|
+
// false no insert; padrão é via SetDefault), availableBalance/predictedBalance
|
|
77
|
+
// (sempre 0; saldo só vem de movimentação) e history — assim o client não pode
|
|
78
|
+
// injetá-los (A3). audit e restaurantId seguem opcionais: são preenchidos pelo
|
|
79
|
+
// servidor (audit resolve o VALIDATION_ERROR; restaurantId vem do RequestContext).
|
|
80
|
+
const baseAccountInsertSchema = s.object({
|
|
81
|
+
name: s.string(),
|
|
82
|
+
status: s.type().enum(status_1.RecordStatus),
|
|
83
|
+
restaurantId: s.string().optional(),
|
|
84
|
+
audit: audit_1.auditSchema.optional(),
|
|
85
|
+
});
|
|
86
|
+
const platformAccountInsertSchema = baseAccountInsertSchema.extend({
|
|
87
|
+
type: s.type().literal(FinancialAccountType.Platform),
|
|
88
|
+
feePercent: s.number().min(0).max(100),
|
|
89
|
+
settlementDays: s.number().int().min(0),
|
|
90
|
+
});
|
|
91
|
+
const standardAccountInsertSchema = baseAccountInsertSchema.extend({
|
|
92
|
+
type: s.type().enum([
|
|
93
|
+
FinancialAccountType.Bank,
|
|
94
|
+
FinancialAccountType.Cash,
|
|
95
|
+
FinancialAccountType.DigitalWallet,
|
|
96
|
+
]),
|
|
97
|
+
});
|
|
98
|
+
exports.financialAccountInsertSchema = s.type().union([
|
|
99
|
+
platformAccountInsertSchema,
|
|
100
|
+
standardAccountInsertSchema,
|
|
101
|
+
]);
|
|
72
102
|
//# sourceMappingURL=financial-account-schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"financial-account-schema.js","sourceRoot":"","sources":["../../../../src/core/data/financial/financial-account-schema.ts"],"names":[],"mappings":";;;AAAA,iEAAwD;AACxD,6CAA+C;AAC/C,2CAA6C;AAE7C,MAAM,CAAC,GAAG,IAAI,wBAAQ,EAAE,CAAA;AAExB,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,qCAAa,CAAA;IACb,qCAAa,CAAA;IACb,uDAA+B,CAAA;IAC/B,6CAAqB,CAAA;AACvB,CAAC,EALW,oBAAoB,oCAApB,oBAAoB,QAK/B;AAEY,QAAA,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACxC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,qBAAY,CAAC;IACnC,SAAS,EAAE,CAAC,CAAC,OAAO,EAAE;IACtB,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IACvC,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IACvC,OAAO,EAAE,CAAC,CAAC,KAAK,CACd,CAAC,CAAC,MAAM,CAAC;QACP,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE;QACrB,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;QACd,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;QAClB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAC9B,CAAC,CACH,CAAC,OAAO,CAAC,EAAE,CAAC;IACb,KAAK,EAAE,mBAAW;CACnB,CAAC,CAAA;AACF,wBAAwB;AACxB,mEAAmE;AACnE,mEAAmE;AACnE,MAAM,qBAAqB,GAAG,yBAAiB,CAAC,MAAM,CAAC;IACrD,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,oBAAoB,CAAC,QAAQ,CAAC,EAAE,yBAAyB;IAChF,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,
|
|
1
|
+
{"version":3,"file":"financial-account-schema.js","sourceRoot":"","sources":["../../../../src/core/data/financial/financial-account-schema.ts"],"names":[],"mappings":";;;AAAA,iEAAwD;AACxD,6CAA+C;AAC/C,2CAA6C;AAE7C,MAAM,CAAC,GAAG,IAAI,wBAAQ,EAAE,CAAA;AAExB,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,qCAAa,CAAA;IACb,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;AACnF,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,qBAAY,CAAC;IACnC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,KAAK,EAAE,mBAAW,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAA;AAEF,MAAM,2BAA2B,GAAG,uBAAuB,CAAC,MAAM,CAAC;IACjE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,oBAAoB,CAAC,QAAQ,CAAC;IACrD,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IACtC,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACxC,CAAC,CAAA;AAEF,MAAM,2BAA2B,GAAG,uBAAuB,CAAC,MAAM,CAAC;IACjE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC;QAClB,oBAAoB,CAAC,IAAI;QACzB,oBAAoB,CAAC,IAAI;QACzB,oBAAoB,CAAC,aAAa;KACnC,CAAC;CACH,CAAC,CAAA;AAEW,QAAA,4BAA4B,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC;IACzD,2BAA2B;IAC3B,2BAA2B;CAC5B,CAAC,CAAA"}
|
|
@@ -187,4 +187,161 @@ export declare const financialCategoryUpdateSchema: import("@ascendance-hub/sapp
|
|
|
187
187
|
operationalNature: import("@ascendance-hub/sapphire-core").EnumField<OperationalNature, OperationalNature | undefined, OperationalNature | undefined>;
|
|
188
188
|
status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus | undefined, RecordStatus | undefined>;
|
|
189
189
|
}>>;
|
|
190
|
+
export declare const financialCategoryInsertSchema: import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
191
|
+
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
192
|
+
type: import("@ascendance-hub/sapphire-core").EnumField<CategoryType, CategoryType, CategoryType>;
|
|
193
|
+
behavior: import("@ascendance-hub/sapphire-core").EnumField<CategoryBehavior, CategoryBehavior, CategoryBehavior>;
|
|
194
|
+
operationalNature: import("@ascendance-hub/sapphire-core").EnumField<OperationalNature, OperationalNature, OperationalNature>;
|
|
195
|
+
status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
|
|
196
|
+
restaurantId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
197
|
+
isSystem: import("@ascendance-hub/sapphire-core").BooleanField<boolean | undefined, boolean | undefined>;
|
|
198
|
+
usage: import("@ascendance-hub/sapphire-core").NumberField<number | undefined, number | undefined>;
|
|
199
|
+
lastUsedAt: import("@ascendance-hub/sapphire-core").DateField<Date | undefined, Date | undefined>;
|
|
200
|
+
history: import("@ascendance-hub/sapphire-core").ArrayField<import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
201
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
202
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
203
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
204
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
205
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
206
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
207
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
208
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
209
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
210
|
+
}>, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
211
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
212
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
213
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
214
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
215
|
+
}>>, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
216
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
217
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
218
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
219
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
220
|
+
}>[] | undefined, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
221
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
222
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
223
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
224
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
225
|
+
}>[] | undefined>;
|
|
226
|
+
audit: import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
227
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
228
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
229
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
230
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
231
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
232
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
233
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
234
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
235
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
236
|
+
}> | undefined, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
237
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
238
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
239
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
240
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
241
|
+
}> | undefined>;
|
|
242
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
243
|
+
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
244
|
+
type: import("@ascendance-hub/sapphire-core").EnumField<CategoryType, CategoryType, CategoryType>;
|
|
245
|
+
behavior: import("@ascendance-hub/sapphire-core").EnumField<CategoryBehavior, CategoryBehavior, CategoryBehavior>;
|
|
246
|
+
operationalNature: import("@ascendance-hub/sapphire-core").EnumField<OperationalNature, OperationalNature, OperationalNature>;
|
|
247
|
+
status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
|
|
248
|
+
restaurantId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
249
|
+
isSystem: import("@ascendance-hub/sapphire-core").BooleanField<boolean | undefined, boolean | undefined>;
|
|
250
|
+
usage: import("@ascendance-hub/sapphire-core").NumberField<number | undefined, number | undefined>;
|
|
251
|
+
lastUsedAt: import("@ascendance-hub/sapphire-core").DateField<Date | undefined, Date | undefined>;
|
|
252
|
+
history: import("@ascendance-hub/sapphire-core").ArrayField<import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
253
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
254
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
255
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
256
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
257
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
258
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
259
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
260
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
261
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
262
|
+
}>, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
263
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
264
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
265
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
266
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
267
|
+
}>>, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
268
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
269
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
270
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
271
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
272
|
+
}>[] | undefined, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
273
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
274
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
275
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
276
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
277
|
+
}>[] | undefined>;
|
|
278
|
+
audit: import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
279
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
280
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
281
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
282
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
283
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
284
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
285
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
286
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
287
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
288
|
+
}> | undefined, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
289
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
290
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
291
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
292
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
293
|
+
}> | undefined>;
|
|
294
|
+
}>, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
295
|
+
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
296
|
+
type: import("@ascendance-hub/sapphire-core").EnumField<CategoryType, CategoryType, CategoryType>;
|
|
297
|
+
behavior: import("@ascendance-hub/sapphire-core").EnumField<CategoryBehavior, CategoryBehavior, CategoryBehavior>;
|
|
298
|
+
operationalNature: import("@ascendance-hub/sapphire-core").EnumField<OperationalNature, OperationalNature, OperationalNature>;
|
|
299
|
+
status: import("@ascendance-hub/sapphire-core").EnumField<RecordStatus, RecordStatus, RecordStatus>;
|
|
300
|
+
restaurantId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
301
|
+
isSystem: import("@ascendance-hub/sapphire-core").BooleanField<boolean | undefined, boolean | undefined>;
|
|
302
|
+
usage: import("@ascendance-hub/sapphire-core").NumberField<number | undefined, number | undefined>;
|
|
303
|
+
lastUsedAt: import("@ascendance-hub/sapphire-core").DateField<Date | undefined, Date | undefined>;
|
|
304
|
+
history: import("@ascendance-hub/sapphire-core").ArrayField<import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
305
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
306
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
307
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
308
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
309
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
310
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
311
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
312
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
313
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
314
|
+
}>, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
315
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
316
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
317
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
318
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
319
|
+
}>>, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
320
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
321
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
322
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
323
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
324
|
+
}>[] | undefined, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
325
|
+
at: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
326
|
+
by: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
327
|
+
action: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
328
|
+
detail: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
329
|
+
}>[] | undefined>;
|
|
330
|
+
audit: import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
331
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
332
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
333
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
334
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
335
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
336
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
337
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
338
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
339
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
340
|
+
}> | undefined, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
341
|
+
createdAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
342
|
+
updatedAt: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
343
|
+
createdBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
344
|
+
updatedBy: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
345
|
+
}> | undefined>;
|
|
346
|
+
}>>;
|
|
190
347
|
//# sourceMappingURL=financial-category-schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"financial-category-schema.d.ts","sourceRoot":"","sources":["../../../../src/core/data/financial/financial-category-schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAK/C,oBAAY,YAAY;IACtB,OAAO,YAAY;IACnB,OAAO,YAAY;CACpB;AAED,oBAAY,gBAAgB;IAC1B,KAAK,UAAU;IACf,QAAQ,aAAa;CACtB;AAED,oBAAY,iBAAiB;IAC3B,WAAW,gBAAgB;IAC3B,cAAc,mBAAmB;CAClC;AAED,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqBlC,CAAA;AAMF,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;GAM9B,CAAA"}
|
|
1
|
+
{"version":3,"file":"financial-category-schema.d.ts","sourceRoot":"","sources":["../../../../src/core/data/financial/financial-category-schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAK/C,oBAAY,YAAY;IACtB,OAAO,YAAY;IACnB,OAAO,YAAY;CACpB;AAED,oBAAY,gBAAgB;IAC1B,KAAK,UAAU;IACf,QAAQ,aAAa;CACtB;AAED,oBAAY,iBAAiB;IAC3B,WAAW,gBAAgB;IAC3B,cAAc,mBAAmB;CAClC;AAED,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqBlC,CAAA;AAMF,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;GAM9B,CAAA;AAQZ,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmBxC,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.financialCategoryUpdateSchema = exports.financialCategorySchema = exports.OperationalNature = exports.CategoryBehavior = exports.CategoryType = void 0;
|
|
3
|
+
exports.financialCategoryInsertSchema = exports.financialCategoryUpdateSchema = exports.financialCategorySchema = exports.OperationalNature = exports.CategoryBehavior = exports.CategoryType = void 0;
|
|
4
4
|
const sapphire_core_1 = require("@ascendance-hub/sapphire-core");
|
|
5
5
|
const status_1 = require("../common/status");
|
|
6
6
|
const audit_1 = require("../common/audit");
|
|
@@ -51,4 +51,28 @@ exports.financialCategoryUpdateSchema = s.object({
|
|
|
51
51
|
operationalNature: s.type().enum(OperationalNature),
|
|
52
52
|
status: s.type().enum(status_1.RecordStatus),
|
|
53
53
|
}).partial();
|
|
54
|
+
// Schema de INSERT (POST /financial-categories). Diferente do schema completo
|
|
55
|
+
// (entity), os campos que o servidor computa/força ficam OPCIONAIS — assim o
|
|
56
|
+
// client não precisa enviá-los (audit é preenchido no servidor; restaurantId vem
|
|
57
|
+
// do RequestContext; isSystem/usage/history são forçados no repositório). Mantém
|
|
58
|
+
// compatibilidade com clients que ainda enviam esses campos, e resolve o
|
|
59
|
+
// VALIDATION_ERROR de quando o `audit` era obrigatório no insert.
|
|
60
|
+
exports.financialCategoryInsertSchema = s.object({
|
|
61
|
+
name: s.string(),
|
|
62
|
+
type: s.type().enum(CategoryType),
|
|
63
|
+
behavior: s.type().enum(CategoryBehavior),
|
|
64
|
+
operationalNature: s.type().enum(OperationalNature),
|
|
65
|
+
status: s.type().enum(status_1.RecordStatus),
|
|
66
|
+
restaurantId: s.string().optional(),
|
|
67
|
+
isSystem: s.boolean().optional(),
|
|
68
|
+
usage: s.number().int().optional(),
|
|
69
|
+
lastUsedAt: s.date().coerce().optional(),
|
|
70
|
+
history: s.array(s.object({
|
|
71
|
+
at: s.date().coerce(),
|
|
72
|
+
by: s.string(),
|
|
73
|
+
action: s.string(),
|
|
74
|
+
detail: s.string().optional(),
|
|
75
|
+
})).optional(),
|
|
76
|
+
audit: audit_1.auditSchema.optional(),
|
|
77
|
+
});
|
|
54
78
|
//# sourceMappingURL=financial-category-schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"financial-category-schema.js","sourceRoot":"","sources":["../../../../src/core/data/financial/financial-category-schema.ts"],"names":[],"mappings":";;;AAAA,iEAAwD;AACxD,6CAA+C;AAC/C,2CAA6C;AAE7C,MAAM,CAAC,GAAG,IAAI,wBAAQ,EAAE,CAAA;AAExB,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,mCAAmB,CAAA;IACnB,mCAAmB,CAAA;AACrB,CAAC,EAHW,YAAY,4BAAZ,YAAY,QAGvB;AAED,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,mCAAe,CAAA;IACf,yCAAqB,CAAA;AACvB,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B;AAED,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,gDAA2B,CAAA;IAC3B,sDAAiC,CAAA;AACnC,CAAC,EAHW,iBAAiB,iCAAjB,iBAAiB,QAG5B;AAEY,QAAA,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,C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AM,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,qBAAY,CAAC;CACpC,CAAC,CAAC,OAAO,EAAE,CAAA"}
|
|
1
|
+
{"version":3,"file":"financial-category-schema.js","sourceRoot":"","sources":["../../../../src/core/data/financial/financial-category-schema.ts"],"names":[],"mappings":";;;AAAA,iEAAwD;AACxD,6CAA+C;AAC/C,2CAA6C;AAE7C,MAAM,CAAC,GAAG,IAAI,wBAAQ,EAAE,CAAA;AAExB,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,mCAAmB,CAAA;IACnB,mCAAmB,CAAA;AACrB,CAAC,EAHW,YAAY,4BAAZ,YAAY,QAGvB;AAED,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,mCAAe,CAAA;IACf,yCAAqB,CAAA;AACvB,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B;AAED,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,gDAA2B,CAAA;IAC3B,sDAAiC,CAAA;AACnC,CAAC,EAHW,iBAAiB,iCAAjB,iBAAiB,QAG5B;AAEY,QAAA,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC;IACjC,QAAQ,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC;IACzC,iBAAiB,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC;IACnD,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,qBAAY,CAAC;IACnC,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE;IACrB,4EAA4E;IAC5E,2EAA2E;IAC3E,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,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C,QAAQ,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC;IACzC,iBAAiB,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC;IACnD,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,qBAAY,CAAC;IACnC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACnC,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAChC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IAClC,UAAU,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACxC,OAAO,EAAE,CAAC,CAAC,KAAK,CACd,CAAC,CAAC,MAAM,CAAC;QACP,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE;QACrB,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;QACd,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;QAClB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAC9B,CAAC,CACH,CAAC,QAAQ,EAAE;IACZ,KAAK,EAAE,mBAAW,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAA"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { MovementDirection, MovementStatus, PaymentMethod, MovementOrigin, CounterpartyKind } from './financial-movement-schema';
|
|
2
|
+
/** Contraparte (cliente/fornecedor) enviada no request. */
|
|
3
|
+
export interface MovementCounterpartyInput {
|
|
4
|
+
name: string;
|
|
5
|
+
kind: CounterpartyKind;
|
|
6
|
+
refId?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Corpo de POST /financial-movements. O client envia `accountId`/`categoryId`
|
|
10
|
+
* (não os snapshots): o servidor resolve conta+categoria vivas, monta os
|
|
11
|
+
* Extended References e computa fee/net/data-prevista na transação.
|
|
12
|
+
*/
|
|
13
|
+
export interface RegisterMovementRequest {
|
|
14
|
+
direction: MovementDirection;
|
|
15
|
+
title: string;
|
|
16
|
+
grossValue: number;
|
|
17
|
+
date: string | Date;
|
|
18
|
+
accountId: string;
|
|
19
|
+
categoryId: string;
|
|
20
|
+
paymentMethod: PaymentMethod;
|
|
21
|
+
status?: MovementStatus;
|
|
22
|
+
counterparty?: MovementCounterpartyInput;
|
|
23
|
+
fiscalNote?: string;
|
|
24
|
+
description?: string;
|
|
25
|
+
origin?: MovementOrigin;
|
|
26
|
+
/** Confirma persistir uma possível duplicata (<2min). */
|
|
27
|
+
confirmDuplicate?: boolean;
|
|
28
|
+
}
|
|
29
|
+
/** Corpo de PATCH /financial-movements/:id. `direction` é imutável. */
|
|
30
|
+
export interface UpdateMovementRequest {
|
|
31
|
+
title?: string;
|
|
32
|
+
grossValue?: number;
|
|
33
|
+
date?: string | Date;
|
|
34
|
+
paymentMethod?: PaymentMethod;
|
|
35
|
+
status?: MovementStatus;
|
|
36
|
+
accountId?: string;
|
|
37
|
+
categoryId?: string;
|
|
38
|
+
counterparty?: MovementCounterpartyInput;
|
|
39
|
+
fiscalNote?: string;
|
|
40
|
+
description?: string;
|
|
41
|
+
}
|
|
42
|
+
/** Filtros de GET /financial-movements. */
|
|
43
|
+
export interface MovementListQuery {
|
|
44
|
+
q?: string;
|
|
45
|
+
direction?: MovementDirection;
|
|
46
|
+
status?: MovementStatus;
|
|
47
|
+
dateFrom?: string | Date;
|
|
48
|
+
dateTo?: string | Date;
|
|
49
|
+
page?: number;
|
|
50
|
+
size?: number;
|
|
51
|
+
}
|
|
52
|
+
/** Resposta de ações que retornam apenas a mensagem ao usuário (ex.: recompute). */
|
|
53
|
+
export interface FinancialMovementActionResult {
|
|
54
|
+
message: string;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=financial-movement-response.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"financial-movement-response.d.ts","sourceRoot":"","sources":["../../../../src/core/data/financial/financial-movement-response.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,cAAc,EACd,gBAAgB,EACjB,MAAM,6BAA6B,CAAA;AAEpC,2DAA2D;AAC3D,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,gBAAgB,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACtC,SAAS,EAAE,iBAAiB,CAAA;IAC5B,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;IAClB,aAAa,EAAE,aAAa,CAAA;IAC5B,MAAM,CAAC,EAAE,cAAc,CAAA;IACvB,YAAY,CAAC,EAAE,yBAAyB,CAAA;IACxC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,MAAM,CAAC,EAAE,cAAc,CAAA;IACvB,yDAAyD;IACzD,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B;AAED,uEAAuE;AACvE,MAAM,WAAW,qBAAqB;IACpC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B,MAAM,CAAC,EAAE,cAAc,CAAA;IACvB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,yBAAyB,CAAA;IACxC,UAAU,C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