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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"financial-movement-response.js","sourceRoot":"","sources":["../../../../src/core/data/financial/financial-movement-response.ts"],"names":[],"mappings":""}
|
|
@@ -1017,4 +1017,179 @@ export declare const financialMovementSchema: import("@ascendance-hub/sapphire-c
|
|
|
1017
1017
|
type: import("@ascendance-hub/sapphire-core").LiteralField<CategoryType.Expense, CategoryType.Expense, CategoryType.Expense>;
|
|
1018
1018
|
}>>;
|
|
1019
1019
|
}>>;
|
|
1020
|
+
/**
|
|
1021
|
+
* Schema de REGISTRO (POST /financial-movements). NÃO é o schema da entity: o
|
|
1022
|
+
* client envia `accountId`/`categoryId` (não os snapshots), e o servidor resolve
|
|
1023
|
+
* conta+categoria vivas, monta os Extended References e computa fee/net/data
|
|
1024
|
+
* prevista dentro da transação. Espelha o `RegisterMovementInput` da API.
|
|
1025
|
+
*/
|
|
1026
|
+
export declare const registerMovementSchema: import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
1027
|
+
direction: import("@ascendance-hub/sapphire-core").EnumField<MovementDirection, MovementDirection, MovementDirection>;
|
|
1028
|
+
title: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
1029
|
+
grossValue: import("@ascendance-hub/sapphire-core").NumberField<number, number>;
|
|
1030
|
+
date: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
1031
|
+
accountId: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
1032
|
+
categoryId: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
1033
|
+
paymentMethod: import("@ascendance-hub/sapphire-core").EnumField<PaymentMethod, PaymentMethod, PaymentMethod>;
|
|
1034
|
+
status: import("@ascendance-hub/sapphire-core").EnumField<MovementStatus, MovementStatus | undefined, MovementStatus | undefined>;
|
|
1035
|
+
counterparty: import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
1036
|
+
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
1037
|
+
kind: import("@ascendance-hub/sapphire-core").EnumField<CounterpartyKind, CounterpartyKind, CounterpartyKind>;
|
|
1038
|
+
refId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
1039
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
1040
|
+
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
1041
|
+
kind: import("@ascendance-hub/sapphire-core").EnumField<CounterpartyKind, CounterpartyKind, CounterpartyKind>;
|
|
1042
|
+
refId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
1043
|
+
}> | undefined, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
1044
|
+
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
1045
|
+
kind: import("@ascendance-hub/sapphire-core").EnumField<CounterpartyKind, CounterpartyKind, CounterpartyKind>;
|
|
1046
|
+
refId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
1047
|
+
}> | undefined>;
|
|
1048
|
+
fiscalNote: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
1049
|
+
description: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
1050
|
+
origin: import("@ascendance-hub/sapphire-core").EnumField<MovementOrigin, MovementOrigin | undefined, MovementOrigin | undefined>;
|
|
1051
|
+
confirmDuplicate: import("@ascendance-hub/sapphire-core").BooleanField<boolean | undefined, boolean | undefined>;
|
|
1052
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
1053
|
+
direction: import("@ascendance-hub/sapphire-core").EnumField<MovementDirection, MovementDirection, MovementDirection>;
|
|
1054
|
+
title: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
1055
|
+
grossValue: import("@ascendance-hub/sapphire-core").NumberField<number, number>;
|
|
1056
|
+
date: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
1057
|
+
accountId: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
1058
|
+
categoryId: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
1059
|
+
paymentMethod: import("@ascendance-hub/sapphire-core").EnumField<PaymentMethod, PaymentMethod, PaymentMethod>;
|
|
1060
|
+
status: import("@ascendance-hub/sapphire-core").EnumField<MovementStatus, MovementStatus | undefined, MovementStatus | undefined>;
|
|
1061
|
+
counterparty: import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
1062
|
+
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
1063
|
+
kind: import("@ascendance-hub/sapphire-core").EnumField<CounterpartyKind, CounterpartyKind, CounterpartyKind>;
|
|
1064
|
+
refId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
1065
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
1066
|
+
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
1067
|
+
kind: import("@ascendance-hub/sapphire-core").EnumField<CounterpartyKind, CounterpartyKind, CounterpartyKind>;
|
|
1068
|
+
refId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
1069
|
+
}> | undefined, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
1070
|
+
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
1071
|
+
kind: import("@ascendance-hub/sapphire-core").EnumField<CounterpartyKind, CounterpartyKind, CounterpartyKind>;
|
|
1072
|
+
refId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
1073
|
+
}> | undefined>;
|
|
1074
|
+
fiscalNote: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
1075
|
+
description: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
1076
|
+
origin: import("@ascendance-hub/sapphire-core").EnumField<MovementOrigin, MovementOrigin | undefined, MovementOrigin | undefined>;
|
|
1077
|
+
confirmDuplicate: import("@ascendance-hub/sapphire-core").BooleanField<boolean | undefined, boolean | undefined>;
|
|
1078
|
+
}>, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
1079
|
+
direction: import("@ascendance-hub/sapphire-core").EnumField<MovementDirection, MovementDirection, MovementDirection>;
|
|
1080
|
+
title: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
1081
|
+
grossValue: import("@ascendance-hub/sapphire-core").NumberField<number, number>;
|
|
1082
|
+
date: import("@ascendance-hub/sapphire-core").DateField<Date, Date>;
|
|
1083
|
+
accountId: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
1084
|
+
categoryId: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
1085
|
+
paymentMethod: import("@ascendance-hub/sapphire-core").EnumField<PaymentMethod, PaymentMethod, PaymentMethod>;
|
|
1086
|
+
status: import("@ascendance-hub/sapphire-core").EnumField<MovementStatus, MovementStatus | undefined, MovementStatus | undefined>;
|
|
1087
|
+
counterparty: import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
1088
|
+
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
1089
|
+
kind: import("@ascendance-hub/sapphire-core").EnumField<CounterpartyKind, CounterpartyKind, CounterpartyKind>;
|
|
1090
|
+
refId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
1091
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
1092
|
+
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
1093
|
+
kind: import("@ascendance-hub/sapphire-core").EnumField<CounterpartyKind, CounterpartyKind, CounterpartyKind>;
|
|
1094
|
+
refId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
1095
|
+
}> | undefined, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
1096
|
+
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
1097
|
+
kind: import("@ascendance-hub/sapphire-core").EnumField<CounterpartyKind, CounterpartyKind, CounterpartyKind>;
|
|
1098
|
+
refId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
1099
|
+
}> | undefined>;
|
|
1100
|
+
fiscalNote: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
1101
|
+
description: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
1102
|
+
origin: import("@ascendance-hub/sapphire-core").EnumField<MovementOrigin, MovementOrigin | undefined, MovementOrigin | undefined>;
|
|
1103
|
+
confirmDuplicate: import("@ascendance-hub/sapphire-core").BooleanField<boolean | undefined, boolean | undefined>;
|
|
1104
|
+
}>>;
|
|
1105
|
+
/**
|
|
1106
|
+
* Schema de EDIÇÃO (PATCH /financial-movements/:id). Todos os campos opcionais;
|
|
1107
|
+
* `direction` é imutável (não entra aqui). Espelha o `UpdateMovementInput`.
|
|
1108
|
+
*/
|
|
1109
|
+
export declare const updateMovementSchema: import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
1110
|
+
title: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
1111
|
+
grossValue: import("@ascendance-hub/sapphire-core").NumberField<number | undefined, number | undefined>;
|
|
1112
|
+
date: import("@ascendance-hub/sapphire-core").DateField<Date | undefined, Date | undefined>;
|
|
1113
|
+
paymentMethod: import("@ascendance-hub/sapphire-core").EnumField<PaymentMethod, PaymentMethod | undefined, PaymentMethod | undefined>;
|
|
1114
|
+
status: import("@ascendance-hub/sapphire-core").EnumField<MovementStatus, MovementStatus | undefined, MovementStatus | undefined>;
|
|
1115
|
+
accountId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
1116
|
+
categoryId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
1117
|
+
counterparty: import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
1118
|
+
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
1119
|
+
kind: import("@ascendance-hub/sapphire-core").EnumField<CounterpartyKind, CounterpartyKind, CounterpartyKind>;
|
|
1120
|
+
refId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
1121
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
1122
|
+
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
1123
|
+
kind: import("@ascendance-hub/sapphire-core").EnumField<CounterpartyKind, CounterpartyKind, CounterpartyKind>;
|
|
1124
|
+
refId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
1125
|
+
}> | undefined, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
1126
|
+
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
1127
|
+
kind: import("@ascendance-hub/sapphire-core").EnumField<CounterpartyKind, CounterpartyKind, CounterpartyKind>;
|
|
1128
|
+
refId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
1129
|
+
}> | undefined>;
|
|
1130
|
+
fiscalNote: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
1131
|
+
description: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
1132
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
1133
|
+
title: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
1134
|
+
grossValue: import("@ascendance-hub/sapphire-core").NumberField<number | undefined, number | undefined>;
|
|
1135
|
+
date: import("@ascendance-hub/sapphire-core").DateField<Date | undefined, Date | undefined>;
|
|
1136
|
+
paymentMethod: import("@ascendance-hub/sapphire-core").EnumField<PaymentMethod, PaymentMethod | undefined, PaymentMethod | undefined>;
|
|
1137
|
+
status: import("@ascendance-hub/sapphire-core").EnumField<MovementStatus, MovementStatus | undefined, MovementStatus | undefined>;
|
|
1138
|
+
accountId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
1139
|
+
categoryId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
1140
|
+
counterparty: import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
1141
|
+
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
1142
|
+
kind: import("@ascendance-hub/sapphire-core").EnumField<CounterpartyKind, CounterpartyKind, CounterpartyKind>;
|
|
1143
|
+
refId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
1144
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
1145
|
+
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
1146
|
+
kind: import("@ascendance-hub/sapphire-core").EnumField<CounterpartyKind, CounterpartyKind, CounterpartyKind>;
|
|
1147
|
+
refId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
1148
|
+
}> | undefined, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
1149
|
+
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
1150
|
+
kind: import("@ascendance-hub/sapphire-core").EnumField<CounterpartyKind, CounterpartyKind, CounterpartyKind>;
|
|
1151
|
+
refId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
1152
|
+
}> | undefined>;
|
|
1153
|
+
fiscalNote: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
1154
|
+
description: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
1155
|
+
}>, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
1156
|
+
title: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
1157
|
+
grossValue: import("@ascendance-hub/sapphire-core").NumberField<number | undefined, number | undefined>;
|
|
1158
|
+
date: import("@ascendance-hub/sapphire-core").DateField<Date | undefined, Date | undefined>;
|
|
1159
|
+
paymentMethod: import("@ascendance-hub/sapphire-core").EnumField<PaymentMethod, PaymentMethod | undefined, PaymentMethod | undefined>;
|
|
1160
|
+
status: import("@ascendance-hub/sapphire-core").EnumField<MovementStatus, MovementStatus | undefined, MovementStatus | undefined>;
|
|
1161
|
+
accountId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
1162
|
+
categoryId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
1163
|
+
counterparty: import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
1164
|
+
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
1165
|
+
kind: import("@ascendance-hub/sapphire-core").EnumField<CounterpartyKind, CounterpartyKind, CounterpartyKind>;
|
|
1166
|
+
refId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
1167
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
1168
|
+
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
1169
|
+
kind: import("@ascendance-hub/sapphire-core").EnumField<CounterpartyKind, CounterpartyKind, CounterpartyKind>;
|
|
1170
|
+
refId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
1171
|
+
}> | undefined, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
1172
|
+
name: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
1173
|
+
kind: import("@ascendance-hub/sapphire-core").EnumField<CounterpartyKind, CounterpartyKind, CounterpartyKind>;
|
|
1174
|
+
refId: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
1175
|
+
}> | undefined>;
|
|
1176
|
+
fiscalNote: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
1177
|
+
description: import("@ascendance-hub/sapphire-core").StringField<string | undefined, string | undefined>;
|
|
1178
|
+
}>>;
|
|
1179
|
+
/** Corpo de PATCH /financial-movements/:id/status. */
|
|
1180
|
+
export declare const changeMovementStatusSchema: import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
1181
|
+
status: import("@ascendance-hub/sapphire-core").EnumField<MovementStatus, MovementStatus, MovementStatus>;
|
|
1182
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
1183
|
+
status: import("@ascendance-hub/sapphire-core").EnumField<MovementStatus, MovementStatus, MovementStatus>;
|
|
1184
|
+
}>, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
1185
|
+
status: import("@ascendance-hub/sapphire-core").EnumField<MovementStatus, MovementStatus, MovementStatus>;
|
|
1186
|
+
}>>;
|
|
1187
|
+
/** Corpo de POST /financial-movements/recompute-balances. */
|
|
1188
|
+
export declare const recomputeBalancesSchema: import("@ascendance-hub/sapphire-core").ObjectField<{
|
|
1189
|
+
accountId: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
1190
|
+
}, import("@ascendance-hub/sapphire-core").ObjectOutput<{
|
|
1191
|
+
accountId: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
1192
|
+
}>, import("@ascendance-hub/sapphire-core").ObjectInput<{
|
|
1193
|
+
accountId: import("@ascendance-hub/sapphire-core").StringField<string, string>;
|
|
1194
|
+
}>>;
|
|
1020
1195
|
//# sourceMappingURL=financial-movement-schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"financial-movement-schema.d.ts","sourceRoot":"","sources":["../../../../src/core/data/financial/financial-movement-schema.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAI1D;;;;;;;;;GASG;AAEH,oBAAY,iBAAiB;IAC3B,EAAE,OAAO;IACT,GAAG,QAAQ;CACZ;AAED,oBAAY,cAAc;IACxB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,SAAS,cAAc;CACxB;AAED,oBAAY,aAAa;IACvB,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,aAAa,kBAAkB;CAChC;AAED,oBAAY,cAAc;IACxB,MAAM,WAAW;IACjB,KAAK,UAAU;CAChB;AAED,oBAAY,gBAAgB;IAC1B,MAAM,WAAW;IACjB,QAAQ,aAAa;CACtB;AAsFD,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAGlC,CAAA"}
|
|
1
|
+
{"version":3,"file":"financial-movement-schema.d.ts","sourceRoot":"","sources":["../../../../src/core/data/financial/financial-movement-schema.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAI1D;;;;;;;;;GASG;AAEH,oBAAY,iBAAiB;IAC3B,EAAE,OAAO;IACT,GAAG,QAAQ;CACZ;AAED,oBAAY,cAAc;IACxB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,SAAS,cAAc;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAGlC,CAAA;AASF;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAejC,CAAA;AAEF;;;GAGG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAWrB,CAAA;AAEZ,sDAAsD;AACtD,eAAO,MAAM,0BAA0B;;;;;;GAErC,CAAA;AAEF,6DAA6D;AAC7D,eAAO,MAAM,uBAAuB;;;;;;GAElC,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.financialMovementSchema = exports.CounterpartyKind = exports.MovementOrigin = exports.PaymentMethod = exports.MovementStatus = exports.MovementDirection = void 0;
|
|
3
|
+
exports.recomputeBalancesSchema = exports.changeMovementStatusSchema = exports.updateMovementSchema = exports.registerMovementSchema = exports.financialMovementSchema = exports.CounterpartyKind = exports.MovementOrigin = exports.PaymentMethod = exports.MovementStatus = exports.MovementDirection = void 0;
|
|
4
4
|
const sapphire_core_1 = require("@ascendance-hub/sapphire-core");
|
|
5
5
|
const audit_1 = require("../common/audit");
|
|
6
6
|
const financial_account_schema_1 = require("./financial-account-schema");
|
|
@@ -76,9 +76,9 @@ const baseMovementSchema = s.object({
|
|
|
76
76
|
netValue: s.number().min(0),
|
|
77
77
|
// Snapshot da conta `platform` no momento do registro (mudança futura na
|
|
78
78
|
// conta não altera o histórico). Ausentes em contas sem prazo/taxa.
|
|
79
|
-
feePercentApplied: s.number().
|
|
79
|
+
feePercentApplied: s.number().min(0).max(100).optional(),
|
|
80
80
|
settlementDaysApplied: s.number().int().min(0).optional(),
|
|
81
|
-
predictedReceiptDate: s.date().optional(),
|
|
81
|
+
predictedReceiptDate: s.date().coerce().optional(), // coerce: consistente com `date`
|
|
82
82
|
account: accountRefSchema,
|
|
83
83
|
paymentMethod: s.type().enum(PaymentMethod),
|
|
84
84
|
counterparty: s.object({
|
|
@@ -90,7 +90,7 @@ const baseMovementSchema = s.object({
|
|
|
90
90
|
description: s.string().max(500).optional(),
|
|
91
91
|
origin: s.type().enum(MovementOrigin),
|
|
92
92
|
history: s.array(s.object({
|
|
93
|
-
at: s.date(), //
|
|
93
|
+
at: s.date().coerce(), // coerce: consistente com `date` — aceita Date (servidor) ou ISO
|
|
94
94
|
by: s.string(),
|
|
95
95
|
action: s.string(),
|
|
96
96
|
detail: s.string().optional(),
|
|
@@ -120,4 +120,56 @@ exports.financialMovementSchema = s.type().union([
|
|
|
120
120
|
inMovementSchema,
|
|
121
121
|
outMovementSchema,
|
|
122
122
|
]);
|
|
123
|
+
// Sub-doc opcional da contraparte no request (cliente/fornecedor).
|
|
124
|
+
const counterpartyRequestSchema = s.object({
|
|
125
|
+
name: s.string(),
|
|
126
|
+
kind: s.type().enum(CounterpartyKind),
|
|
127
|
+
refId: s.string().optional(),
|
|
128
|
+
});
|
|
129
|
+
/**
|
|
130
|
+
* Schema de REGISTRO (POST /financial-movements). NÃO é o schema da entity: o
|
|
131
|
+
* client envia `accountId`/`categoryId` (não os snapshots), e o servidor resolve
|
|
132
|
+
* conta+categoria vivas, monta os Extended References e computa fee/net/data
|
|
133
|
+
* prevista dentro da transação. Espelha o `RegisterMovementInput` da API.
|
|
134
|
+
*/
|
|
135
|
+
exports.registerMovementSchema = s.object({
|
|
136
|
+
direction: s.type().enum(MovementDirection),
|
|
137
|
+
title: s.string().max(120),
|
|
138
|
+
grossValue: s.number().positive(),
|
|
139
|
+
date: s.date().coerce(),
|
|
140
|
+
accountId: s.string(),
|
|
141
|
+
categoryId: s.string(),
|
|
142
|
+
paymentMethod: s.type().enum(PaymentMethod),
|
|
143
|
+
status: s.type().enum(MovementStatus).optional(),
|
|
144
|
+
counterparty: counterpartyRequestSchema.optional(),
|
|
145
|
+
fiscalNote: s.string().optional(),
|
|
146
|
+
description: s.string().max(500).optional(),
|
|
147
|
+
origin: s.type().enum(MovementOrigin).optional(),
|
|
148
|
+
// Confirmação explícita para persistir uma possível duplicata (<2min).
|
|
149
|
+
confirmDuplicate: s.boolean().optional(),
|
|
150
|
+
});
|
|
151
|
+
/**
|
|
152
|
+
* Schema de EDIÇÃO (PATCH /financial-movements/:id). Todos os campos opcionais;
|
|
153
|
+
* `direction` é imutável (não entra aqui). Espelha o `UpdateMovementInput`.
|
|
154
|
+
*/
|
|
155
|
+
exports.updateMovementSchema = s.object({
|
|
156
|
+
title: s.string().max(120),
|
|
157
|
+
grossValue: s.number().positive(),
|
|
158
|
+
date: s.date().coerce(),
|
|
159
|
+
paymentMethod: s.type().enum(PaymentMethod),
|
|
160
|
+
status: s.type().enum(MovementStatus),
|
|
161
|
+
accountId: s.string(),
|
|
162
|
+
categoryId: s.string(),
|
|
163
|
+
counterparty: counterpartyRequestSchema,
|
|
164
|
+
fiscalNote: s.string(),
|
|
165
|
+
description: s.string().max(500),
|
|
166
|
+
}).partial();
|
|
167
|
+
/** Corpo de PATCH /financial-movements/:id/status. */
|
|
168
|
+
exports.changeMovementStatusSchema = s.object({
|
|
169
|
+
status: s.type().enum(MovementStatus),
|
|
170
|
+
});
|
|
171
|
+
/** Corpo de POST /financial-movements/recompute-balances. */
|
|
172
|
+
exports.recomputeBalancesSchema = s.object({
|
|
173
|
+
accountId: s.string(),
|
|
174
|
+
});
|
|
123
175
|
//# sourceMappingURL=financial-movement-schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"financial-movement-schema.js","sourceRoot":"","sources":["../../../../src/core/data/financial/financial-movement-schema.ts"],"names":[],"mappings":";;;AAAA,iEAAwD;AACxD,2CAA6C;AAC7C,yEAAiE;AACjE,2EAA0D;AAE1D,MAAM,CAAC,GAAG,IAAI,wBAAQ,EAAE,CAAA;AAExB;;;;;;;;;GASG;AAEH,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,8BAAS,CAAA;IACT,gCAAW,CAAA;AACb,CAAC,EAHW,iBAAiB,iCAAjB,iBAAiB,QAG5B;AAED,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,qCAAmB,CAAA;IACnB,qCAAmB,CAAA;IACnB,yCAAuB,CAAA;AACzB,CAAC,EAJW,cAAc,8BAAd,cAAc,QAIzB;AAED,IAAY,aAQX;AARD,WAAY,aAAa;IACvB,8BAAa,CAAA;IACb,4BAAW,CAAA;IACX,gCAAe,CAAA;IACf,kCAAiB,CAAA;IACjB,sCAAqB,CAAA;IACrB,kCAAiB,CAAA;IACjB,gDAA+B,CAAA;AACjC,CAAC,EARW,aAAa,6BAAb,aAAa,QAQxB;AAED,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,mCAAiB,CAAA;IACjB,iCAAe,CAAA;AACjB,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB;AAED,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,qCAAiB,CAAA;IACjB,yCAAqB,CAAA;AACvB,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B;AAED;;;;GAIG;AACH,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChC,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;IACf,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,+CAAoB,CAAC;CAC1C,CAAC,CAAA;AAEF;;;;GAIG;AACH,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC;IAC1B,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC;IACrC,gFAAgF;IAChF,0EAA0E;IAC1E,sEAAsE;IACtE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE;IAEvB,wEAAwE;IACxE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IACtC,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAE3B,yEAAyE;IACzE,oEAAoE;IACpE,iBAAiB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,
|
|
1
|
+
{"version":3,"file":"financial-movement-schema.js","sourceRoot":"","sources":["../../../../src/core/data/financial/financial-movement-schema.ts"],"names":[],"mappings":";;;AAAA,iEAAwD;AACxD,2CAA6C;AAC7C,yEAAiE;AACjE,2EAA0D;AAE1D,MAAM,CAAC,GAAG,IAAI,wBAAQ,EAAE,CAAA;AAExB;;;;;;;;;GASG;AAEH,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,8BAAS,CAAA;IACT,gCAAW,CAAA;AACb,CAAC,EAHW,iBAAiB,iCAAjB,iBAAiB,QAG5B;AAED,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,qCAAmB,CAAA;IACnB,qCAAmB,CAAA;IACnB,yCAAuB,CAAA;AACzB,CAAC,EAJW,cAAc,8BAAd,cAAc,QAIzB;AAED,IAAY,aAQX;AARD,WAAY,aAAa;IACvB,8BAAa,CAAA;IACb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AAE;IACjC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE;IACvB,aAAa,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC;IAC3C,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC;IACrC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,YAAY,EAAE,yBAAyB;IACvC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;IACtB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC;CACjC,CAAC,CAAC,OAAO,EAAE,CAAA;AAEZ,sDAAsD;AACzC,QAAA,0BAA0B,GAAG,CAAC,CAAC,MAAM,CAAC;IACjD,MAAM,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC;CACtC,CAAC,CAAA;AAEF,6DAA6D;AAChD,QAAA,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAA"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
export { FinancialAccount } from './financial-account-entity';
|
|
2
|
-
export { financialAccountSchema, FinancialAccountType } from './financial-account-schema';
|
|
2
|
+
export { financialAccountSchema, financialAccountInsertSchema, FinancialAccountType } from './financial-account-schema';
|
|
3
3
|
export { financialAccountUpdateSchema } from './financial-account-schema';
|
|
4
4
|
export type { FinancialAccountActionResult, InactivateFinancialAccountRequest } from './financial-account-response';
|
|
5
5
|
export { FinancialCategory } from './financial-category-entity';
|
|
6
|
-
export { financialCategorySchema, financialCategoryUpdateSchema, CategoryType, CategoryBehavior, OperationalNature, } from './financial-category-schema';
|
|
6
|
+
export { financialCategorySchema, financialCategoryInsertSchema, financialCategoryUpdateSchema, CategoryType, CategoryBehavior, OperationalNature, } from './financial-category-schema';
|
|
7
7
|
export type { FinancialCategoryActionResult } from './financial-category-response';
|
|
8
8
|
export { FinancialMovement } from './financial-movement-entity';
|
|
9
|
-
export { financialMovementSchema, MovementDirection, MovementStatus, PaymentMethod, MovementOrigin, CounterpartyKind, } from './financial-movement-schema';
|
|
9
|
+
export { financialMovementSchema, registerMovementSchema, updateMovementSchema, changeMovementStatusSchema, recomputeBalancesSchema, MovementDirection, MovementStatus, PaymentMethod, MovementOrigin, CounterpartyKind, } from './financial-movement-schema';
|
|
10
|
+
export type { RegisterMovementRequest, UpdateMovementRequest, MovementListQuery, MovementCounterpartyInput, FinancialMovementActionResult, } from './financial-movement-response';
|
|
10
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/data/financial/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/data/financial/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,EAAE,sBAAsB,EAAE,4BAA4B,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AACvH,OAAO,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAA;AACzE,YAAY,EAAE,4BAA4B,EAAE,iCAAiC,EAAE,MAAM,8BAA8B,CAAA;AAEnH,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AAC/D,OAAO,EACL,uBAAuB,EACvB,6BAA6B,EAC7B,6BAA6B,EAC7B,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,6BAA6B,CAAA;AACpC,YAAY,EAAE,6BAA6B,EAAE,MAAM,+BAA+B,CAAA;AAElF,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AAC/D,OAAO,EACL,uBAAuB,EACvB,sBAAsB,EACtB,oBAAoB,EACpB,0BAA0B,EAC1B,uBAAuB,EACvB,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,cAAc,EACd,gBAAgB,GACjB,MAAM,6BAA6B,CAAA;AACpC,YAAY,EACV,uBAAuB,EACvB,qBAAqB,EACrB,iBAAiB,EACjB,yBAAyB,EACzB,6BAA6B,GAC9B,MAAM,+BAA+B,CAAA"}
|
|
@@ -1,19 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CounterpartyKind = exports.MovementOrigin = exports.PaymentMethod = exports.MovementStatus = exports.MovementDirection = exports.financialMovementSchema = exports.OperationalNature = exports.CategoryBehavior = exports.CategoryType = exports.financialCategoryUpdateSchema = exports.financialCategorySchema = exports.financialAccountUpdateSchema = exports.FinancialAccountType = exports.financialAccountSchema = void 0;
|
|
3
|
+
exports.CounterpartyKind = exports.MovementOrigin = exports.PaymentMethod = exports.MovementStatus = exports.MovementDirection = exports.recomputeBalancesSchema = exports.changeMovementStatusSchema = exports.updateMovementSchema = exports.registerMovementSchema = exports.financialMovementSchema = exports.OperationalNature = exports.CategoryBehavior = exports.CategoryType = exports.financialCategoryUpdateSchema = exports.financialCategoryInsertSchema = exports.financialCategorySchema = exports.financialAccountUpdateSchema = exports.FinancialAccountType = exports.financialAccountInsertSchema = exports.financialAccountSchema = void 0;
|
|
4
4
|
var financial_account_schema_1 = require("./financial-account-schema");
|
|
5
5
|
Object.defineProperty(exports, "financialAccountSchema", { enumerable: true, get: function () { return financial_account_schema_1.financialAccountSchema; } });
|
|
6
|
+
Object.defineProperty(exports, "financialAccountInsertSchema", { enumerable: true, get: function () { return financial_account_schema_1.financialAccountInsertSchema; } });
|
|
6
7
|
Object.defineProperty(exports, "FinancialAccountType", { enumerable: true, get: function () { return financial_account_schema_1.FinancialAccountType; } });
|
|
7
8
|
var financial_account_schema_2 = require("./financial-account-schema");
|
|
8
9
|
Object.defineProperty(exports, "financialAccountUpdateSchema", { enumerable: true, get: function () { return financial_account_schema_2.financialAccountUpdateSchema; } });
|
|
9
10
|
var financial_category_schema_1 = require("./financial-category-schema");
|
|
10
11
|
Object.defineProperty(exports, "financialCategorySchema", { enumerable: true, get: function () { return financial_category_schema_1.financialCategorySchema; } });
|
|
12
|
+
Object.defineProperty(exports, "financialCategoryInsertSchema", { enumerable: true, get: function () { return financial_category_schema_1.financialCategoryInsertSchema; } });
|
|
11
13
|
Object.defineProperty(exports, "financialCategoryUpdateSchema", { enumerable: true, get: function () { return financial_category_schema_1.financialCategoryUpdateSchema; } });
|
|
12
14
|
Object.defineProperty(exports, "CategoryType", { enumerable: true, get: function () { return financial_category_schema_1.CategoryType; } });
|
|
13
15
|
Object.defineProperty(exports, "CategoryBehavior", { enumerable: true, get: function () { return financial_category_schema_1.CategoryBehavior; } });
|
|
14
16
|
Object.defineProperty(exports, "OperationalNature", { enumerable: true, get: function () { return financial_category_schema_1.OperationalNature; } });
|
|
15
17
|
var financial_movement_schema_1 = require("./financial-movement-schema");
|
|
16
18
|
Object.defineProperty(exports, "financialMovementSchema", { enumerable: true, get: function () { return financial_movement_schema_1.financialMovementSchema; } });
|
|
19
|
+
Object.defineProperty(exports, "registerMovementSchema", { enumerable: true, get: function () { return financial_movement_schema_1.registerMovementSchema; } });
|
|
20
|
+
Object.defineProperty(exports, "updateMovementSchema", { enumerable: true, get: function () { return financial_movement_schema_1.updateMovementSchema; } });
|
|
21
|
+
Object.defineProperty(exports, "changeMovementStatusSchema", { enumerable: true, get: function () { return financial_movement_schema_1.changeMovementStatusSchema; } });
|
|
22
|
+
Object.defineProperty(exports, "recomputeBalancesSchema", { enumerable: true, get: function () { return financial_movement_schema_1.recomputeBalancesSchema; } });
|
|
17
23
|
Object.defineProperty(exports, "MovementDirection", { enumerable: true, get: function () { return financial_movement_schema_1.MovementDirection; } });
|
|
18
24
|
Object.defineProperty(exports, "MovementStatus", { enumerable: true, get: function () { return financial_movement_schema_1.MovementStatus; } });
|
|
19
25
|
Object.defineProperty(exports, "PaymentMethod", { enumerable: true, get: function () { return financial_movement_schema_1.PaymentMethod; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/data/financial/index.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/data/financial/index.ts"],"names":[],"mappings":";;;AACA,uEAAuH;AAA9G,kIAAA,sBAAsB,OAAA;AAAE,wIAAA,4BAA4B,OAAA;AAAE,gIAAA,oBAAoB,OAAA;AACnF,uEAAyE;AAAhE,wIAAA,4BAA4B,OAAA;AAIrC,yEAOoC;AANlC,oIAAA,uBAAuB,OAAA;AACvB,0IAAA,6BAA6B,OAAA;AAC7B,0IAAA,6BAA6B,OAAA;AAC7B,yHAAA,YAAY,OAAA;AACZ,6HAAA,gBAAgB,OAAA;AAChB,8HAAA,iBAAiB,OAAA;AAKnB,yEAWoC;AAVlC,oIAAA,uBAAuB,OAAA;AACvB,mIAAA,sBAAsB,OAAA;AACtB,iIAAA,oBAAoB,OAAA;AACpB,uIAAA,0BAA0B,OAAA;AAC1B,oIAAA,uBAAuB,OAAA;AACvB,8HAAA,iBAAiB,OAAA;AACjB,2HAAA,cAAc,OAAA;AACd,0HAAA,aAAa,OAAA;AACb,2HAAA,cAAc,OAAA;AACd,6HAAA,gBAAgB,OAAA"}
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
* Headers de contexto enviados em toda requisição à API.
|
|
3
3
|
*
|
|
4
4
|
* - `env` é **obrigatório**: seleciona o banco do tenant (multi-tenant por env).
|
|
5
|
-
* - `authorization` (Bearer token)
|
|
6
|
-
*
|
|
7
|
-
* -
|
|
5
|
+
* - `authorization` (Bearer token) aparece nas rotas protegidas — opcional
|
|
6
|
+
* porque rotas públicas (ex.: login) não o têm.
|
|
7
|
+
* - `restaurantId` NÃO é modelado: a API o deriva do JWT e ignora o header (era
|
|
8
|
+
* campo morto). O index signature ainda aceita headers adicionais se preciso.
|
|
8
9
|
*/
|
|
9
10
|
export type Headers = {
|
|
10
11
|
env: string;
|
|
11
12
|
authorization?: string;
|
|
12
|
-
restaurantId?: string;
|
|
13
13
|
[key: string]: string | undefined;
|
|
14
14
|
};
|
|
15
15
|
//# sourceMappingURL=headers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"headers.d.ts","sourceRoot":"","sources":["../../../../src/core/data/request/headers.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"headers.d.ts","sourceRoot":"","sources":["../../../../src/core/data/request/headers.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB,GAAG,EAAE,MAAM,CAAA;IACX,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAA;CAClC,CAAA"}
|
package/build/core/index.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export * from './data';
|
|
2
2
|
export { MasterClient } from './client/master-client';
|
|
3
3
|
export { withHeaders } from './client/request-config';
|
|
4
|
+
export { ApiError } from './client/api-error';
|
|
5
|
+
export { HttpBaseClient } from './client/http-base-client';
|
|
6
|
+
export { createHttpConnection } from './client/create-connection';
|
|
7
|
+
export type { BaseClient, Insertable, Gettable, Findable, Listable, Updatable, Deletable, } from './client/base-client';
|
|
4
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAA;AACtB,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAA;AACtB,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AACjE,YAAY,EACV,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,GAC3E,MAAM,sBAAsB,CAAA"}
|
package/build/core/index.js
CHANGED
|
@@ -14,10 +14,16 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.withHeaders = exports.MasterClient = void 0;
|
|
17
|
+
exports.createHttpConnection = exports.HttpBaseClient = exports.ApiError = exports.withHeaders = exports.MasterClient = void 0;
|
|
18
18
|
__exportStar(require("./data"), exports);
|
|
19
19
|
var master_client_1 = require("./client/master-client");
|
|
20
20
|
Object.defineProperty(exports, "MasterClient", { enumerable: true, get: function () { return master_client_1.MasterClient; } });
|
|
21
21
|
var request_config_1 = require("./client/request-config");
|
|
22
22
|
Object.defineProperty(exports, "withHeaders", { enumerable: true, get: function () { return request_config_1.withHeaders; } });
|
|
23
|
+
var api_error_1 = require("./client/api-error");
|
|
24
|
+
Object.defineProperty(exports, "ApiError", { enumerable: true, get: function () { return api_error_1.ApiError; } });
|
|
25
|
+
var http_base_client_1 = require("./client/http-base-client");
|
|
26
|
+
Object.defineProperty(exports, "HttpBaseClient", { enumerable: true, get: function () { return http_base_client_1.HttpBaseClient; } });
|
|
27
|
+
var create_connection_1 = require("./client/create-connection");
|
|
28
|
+
Object.defineProperty(exports, "createHttpConnection", { enumerable: true, get: function () { return create_connection_1.createHttpConnection; } });
|
|
23
29
|
//# sourceMappingURL=index.js.map
|
package/build/core/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yCAAsB;AACtB,wDAAqD;AAA5C,6GAAA,YAAY,OAAA;AACrB,0DAAqD;AAA5C,6GAAA,WAAW,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/core/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,yCAAsB;AACtB,wDAAqD;AAA5C,6GAAA,YAAY,OAAA;AACrB,0DAAqD;AAA5C,6GAAA,WAAW,OAAA;AACpB,gDAA6C;AAApC,qGAAA,QAAQ,OAAA;AACjB,8DAA0D;AAAjD,kHAAA,cAAc,OAAA;AACvB,gEAAiE;AAAxD,yHAAA,oBAAoB,OAAA"}
|