@mestra-dev/contract 0.0.301 → 0.0.303

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 +796 -13
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -4860,6 +4860,19 @@ declare const routes: import("hono/hono-base").HonoBase<{
4860
4860
  $post: {
4861
4861
  input: {
4862
4862
  json: {
4863
+ branchId?: string | null | undefined;
4864
+ responsibleId?: string | null | undefined;
4865
+ internalNote?: string | null | undefined;
4866
+ allowedPaymentMethods?: string[] | null | undefined;
4867
+ allowPartialPayment?: boolean | undefined;
4868
+ remindPayer?: boolean | undefined;
4869
+ recurringInterval?: "monthly" | "quarterly" | "yearly" | null | undefined;
4870
+ scheduleType?: "fullPayment" | "installment" | "subscription" | "prepayment" | "stages" | null | undefined;
4871
+ installmentInterval?: "month" | "twoWeeks" | "week" | "year" | null | undefined;
4872
+ stageLabel?: string | null | undefined;
4873
+ dueTrigger?: "contract" | "date" | "payment" | "deposit" | "registration" | null | undefined;
4874
+ dueOffsetDays?: number | null | undefined;
4875
+ isDeposit?: boolean | undefined;
4863
4876
  installmentNumber?: number | null | undefined;
4864
4877
  totalInstallments?: number | null | undefined;
4865
4878
  installmentGroupId?: string | null | undefined;
@@ -4882,6 +4895,57 @@ declare const routes: import("hono/hono-base").HonoBase<{
4882
4895
  quantity?: number | undefined;
4883
4896
  discount?: number | undefined;
4884
4897
  description?: string | undefined;
4898
+ itemId?: string | null | undefined;
4899
+ itemPrice?: number | null | undefined;
4900
+ itemQuantity?: number | null | undefined;
4901
+ itemDiscount?: number | null | undefined;
4902
+ kind?: "free" | "service" | "property" | "transit" | null | undefined;
4903
+ amountType?: "transit" | "revenue" | "commission" | "advance" | "conditional" | null | undefined;
4904
+ vatRate?: number | null | undefined;
4905
+ dealType?: "sale" | "rent" | null | undefined;
4906
+ priceUnit?: "per_month" | "per_day" | "total" | null | undefined;
4907
+ deposit?: number | null | undefined;
4908
+ commissionMode?: "fixed" | "percent" | null | undefined;
4909
+ commissionPercent?: number | null | undefined;
4910
+ commissionFixed?: number | null | undefined;
4911
+ commissionPaidBy?: "buyer" | "seller" | "split" | null | undefined;
4912
+ commissionBuyerShare?: number | null | undefined;
4913
+ commissionBilledSide?: "buyer" | "seller" | null | undefined;
4914
+ commissionBaseUnlocked?: boolean | undefined;
4915
+ viaAgency?: {
4916
+ payee: string;
4917
+ payeeBank: string;
4918
+ transferTrigger: "contract" | "date" | "payment" | "deposit" | "registration";
4919
+ deadlineDays: number;
4920
+ enabled: boolean;
4921
+ } | null | undefined;
4922
+ transit?: {
4923
+ payee: string;
4924
+ payeeBank: string;
4925
+ transferTrigger: "contract" | "date" | "payment" | "deposit" | "registration";
4926
+ deadlineDays: number;
4927
+ } | null | undefined;
4928
+ transferPayment?: {
4929
+ viaAgencyBefore: boolean;
4930
+ } | null | undefined;
4931
+ executors?: {
4932
+ personKind: "member" | "partner";
4933
+ personId?: string | null | undefined;
4934
+ name: string;
4935
+ role: "partner" | "lead" | "co_agent" | "buyer_agent" | "seller_agent";
4936
+ shareKind: "fixed" | "percent";
4937
+ sharePercent?: number | null | undefined;
4938
+ shareAmount?: number | null | undefined;
4939
+ trigger?: "contract" | "date" | "payment" | "deposit" | "registration" | undefined;
4940
+ }[] | undefined;
4941
+ costs?: {
4942
+ category: string;
4943
+ supplier?: string | undefined;
4944
+ description?: string | undefined;
4945
+ amount: number;
4946
+ inputVatRate?: number | undefined;
4947
+ paidBy: "company_now" | "company_later" | "executor";
4948
+ }[] | undefined;
4885
4949
  }[] | undefined;
4886
4950
  unitName?: string | undefined;
4887
4951
  unitPrice?: number | undefined;
@@ -4895,7 +4959,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
4895
4959
  subscriptionStartDate?: string | number | undefined;
4896
4960
  subscriptionEndDate?: string | number | undefined;
4897
4961
  paymentMethod?: string | undefined;
4898
- amountType?: "revenue" | "transit" | undefined;
4962
+ amountType?: "transit" | "revenue" | undefined;
4899
4963
  };
4900
4964
  };
4901
4965
  output: {
@@ -4907,6 +4971,19 @@ declare const routes: import("hono/hono-base").HonoBase<{
4907
4971
  } | {
4908
4972
  input: {
4909
4973
  json: {
4974
+ branchId?: string | null | undefined;
4975
+ responsibleId?: string | null | undefined;
4976
+ internalNote?: string | null | undefined;
4977
+ allowedPaymentMethods?: string[] | null | undefined;
4978
+ allowPartialPayment?: boolean | undefined;
4979
+ remindPayer?: boolean | undefined;
4980
+ recurringInterval?: "monthly" | "quarterly" | "yearly" | null | undefined;
4981
+ scheduleType?: "fullPayment" | "installment" | "subscription" | "prepayment" | "stages" | null | undefined;
4982
+ installmentInterval?: "month" | "twoWeeks" | "week" | "year" | null | undefined;
4983
+ stageLabel?: string | null | undefined;
4984
+ dueTrigger?: "contract" | "date" | "payment" | "deposit" | "registration" | null | undefined;
4985
+ dueOffsetDays?: number | null | undefined;
4986
+ isDeposit?: boolean | undefined;
4910
4987
  installmentNumber?: number | null | undefined;
4911
4988
  totalInstallments?: number | null | undefined;
4912
4989
  installmentGroupId?: string | null | undefined;
@@ -4929,6 +5006,57 @@ declare const routes: import("hono/hono-base").HonoBase<{
4929
5006
  quantity?: number | undefined;
4930
5007
  discount?: number | undefined;
4931
5008
  description?: string | undefined;
5009
+ itemId?: string | null | undefined;
5010
+ itemPrice?: number | null | undefined;
5011
+ itemQuantity?: number | null | undefined;
5012
+ itemDiscount?: number | null | undefined;
5013
+ kind?: "free" | "service" | "property" | "transit" | null | undefined;
5014
+ amountType?: "transit" | "revenue" | "commission" | "advance" | "conditional" | null | undefined;
5015
+ vatRate?: number | null | undefined;
5016
+ dealType?: "sale" | "rent" | null | undefined;
5017
+ priceUnit?: "per_month" | "per_day" | "total" | null | undefined;
5018
+ deposit?: number | null | undefined;
5019
+ commissionMode?: "fixed" | "percent" | null | undefined;
5020
+ commissionPercent?: number | null | undefined;
5021
+ commissionFixed?: number | null | undefined;
5022
+ commissionPaidBy?: "buyer" | "seller" | "split" | null | undefined;
5023
+ commissionBuyerShare?: number | null | undefined;
5024
+ commissionBilledSide?: "buyer" | "seller" | null | undefined;
5025
+ commissionBaseUnlocked?: boolean | undefined;
5026
+ viaAgency?: {
5027
+ payee: string;
5028
+ payeeBank: string;
5029
+ transferTrigger: "contract" | "date" | "payment" | "deposit" | "registration";
5030
+ deadlineDays: number;
5031
+ enabled: boolean;
5032
+ } | null | undefined;
5033
+ transit?: {
5034
+ payee: string;
5035
+ payeeBank: string;
5036
+ transferTrigger: "contract" | "date" | "payment" | "deposit" | "registration";
5037
+ deadlineDays: number;
5038
+ } | null | undefined;
5039
+ transferPayment?: {
5040
+ viaAgencyBefore: boolean;
5041
+ } | null | undefined;
5042
+ executors?: {
5043
+ personKind: "member" | "partner";
5044
+ personId?: string | null | undefined;
5045
+ name: string;
5046
+ role: "partner" | "lead" | "co_agent" | "buyer_agent" | "seller_agent";
5047
+ shareKind: "fixed" | "percent";
5048
+ sharePercent?: number | null | undefined;
5049
+ shareAmount?: number | null | undefined;
5050
+ trigger?: "contract" | "date" | "payment" | "deposit" | "registration" | undefined;
5051
+ }[] | undefined;
5052
+ costs?: {
5053
+ category: string;
5054
+ supplier?: string | undefined;
5055
+ description?: string | undefined;
5056
+ amount: number;
5057
+ inputVatRate?: number | undefined;
5058
+ paidBy: "company_now" | "company_later" | "executor";
5059
+ }[] | undefined;
4932
5060
  }[] | undefined;
4933
5061
  unitName?: string | undefined;
4934
5062
  unitPrice?: number | undefined;
@@ -4942,7 +5070,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
4942
5070
  subscriptionStartDate?: string | number | undefined;
4943
5071
  subscriptionEndDate?: string | number | undefined;
4944
5072
  paymentMethod?: string | undefined;
4945
- amountType?: "revenue" | "transit" | undefined;
5073
+ amountType?: "transit" | "revenue" | undefined;
4946
5074
  };
4947
5075
  };
4948
5076
  output: {
@@ -4960,6 +5088,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
4960
5088
  date: string;
4961
5089
  customerId: string;
4962
5090
  created_by: string;
5091
+ branchId: string | null;
5092
+ responsibleId: string | null;
4963
5093
  fullPayment: boolean | null;
4964
5094
  installment: boolean | null;
4965
5095
  notes: string | null;
@@ -4984,11 +5114,40 @@ declare const routes: import("hono/hono-base").HonoBase<{
4984
5114
  subscription: boolean | null;
4985
5115
  subscriptionStartDate: string | null;
4986
5116
  paymentMethod: string | null;
4987
- amountType: "revenue" | "commission" | "transit" | "advance" | "conditional";
5117
+ internalNote: string | null;
5118
+ allowedPaymentMethods: string[] | null;
5119
+ allowPartialPayment: boolean;
5120
+ remindPayer: boolean;
5121
+ recurringInterval: string | null;
5122
+ scheduleType: string | null;
5123
+ installmentInterval: string | null;
5124
+ stageLabel: string | null;
5125
+ dueTrigger: string | null;
5126
+ dueOffsetDays: number | null;
5127
+ isDeposit: boolean;
5128
+ amountType: "transit" | "revenue" | "commission" | "advance" | "conditional";
4988
5129
  subtotal: number;
4989
5130
  lineDiscounts: number;
4990
5131
  total: number;
4991
5132
  services: {
5133
+ executors: {
5134
+ personKind: string;
5135
+ personId: string | null;
5136
+ name: string;
5137
+ role: string;
5138
+ shareKind: string;
5139
+ sharePercent: number | null;
5140
+ shareAmount: number | null;
5141
+ trigger: string;
5142
+ }[];
5143
+ costs: {
5144
+ category: string;
5145
+ supplier: string;
5146
+ description: string;
5147
+ amount: number;
5148
+ inputVatRate: number;
5149
+ paidBy: string;
5150
+ }[];
4992
5151
  id: string;
4993
5152
  serviceId: string | null;
4994
5153
  position: number;
@@ -4997,6 +5156,39 @@ declare const routes: import("hono/hono-base").HonoBase<{
4997
5156
  quantity: number;
4998
5157
  discount: number;
4999
5158
  description: string | null;
5159
+ itemId: string | null;
5160
+ itemPrice: number | null;
5161
+ itemQuantity: number | null;
5162
+ itemDiscount: number | null;
5163
+ kind: string | null;
5164
+ amountType: "transit" | "revenue" | "commission" | "advance" | "conditional" | null;
5165
+ vatRate: number | null;
5166
+ dealType: string | null;
5167
+ priceUnit: string | null;
5168
+ deposit: number | null;
5169
+ commissionMode: string | null;
5170
+ commissionPercent: number | null;
5171
+ commissionFixed: number | null;
5172
+ commissionPaidBy: string | null;
5173
+ commissionBuyerShare: number | null;
5174
+ commissionBilledSide: string | null;
5175
+ commissionBaseUnlocked: boolean;
5176
+ viaAgency: {
5177
+ payee: string;
5178
+ payeeBank: string;
5179
+ transferTrigger: string;
5180
+ deadlineDays: number;
5181
+ enabled: boolean;
5182
+ } | null;
5183
+ transit: {
5184
+ payee: string;
5185
+ payeeBank: string;
5186
+ transferTrigger: string;
5187
+ deadlineDays: number;
5188
+ } | null;
5189
+ transferPayment: {
5190
+ viaAgencyBefore: boolean;
5191
+ } | null;
5000
5192
  }[];
5001
5193
  }[];
5002
5194
  };
@@ -5095,6 +5287,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
5095
5287
  date: string;
5096
5288
  customerId: string;
5097
5289
  created_by: string;
5290
+ branchId: string | null;
5291
+ responsibleId: string | null;
5098
5292
  fullPayment: boolean | null;
5099
5293
  installment: boolean | null;
5100
5294
  notes: string | null;
@@ -5119,11 +5313,40 @@ declare const routes: import("hono/hono-base").HonoBase<{
5119
5313
  subscription: boolean | null;
5120
5314
  subscriptionStartDate: string | null;
5121
5315
  paymentMethod: string | null;
5122
- amountType: "revenue" | "commission" | "transit" | "advance" | "conditional";
5316
+ internalNote: string | null;
5317
+ allowedPaymentMethods: string[] | null;
5318
+ allowPartialPayment: boolean;
5319
+ remindPayer: boolean;
5320
+ recurringInterval: string | null;
5321
+ scheduleType: string | null;
5322
+ installmentInterval: string | null;
5323
+ stageLabel: string | null;
5324
+ dueTrigger: string | null;
5325
+ dueOffsetDays: number | null;
5326
+ isDeposit: boolean;
5327
+ amountType: "transit" | "revenue" | "commission" | "advance" | "conditional";
5123
5328
  subtotal: number;
5124
5329
  lineDiscounts: number;
5125
5330
  total: number;
5126
5331
  services: {
5332
+ executors: {
5333
+ personKind: string;
5334
+ personId: string | null;
5335
+ name: string;
5336
+ role: string;
5337
+ shareKind: string;
5338
+ sharePercent: number | null;
5339
+ shareAmount: number | null;
5340
+ trigger: string;
5341
+ }[];
5342
+ costs: {
5343
+ category: string;
5344
+ supplier: string;
5345
+ description: string;
5346
+ amount: number;
5347
+ inputVatRate: number;
5348
+ paidBy: string;
5349
+ }[];
5127
5350
  id: string;
5128
5351
  serviceId: string | null;
5129
5352
  position: number;
@@ -5132,6 +5355,39 @@ declare const routes: import("hono/hono-base").HonoBase<{
5132
5355
  quantity: number;
5133
5356
  discount: number;
5134
5357
  description: string | null;
5358
+ itemId: string | null;
5359
+ itemPrice: number | null;
5360
+ itemQuantity: number | null;
5361
+ itemDiscount: number | null;
5362
+ kind: string | null;
5363
+ amountType: "transit" | "revenue" | "commission" | "advance" | "conditional" | null;
5364
+ vatRate: number | null;
5365
+ dealType: string | null;
5366
+ priceUnit: string | null;
5367
+ deposit: number | null;
5368
+ commissionMode: string | null;
5369
+ commissionPercent: number | null;
5370
+ commissionFixed: number | null;
5371
+ commissionPaidBy: string | null;
5372
+ commissionBuyerShare: number | null;
5373
+ commissionBilledSide: string | null;
5374
+ commissionBaseUnlocked: boolean;
5375
+ viaAgency: {
5376
+ payee: string;
5377
+ payeeBank: string;
5378
+ transferTrigger: string;
5379
+ deadlineDays: number;
5380
+ enabled: boolean;
5381
+ } | null;
5382
+ transit: {
5383
+ payee: string;
5384
+ payeeBank: string;
5385
+ transferTrigger: string;
5386
+ deadlineDays: number;
5387
+ } | null;
5388
+ transferPayment: {
5389
+ viaAgencyBefore: boolean;
5390
+ } | null;
5135
5391
  }[];
5136
5392
  }[];
5137
5393
  };
@@ -5182,6 +5438,19 @@ declare const routes: import("hono/hono-base").HonoBase<{
5182
5438
  $post: {
5183
5439
  input: {
5184
5440
  json: {
5441
+ branchId?: string | null | undefined;
5442
+ responsibleId?: string | null | undefined;
5443
+ internalNote?: string | null | undefined;
5444
+ allowedPaymentMethods?: string[] | null | undefined;
5445
+ allowPartialPayment?: boolean | undefined;
5446
+ remindPayer?: boolean | undefined;
5447
+ recurringInterval?: "monthly" | "quarterly" | "yearly" | null | undefined;
5448
+ scheduleType?: "fullPayment" | "installment" | "subscription" | "prepayment" | "stages" | null | undefined;
5449
+ installmentInterval?: "month" | "twoWeeks" | "week" | "year" | null | undefined;
5450
+ stageLabel?: string | null | undefined;
5451
+ dueTrigger?: "contract" | "date" | "payment" | "deposit" | "registration" | null | undefined;
5452
+ dueOffsetDays?: number | null | undefined;
5453
+ isDeposit?: boolean | undefined;
5185
5454
  installmentNumber?: number | null | undefined;
5186
5455
  totalInstallments?: number | null | undefined;
5187
5456
  installmentGroupId?: string | null | undefined;
@@ -5195,6 +5464,57 @@ declare const routes: import("hono/hono-base").HonoBase<{
5195
5464
  quantity?: number | undefined;
5196
5465
  discount?: number | undefined;
5197
5466
  description?: string | undefined;
5467
+ itemId?: string | null | undefined;
5468
+ itemPrice?: number | null | undefined;
5469
+ itemQuantity?: number | null | undefined;
5470
+ itemDiscount?: number | null | undefined;
5471
+ kind?: "free" | "service" | "property" | "transit" | null | undefined;
5472
+ amountType?: "transit" | "revenue" | "commission" | "advance" | "conditional" | null | undefined;
5473
+ vatRate?: number | null | undefined;
5474
+ dealType?: "sale" | "rent" | null | undefined;
5475
+ priceUnit?: "per_month" | "per_day" | "total" | null | undefined;
5476
+ deposit?: number | null | undefined;
5477
+ commissionMode?: "fixed" | "percent" | null | undefined;
5478
+ commissionPercent?: number | null | undefined;
5479
+ commissionFixed?: number | null | undefined;
5480
+ commissionPaidBy?: "buyer" | "seller" | "split" | null | undefined;
5481
+ commissionBuyerShare?: number | null | undefined;
5482
+ commissionBilledSide?: "buyer" | "seller" | null | undefined;
5483
+ commissionBaseUnlocked?: boolean | undefined;
5484
+ viaAgency?: {
5485
+ payee: string;
5486
+ payeeBank: string;
5487
+ transferTrigger: "contract" | "date" | "payment" | "deposit" | "registration";
5488
+ deadlineDays: number;
5489
+ enabled: boolean;
5490
+ } | null | undefined;
5491
+ transit?: {
5492
+ payee: string;
5493
+ payeeBank: string;
5494
+ transferTrigger: "contract" | "date" | "payment" | "deposit" | "registration";
5495
+ deadlineDays: number;
5496
+ } | null | undefined;
5497
+ transferPayment?: {
5498
+ viaAgencyBefore: boolean;
5499
+ } | null | undefined;
5500
+ executors?: {
5501
+ personKind: "member" | "partner";
5502
+ personId?: string | null | undefined;
5503
+ name: string;
5504
+ role: "partner" | "lead" | "co_agent" | "buyer_agent" | "seller_agent";
5505
+ shareKind: "fixed" | "percent";
5506
+ sharePercent?: number | null | undefined;
5507
+ shareAmount?: number | null | undefined;
5508
+ trigger?: "contract" | "date" | "payment" | "deposit" | "registration" | undefined;
5509
+ }[] | undefined;
5510
+ costs?: {
5511
+ category: string;
5512
+ supplier?: string | undefined;
5513
+ description?: string | undefined;
5514
+ amount: number;
5515
+ inputVatRate?: number | undefined;
5516
+ paidBy: "company_now" | "company_later" | "executor";
5517
+ }[] | undefined;
5198
5518
  }[] | undefined;
5199
5519
  serviceId?: string | undefined;
5200
5520
  SellerFinanceAccountId?: string | undefined;
@@ -5218,7 +5538,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
5218
5538
  subscriptionStartDate?: string | number | undefined;
5219
5539
  subscriptionEndDate?: string | number | undefined;
5220
5540
  paymentMethod?: string | undefined;
5221
- amountType?: "revenue" | "transit" | undefined;
5541
+ amountType?: "transit" | "revenue" | undefined;
5222
5542
  };
5223
5543
  };
5224
5544
  output: {
@@ -5230,6 +5550,19 @@ declare const routes: import("hono/hono-base").HonoBase<{
5230
5550
  } | {
5231
5551
  input: {
5232
5552
  json: {
5553
+ branchId?: string | null | undefined;
5554
+ responsibleId?: string | null | undefined;
5555
+ internalNote?: string | null | undefined;
5556
+ allowedPaymentMethods?: string[] | null | undefined;
5557
+ allowPartialPayment?: boolean | undefined;
5558
+ remindPayer?: boolean | undefined;
5559
+ recurringInterval?: "monthly" | "quarterly" | "yearly" | null | undefined;
5560
+ scheduleType?: "fullPayment" | "installment" | "subscription" | "prepayment" | "stages" | null | undefined;
5561
+ installmentInterval?: "month" | "twoWeeks" | "week" | "year" | null | undefined;
5562
+ stageLabel?: string | null | undefined;
5563
+ dueTrigger?: "contract" | "date" | "payment" | "deposit" | "registration" | null | undefined;
5564
+ dueOffsetDays?: number | null | undefined;
5565
+ isDeposit?: boolean | undefined;
5233
5566
  installmentNumber?: number | null | undefined;
5234
5567
  totalInstallments?: number | null | undefined;
5235
5568
  installmentGroupId?: string | null | undefined;
@@ -5243,6 +5576,57 @@ declare const routes: import("hono/hono-base").HonoBase<{
5243
5576
  quantity?: number | undefined;
5244
5577
  discount?: number | undefined;
5245
5578
  description?: string | undefined;
5579
+ itemId?: string | null | undefined;
5580
+ itemPrice?: number | null | undefined;
5581
+ itemQuantity?: number | null | undefined;
5582
+ itemDiscount?: number | null | undefined;
5583
+ kind?: "free" | "service" | "property" | "transit" | null | undefined;
5584
+ amountType?: "transit" | "revenue" | "commission" | "advance" | "conditional" | null | undefined;
5585
+ vatRate?: number | null | undefined;
5586
+ dealType?: "sale" | "rent" | null | undefined;
5587
+ priceUnit?: "per_month" | "per_day" | "total" | null | undefined;
5588
+ deposit?: number | null | undefined;
5589
+ commissionMode?: "fixed" | "percent" | null | undefined;
5590
+ commissionPercent?: number | null | undefined;
5591
+ commissionFixed?: number | null | undefined;
5592
+ commissionPaidBy?: "buyer" | "seller" | "split" | null | undefined;
5593
+ commissionBuyerShare?: number | null | undefined;
5594
+ commissionBilledSide?: "buyer" | "seller" | null | undefined;
5595
+ commissionBaseUnlocked?: boolean | undefined;
5596
+ viaAgency?: {
5597
+ payee: string;
5598
+ payeeBank: string;
5599
+ transferTrigger: "contract" | "date" | "payment" | "deposit" | "registration";
5600
+ deadlineDays: number;
5601
+ enabled: boolean;
5602
+ } | null | undefined;
5603
+ transit?: {
5604
+ payee: string;
5605
+ payeeBank: string;
5606
+ transferTrigger: "contract" | "date" | "payment" | "deposit" | "registration";
5607
+ deadlineDays: number;
5608
+ } | null | undefined;
5609
+ transferPayment?: {
5610
+ viaAgencyBefore: boolean;
5611
+ } | null | undefined;
5612
+ executors?: {
5613
+ personKind: "member" | "partner";
5614
+ personId?: string | null | undefined;
5615
+ name: string;
5616
+ role: "partner" | "lead" | "co_agent" | "buyer_agent" | "seller_agent";
5617
+ shareKind: "fixed" | "percent";
5618
+ sharePercent?: number | null | undefined;
5619
+ shareAmount?: number | null | undefined;
5620
+ trigger?: "contract" | "date" | "payment" | "deposit" | "registration" | undefined;
5621
+ }[] | undefined;
5622
+ costs?: {
5623
+ category: string;
5624
+ supplier?: string | undefined;
5625
+ description?: string | undefined;
5626
+ amount: number;
5627
+ inputVatRate?: number | undefined;
5628
+ paidBy: "company_now" | "company_later" | "executor";
5629
+ }[] | undefined;
5246
5630
  }[] | undefined;
5247
5631
  serviceId?: string | undefined;
5248
5632
  SellerFinanceAccountId?: string | undefined;
@@ -5266,7 +5650,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
5266
5650
  subscriptionStartDate?: string | number | undefined;
5267
5651
  subscriptionEndDate?: string | number | undefined;
5268
5652
  paymentMethod?: string | undefined;
5269
- amountType?: "revenue" | "transit" | undefined;
5653
+ amountType?: "transit" | "revenue" | undefined;
5270
5654
  };
5271
5655
  };
5272
5656
  output: {
@@ -5284,6 +5668,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
5284
5668
  date: string;
5285
5669
  customerId: string;
5286
5670
  created_by: string;
5671
+ branchId: string | null;
5672
+ responsibleId: string | null;
5287
5673
  fullPayment: boolean | null;
5288
5674
  installment: boolean | null;
5289
5675
  notes: string | null;
@@ -5308,11 +5694,40 @@ declare const routes: import("hono/hono-base").HonoBase<{
5308
5694
  subscription: boolean | null;
5309
5695
  subscriptionStartDate: string | null;
5310
5696
  paymentMethod: string | null;
5311
- amountType: "revenue" | "commission" | "transit" | "advance" | "conditional";
5697
+ internalNote: string | null;
5698
+ allowedPaymentMethods: string[] | null;
5699
+ allowPartialPayment: boolean;
5700
+ remindPayer: boolean;
5701
+ recurringInterval: string | null;
5702
+ scheduleType: string | null;
5703
+ installmentInterval: string | null;
5704
+ stageLabel: string | null;
5705
+ dueTrigger: string | null;
5706
+ dueOffsetDays: number | null;
5707
+ isDeposit: boolean;
5708
+ amountType: "transit" | "revenue" | "commission" | "advance" | "conditional";
5312
5709
  subtotal: number;
5313
5710
  lineDiscounts: number;
5314
5711
  total: number;
5315
5712
  services: {
5713
+ executors: {
5714
+ personKind: string;
5715
+ personId: string | null;
5716
+ name: string;
5717
+ role: string;
5718
+ shareKind: string;
5719
+ sharePercent: number | null;
5720
+ shareAmount: number | null;
5721
+ trigger: string;
5722
+ }[];
5723
+ costs: {
5724
+ category: string;
5725
+ supplier: string;
5726
+ description: string;
5727
+ amount: number;
5728
+ inputVatRate: number;
5729
+ paidBy: string;
5730
+ }[];
5316
5731
  id: string;
5317
5732
  serviceId: string | null;
5318
5733
  position: number;
@@ -5321,6 +5736,374 @@ declare const routes: import("hono/hono-base").HonoBase<{
5321
5736
  quantity: number;
5322
5737
  discount: number;
5323
5738
  description: string | null;
5739
+ itemId: string | null;
5740
+ itemPrice: number | null;
5741
+ itemQuantity: number | null;
5742
+ itemDiscount: number | null;
5743
+ kind: string | null;
5744
+ amountType: "transit" | "revenue" | "commission" | "advance" | "conditional" | null;
5745
+ vatRate: number | null;
5746
+ dealType: string | null;
5747
+ priceUnit: string | null;
5748
+ deposit: number | null;
5749
+ commissionMode: string | null;
5750
+ commissionPercent: number | null;
5751
+ commissionFixed: number | null;
5752
+ commissionPaidBy: string | null;
5753
+ commissionBuyerShare: number | null;
5754
+ commissionBilledSide: string | null;
5755
+ commissionBaseUnlocked: boolean;
5756
+ viaAgency: {
5757
+ payee: string;
5758
+ payeeBank: string;
5759
+ transferTrigger: string;
5760
+ deadlineDays: number;
5761
+ enabled: boolean;
5762
+ } | null;
5763
+ transit: {
5764
+ payee: string;
5765
+ payeeBank: string;
5766
+ transferTrigger: string;
5767
+ deadlineDays: number;
5768
+ } | null;
5769
+ transferPayment: {
5770
+ viaAgencyBefore: boolean;
5771
+ } | null;
5772
+ }[];
5773
+ }[];
5774
+ };
5775
+ outputFormat: "json";
5776
+ status: 200;
5777
+ };
5778
+ };
5779
+ } & {
5780
+ "/plan/save": {
5781
+ $post: {
5782
+ input: {
5783
+ json: {
5784
+ workspace: string;
5785
+ installmentGroupId?: string | undefined;
5786
+ invoices: {
5787
+ services: {
5788
+ serviceId?: string | null | undefined;
5789
+ name: string;
5790
+ unitPrice: number;
5791
+ quantity?: number | undefined;
5792
+ discount?: number | undefined;
5793
+ description?: string | undefined;
5794
+ itemId?: string | null | undefined;
5795
+ itemPrice?: number | null | undefined;
5796
+ itemQuantity?: number | null | undefined;
5797
+ itemDiscount?: number | null | undefined;
5798
+ kind?: "free" | "service" | "property" | "transit" | null | undefined;
5799
+ amountType?: "transit" | "revenue" | "commission" | "advance" | "conditional" | null | undefined;
5800
+ vatRate?: number | null | undefined;
5801
+ dealType?: "sale" | "rent" | null | undefined;
5802
+ priceUnit?: "per_month" | "per_day" | "total" | null | undefined;
5803
+ deposit?: number | null | undefined;
5804
+ commissionMode?: "fixed" | "percent" | null | undefined;
5805
+ commissionPercent?: number | null | undefined;
5806
+ commissionFixed?: number | null | undefined;
5807
+ commissionPaidBy?: "buyer" | "seller" | "split" | null | undefined;
5808
+ commissionBuyerShare?: number | null | undefined;
5809
+ commissionBilledSide?: "buyer" | "seller" | null | undefined;
5810
+ commissionBaseUnlocked?: boolean | undefined;
5811
+ viaAgency?: {
5812
+ payee: string;
5813
+ payeeBank: string;
5814
+ transferTrigger: "contract" | "date" | "payment" | "deposit" | "registration";
5815
+ deadlineDays: number;
5816
+ enabled: boolean;
5817
+ } | null | undefined;
5818
+ transit?: {
5819
+ payee: string;
5820
+ payeeBank: string;
5821
+ transferTrigger: "contract" | "date" | "payment" | "deposit" | "registration";
5822
+ deadlineDays: number;
5823
+ } | null | undefined;
5824
+ transferPayment?: {
5825
+ viaAgencyBefore: boolean;
5826
+ } | null | undefined;
5827
+ executors?: {
5828
+ personKind: "member" | "partner";
5829
+ personId?: string | null | undefined;
5830
+ name: string;
5831
+ role: "partner" | "lead" | "co_agent" | "buyer_agent" | "seller_agent";
5832
+ shareKind: "fixed" | "percent";
5833
+ sharePercent?: number | null | undefined;
5834
+ shareAmount?: number | null | undefined;
5835
+ trigger?: "contract" | "date" | "payment" | "deposit" | "registration" | undefined;
5836
+ }[] | undefined;
5837
+ costs?: {
5838
+ category: string;
5839
+ supplier?: string | undefined;
5840
+ description?: string | undefined;
5841
+ amount: number;
5842
+ inputVatRate?: number | undefined;
5843
+ paidBy: "company_now" | "company_later" | "executor";
5844
+ }[] | undefined;
5845
+ }[];
5846
+ branchId?: string | null | undefined;
5847
+ responsibleId?: string | null | undefined;
5848
+ internalNote?: string | null | undefined;
5849
+ allowedPaymentMethods?: string[] | null | undefined;
5850
+ allowPartialPayment?: boolean | undefined;
5851
+ remindPayer?: boolean | undefined;
5852
+ recurringInterval?: "monthly" | "quarterly" | "yearly" | null | undefined;
5853
+ scheduleType?: "fullPayment" | "installment" | "subscription" | "prepayment" | "stages" | null | undefined;
5854
+ installmentInterval?: "month" | "twoWeeks" | "week" | "year" | null | undefined;
5855
+ stageLabel?: string | null | undefined;
5856
+ dueTrigger?: "contract" | "date" | "payment" | "deposit" | "registration" | null | undefined;
5857
+ dueOffsetDays?: number | null | undefined;
5858
+ isDeposit?: boolean | undefined;
5859
+ invoiceId: string;
5860
+ SellerFinanceAccountId: string;
5861
+ customerId: string;
5862
+ date: string | number;
5863
+ language: "ru" | "en";
5864
+ currency: "USD" | "EUR" | "RUB";
5865
+ vatOption: "vat_included" | "vat_excluded";
5866
+ vatRate?: number | undefined;
5867
+ buyerInn?: string | undefined;
5868
+ buyerKpp?: string | undefined;
5869
+ notes?: string | undefined;
5870
+ status?: "pending" | "canceled" | "paid" | "refunded" | undefined;
5871
+ discount?: number | undefined;
5872
+ fullPayment?: boolean | undefined;
5873
+ installment?: boolean | undefined;
5874
+ subscription?: boolean | undefined;
5875
+ subscriptionStartDate?: string | number | undefined;
5876
+ subscriptionEndDate?: string | number | undefined;
5877
+ paymentMethod?: string | undefined;
5878
+ amountType?: "transit" | "revenue" | undefined;
5879
+ cinvoiceId?: string | undefined;
5880
+ }[];
5881
+ };
5882
+ };
5883
+ output: {
5884
+ success: false;
5885
+ error: string;
5886
+ };
5887
+ outputFormat: "json";
5888
+ status: 400 | 404;
5889
+ } | {
5890
+ input: {
5891
+ json: {
5892
+ workspace: string;
5893
+ installmentGroupId?: string | undefined;
5894
+ invoices: {
5895
+ services: {
5896
+ serviceId?: string | null | undefined;
5897
+ name: string;
5898
+ unitPrice: number;
5899
+ quantity?: number | undefined;
5900
+ discount?: number | undefined;
5901
+ description?: string | undefined;
5902
+ itemId?: string | null | undefined;
5903
+ itemPrice?: number | null | undefined;
5904
+ itemQuantity?: number | null | undefined;
5905
+ itemDiscount?: number | null | undefined;
5906
+ kind?: "free" | "service" | "property" | "transit" | null | undefined;
5907
+ amountType?: "transit" | "revenue" | "commission" | "advance" | "conditional" | null | undefined;
5908
+ vatRate?: number | null | undefined;
5909
+ dealType?: "sale" | "rent" | null | undefined;
5910
+ priceUnit?: "per_month" | "per_day" | "total" | null | undefined;
5911
+ deposit?: number | null | undefined;
5912
+ commissionMode?: "fixed" | "percent" | null | undefined;
5913
+ commissionPercent?: number | null | undefined;
5914
+ commissionFixed?: number | null | undefined;
5915
+ commissionPaidBy?: "buyer" | "seller" | "split" | null | undefined;
5916
+ commissionBuyerShare?: number | null | undefined;
5917
+ commissionBilledSide?: "buyer" | "seller" | null | undefined;
5918
+ commissionBaseUnlocked?: boolean | undefined;
5919
+ viaAgency?: {
5920
+ payee: string;
5921
+ payeeBank: string;
5922
+ transferTrigger: "contract" | "date" | "payment" | "deposit" | "registration";
5923
+ deadlineDays: number;
5924
+ enabled: boolean;
5925
+ } | null | undefined;
5926
+ transit?: {
5927
+ payee: string;
5928
+ payeeBank: string;
5929
+ transferTrigger: "contract" | "date" | "payment" | "deposit" | "registration";
5930
+ deadlineDays: number;
5931
+ } | null | undefined;
5932
+ transferPayment?: {
5933
+ viaAgencyBefore: boolean;
5934
+ } | null | undefined;
5935
+ executors?: {
5936
+ personKind: "member" | "partner";
5937
+ personId?: string | null | undefined;
5938
+ name: string;
5939
+ role: "partner" | "lead" | "co_agent" | "buyer_agent" | "seller_agent";
5940
+ shareKind: "fixed" | "percent";
5941
+ sharePercent?: number | null | undefined;
5942
+ shareAmount?: number | null | undefined;
5943
+ trigger?: "contract" | "date" | "payment" | "deposit" | "registration" | undefined;
5944
+ }[] | undefined;
5945
+ costs?: {
5946
+ category: string;
5947
+ supplier?: string | undefined;
5948
+ description?: string | undefined;
5949
+ amount: number;
5950
+ inputVatRate?: number | undefined;
5951
+ paidBy: "company_now" | "company_later" | "executor";
5952
+ }[] | undefined;
5953
+ }[];
5954
+ branchId?: string | null | undefined;
5955
+ responsibleId?: string | null | undefined;
5956
+ internalNote?: string | null | undefined;
5957
+ allowedPaymentMethods?: string[] | null | undefined;
5958
+ allowPartialPayment?: boolean | undefined;
5959
+ remindPayer?: boolean | undefined;
5960
+ recurringInterval?: "monthly" | "quarterly" | "yearly" | null | undefined;
5961
+ scheduleType?: "fullPayment" | "installment" | "subscription" | "prepayment" | "stages" | null | undefined;
5962
+ installmentInterval?: "month" | "twoWeeks" | "week" | "year" | null | undefined;
5963
+ stageLabel?: string | null | undefined;
5964
+ dueTrigger?: "contract" | "date" | "payment" | "deposit" | "registration" | null | undefined;
5965
+ dueOffsetDays?: number | null | undefined;
5966
+ isDeposit?: boolean | undefined;
5967
+ invoiceId: string;
5968
+ SellerFinanceAccountId: string;
5969
+ customerId: string;
5970
+ date: string | number;
5971
+ language: "ru" | "en";
5972
+ currency: "USD" | "EUR" | "RUB";
5973
+ vatOption: "vat_included" | "vat_excluded";
5974
+ vatRate?: number | undefined;
5975
+ buyerInn?: string | undefined;
5976
+ buyerKpp?: string | undefined;
5977
+ notes?: string | undefined;
5978
+ status?: "pending" | "canceled" | "paid" | "refunded" | undefined;
5979
+ discount?: number | undefined;
5980
+ fullPayment?: boolean | undefined;
5981
+ installment?: boolean | undefined;
5982
+ subscription?: boolean | undefined;
5983
+ subscriptionStartDate?: string | number | undefined;
5984
+ subscriptionEndDate?: string | number | undefined;
5985
+ paymentMethod?: string | undefined;
5986
+ amountType?: "transit" | "revenue" | undefined;
5987
+ cinvoiceId?: string | undefined;
5988
+ }[];
5989
+ };
5990
+ };
5991
+ output: {
5992
+ success: true;
5993
+ cinvoices: {
5994
+ id: string;
5995
+ created_at: string;
5996
+ workspaceId: string;
5997
+ updated_at: string | null;
5998
+ deleted_at: string | null;
5999
+ verified_at: string | null;
6000
+ suspended_at: string | null;
6001
+ invoiceId: string;
6002
+ status: string;
6003
+ date: string;
6004
+ customerId: string;
6005
+ created_by: string;
6006
+ branchId: string | null;
6007
+ responsibleId: string | null;
6008
+ fullPayment: boolean | null;
6009
+ installment: boolean | null;
6010
+ notes: string | null;
6011
+ subscriptionEndDate: string | null;
6012
+ currency: string;
6013
+ serviceId: string | null;
6014
+ invoiceDiscount: number;
6015
+ discount: number;
6016
+ SellerFinanceAccountId: string;
6017
+ language: string;
6018
+ vatOption: string;
6019
+ unitName: string;
6020
+ unitPrice: number;
6021
+ unitQuantity: number;
6022
+ installmentNumber: number | null;
6023
+ totalInstallments: number | null;
6024
+ installmentGroupId: string | null;
6025
+ vatRate: number | null;
6026
+ paidAt: string | null;
6027
+ buyerInn: string | null;
6028
+ buyerKpp: string | null;
6029
+ subscription: boolean | null;
6030
+ subscriptionStartDate: string | null;
6031
+ paymentMethod: string | null;
6032
+ internalNote: string | null;
6033
+ allowedPaymentMethods: string[] | null;
6034
+ allowPartialPayment: boolean;
6035
+ remindPayer: boolean;
6036
+ recurringInterval: string | null;
6037
+ scheduleType: string | null;
6038
+ installmentInterval: string | null;
6039
+ stageLabel: string | null;
6040
+ dueTrigger: string | null;
6041
+ dueOffsetDays: number | null;
6042
+ isDeposit: boolean;
6043
+ amountType: "transit" | "revenue" | "commission" | "advance" | "conditional";
6044
+ subtotal: number;
6045
+ lineDiscounts: number;
6046
+ total: number;
6047
+ services: {
6048
+ executors: {
6049
+ personKind: string;
6050
+ personId: string | null;
6051
+ name: string;
6052
+ role: string;
6053
+ shareKind: string;
6054
+ sharePercent: number | null;
6055
+ shareAmount: number | null;
6056
+ trigger: string;
6057
+ }[];
6058
+ costs: {
6059
+ category: string;
6060
+ supplier: string;
6061
+ description: string;
6062
+ amount: number;
6063
+ inputVatRate: number;
6064
+ paidBy: string;
6065
+ }[];
6066
+ id: string;
6067
+ serviceId: string | null;
6068
+ position: number;
6069
+ name: string;
6070
+ unitPrice: number;
6071
+ quantity: number;
6072
+ discount: number;
6073
+ description: string | null;
6074
+ itemId: string | null;
6075
+ itemPrice: number | null;
6076
+ itemQuantity: number | null;
6077
+ itemDiscount: number | null;
6078
+ kind: string | null;
6079
+ amountType: "transit" | "revenue" | "commission" | "advance" | "conditional" | null;
6080
+ vatRate: number | null;
6081
+ dealType: string | null;
6082
+ priceUnit: string | null;
6083
+ deposit: number | null;
6084
+ commissionMode: string | null;
6085
+ commissionPercent: number | null;
6086
+ commissionFixed: number | null;
6087
+ commissionPaidBy: string | null;
6088
+ commissionBuyerShare: number | null;
6089
+ commissionBilledSide: string | null;
6090
+ commissionBaseUnlocked: boolean;
6091
+ viaAgency: {
6092
+ payee: string;
6093
+ payeeBank: string;
6094
+ transferTrigger: string;
6095
+ deadlineDays: number;
6096
+ enabled: boolean;
6097
+ } | null;
6098
+ transit: {
6099
+ payee: string;
6100
+ payeeBank: string;
6101
+ transferTrigger: string;
6102
+ deadlineDays: number;
6103
+ } | null;
6104
+ transferPayment: {
6105
+ viaAgencyBefore: boolean;
6106
+ } | null;
5324
6107
  }[];
5325
6108
  }[];
5326
6109
  };
@@ -10592,7 +11375,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
10592
11375
  $post: {
10593
11376
  input: {
10594
11377
  json: {
10595
- amountType?: "revenue" | "transit" | undefined;
11378
+ amountType?: "transit" | "revenue" | undefined;
10596
11379
  expenseType?: "cogs" | "operating" | "transit_payout" | undefined;
10597
11380
  refundDirection?: "to_customer" | "from_supplier" | undefined;
10598
11381
  refundedTransactionId?: string | null | undefined;
@@ -10622,7 +11405,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
10622
11405
  } | {
10623
11406
  input: {
10624
11407
  json: {
10625
- amountType?: "revenue" | "transit" | undefined;
11408
+ amountType?: "transit" | "revenue" | undefined;
10626
11409
  expenseType?: "cogs" | "operating" | "transit_payout" | undefined;
10627
11410
  refundDirection?: "to_customer" | "from_supplier" | undefined;
10628
11411
  refundedTransactionId?: string | null | undefined;
@@ -10681,7 +11464,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
10681
11464
  $post: {
10682
11465
  input: {
10683
11466
  json: {
10684
- amountType?: "revenue" | "transit" | undefined;
11467
+ amountType?: "transit" | "revenue" | undefined;
10685
11468
  expenseType?: "cogs" | "operating" | "transit_payout" | undefined;
10686
11469
  refundDirection?: "to_customer" | "from_supplier" | undefined;
10687
11470
  refundedTransactionId?: string | null | undefined;
@@ -10712,7 +11495,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
10712
11495
  } | {
10713
11496
  input: {
10714
11497
  json: {
10715
- amountType?: "revenue" | "transit" | undefined;
11498
+ amountType?: "transit" | "revenue" | undefined;
10716
11499
  expenseType?: "cogs" | "operating" | "transit_payout" | undefined;
10717
11500
  refundDirection?: "to_customer" | "from_supplier" | undefined;
10718
11501
  refundedTransactionId?: string | null | undefined;
@@ -11622,7 +12405,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
11622
12405
  paidAt: string | null;
11623
12406
  lines: {
11624
12407
  id: string;
11625
- kind: "refund" | "commission";
12408
+ kind: "commission" | "refund";
11626
12409
  workspaceName: string;
11627
12410
  interval: "monthly" | "yearly";
11628
12411
  commissionPercent: number;
@@ -11735,7 +12518,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
11735
12518
  paidAt: string | null;
11736
12519
  lines: {
11737
12520
  id: string;
11738
- kind: "refund" | "commission";
12521
+ kind: "commission" | "refund";
11739
12522
  workspaceName: string;
11740
12523
  interval: "monthly" | "yearly";
11741
12524
  commissionPercent: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mestra-dev/contract",
3
- "version": "0.0.301",
3
+ "version": "0.0.303",
4
4
  "description": "Types-only Hono AppType contract for the Mestra auth API",
5
5
  "type": "module",
6
6
  "sideEffects": false,