@glissandoo/lib 1.117.0 → 1.119.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.
Files changed (53) hide show
  1. package/functions/index.d.ts +2 -0
  2. package/functions/index.js +2 -0
  3. package/functions/partnershipPartner.d.ts +15 -1
  4. package/functions/partnershipSepaPaymentGroup.d.ts +4 -1
  5. package/functions/regions.js +2 -0
  6. package/helpers/errors.d.ts +3 -0
  7. package/helpers/errors.js +3 -0
  8. package/helpers/types.d.ts +1 -0
  9. package/helpers/types.js +13 -1
  10. package/models/Evento/Player/basic.d.ts +1 -0
  11. package/models/Evento/Player/basic.js +3 -0
  12. package/models/Evento/types.d.ts +1 -0
  13. package/models/Partnership/Communication/index.d.ts +13 -5
  14. package/models/Partnership/Communication/index.js +27 -20
  15. package/models/Partnership/Communication/supabase.d.ts +7 -0
  16. package/models/Partnership/Communication/supabase.js +24 -0
  17. package/models/Partnership/Communication/types.d.ts +5 -4
  18. package/models/Partnership/Group/index.d.ts +25 -7
  19. package/models/Partnership/Group/index.js +51 -13
  20. package/models/Partnership/Group/supabase.d.ts +13 -0
  21. package/models/Partnership/Group/supabase.js +25 -0
  22. package/models/Partnership/Group/types.d.ts +9 -3
  23. package/models/Partnership/Partner/index.d.ts +18 -7
  24. package/models/Partnership/Partner/index.js +47 -33
  25. package/models/Partnership/Partner/supabase.d.ts +7 -0
  26. package/models/Partnership/Partner/supabase.js +38 -0
  27. package/models/Partnership/Partner/types.d.ts +9 -8
  28. package/models/Partnership/Payment/index.d.ts +22 -5
  29. package/models/Partnership/Payment/index.js +44 -22
  30. package/models/Partnership/Payment/supabase.d.ts +15 -0
  31. package/models/Partnership/Payment/supabase.js +40 -0
  32. package/models/Partnership/Payment/types.d.ts +14 -6
  33. package/models/Partnership/Payment/types.js +1 -0
  34. package/models/Partnership/Plan/index.d.ts +14 -5
  35. package/models/Partnership/Plan/index.js +26 -18
  36. package/models/Partnership/Plan/supabase.d.ts +7 -0
  37. package/models/Partnership/Plan/supabase.js +22 -0
  38. package/models/Partnership/Plan/types.d.ts +5 -4
  39. package/models/Partnership/SepaPaymentGroup/index.d.ts +12 -4
  40. package/models/Partnership/SepaPaymentGroup/index.js +21 -14
  41. package/models/Partnership/SepaPaymentGroup/supabase.d.ts +7 -0
  42. package/models/Partnership/SepaPaymentGroup/supabase.js +18 -0
  43. package/models/Partnership/SepaPaymentGroup/types.d.ts +4 -3
  44. package/models/Partnership/Subscription/index.d.ts +15 -7
  45. package/models/Partnership/Subscription/index.js +27 -20
  46. package/models/Partnership/Subscription/supabase.d.ts +7 -0
  47. package/models/Partnership/Subscription/supabase.js +23 -0
  48. package/models/Partnership/Subscription/types.d.ts +7 -6
  49. package/models/Partnership/types.d.ts +5 -0
  50. package/package.json +1 -1
  51. package/types/supabase/generated.d.ts +487 -0
  52. package/types/supabase/generated.js +4 -0
  53. package/types/supabase/generated.ts +497 -0
@@ -686,6 +686,453 @@ export type Database = {
686
686
  };
687
687
  Relationships: [];
688
688
  };
689
+ partnership_communication: {
690
+ Row: {
691
+ createdAt: string;
692
+ deletedAt: string | null;
693
+ id: string;
694
+ imagesPath: string[];
695
+ imageURL: string | null;
696
+ message: Json;
697
+ messageHtml: string;
698
+ ownerId: string;
699
+ ownerName: string;
700
+ partnershipId: string;
701
+ recipients: string[];
702
+ recipientsCount: number;
703
+ scheduledAt: string | null;
704
+ status: Database['public']['Enums']['partnership_communication_status'];
705
+ title: string;
706
+ };
707
+ Insert: {
708
+ createdAt?: string;
709
+ deletedAt?: string | null;
710
+ id?: string;
711
+ imagesPath?: string[];
712
+ imageURL?: string | null;
713
+ message?: Json;
714
+ messageHtml?: string;
715
+ ownerId: string;
716
+ ownerName: string;
717
+ partnershipId: string;
718
+ recipients?: string[];
719
+ recipientsCount?: number;
720
+ scheduledAt?: string | null;
721
+ status: Database['public']['Enums']['partnership_communication_status'];
722
+ title: string;
723
+ };
724
+ Update: {
725
+ createdAt?: string;
726
+ deletedAt?: string | null;
727
+ id?: string;
728
+ imagesPath?: string[];
729
+ imageURL?: string | null;
730
+ message?: Json;
731
+ messageHtml?: string;
732
+ ownerId?: string;
733
+ ownerName?: string;
734
+ partnershipId?: string;
735
+ recipients?: string[];
736
+ recipientsCount?: number;
737
+ scheduledAt?: string | null;
738
+ status?: Database['public']['Enums']['partnership_communication_status'];
739
+ title?: string;
740
+ };
741
+ Relationships: [];
742
+ };
743
+ partnership_group: {
744
+ Row: {
745
+ groupId: string;
746
+ linkedAt: string;
747
+ linkedBy: string | null;
748
+ partnershipId: string;
749
+ };
750
+ Insert: {
751
+ groupId: string;
752
+ linkedAt?: string;
753
+ linkedBy?: string | null;
754
+ partnershipId: string;
755
+ };
756
+ Update: {
757
+ groupId?: string;
758
+ linkedAt?: string;
759
+ linkedBy?: string | null;
760
+ partnershipId?: string;
761
+ };
762
+ Relationships: [
763
+ {
764
+ foreignKeyName: 'partnership_group_group_id_fkey';
765
+ columns: ['groupId'];
766
+ isOneToOne: false;
767
+ referencedRelation: 'group';
768
+ referencedColumns: ['id'];
769
+ }
770
+ ];
771
+ };
772
+ partnership_partner: {
773
+ Row: {
774
+ acceptedAt: string | null;
775
+ acceptedBy: string | null;
776
+ acceptsCommunications: boolean;
777
+ address: Json | null;
778
+ birthDate: string | null;
779
+ createdAt: string;
780
+ createdBy: string;
781
+ customFields: Json;
782
+ deletedAt: string | null;
783
+ deletedBy: string | null;
784
+ editedBy: string | null;
785
+ email: string | null;
786
+ groupIds: string[];
787
+ id: string;
788
+ lastname: string;
789
+ name: string;
790
+ NIF: string | null;
791
+ partnerNumber: number;
792
+ partnershipId: string;
793
+ payerId: string | null;
794
+ paymentMethod: Database['public']['Enums']['partnership_payment_method'] | null;
795
+ phone: string | null;
796
+ photoURL: string;
797
+ sepaMandate: Json | null;
798
+ status: Database['public']['Enums']['partnership_partner_status'];
799
+ subscriptionIds: string[];
800
+ subscriptions: Json;
801
+ tagIds: string[];
802
+ updatedAt: string;
803
+ userId: string | null;
804
+ };
805
+ Insert: {
806
+ acceptedAt?: string | null;
807
+ acceptedBy?: string | null;
808
+ acceptsCommunications?: boolean;
809
+ address?: Json | null;
810
+ birthDate?: string | null;
811
+ createdAt?: string;
812
+ createdBy: string;
813
+ customFields?: Json;
814
+ deletedAt?: string | null;
815
+ deletedBy?: string | null;
816
+ editedBy?: string | null;
817
+ email?: string | null;
818
+ groupIds?: string[];
819
+ id?: string;
820
+ lastname?: string;
821
+ name: string;
822
+ NIF?: string | null;
823
+ partnerNumber: number;
824
+ partnershipId: string;
825
+ payerId?: string | null;
826
+ paymentMethod?: Database['public']['Enums']['partnership_payment_method'] | null;
827
+ phone?: string | null;
828
+ photoURL?: string;
829
+ sepaMandate?: Json | null;
830
+ status?: Database['public']['Enums']['partnership_partner_status'];
831
+ subscriptionIds?: string[];
832
+ subscriptions?: Json;
833
+ tagIds?: string[];
834
+ updatedAt?: string;
835
+ userId?: string | null;
836
+ };
837
+ Update: {
838
+ acceptedAt?: string | null;
839
+ acceptedBy?: string | null;
840
+ acceptsCommunications?: boolean;
841
+ address?: Json | null;
842
+ birthDate?: string | null;
843
+ createdAt?: string;
844
+ createdBy?: string;
845
+ customFields?: Json;
846
+ deletedAt?: string | null;
847
+ deletedBy?: string | null;
848
+ editedBy?: string | null;
849
+ email?: string | null;
850
+ groupIds?: string[];
851
+ id?: string;
852
+ lastname?: string;
853
+ name?: string;
854
+ NIF?: string | null;
855
+ partnerNumber?: number;
856
+ partnershipId?: string;
857
+ payerId?: string | null;
858
+ paymentMethod?: Database['public']['Enums']['partnership_payment_method'] | null;
859
+ phone?: string | null;
860
+ photoURL?: string;
861
+ sepaMandate?: Json | null;
862
+ status?: Database['public']['Enums']['partnership_partner_status'];
863
+ subscriptionIds?: string[];
864
+ subscriptions?: Json;
865
+ tagIds?: string[];
866
+ updatedAt?: string;
867
+ userId?: string | null;
868
+ };
869
+ Relationships: [
870
+ {
871
+ foreignKeyName: 'partnership_partner_payer_id_fkey';
872
+ columns: ['payerId'];
873
+ isOneToOne: false;
874
+ referencedRelation: 'partnership_partner';
875
+ referencedColumns: ['id'];
876
+ }
877
+ ];
878
+ };
879
+ partnership_payment: {
880
+ Row: {
881
+ amount: number;
882
+ createdAt: string;
883
+ createdBy: string | null;
884
+ dueDate: string;
885
+ editedBy: string | null;
886
+ id: string;
887
+ partnerId: string;
888
+ partnershipId: string;
889
+ payerId: string | null;
890
+ paymentMethod: Database['public']['Enums']['partnership_payment_method'] | null;
891
+ receiptFilePath: string | null;
892
+ sepaEndToEndId: string | null;
893
+ sepaPaymentGroupId: string | null;
894
+ status: Database['public']['Enums']['partnership_payment_status'];
895
+ subscriptionId: string | null;
896
+ title: string;
897
+ updatedAt: string;
898
+ };
899
+ Insert: {
900
+ amount: number;
901
+ createdAt?: string;
902
+ createdBy?: string | null;
903
+ dueDate: string;
904
+ editedBy?: string | null;
905
+ id?: string;
906
+ partnerId: string;
907
+ partnershipId: string;
908
+ payerId?: string | null;
909
+ paymentMethod?: Database['public']['Enums']['partnership_payment_method'] | null;
910
+ receiptFilePath?: string | null;
911
+ sepaEndToEndId?: string | null;
912
+ sepaPaymentGroupId?: string | null;
913
+ status?: Database['public']['Enums']['partnership_payment_status'];
914
+ subscriptionId?: string | null;
915
+ title: string;
916
+ updatedAt?: string;
917
+ };
918
+ Update: {
919
+ amount?: number;
920
+ createdAt?: string;
921
+ createdBy?: string | null;
922
+ dueDate?: string;
923
+ editedBy?: string | null;
924
+ id?: string;
925
+ partnerId?: string;
926
+ partnershipId?: string;
927
+ payerId?: string | null;
928
+ paymentMethod?: Database['public']['Enums']['partnership_payment_method'] | null;
929
+ receiptFilePath?: string | null;
930
+ sepaEndToEndId?: string | null;
931
+ sepaPaymentGroupId?: string | null;
932
+ status?: Database['public']['Enums']['partnership_payment_status'];
933
+ subscriptionId?: string | null;
934
+ title?: string;
935
+ updatedAt?: string;
936
+ };
937
+ Relationships: [
938
+ {
939
+ foreignKeyName: 'partnership_payment_payer_id_fkey';
940
+ columns: ['payerId'];
941
+ isOneToOne: false;
942
+ referencedRelation: 'partnership_partner';
943
+ referencedColumns: ['id'];
944
+ },
945
+ {
946
+ foreignKeyName: 'partnership_payment_sepa_group_id_fkey';
947
+ columns: ['sepaPaymentGroupId'];
948
+ isOneToOne: false;
949
+ referencedRelation: 'partnership_sepa_payment_group';
950
+ referencedColumns: ['id'];
951
+ },
952
+ {
953
+ foreignKeyName: 'partnership_payment_subscription_id_fkey';
954
+ columns: ['subscriptionId'];
955
+ isOneToOne: false;
956
+ referencedRelation: 'partnership_subscription';
957
+ referencedColumns: ['id'];
958
+ }
959
+ ];
960
+ };
961
+ partnership_payment_history: {
962
+ Row: {
963
+ changed_at: string;
964
+ changed_by: string;
965
+ id: string;
966
+ payment_id: string;
967
+ status: Database['public']['Enums']['partnership_payment_status'];
968
+ };
969
+ Insert: {
970
+ changed_at?: string;
971
+ changed_by: string;
972
+ id?: string;
973
+ payment_id: string;
974
+ status: Database['public']['Enums']['partnership_payment_status'];
975
+ };
976
+ Update: {
977
+ changed_at?: string;
978
+ changed_by?: string;
979
+ id?: string;
980
+ payment_id?: string;
981
+ status?: Database['public']['Enums']['partnership_payment_status'];
982
+ };
983
+ Relationships: [
984
+ {
985
+ foreignKeyName: 'partnership_payment_history_payment_id_fkey';
986
+ columns: ['payment_id'];
987
+ isOneToOne: false;
988
+ referencedRelation: 'partnership_payment';
989
+ referencedColumns: ['id'];
990
+ }
991
+ ];
992
+ };
993
+ partnership_plan: {
994
+ Row: {
995
+ createdAt: string;
996
+ createdBy: string;
997
+ deletedAt: string | null;
998
+ deletedBy: string | null;
999
+ description: string;
1000
+ editedBy: string | null;
1001
+ id: string;
1002
+ name: string;
1003
+ partnershipId: string;
1004
+ price: number;
1005
+ schedule: Json;
1006
+ subscriptionsCount: number;
1007
+ updatedAt: string;
1008
+ };
1009
+ Insert: {
1010
+ createdAt?: string;
1011
+ createdBy: string;
1012
+ deletedAt?: string | null;
1013
+ deletedBy?: string | null;
1014
+ description?: string;
1015
+ editedBy?: string | null;
1016
+ id?: string;
1017
+ name: string;
1018
+ partnershipId: string;
1019
+ price: number;
1020
+ schedule: Json;
1021
+ subscriptionsCount?: number;
1022
+ updatedAt?: string;
1023
+ };
1024
+ Update: {
1025
+ createdAt?: string;
1026
+ createdBy?: string;
1027
+ deletedAt?: string | null;
1028
+ deletedBy?: string | null;
1029
+ description?: string;
1030
+ editedBy?: string | null;
1031
+ id?: string;
1032
+ name?: string;
1033
+ partnershipId?: string;
1034
+ price?: number;
1035
+ schedule?: Json;
1036
+ subscriptionsCount?: number;
1037
+ updatedAt?: string;
1038
+ };
1039
+ Relationships: [];
1040
+ };
1041
+ partnership_sepa_payment_group: {
1042
+ Row: {
1043
+ createdAt: string;
1044
+ createdBy: string;
1045
+ creditorInfo: Json;
1046
+ editedBy: string | null;
1047
+ filePath: string | null;
1048
+ id: string;
1049
+ partnershipId: string;
1050
+ paymentsIds: string[];
1051
+ updatedAt: string;
1052
+ };
1053
+ Insert: {
1054
+ createdAt?: string;
1055
+ createdBy: string;
1056
+ creditorInfo: Json;
1057
+ editedBy?: string | null;
1058
+ filePath?: string | null;
1059
+ id?: string;
1060
+ partnershipId: string;
1061
+ paymentsIds?: string[];
1062
+ updatedAt?: string;
1063
+ };
1064
+ Update: {
1065
+ createdAt?: string;
1066
+ createdBy?: string;
1067
+ creditorInfo?: Json;
1068
+ editedBy?: string | null;
1069
+ filePath?: string | null;
1070
+ id?: string;
1071
+ partnershipId?: string;
1072
+ paymentsIds?: string[];
1073
+ updatedAt?: string;
1074
+ };
1075
+ Relationships: [];
1076
+ };
1077
+ partnership_subscription: {
1078
+ Row: {
1079
+ createdAt: string;
1080
+ createdBy: string;
1081
+ deletedAt: string | null;
1082
+ deletedBy: string | null;
1083
+ editedBy: string | null;
1084
+ endDate: string | null;
1085
+ id: string;
1086
+ nextPaymentDate: string | null;
1087
+ partnerId: string;
1088
+ partnerInfo: Json;
1089
+ partnershipId: string;
1090
+ planId: string;
1091
+ planInfo: Json;
1092
+ updatedAt: string;
1093
+ };
1094
+ Insert: {
1095
+ createdAt?: string;
1096
+ createdBy: string;
1097
+ deletedAt?: string | null;
1098
+ deletedBy?: string | null;
1099
+ editedBy?: string | null;
1100
+ endDate?: string | null;
1101
+ id?: string;
1102
+ nextPaymentDate?: string | null;
1103
+ partnerId: string;
1104
+ partnerInfo: Json;
1105
+ partnershipId: string;
1106
+ planId: string;
1107
+ planInfo: Json;
1108
+ updatedAt?: string;
1109
+ };
1110
+ Update: {
1111
+ createdAt?: string;
1112
+ createdBy?: string;
1113
+ deletedAt?: string | null;
1114
+ deletedBy?: string | null;
1115
+ editedBy?: string | null;
1116
+ endDate?: string | null;
1117
+ id?: string;
1118
+ nextPaymentDate?: string | null;
1119
+ partnerId?: string;
1120
+ partnerInfo?: Json;
1121
+ partnershipId?: string;
1122
+ planId?: string;
1123
+ planInfo?: Json;
1124
+ updatedAt?: string;
1125
+ };
1126
+ Relationships: [
1127
+ {
1128
+ foreignKeyName: 'partnership_subscription_plan_id_fkey';
1129
+ columns: ['planId'];
1130
+ isOneToOne: false;
1131
+ referencedRelation: 'partnership_plan';
1132
+ referencedColumns: ['id'];
1133
+ }
1134
+ ];
1135
+ };
689
1136
  repertoire: {
690
1137
  Row: {
691
1138
  compositor: string | null;
@@ -763,6 +1210,38 @@ export type Database = {
763
1210
  [_ in never]: never;
764
1211
  };
765
1212
  Functions: {
1213
+ generate_partnership_recurring_payment: {
1214
+ Args: {
1215
+ p_amount: number;
1216
+ p_due_date: string;
1217
+ p_next_payment_date: string;
1218
+ p_partner_id: string;
1219
+ p_partnership_id: string;
1220
+ p_payment_method: Database['public']['Enums']['partnership_payment_method'];
1221
+ p_subscription_id: string;
1222
+ p_title: string;
1223
+ };
1224
+ Returns: {
1225
+ created: boolean;
1226
+ payment_id: string;
1227
+ }[];
1228
+ } | {
1229
+ Args: {
1230
+ p_amount: number;
1231
+ p_due_date: string;
1232
+ p_next_payment_date: string;
1233
+ p_partner_id: string;
1234
+ p_partnership_id: string;
1235
+ p_payer_id?: string;
1236
+ p_payment_method: Database['public']['Enums']['partnership_payment_method'];
1237
+ p_subscription_id: string;
1238
+ p_title: string;
1239
+ };
1240
+ Returns: {
1241
+ created: boolean;
1242
+ payment_id: string;
1243
+ }[];
1244
+ };
766
1245
  immutable_unaccent: {
767
1246
  Args: {
768
1247
  '': string;
@@ -798,6 +1277,10 @@ export type Database = {
798
1277
  group_plan_period: 'yearly' | 'monthly';
799
1278
  group_status: 'premium' | 'trial' | 'inactive' | 'deleted';
800
1279
  offer_type: 'group' | 'event';
1280
+ partnership_communication_status: 'sent' | 'scheduled';
1281
+ partnership_partner_status: 'active' | 'pending' | 'inactive';
1282
+ partnership_payment_method: 'CASH' | 'TRANSFER' | 'SEPA' | 'BIZUM';
1283
+ partnership_payment_status: 'pending' | 'charged' | 'returned' | 'canceled';
801
1284
  social_network: 'facebook' | 'twitter' | 'instagram' | 'youtube';
802
1285
  };
803
1286
  CompositeTypes: {
@@ -871,6 +1354,10 @@ export declare const Constants: {
871
1354
  readonly group_plan_period: readonly ["yearly", "monthly"];
872
1355
  readonly group_status: readonly ["premium", "trial", "inactive", "deleted"];
873
1356
  readonly offer_type: readonly ["group", "event"];
1357
+ readonly partnership_communication_status: readonly ["sent", "scheduled"];
1358
+ readonly partnership_partner_status: readonly ["active", "pending", "inactive"];
1359
+ readonly partnership_payment_method: readonly ["CASH", "TRANSFER", "SEPA", "BIZUM"];
1360
+ readonly partnership_payment_status: readonly ["pending", "charged", "returned", "canceled"];
874
1361
  readonly social_network: readonly ["facebook", "twitter", "instagram", "youtube"];
875
1362
  };
876
1363
  };
@@ -15,6 +15,10 @@ exports.Constants = {
15
15
  group_plan_period: ['yearly', 'monthly'],
16
16
  group_status: ['premium', 'trial', 'inactive', 'deleted'],
17
17
  offer_type: ['group', 'event'],
18
+ partnership_communication_status: ['sent', 'scheduled'],
19
+ partnership_partner_status: ['active', 'pending', 'inactive'],
20
+ partnership_payment_method: ['CASH', 'TRANSFER', 'SEPA', 'BIZUM'],
21
+ partnership_payment_status: ['pending', 'charged', 'returned', 'canceled'],
18
22
  social_network: ['facebook', 'twitter', 'instagram', 'youtube'],
19
23
  },
20
24
  },