@mestra-dev/contract 0.0.271 → 0.0.273
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +218 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import type { ApplyGlobalResponse } from 'hono/client';
|
|
2
2
|
import type { JwtVariables } from 'hono/jwt';
|
|
3
3
|
|
|
4
|
+
type FinanceAmountType = "revenue" | "commission" | "transit" | "advance" | "conditional";
|
|
5
|
+
type FinanceExpenseType = "cogs" | "operating" | "transit_payout";
|
|
6
|
+
type FinanceRefundDirection = "to_customer" | "from_supplier";
|
|
4
7
|
type FinanceCurrency = "ruble" | "dollar" | "euro";
|
|
5
8
|
type FinanceTransactionType = "refund" | "income" | "expense" | "transfer";
|
|
6
9
|
declare const PERSONA_CHOICES: {
|
|
@@ -3748,6 +3751,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
3748
3751
|
subscriptionStartDate?: string | number | undefined;
|
|
3749
3752
|
subscriptionEndDate?: string | number | undefined;
|
|
3750
3753
|
paymentMethod?: string | undefined;
|
|
3754
|
+
amountType?: "revenue" | "transit" | undefined;
|
|
3751
3755
|
};
|
|
3752
3756
|
};
|
|
3753
3757
|
output: {
|
|
@@ -3794,6 +3798,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
3794
3798
|
subscriptionStartDate?: string | number | undefined;
|
|
3795
3799
|
subscriptionEndDate?: string | number | undefined;
|
|
3796
3800
|
paymentMethod?: string | undefined;
|
|
3801
|
+
amountType?: "revenue" | "transit" | undefined;
|
|
3797
3802
|
};
|
|
3798
3803
|
};
|
|
3799
3804
|
output: {
|
|
@@ -3835,6 +3840,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
3835
3840
|
subscription: boolean | null;
|
|
3836
3841
|
subscriptionStartDate: string | null;
|
|
3837
3842
|
paymentMethod: string | null;
|
|
3843
|
+
amountType: "revenue" | "commission" | "transit" | "advance" | "conditional";
|
|
3838
3844
|
subtotal: number;
|
|
3839
3845
|
lineDiscounts: number;
|
|
3840
3846
|
total: number;
|
|
@@ -3969,6 +3975,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
3969
3975
|
subscription: boolean | null;
|
|
3970
3976
|
subscriptionStartDate: string | null;
|
|
3971
3977
|
paymentMethod: string | null;
|
|
3978
|
+
amountType: "revenue" | "commission" | "transit" | "advance" | "conditional";
|
|
3972
3979
|
subtotal: number;
|
|
3973
3980
|
lineDiscounts: number;
|
|
3974
3981
|
total: number;
|
|
@@ -4067,6 +4074,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
4067
4074
|
subscriptionStartDate?: string | number | undefined;
|
|
4068
4075
|
subscriptionEndDate?: string | number | undefined;
|
|
4069
4076
|
paymentMethod?: string | undefined;
|
|
4077
|
+
amountType?: "revenue" | "transit" | undefined;
|
|
4070
4078
|
};
|
|
4071
4079
|
};
|
|
4072
4080
|
output: {
|
|
@@ -4114,6 +4122,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
4114
4122
|
subscriptionStartDate?: string | number | undefined;
|
|
4115
4123
|
subscriptionEndDate?: string | number | undefined;
|
|
4116
4124
|
paymentMethod?: string | undefined;
|
|
4125
|
+
amountType?: "revenue" | "transit" | undefined;
|
|
4117
4126
|
};
|
|
4118
4127
|
};
|
|
4119
4128
|
output: {
|
|
@@ -4155,6 +4164,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
4155
4164
|
subscription: boolean | null;
|
|
4156
4165
|
subscriptionStartDate: string | null;
|
|
4157
4166
|
paymentMethod: string | null;
|
|
4167
|
+
amountType: "revenue" | "commission" | "transit" | "advance" | "conditional";
|
|
4158
4168
|
subtotal: number;
|
|
4159
4169
|
lineDiscounts: number;
|
|
4160
4170
|
total: number;
|
|
@@ -8234,6 +8244,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
8234
8244
|
totals: {
|
|
8235
8245
|
currency: string;
|
|
8236
8246
|
amountMinor: number;
|
|
8247
|
+
turnoverMinor: number;
|
|
8237
8248
|
invoiceCount: number;
|
|
8238
8249
|
growth: {
|
|
8239
8250
|
amountMinor: {
|
|
@@ -8241,6 +8252,11 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
8241
8252
|
growthPercentage: number | null;
|
|
8242
8253
|
direction: GrowthDirection;
|
|
8243
8254
|
};
|
|
8255
|
+
turnoverMinor: {
|
|
8256
|
+
previousValue: number;
|
|
8257
|
+
growthPercentage: number | null;
|
|
8258
|
+
direction: GrowthDirection;
|
|
8259
|
+
};
|
|
8244
8260
|
invoiceCount: {
|
|
8245
8261
|
previousValue: number;
|
|
8246
8262
|
growthPercentage: number | null;
|
|
@@ -8253,6 +8269,77 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
8253
8269
|
status: 200;
|
|
8254
8270
|
};
|
|
8255
8271
|
};
|
|
8272
|
+
} & {
|
|
8273
|
+
"/:workspace/pnl": {
|
|
8274
|
+
$get: {
|
|
8275
|
+
input: {
|
|
8276
|
+
query: {
|
|
8277
|
+
from?: string | number | undefined;
|
|
8278
|
+
to?: string | number | undefined;
|
|
8279
|
+
customerId?: string | undefined;
|
|
8280
|
+
serviceId?: string | undefined;
|
|
8281
|
+
collaboratorId?: string | undefined;
|
|
8282
|
+
taskId?: string | undefined;
|
|
8283
|
+
category?: string | undefined;
|
|
8284
|
+
};
|
|
8285
|
+
} & {
|
|
8286
|
+
param: {
|
|
8287
|
+
workspace: string;
|
|
8288
|
+
};
|
|
8289
|
+
};
|
|
8290
|
+
output: {
|
|
8291
|
+
success: false;
|
|
8292
|
+
error: string;
|
|
8293
|
+
};
|
|
8294
|
+
outputFormat: "json";
|
|
8295
|
+
status: 400;
|
|
8296
|
+
} | {
|
|
8297
|
+
input: {
|
|
8298
|
+
query: {
|
|
8299
|
+
from?: string | number | undefined;
|
|
8300
|
+
to?: string | number | undefined;
|
|
8301
|
+
customerId?: string | undefined;
|
|
8302
|
+
serviceId?: string | undefined;
|
|
8303
|
+
collaboratorId?: string | undefined;
|
|
8304
|
+
taskId?: string | undefined;
|
|
8305
|
+
category?: string | undefined;
|
|
8306
|
+
};
|
|
8307
|
+
} & {
|
|
8308
|
+
param: {
|
|
8309
|
+
workspace: string;
|
|
8310
|
+
};
|
|
8311
|
+
};
|
|
8312
|
+
output: {
|
|
8313
|
+
success: true;
|
|
8314
|
+
workspaceId: string;
|
|
8315
|
+
period: {
|
|
8316
|
+
from: string | null;
|
|
8317
|
+
to: string | null;
|
|
8318
|
+
};
|
|
8319
|
+
totals: {
|
|
8320
|
+
currency: string;
|
|
8321
|
+
turnoverMinor: number;
|
|
8322
|
+
transitMinor: number;
|
|
8323
|
+
refundsMinor: number;
|
|
8324
|
+
revenueMinor: number;
|
|
8325
|
+
cogsMinor: number;
|
|
8326
|
+
grossProfitMinor: number;
|
|
8327
|
+
operatingMinor: number;
|
|
8328
|
+
netProfitMinor: number;
|
|
8329
|
+
transitPayoutsMinor: number;
|
|
8330
|
+
transitHeldMinor: number;
|
|
8331
|
+
outputVatMinor: number;
|
|
8332
|
+
inputVatMinor: number;
|
|
8333
|
+
incomeCount: number;
|
|
8334
|
+
expenseCount: number;
|
|
8335
|
+
refundCount: number;
|
|
8336
|
+
invoiceCount: number;
|
|
8337
|
+
}[];
|
|
8338
|
+
};
|
|
8339
|
+
outputFormat: "json";
|
|
8340
|
+
status: 200;
|
|
8341
|
+
};
|
|
8342
|
+
};
|
|
8256
8343
|
} & {
|
|
8257
8344
|
"/:workspace/leads-by-source": {
|
|
8258
8345
|
$get: {
|
|
@@ -9084,6 +9171,14 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
9084
9171
|
vat: number | null;
|
|
9085
9172
|
reason: string | null;
|
|
9086
9173
|
cinvoiceId: string | null;
|
|
9174
|
+
currency: string | null;
|
|
9175
|
+
amountType: FinanceAmountType | null;
|
|
9176
|
+
expenseType: FinanceExpenseType | null;
|
|
9177
|
+
refundDirection: FinanceRefundDirection | null;
|
|
9178
|
+
refundedTransactionId: string | null;
|
|
9179
|
+
category: string | null;
|
|
9180
|
+
collaboratorId: string | null;
|
|
9181
|
+
taskId: string | null;
|
|
9087
9182
|
created_at: string;
|
|
9088
9183
|
updated_at: string | null;
|
|
9089
9184
|
}[];
|
|
@@ -9133,6 +9228,14 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
9133
9228
|
vat: number | null;
|
|
9134
9229
|
reason: string | null;
|
|
9135
9230
|
cinvoiceId: string | null;
|
|
9231
|
+
currency: string | null;
|
|
9232
|
+
amountType: FinanceAmountType | null;
|
|
9233
|
+
expenseType: FinanceExpenseType | null;
|
|
9234
|
+
refundDirection: FinanceRefundDirection | null;
|
|
9235
|
+
refundedTransactionId: string | null;
|
|
9236
|
+
category: string | null;
|
|
9237
|
+
collaboratorId: string | null;
|
|
9238
|
+
taskId: string | null;
|
|
9136
9239
|
created_at: string;
|
|
9137
9240
|
updated_at: string | null;
|
|
9138
9241
|
};
|
|
@@ -9146,6 +9249,13 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
9146
9249
|
$post: {
|
|
9147
9250
|
input: {
|
|
9148
9251
|
json: {
|
|
9252
|
+
amountType?: "revenue" | "transit" | undefined;
|
|
9253
|
+
expenseType?: "cogs" | "operating" | "transit_payout" | undefined;
|
|
9254
|
+
refundDirection?: "to_customer" | "from_supplier" | undefined;
|
|
9255
|
+
refundedTransactionId?: string | null | undefined;
|
|
9256
|
+
category?: string | null | undefined;
|
|
9257
|
+
collaboratorId?: string | null | undefined;
|
|
9258
|
+
taskId?: string | null | undefined;
|
|
9149
9259
|
workspace: string;
|
|
9150
9260
|
type: "refund" | "income" | "expense" | "transfer";
|
|
9151
9261
|
customerId?: string | undefined;
|
|
@@ -9169,6 +9279,13 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
9169
9279
|
} | {
|
|
9170
9280
|
input: {
|
|
9171
9281
|
json: {
|
|
9282
|
+
amountType?: "revenue" | "transit" | undefined;
|
|
9283
|
+
expenseType?: "cogs" | "operating" | "transit_payout" | undefined;
|
|
9284
|
+
refundDirection?: "to_customer" | "from_supplier" | undefined;
|
|
9285
|
+
refundedTransactionId?: string | null | undefined;
|
|
9286
|
+
category?: string | null | undefined;
|
|
9287
|
+
collaboratorId?: string | null | undefined;
|
|
9288
|
+
taskId?: string | null | undefined;
|
|
9172
9289
|
workspace: string;
|
|
9173
9290
|
type: "refund" | "income" | "expense" | "transfer";
|
|
9174
9291
|
customerId?: string | undefined;
|
|
@@ -9200,6 +9317,14 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
9200
9317
|
vat: number | null;
|
|
9201
9318
|
reason: string | null;
|
|
9202
9319
|
cinvoiceId: string | null;
|
|
9320
|
+
currency: string | null;
|
|
9321
|
+
amountType: FinanceAmountType | null;
|
|
9322
|
+
expenseType: FinanceExpenseType | null;
|
|
9323
|
+
refundDirection: FinanceRefundDirection | null;
|
|
9324
|
+
refundedTransactionId: string | null;
|
|
9325
|
+
category: string | null;
|
|
9326
|
+
collaboratorId: string | null;
|
|
9327
|
+
taskId: string | null;
|
|
9203
9328
|
created_at: string;
|
|
9204
9329
|
updated_at: string | null;
|
|
9205
9330
|
};
|
|
@@ -9213,6 +9338,13 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
9213
9338
|
$post: {
|
|
9214
9339
|
input: {
|
|
9215
9340
|
json: {
|
|
9341
|
+
amountType?: "revenue" | "transit" | undefined;
|
|
9342
|
+
expenseType?: "cogs" | "operating" | "transit_payout" | undefined;
|
|
9343
|
+
refundDirection?: "to_customer" | "from_supplier" | undefined;
|
|
9344
|
+
refundedTransactionId?: string | null | undefined;
|
|
9345
|
+
category?: string | null | undefined;
|
|
9346
|
+
collaboratorId?: string | null | undefined;
|
|
9347
|
+
taskId?: string | null | undefined;
|
|
9216
9348
|
transactionId: string;
|
|
9217
9349
|
workspace: string;
|
|
9218
9350
|
type?: "refund" | "income" | "expense" | "transfer" | undefined;
|
|
@@ -9237,6 +9369,13 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
9237
9369
|
} | {
|
|
9238
9370
|
input: {
|
|
9239
9371
|
json: {
|
|
9372
|
+
amountType?: "revenue" | "transit" | undefined;
|
|
9373
|
+
expenseType?: "cogs" | "operating" | "transit_payout" | undefined;
|
|
9374
|
+
refundDirection?: "to_customer" | "from_supplier" | undefined;
|
|
9375
|
+
refundedTransactionId?: string | null | undefined;
|
|
9376
|
+
category?: string | null | undefined;
|
|
9377
|
+
collaboratorId?: string | null | undefined;
|
|
9378
|
+
taskId?: string | null | undefined;
|
|
9240
9379
|
transactionId: string;
|
|
9241
9380
|
workspace: string;
|
|
9242
9381
|
type?: "refund" | "income" | "expense" | "transfer" | undefined;
|
|
@@ -9269,6 +9408,14 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
9269
9408
|
vat: number | null;
|
|
9270
9409
|
reason: string | null;
|
|
9271
9410
|
cinvoiceId: string | null;
|
|
9411
|
+
currency: string | null;
|
|
9412
|
+
amountType: FinanceAmountType | null;
|
|
9413
|
+
expenseType: FinanceExpenseType | null;
|
|
9414
|
+
refundDirection: FinanceRefundDirection | null;
|
|
9415
|
+
refundedTransactionId: string | null;
|
|
9416
|
+
category: string | null;
|
|
9417
|
+
collaboratorId: string | null;
|
|
9418
|
+
taskId: string | null;
|
|
9272
9419
|
created_at: string;
|
|
9273
9420
|
updated_at: string | null;
|
|
9274
9421
|
};
|
|
@@ -9306,6 +9453,77 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
9306
9453
|
status: 200;
|
|
9307
9454
|
};
|
|
9308
9455
|
};
|
|
9456
|
+
} & {
|
|
9457
|
+
"/pnl/:workspace": {
|
|
9458
|
+
$get: {
|
|
9459
|
+
input: {
|
|
9460
|
+
query: {
|
|
9461
|
+
from?: string | number | undefined;
|
|
9462
|
+
to?: string | number | undefined;
|
|
9463
|
+
customerId?: string | undefined;
|
|
9464
|
+
serviceId?: string | undefined;
|
|
9465
|
+
collaboratorId?: string | undefined;
|
|
9466
|
+
taskId?: string | undefined;
|
|
9467
|
+
category?: string | undefined;
|
|
9468
|
+
};
|
|
9469
|
+
} & {
|
|
9470
|
+
param: {
|
|
9471
|
+
workspace: string;
|
|
9472
|
+
};
|
|
9473
|
+
};
|
|
9474
|
+
output: {
|
|
9475
|
+
success: false;
|
|
9476
|
+
error: string;
|
|
9477
|
+
};
|
|
9478
|
+
outputFormat: "json";
|
|
9479
|
+
status: 400;
|
|
9480
|
+
} | {
|
|
9481
|
+
input: {
|
|
9482
|
+
query: {
|
|
9483
|
+
from?: string | number | undefined;
|
|
9484
|
+
to?: string | number | undefined;
|
|
9485
|
+
customerId?: string | undefined;
|
|
9486
|
+
serviceId?: string | undefined;
|
|
9487
|
+
collaboratorId?: string | undefined;
|
|
9488
|
+
taskId?: string | undefined;
|
|
9489
|
+
category?: string | undefined;
|
|
9490
|
+
};
|
|
9491
|
+
} & {
|
|
9492
|
+
param: {
|
|
9493
|
+
workspace: string;
|
|
9494
|
+
};
|
|
9495
|
+
};
|
|
9496
|
+
output: {
|
|
9497
|
+
success: true;
|
|
9498
|
+
workspaceId: string;
|
|
9499
|
+
period: {
|
|
9500
|
+
from: string | null;
|
|
9501
|
+
to: string | null;
|
|
9502
|
+
};
|
|
9503
|
+
totals: {
|
|
9504
|
+
currency: string;
|
|
9505
|
+
turnoverMinor: number;
|
|
9506
|
+
transitMinor: number;
|
|
9507
|
+
refundsMinor: number;
|
|
9508
|
+
revenueMinor: number;
|
|
9509
|
+
cogsMinor: number;
|
|
9510
|
+
grossProfitMinor: number;
|
|
9511
|
+
operatingMinor: number;
|
|
9512
|
+
netProfitMinor: number;
|
|
9513
|
+
transitPayoutsMinor: number;
|
|
9514
|
+
transitHeldMinor: number;
|
|
9515
|
+
outputVatMinor: number;
|
|
9516
|
+
inputVatMinor: number;
|
|
9517
|
+
incomeCount: number;
|
|
9518
|
+
expenseCount: number;
|
|
9519
|
+
refundCount: number;
|
|
9520
|
+
invoiceCount: number;
|
|
9521
|
+
}[];
|
|
9522
|
+
};
|
|
9523
|
+
outputFormat: "json";
|
|
9524
|
+
status: 200;
|
|
9525
|
+
};
|
|
9526
|
+
};
|
|
9309
9527
|
} & {
|
|
9310
9528
|
"/visibility/:workspace": {
|
|
9311
9529
|
$get: {
|