@mestra-dev/contract 0.0.301 → 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 +756 -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,53 @@ declare const routes: import("hono/hono-base").HonoBase<{
4882
4895
  quantity?: number | undefined;
4883
4896
  discount?: number | undefined;
4884
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;
4885
4945
  }[] | undefined;
4886
4946
  unitName?: string | undefined;
4887
4947
  unitPrice?: number | undefined;
@@ -4895,7 +4955,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
4895
4955
  subscriptionStartDate?: string | number | undefined;
4896
4956
  subscriptionEndDate?: string | number | undefined;
4897
4957
  paymentMethod?: string | undefined;
4898
- amountType?: "revenue" | "transit" | undefined;
4958
+ amountType?: "transit" | "revenue" | undefined;
4899
4959
  };
4900
4960
  };
4901
4961
  output: {
@@ -4907,6 +4967,19 @@ declare const routes: import("hono/hono-base").HonoBase<{
4907
4967
  } | {
4908
4968
  input: {
4909
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;
4910
4983
  installmentNumber?: number | null | undefined;
4911
4984
  totalInstallments?: number | null | undefined;
4912
4985
  installmentGroupId?: string | null | undefined;
@@ -4929,6 +5002,53 @@ declare const routes: import("hono/hono-base").HonoBase<{
4929
5002
  quantity?: number | undefined;
4930
5003
  discount?: number | undefined;
4931
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;
4932
5052
  }[] | undefined;
4933
5053
  unitName?: string | undefined;
4934
5054
  unitPrice?: number | undefined;
@@ -4942,7 +5062,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
4942
5062
  subscriptionStartDate?: string | number | undefined;
4943
5063
  subscriptionEndDate?: string | number | undefined;
4944
5064
  paymentMethod?: string | undefined;
4945
- amountType?: "revenue" | "transit" | undefined;
5065
+ amountType?: "transit" | "revenue" | undefined;
4946
5066
  };
4947
5067
  };
4948
5068
  output: {
@@ -4960,6 +5080,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
4960
5080
  date: string;
4961
5081
  customerId: string;
4962
5082
  created_by: string;
5083
+ branchId: string | null;
5084
+ responsibleId: string | null;
4963
5085
  fullPayment: boolean | null;
4964
5086
  installment: boolean | null;
4965
5087
  notes: string | null;
@@ -4984,11 +5106,40 @@ declare const routes: import("hono/hono-base").HonoBase<{
4984
5106
  subscription: boolean | null;
4985
5107
  subscriptionStartDate: string | null;
4986
5108
  paymentMethod: string | null;
4987
- 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";
4988
5121
  subtotal: number;
4989
5122
  lineDiscounts: number;
4990
5123
  total: number;
4991
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
+ }[];
4992
5143
  id: string;
4993
5144
  serviceId: string | null;
4994
5145
  position: number;
@@ -4997,6 +5148,35 @@ declare const routes: import("hono/hono-base").HonoBase<{
4997
5148
  quantity: number;
4998
5149
  discount: number;
4999
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;
5000
5180
  }[];
5001
5181
  }[];
5002
5182
  };
@@ -5095,6 +5275,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
5095
5275
  date: string;
5096
5276
  customerId: string;
5097
5277
  created_by: string;
5278
+ branchId: string | null;
5279
+ responsibleId: string | null;
5098
5280
  fullPayment: boolean | null;
5099
5281
  installment: boolean | null;
5100
5282
  notes: string | null;
@@ -5119,11 +5301,40 @@ declare const routes: import("hono/hono-base").HonoBase<{
5119
5301
  subscription: boolean | null;
5120
5302
  subscriptionStartDate: string | null;
5121
5303
  paymentMethod: string | null;
5122
- 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";
5123
5316
  subtotal: number;
5124
5317
  lineDiscounts: number;
5125
5318
  total: number;
5126
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
+ }[];
5127
5338
  id: string;
5128
5339
  serviceId: string | null;
5129
5340
  position: number;
@@ -5132,6 +5343,35 @@ declare const routes: import("hono/hono-base").HonoBase<{
5132
5343
  quantity: number;
5133
5344
  discount: number;
5134
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;
5135
5375
  }[];
5136
5376
  }[];
5137
5377
  };
@@ -5182,6 +5422,19 @@ declare const routes: import("hono/hono-base").HonoBase<{
5182
5422
  $post: {
5183
5423
  input: {
5184
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;
5185
5438
  installmentNumber?: number | null | undefined;
5186
5439
  totalInstallments?: number | null | undefined;
5187
5440
  installmentGroupId?: string | null | undefined;
@@ -5195,6 +5448,53 @@ declare const routes: import("hono/hono-base").HonoBase<{
5195
5448
  quantity?: number | undefined;
5196
5449
  discount?: number | undefined;
5197
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;
5198
5498
  }[] | undefined;
5199
5499
  serviceId?: string | undefined;
5200
5500
  SellerFinanceAccountId?: string | undefined;
@@ -5218,7 +5518,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
5218
5518
  subscriptionStartDate?: string | number | undefined;
5219
5519
  subscriptionEndDate?: string | number | undefined;
5220
5520
  paymentMethod?: string | undefined;
5221
- amountType?: "revenue" | "transit" | undefined;
5521
+ amountType?: "transit" | "revenue" | undefined;
5222
5522
  };
5223
5523
  };
5224
5524
  output: {
@@ -5230,6 +5530,19 @@ declare const routes: import("hono/hono-base").HonoBase<{
5230
5530
  } | {
5231
5531
  input: {
5232
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;
5233
5546
  installmentNumber?: number | null | undefined;
5234
5547
  totalInstallments?: number | null | undefined;
5235
5548
  installmentGroupId?: string | null | undefined;
@@ -5243,6 +5556,53 @@ declare const routes: import("hono/hono-base").HonoBase<{
5243
5556
  quantity?: number | undefined;
5244
5557
  discount?: number | undefined;
5245
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;
5246
5606
  }[] | undefined;
5247
5607
  serviceId?: string | undefined;
5248
5608
  SellerFinanceAccountId?: string | undefined;
@@ -5266,7 +5626,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
5266
5626
  subscriptionStartDate?: string | number | undefined;
5267
5627
  subscriptionEndDate?: string | number | undefined;
5268
5628
  paymentMethod?: string | undefined;
5269
- amountType?: "revenue" | "transit" | undefined;
5629
+ amountType?: "transit" | "revenue" | undefined;
5270
5630
  };
5271
5631
  };
5272
5632
  output: {
@@ -5284,6 +5644,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
5284
5644
  date: string;
5285
5645
  customerId: string;
5286
5646
  created_by: string;
5647
+ branchId: string | null;
5648
+ responsibleId: string | null;
5287
5649
  fullPayment: boolean | null;
5288
5650
  installment: boolean | null;
5289
5651
  notes: string | null;
@@ -5308,11 +5670,40 @@ declare const routes: import("hono/hono-base").HonoBase<{
5308
5670
  subscription: boolean | null;
5309
5671
  subscriptionStartDate: string | null;
5310
5672
  paymentMethod: string | null;
5311
- 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";
5312
5685
  subtotal: number;
5313
5686
  lineDiscounts: number;
5314
5687
  total: number;
5315
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
+ }[];
5316
5707
  id: string;
5317
5708
  serviceId: string | null;
5318
5709
  position: number;
@@ -5321,6 +5712,358 @@ declare const routes: import("hono/hono-base").HonoBase<{
5321
5712
  quantity: number;
5322
5713
  discount: number;
5323
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;
5324
6067
  }[];
5325
6068
  }[];
5326
6069
  };
@@ -10592,7 +11335,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
10592
11335
  $post: {
10593
11336
  input: {
10594
11337
  json: {
10595
- amountType?: "revenue" | "transit" | undefined;
11338
+ amountType?: "transit" | "revenue" | undefined;
10596
11339
  expenseType?: "cogs" | "operating" | "transit_payout" | undefined;
10597
11340
  refundDirection?: "to_customer" | "from_supplier" | undefined;
10598
11341
  refundedTransactionId?: string | null | undefined;
@@ -10622,7 +11365,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
10622
11365
  } | {
10623
11366
  input: {
10624
11367
  json: {
10625
- amountType?: "revenue" | "transit" | undefined;
11368
+ amountType?: "transit" | "revenue" | undefined;
10626
11369
  expenseType?: "cogs" | "operating" | "transit_payout" | undefined;
10627
11370
  refundDirection?: "to_customer" | "from_supplier" | undefined;
10628
11371
  refundedTransactionId?: string | null | undefined;
@@ -10681,7 +11424,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
10681
11424
  $post: {
10682
11425
  input: {
10683
11426
  json: {
10684
- amountType?: "revenue" | "transit" | undefined;
11427
+ amountType?: "transit" | "revenue" | undefined;
10685
11428
  expenseType?: "cogs" | "operating" | "transit_payout" | undefined;
10686
11429
  refundDirection?: "to_customer" | "from_supplier" | undefined;
10687
11430
  refundedTransactionId?: string | null | undefined;
@@ -10712,7 +11455,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
10712
11455
  } | {
10713
11456
  input: {
10714
11457
  json: {
10715
- amountType?: "revenue" | "transit" | undefined;
11458
+ amountType?: "transit" | "revenue" | undefined;
10716
11459
  expenseType?: "cogs" | "operating" | "transit_payout" | undefined;
10717
11460
  refundDirection?: "to_customer" | "from_supplier" | undefined;
10718
11461
  refundedTransactionId?: string | null | undefined;
@@ -11622,7 +12365,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
11622
12365
  paidAt: string | null;
11623
12366
  lines: {
11624
12367
  id: string;
11625
- kind: "refund" | "commission";
12368
+ kind: "commission" | "refund";
11626
12369
  workspaceName: string;
11627
12370
  interval: "monthly" | "yearly";
11628
12371
  commissionPercent: number;
@@ -11735,7 +12478,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
11735
12478
  paidAt: string | null;
11736
12479
  lines: {
11737
12480
  id: string;
11738
- kind: "refund" | "commission";
12481
+ kind: "commission" | "refund";
11739
12482
  workspaceName: string;
11740
12483
  interval: "monthly" | "yearly";
11741
12484
  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.302",
4
4
  "description": "Types-only Hono AppType contract for the Mestra auth API",
5
5
  "type": "module",
6
6
  "sideEffects": false,