@mestra-dev/contract 0.0.300 → 0.0.302

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 +760 -13
  2. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -3601,6 +3601,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
3601
3601
  agencyCommissionType: string | null;
3602
3602
  agencyCommissionAmount: number | null;
3603
3603
  agencyCommissionPaidBy: string | null;
3604
+ agencyCommissionBuyerShare: number | null;
3604
3605
  alternativeEURCurrency: boolean | null;
3605
3606
  alternativeRUBCurrency: boolean | null;
3606
3607
  alternativeUSDCurrency: boolean | null;
@@ -3716,6 +3717,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
3716
3717
  agencyCommissionType: string | null;
3717
3718
  agencyCommissionAmount: number | null;
3718
3719
  agencyCommissionPaidBy: string | null;
3720
+ agencyCommissionBuyerShare: number | null;
3719
3721
  alternativeEURCurrency: boolean | null;
3720
3722
  alternativeRUBCurrency: boolean | null;
3721
3723
  alternativeUSDCurrency: boolean | null;
@@ -3844,6 +3846,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
3844
3846
  agencyCommissionType: string | null;
3845
3847
  agencyCommissionAmount: number | null;
3846
3848
  agencyCommissionPaidBy: string | null;
3849
+ agencyCommissionBuyerShare: number | null;
3847
3850
  alternativeEURCurrency: boolean | null;
3848
3851
  alternativeRUBCurrency: boolean | null;
3849
3852
  alternativeUSDCurrency: boolean | null;
@@ -4001,6 +4004,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
4001
4004
  agencyCommissionType: string | null;
4002
4005
  agencyCommissionAmount: number | null;
4003
4006
  agencyCommissionPaidBy: string | null;
4007
+ agencyCommissionBuyerShare: number | null;
4004
4008
  alternativeEURCurrency: boolean | null;
4005
4009
  alternativeRUBCurrency: boolean | null;
4006
4010
  alternativeUSDCurrency: boolean | null;
@@ -4856,6 +4860,19 @@ declare const routes: import("hono/hono-base").HonoBase<{
4856
4860
  $post: {
4857
4861
  input: {
4858
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;
4859
4876
  installmentNumber?: number | null | undefined;
4860
4877
  totalInstallments?: number | null | undefined;
4861
4878
  installmentGroupId?: string | null | undefined;
@@ -4878,6 +4895,53 @@ declare const routes: import("hono/hono-base").HonoBase<{
4878
4895
  quantity?: number | undefined;
4879
4896
  discount?: number | undefined;
4880
4897
  description?: string | undefined;
4898
+ kind?: "free" | "service" | "property" | "transit" | null | undefined;
4899
+ amountType?: "transit" | "revenue" | "commission" | "advance" | "conditional" | null | undefined;
4900
+ vatRate?: number | null | undefined;
4901
+ dealType?: "sale" | "rent" | null | undefined;
4902
+ priceUnit?: "per_month" | "per_day" | "total" | null | undefined;
4903
+ deposit?: number | null | undefined;
4904
+ commissionMode?: "fixed" | "percent" | null | undefined;
4905
+ commissionPercent?: number | null | undefined;
4906
+ commissionFixed?: number | null | undefined;
4907
+ commissionPaidBy?: "buyer" | "seller" | "split" | null | undefined;
4908
+ commissionBuyerShare?: number | null | undefined;
4909
+ commissionBilledSide?: "buyer" | "seller" | null | undefined;
4910
+ commissionBaseUnlocked?: boolean | undefined;
4911
+ viaAgency?: {
4912
+ payee: string;
4913
+ payeeBank: string;
4914
+ transferTrigger: "contract" | "date" | "payment" | "deposit" | "registration";
4915
+ deadlineDays: number;
4916
+ enabled: boolean;
4917
+ } | null | undefined;
4918
+ transit?: {
4919
+ payee: string;
4920
+ payeeBank: string;
4921
+ transferTrigger: "contract" | "date" | "payment" | "deposit" | "registration";
4922
+ deadlineDays: number;
4923
+ } | null | undefined;
4924
+ transferPayment?: {
4925
+ viaAgencyBefore: boolean;
4926
+ } | null | undefined;
4927
+ executors?: {
4928
+ personKind: "member" | "partner";
4929
+ personId?: string | null | undefined;
4930
+ name: string;
4931
+ role: "partner" | "lead" | "co_agent" | "buyer_agent" | "seller_agent";
4932
+ shareKind: "fixed" | "percent";
4933
+ sharePercent?: number | null | undefined;
4934
+ shareAmount?: number | null | undefined;
4935
+ trigger?: "contract" | "date" | "payment" | "deposit" | "registration" | undefined;
4936
+ }[] | undefined;
4937
+ costs?: {
4938
+ category: string;
4939
+ supplier?: string | undefined;
4940
+ description?: string | undefined;
4941
+ amount: number;
4942
+ inputVatRate?: number | undefined;
4943
+ paidBy: "company_now" | "company_later" | "executor";
4944
+ }[] | undefined;
4881
4945
  }[] | undefined;
4882
4946
  unitName?: string | undefined;
4883
4947
  unitPrice?: number | undefined;
@@ -4891,7 +4955,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
4891
4955
  subscriptionStartDate?: string | number | undefined;
4892
4956
  subscriptionEndDate?: string | number | undefined;
4893
4957
  paymentMethod?: string | undefined;
4894
- amountType?: "revenue" | "transit" | undefined;
4958
+ amountType?: "transit" | "revenue" | undefined;
4895
4959
  };
4896
4960
  };
4897
4961
  output: {
@@ -4903,6 +4967,19 @@ declare const routes: import("hono/hono-base").HonoBase<{
4903
4967
  } | {
4904
4968
  input: {
4905
4969
  json: {
4970
+ branchId?: string | null | undefined;
4971
+ responsibleId?: string | null | undefined;
4972
+ internalNote?: string | null | undefined;
4973
+ allowedPaymentMethods?: string[] | null | undefined;
4974
+ allowPartialPayment?: boolean | undefined;
4975
+ remindPayer?: boolean | undefined;
4976
+ recurringInterval?: "monthly" | "quarterly" | "yearly" | null | undefined;
4977
+ scheduleType?: "fullPayment" | "installment" | "subscription" | "prepayment" | "stages" | null | undefined;
4978
+ installmentInterval?: "month" | "twoWeeks" | "week" | "year" | null | undefined;
4979
+ stageLabel?: string | null | undefined;
4980
+ dueTrigger?: "contract" | "date" | "payment" | "deposit" | "registration" | null | undefined;
4981
+ dueOffsetDays?: number | null | undefined;
4982
+ isDeposit?: boolean | undefined;
4906
4983
  installmentNumber?: number | null | undefined;
4907
4984
  totalInstallments?: number | null | undefined;
4908
4985
  installmentGroupId?: string | null | undefined;
@@ -4925,6 +5002,53 @@ declare const routes: import("hono/hono-base").HonoBase<{
4925
5002
  quantity?: number | undefined;
4926
5003
  discount?: number | undefined;
4927
5004
  description?: string | undefined;
5005
+ kind?: "free" | "service" | "property" | "transit" | null | undefined;
5006
+ amountType?: "transit" | "revenue" | "commission" | "advance" | "conditional" | null | undefined;
5007
+ vatRate?: number | null | undefined;
5008
+ dealType?: "sale" | "rent" | null | undefined;
5009
+ priceUnit?: "per_month" | "per_day" | "total" | null | undefined;
5010
+ deposit?: number | null | undefined;
5011
+ commissionMode?: "fixed" | "percent" | null | undefined;
5012
+ commissionPercent?: number | null | undefined;
5013
+ commissionFixed?: number | null | undefined;
5014
+ commissionPaidBy?: "buyer" | "seller" | "split" | null | undefined;
5015
+ commissionBuyerShare?: number | null | undefined;
5016
+ commissionBilledSide?: "buyer" | "seller" | null | undefined;
5017
+ commissionBaseUnlocked?: boolean | undefined;
5018
+ viaAgency?: {
5019
+ payee: string;
5020
+ payeeBank: string;
5021
+ transferTrigger: "contract" | "date" | "payment" | "deposit" | "registration";
5022
+ deadlineDays: number;
5023
+ enabled: boolean;
5024
+ } | null | undefined;
5025
+ transit?: {
5026
+ payee: string;
5027
+ payeeBank: string;
5028
+ transferTrigger: "contract" | "date" | "payment" | "deposit" | "registration";
5029
+ deadlineDays: number;
5030
+ } | null | undefined;
5031
+ transferPayment?: {
5032
+ viaAgencyBefore: boolean;
5033
+ } | null | undefined;
5034
+ executors?: {
5035
+ personKind: "member" | "partner";
5036
+ personId?: string | null | undefined;
5037
+ name: string;
5038
+ role: "partner" | "lead" | "co_agent" | "buyer_agent" | "seller_agent";
5039
+ shareKind: "fixed" | "percent";
5040
+ sharePercent?: number | null | undefined;
5041
+ shareAmount?: number | null | undefined;
5042
+ trigger?: "contract" | "date" | "payment" | "deposit" | "registration" | undefined;
5043
+ }[] | undefined;
5044
+ costs?: {
5045
+ category: string;
5046
+ supplier?: string | undefined;
5047
+ description?: string | undefined;
5048
+ amount: number;
5049
+ inputVatRate?: number | undefined;
5050
+ paidBy: "company_now" | "company_later" | "executor";
5051
+ }[] | undefined;
4928
5052
  }[] | undefined;
4929
5053
  unitName?: string | undefined;
4930
5054
  unitPrice?: number | undefined;
@@ -4938,7 +5062,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
4938
5062
  subscriptionStartDate?: string | number | undefined;
4939
5063
  subscriptionEndDate?: string | number | undefined;
4940
5064
  paymentMethod?: string | undefined;
4941
- amountType?: "revenue" | "transit" | undefined;
5065
+ amountType?: "transit" | "revenue" | undefined;
4942
5066
  };
4943
5067
  };
4944
5068
  output: {
@@ -4956,6 +5080,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
4956
5080
  date: string;
4957
5081
  customerId: string;
4958
5082
  created_by: string;
5083
+ branchId: string | null;
5084
+ responsibleId: string | null;
4959
5085
  fullPayment: boolean | null;
4960
5086
  installment: boolean | null;
4961
5087
  notes: string | null;
@@ -4980,11 +5106,40 @@ declare const routes: import("hono/hono-base").HonoBase<{
4980
5106
  subscription: boolean | null;
4981
5107
  subscriptionStartDate: string | null;
4982
5108
  paymentMethod: string | null;
4983
- amountType: "revenue" | "commission" | "transit" | "advance" | "conditional";
5109
+ internalNote: string | null;
5110
+ allowedPaymentMethods: string[] | null;
5111
+ allowPartialPayment: boolean;
5112
+ remindPayer: boolean;
5113
+ recurringInterval: string | null;
5114
+ scheduleType: string | null;
5115
+ installmentInterval: string | null;
5116
+ stageLabel: string | null;
5117
+ dueTrigger: string | null;
5118
+ dueOffsetDays: number | null;
5119
+ isDeposit: boolean;
5120
+ amountType: "transit" | "revenue" | "commission" | "advance" | "conditional";
4984
5121
  subtotal: number;
4985
5122
  lineDiscounts: number;
4986
5123
  total: number;
4987
5124
  services: {
5125
+ executors: {
5126
+ personKind: string;
5127
+ personId: string | null;
5128
+ name: string;
5129
+ role: string;
5130
+ shareKind: string;
5131
+ sharePercent: number | null;
5132
+ shareAmount: number | null;
5133
+ trigger: string;
5134
+ }[];
5135
+ costs: {
5136
+ category: string;
5137
+ supplier: string;
5138
+ description: string;
5139
+ amount: number;
5140
+ inputVatRate: number;
5141
+ paidBy: string;
5142
+ }[];
4988
5143
  id: string;
4989
5144
  serviceId: string | null;
4990
5145
  position: number;
@@ -4993,6 +5148,35 @@ declare const routes: import("hono/hono-base").HonoBase<{
4993
5148
  quantity: number;
4994
5149
  discount: number;
4995
5150
  description: string | null;
5151
+ kind: string | null;
5152
+ amountType: "transit" | "revenue" | "commission" | "advance" | "conditional" | null;
5153
+ vatRate: number | null;
5154
+ dealType: string | null;
5155
+ priceUnit: string | null;
5156
+ deposit: number | null;
5157
+ commissionMode: string | null;
5158
+ commissionPercent: number | null;
5159
+ commissionFixed: number | null;
5160
+ commissionPaidBy: string | null;
5161
+ commissionBuyerShare: number | null;
5162
+ commissionBilledSide: string | null;
5163
+ commissionBaseUnlocked: boolean;
5164
+ viaAgency: {
5165
+ payee: string;
5166
+ payeeBank: string;
5167
+ transferTrigger: string;
5168
+ deadlineDays: number;
5169
+ enabled: boolean;
5170
+ } | null;
5171
+ transit: {
5172
+ payee: string;
5173
+ payeeBank: string;
5174
+ transferTrigger: string;
5175
+ deadlineDays: number;
5176
+ } | null;
5177
+ transferPayment: {
5178
+ viaAgencyBefore: boolean;
5179
+ } | null;
4996
5180
  }[];
4997
5181
  }[];
4998
5182
  };
@@ -5091,6 +5275,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
5091
5275
  date: string;
5092
5276
  customerId: string;
5093
5277
  created_by: string;
5278
+ branchId: string | null;
5279
+ responsibleId: string | null;
5094
5280
  fullPayment: boolean | null;
5095
5281
  installment: boolean | null;
5096
5282
  notes: string | null;
@@ -5115,11 +5301,40 @@ declare const routes: import("hono/hono-base").HonoBase<{
5115
5301
  subscription: boolean | null;
5116
5302
  subscriptionStartDate: string | null;
5117
5303
  paymentMethod: string | null;
5118
- amountType: "revenue" | "commission" | "transit" | "advance" | "conditional";
5304
+ internalNote: string | null;
5305
+ allowedPaymentMethods: string[] | null;
5306
+ allowPartialPayment: boolean;
5307
+ remindPayer: boolean;
5308
+ recurringInterval: string | null;
5309
+ scheduleType: string | null;
5310
+ installmentInterval: string | null;
5311
+ stageLabel: string | null;
5312
+ dueTrigger: string | null;
5313
+ dueOffsetDays: number | null;
5314
+ isDeposit: boolean;
5315
+ amountType: "transit" | "revenue" | "commission" | "advance" | "conditional";
5119
5316
  subtotal: number;
5120
5317
  lineDiscounts: number;
5121
5318
  total: number;
5122
5319
  services: {
5320
+ executors: {
5321
+ personKind: string;
5322
+ personId: string | null;
5323
+ name: string;
5324
+ role: string;
5325
+ shareKind: string;
5326
+ sharePercent: number | null;
5327
+ shareAmount: number | null;
5328
+ trigger: string;
5329
+ }[];
5330
+ costs: {
5331
+ category: string;
5332
+ supplier: string;
5333
+ description: string;
5334
+ amount: number;
5335
+ inputVatRate: number;
5336
+ paidBy: string;
5337
+ }[];
5123
5338
  id: string;
5124
5339
  serviceId: string | null;
5125
5340
  position: number;
@@ -5128,6 +5343,35 @@ declare const routes: import("hono/hono-base").HonoBase<{
5128
5343
  quantity: number;
5129
5344
  discount: number;
5130
5345
  description: string | null;
5346
+ kind: string | null;
5347
+ amountType: "transit" | "revenue" | "commission" | "advance" | "conditional" | null;
5348
+ vatRate: number | null;
5349
+ dealType: string | null;
5350
+ priceUnit: string | null;
5351
+ deposit: number | null;
5352
+ commissionMode: string | null;
5353
+ commissionPercent: number | null;
5354
+ commissionFixed: number | null;
5355
+ commissionPaidBy: string | null;
5356
+ commissionBuyerShare: number | null;
5357
+ commissionBilledSide: string | null;
5358
+ commissionBaseUnlocked: boolean;
5359
+ viaAgency: {
5360
+ payee: string;
5361
+ payeeBank: string;
5362
+ transferTrigger: string;
5363
+ deadlineDays: number;
5364
+ enabled: boolean;
5365
+ } | null;
5366
+ transit: {
5367
+ payee: string;
5368
+ payeeBank: string;
5369
+ transferTrigger: string;
5370
+ deadlineDays: number;
5371
+ } | null;
5372
+ transferPayment: {
5373
+ viaAgencyBefore: boolean;
5374
+ } | null;
5131
5375
  }[];
5132
5376
  }[];
5133
5377
  };
@@ -5178,6 +5422,19 @@ declare const routes: import("hono/hono-base").HonoBase<{
5178
5422
  $post: {
5179
5423
  input: {
5180
5424
  json: {
5425
+ branchId?: string | null | undefined;
5426
+ responsibleId?: string | null | undefined;
5427
+ internalNote?: string | null | undefined;
5428
+ allowedPaymentMethods?: string[] | null | undefined;
5429
+ allowPartialPayment?: boolean | undefined;
5430
+ remindPayer?: boolean | undefined;
5431
+ recurringInterval?: "monthly" | "quarterly" | "yearly" | null | undefined;
5432
+ scheduleType?: "fullPayment" | "installment" | "subscription" | "prepayment" | "stages" | null | undefined;
5433
+ installmentInterval?: "month" | "twoWeeks" | "week" | "year" | null | undefined;
5434
+ stageLabel?: string | null | undefined;
5435
+ dueTrigger?: "contract" | "date" | "payment" | "deposit" | "registration" | null | undefined;
5436
+ dueOffsetDays?: number | null | undefined;
5437
+ isDeposit?: boolean | undefined;
5181
5438
  installmentNumber?: number | null | undefined;
5182
5439
  totalInstallments?: number | null | undefined;
5183
5440
  installmentGroupId?: string | null | undefined;
@@ -5191,6 +5448,53 @@ declare const routes: import("hono/hono-base").HonoBase<{
5191
5448
  quantity?: number | undefined;
5192
5449
  discount?: number | undefined;
5193
5450
  description?: string | undefined;
5451
+ kind?: "free" | "service" | "property" | "transit" | null | undefined;
5452
+ amountType?: "transit" | "revenue" | "commission" | "advance" | "conditional" | null | undefined;
5453
+ vatRate?: number | null | undefined;
5454
+ dealType?: "sale" | "rent" | null | undefined;
5455
+ priceUnit?: "per_month" | "per_day" | "total" | null | undefined;
5456
+ deposit?: number | null | undefined;
5457
+ commissionMode?: "fixed" | "percent" | null | undefined;
5458
+ commissionPercent?: number | null | undefined;
5459
+ commissionFixed?: number | null | undefined;
5460
+ commissionPaidBy?: "buyer" | "seller" | "split" | null | undefined;
5461
+ commissionBuyerShare?: number | null | undefined;
5462
+ commissionBilledSide?: "buyer" | "seller" | null | undefined;
5463
+ commissionBaseUnlocked?: boolean | undefined;
5464
+ viaAgency?: {
5465
+ payee: string;
5466
+ payeeBank: string;
5467
+ transferTrigger: "contract" | "date" | "payment" | "deposit" | "registration";
5468
+ deadlineDays: number;
5469
+ enabled: boolean;
5470
+ } | null | undefined;
5471
+ transit?: {
5472
+ payee: string;
5473
+ payeeBank: string;
5474
+ transferTrigger: "contract" | "date" | "payment" | "deposit" | "registration";
5475
+ deadlineDays: number;
5476
+ } | null | undefined;
5477
+ transferPayment?: {
5478
+ viaAgencyBefore: boolean;
5479
+ } | null | undefined;
5480
+ executors?: {
5481
+ personKind: "member" | "partner";
5482
+ personId?: string | null | undefined;
5483
+ name: string;
5484
+ role: "partner" | "lead" | "co_agent" | "buyer_agent" | "seller_agent";
5485
+ shareKind: "fixed" | "percent";
5486
+ sharePercent?: number | null | undefined;
5487
+ shareAmount?: number | null | undefined;
5488
+ trigger?: "contract" | "date" | "payment" | "deposit" | "registration" | undefined;
5489
+ }[] | undefined;
5490
+ costs?: {
5491
+ category: string;
5492
+ supplier?: string | undefined;
5493
+ description?: string | undefined;
5494
+ amount: number;
5495
+ inputVatRate?: number | undefined;
5496
+ paidBy: "company_now" | "company_later" | "executor";
5497
+ }[] | undefined;
5194
5498
  }[] | undefined;
5195
5499
  serviceId?: string | undefined;
5196
5500
  SellerFinanceAccountId?: string | undefined;
@@ -5214,7 +5518,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
5214
5518
  subscriptionStartDate?: string | number | undefined;
5215
5519
  subscriptionEndDate?: string | number | undefined;
5216
5520
  paymentMethod?: string | undefined;
5217
- amountType?: "revenue" | "transit" | undefined;
5521
+ amountType?: "transit" | "revenue" | undefined;
5218
5522
  };
5219
5523
  };
5220
5524
  output: {
@@ -5226,6 +5530,19 @@ declare const routes: import("hono/hono-base").HonoBase<{
5226
5530
  } | {
5227
5531
  input: {
5228
5532
  json: {
5533
+ branchId?: string | null | undefined;
5534
+ responsibleId?: string | null | undefined;
5535
+ internalNote?: string | null | undefined;
5536
+ allowedPaymentMethods?: string[] | null | undefined;
5537
+ allowPartialPayment?: boolean | undefined;
5538
+ remindPayer?: boolean | undefined;
5539
+ recurringInterval?: "monthly" | "quarterly" | "yearly" | null | undefined;
5540
+ scheduleType?: "fullPayment" | "installment" | "subscription" | "prepayment" | "stages" | null | undefined;
5541
+ installmentInterval?: "month" | "twoWeeks" | "week" | "year" | null | undefined;
5542
+ stageLabel?: string | null | undefined;
5543
+ dueTrigger?: "contract" | "date" | "payment" | "deposit" | "registration" | null | undefined;
5544
+ dueOffsetDays?: number | null | undefined;
5545
+ isDeposit?: boolean | undefined;
5229
5546
  installmentNumber?: number | null | undefined;
5230
5547
  totalInstallments?: number | null | undefined;
5231
5548
  installmentGroupId?: string | null | undefined;
@@ -5239,6 +5556,53 @@ declare const routes: import("hono/hono-base").HonoBase<{
5239
5556
  quantity?: number | undefined;
5240
5557
  discount?: number | undefined;
5241
5558
  description?: string | undefined;
5559
+ kind?: "free" | "service" | "property" | "transit" | null | undefined;
5560
+ amountType?: "transit" | "revenue" | "commission" | "advance" | "conditional" | null | undefined;
5561
+ vatRate?: number | null | undefined;
5562
+ dealType?: "sale" | "rent" | null | undefined;
5563
+ priceUnit?: "per_month" | "per_day" | "total" | null | undefined;
5564
+ deposit?: number | null | undefined;
5565
+ commissionMode?: "fixed" | "percent" | null | undefined;
5566
+ commissionPercent?: number | null | undefined;
5567
+ commissionFixed?: number | null | undefined;
5568
+ commissionPaidBy?: "buyer" | "seller" | "split" | null | undefined;
5569
+ commissionBuyerShare?: number | null | undefined;
5570
+ commissionBilledSide?: "buyer" | "seller" | null | undefined;
5571
+ commissionBaseUnlocked?: boolean | undefined;
5572
+ viaAgency?: {
5573
+ payee: string;
5574
+ payeeBank: string;
5575
+ transferTrigger: "contract" | "date" | "payment" | "deposit" | "registration";
5576
+ deadlineDays: number;
5577
+ enabled: boolean;
5578
+ } | null | undefined;
5579
+ transit?: {
5580
+ payee: string;
5581
+ payeeBank: string;
5582
+ transferTrigger: "contract" | "date" | "payment" | "deposit" | "registration";
5583
+ deadlineDays: number;
5584
+ } | null | undefined;
5585
+ transferPayment?: {
5586
+ viaAgencyBefore: boolean;
5587
+ } | null | undefined;
5588
+ executors?: {
5589
+ personKind: "member" | "partner";
5590
+ personId?: string | null | undefined;
5591
+ name: string;
5592
+ role: "partner" | "lead" | "co_agent" | "buyer_agent" | "seller_agent";
5593
+ shareKind: "fixed" | "percent";
5594
+ sharePercent?: number | null | undefined;
5595
+ shareAmount?: number | null | undefined;
5596
+ trigger?: "contract" | "date" | "payment" | "deposit" | "registration" | undefined;
5597
+ }[] | undefined;
5598
+ costs?: {
5599
+ category: string;
5600
+ supplier?: string | undefined;
5601
+ description?: string | undefined;
5602
+ amount: number;
5603
+ inputVatRate?: number | undefined;
5604
+ paidBy: "company_now" | "company_later" | "executor";
5605
+ }[] | undefined;
5242
5606
  }[] | undefined;
5243
5607
  serviceId?: string | undefined;
5244
5608
  SellerFinanceAccountId?: string | undefined;
@@ -5262,7 +5626,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
5262
5626
  subscriptionStartDate?: string | number | undefined;
5263
5627
  subscriptionEndDate?: string | number | undefined;
5264
5628
  paymentMethod?: string | undefined;
5265
- amountType?: "revenue" | "transit" | undefined;
5629
+ amountType?: "transit" | "revenue" | undefined;
5266
5630
  };
5267
5631
  };
5268
5632
  output: {
@@ -5280,6 +5644,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
5280
5644
  date: string;
5281
5645
  customerId: string;
5282
5646
  created_by: string;
5647
+ branchId: string | null;
5648
+ responsibleId: string | null;
5283
5649
  fullPayment: boolean | null;
5284
5650
  installment: boolean | null;
5285
5651
  notes: string | null;
@@ -5304,11 +5670,40 @@ declare const routes: import("hono/hono-base").HonoBase<{
5304
5670
  subscription: boolean | null;
5305
5671
  subscriptionStartDate: string | null;
5306
5672
  paymentMethod: string | null;
5307
- amountType: "revenue" | "commission" | "transit" | "advance" | "conditional";
5673
+ internalNote: string | null;
5674
+ allowedPaymentMethods: string[] | null;
5675
+ allowPartialPayment: boolean;
5676
+ remindPayer: boolean;
5677
+ recurringInterval: string | null;
5678
+ scheduleType: string | null;
5679
+ installmentInterval: string | null;
5680
+ stageLabel: string | null;
5681
+ dueTrigger: string | null;
5682
+ dueOffsetDays: number | null;
5683
+ isDeposit: boolean;
5684
+ amountType: "transit" | "revenue" | "commission" | "advance" | "conditional";
5308
5685
  subtotal: number;
5309
5686
  lineDiscounts: number;
5310
5687
  total: number;
5311
5688
  services: {
5689
+ executors: {
5690
+ personKind: string;
5691
+ personId: string | null;
5692
+ name: string;
5693
+ role: string;
5694
+ shareKind: string;
5695
+ sharePercent: number | null;
5696
+ shareAmount: number | null;
5697
+ trigger: string;
5698
+ }[];
5699
+ costs: {
5700
+ category: string;
5701
+ supplier: string;
5702
+ description: string;
5703
+ amount: number;
5704
+ inputVatRate: number;
5705
+ paidBy: string;
5706
+ }[];
5312
5707
  id: string;
5313
5708
  serviceId: string | null;
5314
5709
  position: number;
@@ -5317,6 +5712,358 @@ declare const routes: import("hono/hono-base").HonoBase<{
5317
5712
  quantity: number;
5318
5713
  discount: number;
5319
5714
  description: string | null;
5715
+ kind: string | null;
5716
+ amountType: "transit" | "revenue" | "commission" | "advance" | "conditional" | null;
5717
+ vatRate: number | null;
5718
+ dealType: string | null;
5719
+ priceUnit: string | null;
5720
+ deposit: number | null;
5721
+ commissionMode: string | null;
5722
+ commissionPercent: number | null;
5723
+ commissionFixed: number | null;
5724
+ commissionPaidBy: string | null;
5725
+ commissionBuyerShare: number | null;
5726
+ commissionBilledSide: string | null;
5727
+ commissionBaseUnlocked: boolean;
5728
+ viaAgency: {
5729
+ payee: string;
5730
+ payeeBank: string;
5731
+ transferTrigger: string;
5732
+ deadlineDays: number;
5733
+ enabled: boolean;
5734
+ } | null;
5735
+ transit: {
5736
+ payee: string;
5737
+ payeeBank: string;
5738
+ transferTrigger: string;
5739
+ deadlineDays: number;
5740
+ } | null;
5741
+ transferPayment: {
5742
+ viaAgencyBefore: boolean;
5743
+ } | null;
5744
+ }[];
5745
+ }[];
5746
+ };
5747
+ outputFormat: "json";
5748
+ status: 200;
5749
+ };
5750
+ };
5751
+ } & {
5752
+ "/plan/save": {
5753
+ $post: {
5754
+ input: {
5755
+ json: {
5756
+ workspace: string;
5757
+ installmentGroupId?: string | undefined;
5758
+ invoices: {
5759
+ services: {
5760
+ serviceId?: string | null | undefined;
5761
+ name: string;
5762
+ unitPrice: number;
5763
+ quantity?: number | undefined;
5764
+ discount?: number | undefined;
5765
+ description?: string | undefined;
5766
+ kind?: "free" | "service" | "property" | "transit" | null | undefined;
5767
+ amountType?: "transit" | "revenue" | "commission" | "advance" | "conditional" | null | undefined;
5768
+ vatRate?: number | null | undefined;
5769
+ dealType?: "sale" | "rent" | null | undefined;
5770
+ priceUnit?: "per_month" | "per_day" | "total" | null | undefined;
5771
+ deposit?: number | null | undefined;
5772
+ commissionMode?: "fixed" | "percent" | null | undefined;
5773
+ commissionPercent?: number | null | undefined;
5774
+ commissionFixed?: number | null | undefined;
5775
+ commissionPaidBy?: "buyer" | "seller" | "split" | null | undefined;
5776
+ commissionBuyerShare?: number | null | undefined;
5777
+ commissionBilledSide?: "buyer" | "seller" | null | undefined;
5778
+ commissionBaseUnlocked?: boolean | undefined;
5779
+ viaAgency?: {
5780
+ payee: string;
5781
+ payeeBank: string;
5782
+ transferTrigger: "contract" | "date" | "payment" | "deposit" | "registration";
5783
+ deadlineDays: number;
5784
+ enabled: boolean;
5785
+ } | null | undefined;
5786
+ transit?: {
5787
+ payee: string;
5788
+ payeeBank: string;
5789
+ transferTrigger: "contract" | "date" | "payment" | "deposit" | "registration";
5790
+ deadlineDays: number;
5791
+ } | null | undefined;
5792
+ transferPayment?: {
5793
+ viaAgencyBefore: boolean;
5794
+ } | null | undefined;
5795
+ executors?: {
5796
+ personKind: "member" | "partner";
5797
+ personId?: string | null | undefined;
5798
+ name: string;
5799
+ role: "partner" | "lead" | "co_agent" | "buyer_agent" | "seller_agent";
5800
+ shareKind: "fixed" | "percent";
5801
+ sharePercent?: number | null | undefined;
5802
+ shareAmount?: number | null | undefined;
5803
+ trigger?: "contract" | "date" | "payment" | "deposit" | "registration" | undefined;
5804
+ }[] | undefined;
5805
+ costs?: {
5806
+ category: string;
5807
+ supplier?: string | undefined;
5808
+ description?: string | undefined;
5809
+ amount: number;
5810
+ inputVatRate?: number | undefined;
5811
+ paidBy: "company_now" | "company_later" | "executor";
5812
+ }[] | undefined;
5813
+ }[];
5814
+ branchId?: string | null | undefined;
5815
+ responsibleId?: string | null | undefined;
5816
+ internalNote?: string | null | undefined;
5817
+ allowedPaymentMethods?: string[] | null | undefined;
5818
+ allowPartialPayment?: boolean | undefined;
5819
+ remindPayer?: boolean | undefined;
5820
+ recurringInterval?: "monthly" | "quarterly" | "yearly" | null | undefined;
5821
+ scheduleType?: "fullPayment" | "installment" | "subscription" | "prepayment" | "stages" | null | undefined;
5822
+ installmentInterval?: "month" | "twoWeeks" | "week" | "year" | null | undefined;
5823
+ stageLabel?: string | null | undefined;
5824
+ dueTrigger?: "contract" | "date" | "payment" | "deposit" | "registration" | null | undefined;
5825
+ dueOffsetDays?: number | null | undefined;
5826
+ isDeposit?: boolean | undefined;
5827
+ invoiceId: string;
5828
+ SellerFinanceAccountId: string;
5829
+ customerId: string;
5830
+ date: string | number;
5831
+ language: "ru" | "en";
5832
+ currency: "USD" | "EUR" | "RUB";
5833
+ vatOption: "vat_included" | "vat_excluded";
5834
+ vatRate?: number | undefined;
5835
+ buyerInn?: string | undefined;
5836
+ buyerKpp?: string | undefined;
5837
+ notes?: string | undefined;
5838
+ status?: "pending" | "canceled" | "paid" | "refunded" | undefined;
5839
+ discount?: number | undefined;
5840
+ fullPayment?: boolean | undefined;
5841
+ installment?: boolean | undefined;
5842
+ subscription?: boolean | undefined;
5843
+ subscriptionStartDate?: string | number | undefined;
5844
+ subscriptionEndDate?: string | number | undefined;
5845
+ paymentMethod?: string | undefined;
5846
+ amountType?: "transit" | "revenue" | undefined;
5847
+ cinvoiceId?: string | undefined;
5848
+ }[];
5849
+ };
5850
+ };
5851
+ output: {
5852
+ success: false;
5853
+ error: string;
5854
+ };
5855
+ outputFormat: "json";
5856
+ status: 400 | 404;
5857
+ } | {
5858
+ input: {
5859
+ json: {
5860
+ workspace: string;
5861
+ installmentGroupId?: string | undefined;
5862
+ invoices: {
5863
+ services: {
5864
+ serviceId?: string | null | undefined;
5865
+ name: string;
5866
+ unitPrice: number;
5867
+ quantity?: number | undefined;
5868
+ discount?: number | undefined;
5869
+ description?: string | undefined;
5870
+ kind?: "free" | "service" | "property" | "transit" | null | undefined;
5871
+ amountType?: "transit" | "revenue" | "commission" | "advance" | "conditional" | null | undefined;
5872
+ vatRate?: number | null | undefined;
5873
+ dealType?: "sale" | "rent" | null | undefined;
5874
+ priceUnit?: "per_month" | "per_day" | "total" | null | undefined;
5875
+ deposit?: number | null | undefined;
5876
+ commissionMode?: "fixed" | "percent" | null | undefined;
5877
+ commissionPercent?: number | null | undefined;
5878
+ commissionFixed?: number | null | undefined;
5879
+ commissionPaidBy?: "buyer" | "seller" | "split" | null | undefined;
5880
+ commissionBuyerShare?: number | null | undefined;
5881
+ commissionBilledSide?: "buyer" | "seller" | null | undefined;
5882
+ commissionBaseUnlocked?: boolean | undefined;
5883
+ viaAgency?: {
5884
+ payee: string;
5885
+ payeeBank: string;
5886
+ transferTrigger: "contract" | "date" | "payment" | "deposit" | "registration";
5887
+ deadlineDays: number;
5888
+ enabled: boolean;
5889
+ } | null | undefined;
5890
+ transit?: {
5891
+ payee: string;
5892
+ payeeBank: string;
5893
+ transferTrigger: "contract" | "date" | "payment" | "deposit" | "registration";
5894
+ deadlineDays: number;
5895
+ } | null | undefined;
5896
+ transferPayment?: {
5897
+ viaAgencyBefore: boolean;
5898
+ } | null | undefined;
5899
+ executors?: {
5900
+ personKind: "member" | "partner";
5901
+ personId?: string | null | undefined;
5902
+ name: string;
5903
+ role: "partner" | "lead" | "co_agent" | "buyer_agent" | "seller_agent";
5904
+ shareKind: "fixed" | "percent";
5905
+ sharePercent?: number | null | undefined;
5906
+ shareAmount?: number | null | undefined;
5907
+ trigger?: "contract" | "date" | "payment" | "deposit" | "registration" | undefined;
5908
+ }[] | undefined;
5909
+ costs?: {
5910
+ category: string;
5911
+ supplier?: string | undefined;
5912
+ description?: string | undefined;
5913
+ amount: number;
5914
+ inputVatRate?: number | undefined;
5915
+ paidBy: "company_now" | "company_later" | "executor";
5916
+ }[] | undefined;
5917
+ }[];
5918
+ branchId?: string | null | undefined;
5919
+ responsibleId?: string | null | undefined;
5920
+ internalNote?: string | null | undefined;
5921
+ allowedPaymentMethods?: string[] | null | undefined;
5922
+ allowPartialPayment?: boolean | undefined;
5923
+ remindPayer?: boolean | undefined;
5924
+ recurringInterval?: "monthly" | "quarterly" | "yearly" | null | undefined;
5925
+ scheduleType?: "fullPayment" | "installment" | "subscription" | "prepayment" | "stages" | null | undefined;
5926
+ installmentInterval?: "month" | "twoWeeks" | "week" | "year" | null | undefined;
5927
+ stageLabel?: string | null | undefined;
5928
+ dueTrigger?: "contract" | "date" | "payment" | "deposit" | "registration" | null | undefined;
5929
+ dueOffsetDays?: number | null | undefined;
5930
+ isDeposit?: boolean | undefined;
5931
+ invoiceId: string;
5932
+ SellerFinanceAccountId: string;
5933
+ customerId: string;
5934
+ date: string | number;
5935
+ language: "ru" | "en";
5936
+ currency: "USD" | "EUR" | "RUB";
5937
+ vatOption: "vat_included" | "vat_excluded";
5938
+ vatRate?: number | undefined;
5939
+ buyerInn?: string | undefined;
5940
+ buyerKpp?: string | undefined;
5941
+ notes?: string | undefined;
5942
+ status?: "pending" | "canceled" | "paid" | "refunded" | undefined;
5943
+ discount?: number | undefined;
5944
+ fullPayment?: boolean | undefined;
5945
+ installment?: boolean | undefined;
5946
+ subscription?: boolean | undefined;
5947
+ subscriptionStartDate?: string | number | undefined;
5948
+ subscriptionEndDate?: string | number | undefined;
5949
+ paymentMethod?: string | undefined;
5950
+ amountType?: "transit" | "revenue" | undefined;
5951
+ cinvoiceId?: string | undefined;
5952
+ }[];
5953
+ };
5954
+ };
5955
+ output: {
5956
+ success: true;
5957
+ cinvoices: {
5958
+ id: string;
5959
+ created_at: string;
5960
+ workspaceId: string;
5961
+ updated_at: string | null;
5962
+ deleted_at: string | null;
5963
+ verified_at: string | null;
5964
+ suspended_at: string | null;
5965
+ invoiceId: string;
5966
+ status: string;
5967
+ date: string;
5968
+ customerId: string;
5969
+ created_by: string;
5970
+ branchId: string | null;
5971
+ responsibleId: string | null;
5972
+ fullPayment: boolean | null;
5973
+ installment: boolean | null;
5974
+ notes: string | null;
5975
+ subscriptionEndDate: string | null;
5976
+ currency: string;
5977
+ serviceId: string | null;
5978
+ invoiceDiscount: number;
5979
+ discount: number;
5980
+ SellerFinanceAccountId: string;
5981
+ language: string;
5982
+ vatOption: string;
5983
+ unitName: string;
5984
+ unitPrice: number;
5985
+ unitQuantity: number;
5986
+ installmentNumber: number | null;
5987
+ totalInstallments: number | null;
5988
+ installmentGroupId: string | null;
5989
+ vatRate: number | null;
5990
+ paidAt: string | null;
5991
+ buyerInn: string | null;
5992
+ buyerKpp: string | null;
5993
+ subscription: boolean | null;
5994
+ subscriptionStartDate: string | null;
5995
+ paymentMethod: string | null;
5996
+ internalNote: string | null;
5997
+ allowedPaymentMethods: string[] | null;
5998
+ allowPartialPayment: boolean;
5999
+ remindPayer: boolean;
6000
+ recurringInterval: string | null;
6001
+ scheduleType: string | null;
6002
+ installmentInterval: string | null;
6003
+ stageLabel: string | null;
6004
+ dueTrigger: string | null;
6005
+ dueOffsetDays: number | null;
6006
+ isDeposit: boolean;
6007
+ amountType: "transit" | "revenue" | "commission" | "advance" | "conditional";
6008
+ subtotal: number;
6009
+ lineDiscounts: number;
6010
+ total: number;
6011
+ services: {
6012
+ executors: {
6013
+ personKind: string;
6014
+ personId: string | null;
6015
+ name: string;
6016
+ role: string;
6017
+ shareKind: string;
6018
+ sharePercent: number | null;
6019
+ shareAmount: number | null;
6020
+ trigger: string;
6021
+ }[];
6022
+ costs: {
6023
+ category: string;
6024
+ supplier: string;
6025
+ description: string;
6026
+ amount: number;
6027
+ inputVatRate: number;
6028
+ paidBy: string;
6029
+ }[];
6030
+ id: string;
6031
+ serviceId: string | null;
6032
+ position: number;
6033
+ name: string;
6034
+ unitPrice: number;
6035
+ quantity: number;
6036
+ discount: number;
6037
+ description: string | null;
6038
+ kind: string | null;
6039
+ amountType: "transit" | "revenue" | "commission" | "advance" | "conditional" | null;
6040
+ vatRate: number | null;
6041
+ dealType: string | null;
6042
+ priceUnit: string | null;
6043
+ deposit: number | null;
6044
+ commissionMode: string | null;
6045
+ commissionPercent: number | null;
6046
+ commissionFixed: number | null;
6047
+ commissionPaidBy: string | null;
6048
+ commissionBuyerShare: number | null;
6049
+ commissionBilledSide: string | null;
6050
+ commissionBaseUnlocked: boolean;
6051
+ viaAgency: {
6052
+ payee: string;
6053
+ payeeBank: string;
6054
+ transferTrigger: string;
6055
+ deadlineDays: number;
6056
+ enabled: boolean;
6057
+ } | null;
6058
+ transit: {
6059
+ payee: string;
6060
+ payeeBank: string;
6061
+ transferTrigger: string;
6062
+ deadlineDays: number;
6063
+ } | null;
6064
+ transferPayment: {
6065
+ viaAgencyBefore: boolean;
6066
+ } | null;
5320
6067
  }[];
5321
6068
  }[];
5322
6069
  };
@@ -10588,7 +11335,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
10588
11335
  $post: {
10589
11336
  input: {
10590
11337
  json: {
10591
- amountType?: "revenue" | "transit" | undefined;
11338
+ amountType?: "transit" | "revenue" | undefined;
10592
11339
  expenseType?: "cogs" | "operating" | "transit_payout" | undefined;
10593
11340
  refundDirection?: "to_customer" | "from_supplier" | undefined;
10594
11341
  refundedTransactionId?: string | null | undefined;
@@ -10618,7 +11365,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
10618
11365
  } | {
10619
11366
  input: {
10620
11367
  json: {
10621
- amountType?: "revenue" | "transit" | undefined;
11368
+ amountType?: "transit" | "revenue" | undefined;
10622
11369
  expenseType?: "cogs" | "operating" | "transit_payout" | undefined;
10623
11370
  refundDirection?: "to_customer" | "from_supplier" | undefined;
10624
11371
  refundedTransactionId?: string | null | undefined;
@@ -10677,7 +11424,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
10677
11424
  $post: {
10678
11425
  input: {
10679
11426
  json: {
10680
- amountType?: "revenue" | "transit" | undefined;
11427
+ amountType?: "transit" | "revenue" | undefined;
10681
11428
  expenseType?: "cogs" | "operating" | "transit_payout" | undefined;
10682
11429
  refundDirection?: "to_customer" | "from_supplier" | undefined;
10683
11430
  refundedTransactionId?: string | null | undefined;
@@ -10708,7 +11455,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
10708
11455
  } | {
10709
11456
  input: {
10710
11457
  json: {
10711
- amountType?: "revenue" | "transit" | undefined;
11458
+ amountType?: "transit" | "revenue" | undefined;
10712
11459
  expenseType?: "cogs" | "operating" | "transit_payout" | undefined;
10713
11460
  refundDirection?: "to_customer" | "from_supplier" | undefined;
10714
11461
  refundedTransactionId?: string | null | undefined;
@@ -11618,7 +12365,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
11618
12365
  paidAt: string | null;
11619
12366
  lines: {
11620
12367
  id: string;
11621
- kind: "refund" | "commission";
12368
+ kind: "commission" | "refund";
11622
12369
  workspaceName: string;
11623
12370
  interval: "monthly" | "yearly";
11624
12371
  commissionPercent: number;
@@ -11731,7 +12478,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
11731
12478
  paidAt: string | null;
11732
12479
  lines: {
11733
12480
  id: string;
11734
- kind: "refund" | "commission";
12481
+ kind: "commission" | "refund";
11735
12482
  workspaceName: string;
11736
12483
  interval: "monthly" | "yearly";
11737
12484
  commissionPercent: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mestra-dev/contract",
3
- "version": "0.0.300",
3
+ "version": "0.0.302",
4
4
  "description": "Types-only Hono AppType contract for the Mestra auth API",
5
5
  "type": "module",
6
6
  "sideEffects": false,