@mestra-dev/contract 0.0.304 → 0.0.306

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.d.ts +159 -14
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -2076,6 +2076,52 @@ declare const routes: import("hono/hono-base").HonoBase<{
2076
2076
  status: 201;
2077
2077
  };
2078
2078
  };
2079
+ } & {
2080
+ "/member/history/:workspace": {
2081
+ $get: {
2082
+ input: {
2083
+ query: {
2084
+ collaboratorId: string;
2085
+ };
2086
+ } & {
2087
+ param: {
2088
+ workspace: string;
2089
+ };
2090
+ };
2091
+ output: {
2092
+ success: true;
2093
+ history: {
2094
+ tasks: {
2095
+ failureReasons: {
2096
+ id: string;
2097
+ title: string;
2098
+ count: number;
2099
+ }[];
2100
+ assigned: number;
2101
+ completed: number;
2102
+ failed: number;
2103
+ open: number;
2104
+ overdue: number;
2105
+ successRate: number | null;
2106
+ months: {
2107
+ month: string;
2108
+ completed: number;
2109
+ failed: number;
2110
+ }[];
2111
+ };
2112
+ earnings: {
2113
+ currency: string;
2114
+ paidMinor: number;
2115
+ unpaidMinor: number;
2116
+ invoiceCount: number;
2117
+ paidInvoiceCount: number;
2118
+ }[];
2119
+ };
2120
+ };
2121
+ outputFormat: "json";
2122
+ status: 200;
2123
+ };
2124
+ };
2079
2125
  } & {
2080
2126
  "/member/documents/:workspace": {
2081
2127
  $get: {
@@ -3562,6 +3608,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
3562
3608
  verified_at: string | null;
3563
3609
  suspended_at: string | null;
3564
3610
  active: boolean | null;
3611
+ currency: string | null;
3565
3612
  price: number | null;
3566
3613
  created_by: string | null;
3567
3614
  renovation: string | null;
@@ -3576,7 +3623,6 @@ declare const routes: import("hono/hono-base").HonoBase<{
3576
3623
  housingType: string | null;
3577
3624
  commercialType: string | null;
3578
3625
  landType: string | null;
3579
- currency: string | null;
3580
3626
  propertyStatus: string | null;
3581
3627
  dealType: string | null;
3582
3628
  listingStatus: string | null;
@@ -3635,10 +3681,10 @@ declare const routes: import("hono/hono-base").HonoBase<{
3635
3681
  suspended_at: string | null;
3636
3682
  name: string;
3637
3683
  active: boolean | null;
3684
+ currency: string | null;
3638
3685
  price: number | null;
3639
3686
  created_by: string | null;
3640
3687
  stock: number | null;
3641
- currency: string | null;
3642
3688
  qrCode: string | null;
3643
3689
  }[];
3644
3690
  };
@@ -5091,6 +5137,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
5091
5137
  status: string;
5092
5138
  date: string;
5093
5139
  customerId: string;
5140
+ currency: string;
5094
5141
  created_by: string;
5095
5142
  branchId: string | null;
5096
5143
  responsibleId: string | null;
@@ -5098,7 +5145,6 @@ declare const routes: import("hono/hono-base").HonoBase<{
5098
5145
  installment: boolean | null;
5099
5146
  notes: string | null;
5100
5147
  subscriptionEndDate: string | null;
5101
- currency: string;
5102
5148
  serviceId: string | null;
5103
5149
  invoiceDiscount: number;
5104
5150
  discount: number;
@@ -5229,8 +5275,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
5229
5275
  updated_at: string | null;
5230
5276
  name: string;
5231
5277
  active: boolean;
5232
- companyName: string | null;
5233
5278
  currency: FinanceCurrency;
5279
+ companyName: string | null;
5234
5280
  vatRate: number | null;
5235
5281
  order: number;
5236
5282
  cardColor: string;
@@ -5302,6 +5348,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
5302
5348
  status: string;
5303
5349
  date: string;
5304
5350
  customerId: string;
5351
+ currency: string;
5305
5352
  created_by: string;
5306
5353
  branchId: string | null;
5307
5354
  responsibleId: string | null;
@@ -5309,7 +5356,6 @@ declare const routes: import("hono/hono-base").HonoBase<{
5309
5356
  installment: boolean | null;
5310
5357
  notes: string | null;
5311
5358
  subscriptionEndDate: string | null;
5312
- currency: string;
5313
5359
  serviceId: string | null;
5314
5360
  invoiceDiscount: number;
5315
5361
  discount: number;
@@ -5699,6 +5745,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
5699
5745
  status: string;
5700
5746
  date: string;
5701
5747
  customerId: string;
5748
+ currency: string;
5702
5749
  created_by: string;
5703
5750
  branchId: string | null;
5704
5751
  responsibleId: string | null;
@@ -5706,7 +5753,6 @@ declare const routes: import("hono/hono-base").HonoBase<{
5706
5753
  installment: boolean | null;
5707
5754
  notes: string | null;
5708
5755
  subscriptionEndDate: string | null;
5709
- currency: string;
5710
5756
  serviceId: string | null;
5711
5757
  invoiceDiscount: number;
5712
5758
  discount: number;
@@ -6252,6 +6298,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
6252
6298
  status: string;
6253
6299
  date: string;
6254
6300
  customerId: string;
6301
+ currency: string;
6255
6302
  created_by: string;
6256
6303
  branchId: string | null;
6257
6304
  responsibleId: string | null;
@@ -6259,7 +6306,6 @@ declare const routes: import("hono/hono-base").HonoBase<{
6259
6306
  installment: boolean | null;
6260
6307
  notes: string | null;
6261
6308
  subscriptionEndDate: string | null;
6262
- currency: string;
6263
6309
  serviceId: string | null;
6264
6310
  invoiceDiscount: number;
6265
6311
  discount: number;
@@ -6424,6 +6470,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
6424
6470
  status: string;
6425
6471
  date: string;
6426
6472
  customerId: string;
6473
+ currency: string;
6427
6474
  created_by: string;
6428
6475
  branchId: string | null;
6429
6476
  responsibleId: string | null;
@@ -6431,7 +6478,6 @@ declare const routes: import("hono/hono-base").HonoBase<{
6431
6478
  installment: boolean | null;
6432
6479
  notes: string | null;
6433
6480
  subscriptionEndDate: string | null;
6434
- currency: string;
6435
6481
  serviceId: string | null;
6436
6482
  invoiceDiscount: number;
6437
6483
  discount: number;
@@ -11081,6 +11127,9 @@ declare const routes: import("hono/hono-base").HonoBase<{
11081
11127
  turnoverMinor: number;
11082
11128
  transitMinor: number;
11083
11129
  refundsMinor: number;
11130
+ outputVatMinor: number;
11131
+ advancesDeferredMinor: number;
11132
+ advancesRecognizedMinor: number;
11084
11133
  revenueMinor: number;
11085
11134
  cogsMinor: number;
11086
11135
  grossProfitMinor: number;
@@ -11088,8 +11137,9 @@ declare const routes: import("hono/hono-base").HonoBase<{
11088
11137
  netProfitMinor: number;
11089
11138
  transitPayoutsMinor: number;
11090
11139
  transitHeldMinor: number;
11091
- outputVatMinor: number;
11092
11140
  inputVatMinor: number;
11141
+ vatPayableMinor: number;
11142
+ deferredRevenueMinor: number;
11093
11143
  incomeCount: number;
11094
11144
  expenseCount: number;
11095
11145
  refundCount: number;
@@ -11926,11 +11976,14 @@ declare const routes: import("hono/hono-base").HonoBase<{
11926
11976
  destinationAccountId: string | null;
11927
11977
  paymentMethod: string | null;
11928
11978
  amount: number;
11979
+ destinationAmount: number | null;
11929
11980
  description: string | null;
11930
11981
  date: string;
11931
11982
  vat: number | null;
11983
+ vatAmount: number;
11932
11984
  reason: string | null;
11933
11985
  cinvoiceId: string | null;
11986
+ invoiceEntry: string | null;
11934
11987
  currency: string | null;
11935
11988
  amountType: FinanceAmountType | null;
11936
11989
  expenseType: FinanceExpenseType | null;
@@ -11939,8 +11992,10 @@ declare const routes: import("hono/hono-base").HonoBase<{
11939
11992
  category: string | null;
11940
11993
  collaboratorId: string | null;
11941
11994
  taskId: string | null;
11995
+ branchId: string | null;
11942
11996
  created_at: string;
11943
11997
  updated_at: string | null;
11998
+ responsibleId: string | null;
11944
11999
  }[];
11945
12000
  };
11946
12001
  outputFormat: "json";
@@ -11983,11 +12038,14 @@ declare const routes: import("hono/hono-base").HonoBase<{
11983
12038
  destinationAccountId: string | null;
11984
12039
  paymentMethod: string | null;
11985
12040
  amount: number;
12041
+ destinationAmount: number | null;
11986
12042
  description: string | null;
11987
12043
  date: string;
11988
12044
  vat: number | null;
12045
+ vatAmount: number;
11989
12046
  reason: string | null;
11990
12047
  cinvoiceId: string | null;
12048
+ invoiceEntry: string | null;
11991
12049
  currency: string | null;
11992
12050
  amountType: FinanceAmountType | null;
11993
12051
  expenseType: FinanceExpenseType | null;
@@ -11996,6 +12054,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
11996
12054
  category: string | null;
11997
12055
  collaboratorId: string | null;
11998
12056
  taskId: string | null;
12057
+ branchId: string | null;
11999
12058
  created_at: string;
12000
12059
  updated_at: string | null;
12001
12060
  };
@@ -12020,10 +12079,12 @@ declare const routes: import("hono/hono-base").HonoBase<{
12020
12079
  type: "transfer" | "refund" | "income" | "expense";
12021
12080
  customerId?: string | undefined;
12022
12081
  serviceId?: string | undefined;
12082
+ branchId?: string | null | undefined;
12023
12083
  accountId?: string | undefined;
12024
12084
  destinationAccountId?: string | undefined;
12025
12085
  paymentMethod?: string | undefined;
12026
12086
  amount: unknown;
12087
+ destinationAmount?: unknown;
12027
12088
  description?: string | undefined;
12028
12089
  date?: string | number | undefined;
12029
12090
  vat?: number | undefined;
@@ -12050,10 +12111,12 @@ declare const routes: import("hono/hono-base").HonoBase<{
12050
12111
  type: "transfer" | "refund" | "income" | "expense";
12051
12112
  customerId?: string | undefined;
12052
12113
  serviceId?: string | undefined;
12114
+ branchId?: string | null | undefined;
12053
12115
  accountId?: string | undefined;
12054
12116
  destinationAccountId?: string | undefined;
12055
12117
  paymentMethod?: string | undefined;
12056
12118
  amount: unknown;
12119
+ destinationAmount?: unknown;
12057
12120
  description?: string | undefined;
12058
12121
  date?: string | number | undefined;
12059
12122
  vat?: number | undefined;
@@ -12072,11 +12135,14 @@ declare const routes: import("hono/hono-base").HonoBase<{
12072
12135
  destinationAccountId: string | null;
12073
12136
  paymentMethod: string | null;
12074
12137
  amount: number;
12138
+ destinationAmount: number | null;
12075
12139
  description: string | null;
12076
12140
  date: string;
12077
12141
  vat: number | null;
12142
+ vatAmount: number;
12078
12143
  reason: string | null;
12079
12144
  cinvoiceId: string | null;
12145
+ invoiceEntry: string | null;
12080
12146
  currency: string | null;
12081
12147
  amountType: FinanceAmountType | null;
12082
12148
  expenseType: FinanceExpenseType | null;
@@ -12085,6 +12151,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
12085
12151
  category: string | null;
12086
12152
  collaboratorId: string | null;
12087
12153
  taskId: string | null;
12154
+ branchId: string | null;
12088
12155
  created_at: string;
12089
12156
  updated_at: string | null;
12090
12157
  };
@@ -12108,12 +12175,47 @@ declare const routes: import("hono/hono-base").HonoBase<{
12108
12175
  transactionId: string;
12109
12176
  workspace: string;
12110
12177
  type?: "transfer" | "refund" | "income" | "expense" | undefined;
12111
- customerId?: string | undefined;
12112
- serviceId?: string | undefined;
12178
+ customerId?: string | null | undefined;
12179
+ serviceId?: string | null | undefined;
12180
+ branchId?: string | null | undefined;
12181
+ accountId?: string | undefined;
12182
+ destinationAccountId?: string | undefined;
12183
+ paymentMethod?: string | undefined;
12184
+ amount?: unknown;
12185
+ destinationAmount?: unknown;
12186
+ description?: string | undefined;
12187
+ date?: string | number | undefined;
12188
+ vat?: number | undefined;
12189
+ reason?: string | undefined;
12190
+ };
12191
+ };
12192
+ output: {
12193
+ success: false;
12194
+ error: string;
12195
+ };
12196
+ outputFormat: "json";
12197
+ status: 409;
12198
+ } | {
12199
+ input: {
12200
+ json: {
12201
+ amountType?: "transit" | "revenue" | undefined;
12202
+ expenseType?: "cogs" | "operating" | "transit_payout" | undefined;
12203
+ refundDirection?: "to_customer" | "from_supplier" | undefined;
12204
+ refundedTransactionId?: string | null | undefined;
12205
+ category?: string | null | undefined;
12206
+ collaboratorId?: string | null | undefined;
12207
+ taskId?: string | null | undefined;
12208
+ transactionId: string;
12209
+ workspace: string;
12210
+ type?: "transfer" | "refund" | "income" | "expense" | undefined;
12211
+ customerId?: string | null | undefined;
12212
+ serviceId?: string | null | undefined;
12213
+ branchId?: string | null | undefined;
12113
12214
  accountId?: string | undefined;
12114
12215
  destinationAccountId?: string | undefined;
12115
12216
  paymentMethod?: string | undefined;
12116
12217
  amount?: unknown;
12218
+ destinationAmount?: unknown;
12117
12219
  description?: string | undefined;
12118
12220
  date?: string | number | undefined;
12119
12221
  vat?: number | undefined;
@@ -12139,12 +12241,14 @@ declare const routes: import("hono/hono-base").HonoBase<{
12139
12241
  transactionId: string;
12140
12242
  workspace: string;
12141
12243
  type?: "transfer" | "refund" | "income" | "expense" | undefined;
12142
- customerId?: string | undefined;
12143
- serviceId?: string | undefined;
12244
+ customerId?: string | null | undefined;
12245
+ serviceId?: string | null | undefined;
12246
+ branchId?: string | null | undefined;
12144
12247
  accountId?: string | undefined;
12145
12248
  destinationAccountId?: string | undefined;
12146
12249
  paymentMethod?: string | undefined;
12147
12250
  amount?: unknown;
12251
+ destinationAmount?: unknown;
12148
12252
  description?: string | undefined;
12149
12253
  date?: string | number | undefined;
12150
12254
  vat?: number | undefined;
@@ -12163,11 +12267,14 @@ declare const routes: import("hono/hono-base").HonoBase<{
12163
12267
  destinationAccountId: string | null;
12164
12268
  paymentMethod: string | null;
12165
12269
  amount: number;
12270
+ destinationAmount: number | null;
12166
12271
  description: string | null;
12167
12272
  date: string;
12168
12273
  vat: number | null;
12274
+ vatAmount: number;
12169
12275
  reason: string | null;
12170
12276
  cinvoiceId: string | null;
12277
+ invoiceEntry: string | null;
12171
12278
  currency: string | null;
12172
12279
  amountType: FinanceAmountType | null;
12173
12280
  expenseType: FinanceExpenseType | null;
@@ -12176,6 +12283,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
12176
12283
  category: string | null;
12177
12284
  collaboratorId: string | null;
12178
12285
  taskId: string | null;
12286
+ branchId: string | null;
12179
12287
  created_at: string;
12180
12288
  updated_at: string | null;
12181
12289
  };
@@ -12199,6 +12307,19 @@ declare const routes: import("hono/hono-base").HonoBase<{
12199
12307
  };
12200
12308
  outputFormat: "json";
12201
12309
  status: 404;
12310
+ } | {
12311
+ input: {
12312
+ json: {
12313
+ transactionId: string;
12314
+ workspace: string;
12315
+ };
12316
+ };
12317
+ output: {
12318
+ success: false;
12319
+ error: string;
12320
+ };
12321
+ outputFormat: "json";
12322
+ status: 409;
12202
12323
  } | {
12203
12324
  input: {
12204
12325
  json: {
@@ -12265,6 +12386,9 @@ declare const routes: import("hono/hono-base").HonoBase<{
12265
12386
  turnoverMinor: number;
12266
12387
  transitMinor: number;
12267
12388
  refundsMinor: number;
12389
+ outputVatMinor: number;
12390
+ advancesDeferredMinor: number;
12391
+ advancesRecognizedMinor: number;
12268
12392
  revenueMinor: number;
12269
12393
  cogsMinor: number;
12270
12394
  grossProfitMinor: number;
@@ -12272,8 +12396,9 @@ declare const routes: import("hono/hono-base").HonoBase<{
12272
12396
  netProfitMinor: number;
12273
12397
  transitPayoutsMinor: number;
12274
12398
  transitHeldMinor: number;
12275
- outputVatMinor: number;
12276
12399
  inputVatMinor: number;
12400
+ vatPayableMinor: number;
12401
+ deferredRevenueMinor: number;
12277
12402
  incomeCount: number;
12278
12403
  expenseCount: number;
12279
12404
  refundCount: number;
@@ -12284,6 +12409,26 @@ declare const routes: import("hono/hono-base").HonoBase<{
12284
12409
  status: 200;
12285
12410
  };
12286
12411
  };
12412
+ } & {
12413
+ "/pending-invoices/:workspace": {
12414
+ $get: {
12415
+ input: {
12416
+ param: {
12417
+ workspace: string;
12418
+ };
12419
+ };
12420
+ output: {
12421
+ success: true;
12422
+ totals: {
12423
+ currency: string;
12424
+ owedMinor: number;
12425
+ invoiceCount: number;
12426
+ }[];
12427
+ };
12428
+ outputFormat: "json";
12429
+ status: 200;
12430
+ };
12431
+ };
12287
12432
  } & {
12288
12433
  "/visibility/:workspace": {
12289
12434
  $get: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mestra-dev/contract",
3
- "version": "0.0.304",
3
+ "version": "0.0.306",
4
4
  "description": "Types-only Hono AppType contract for the Mestra auth API",
5
5
  "type": "module",
6
6
  "sideEffects": false,