@mestra-dev/contract 0.0.211 → 0.0.213
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 +383 -816
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { ApplyGlobalResponse } from 'hono/client';
|
|
2
2
|
import type { JwtVariables } from 'hono/jwt';
|
|
3
3
|
|
|
4
|
-
type GrowthDirection = "positive" | "negative" | "none";
|
|
5
4
|
type FinanceCurrency = "ruble" | "dollar" | "euro";
|
|
6
5
|
type FinanceTransactionType = "refund" | "income" | "expense" | "transfer";
|
|
6
|
+
type GrowthDirection = "positive" | "negative" | "none";
|
|
7
7
|
type Variables = JwtVariables;
|
|
8
8
|
/** Shared error body for middleware / HTTPException responses (typed into AppType). */
|
|
9
9
|
export type ApiError = {
|
|
@@ -30,7 +30,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
30
30
|
readonly info: {
|
|
31
31
|
readonly title: "Auth Service API";
|
|
32
32
|
readonly version: "1.5.12";
|
|
33
|
-
readonly description: "OpenAPI specification for the Auth, Integrations, Workspace, Payments, Analytics, Tasks, Templates, Tags, Failure Reasons, Comments, Assignees, Chat, Events,
|
|
33
|
+
readonly description: "OpenAPI specification for the Auth, Integrations, Workspace, Payments, Analytics, Tasks, Templates, Tags, Failure Reasons, Comments, Assignees, Chat, Events, CInvoices, Customer History, Files, Finance, and Notifications endpoints exposed by the k3-core platform. Unhandled HTTPException and unexpected errors are normalized by the global error handler to `{ success: false, error: string }` (status preserved for HTTPException; 500 otherwise).";
|
|
34
34
|
};
|
|
35
35
|
readonly servers: readonly [
|
|
36
36
|
{
|
|
@@ -103,13 +103,9 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
103
103
|
readonly name: "Events";
|
|
104
104
|
readonly description: "Server-Sent Events (SSE) streaming endpoints";
|
|
105
105
|
},
|
|
106
|
-
{
|
|
107
|
-
readonly name: "Billings";
|
|
108
|
-
readonly description: "Billing/requisite management endpoints";
|
|
109
|
-
},
|
|
110
106
|
{
|
|
111
107
|
readonly name: "CInvoices";
|
|
112
|
-
readonly description: "Customer invoice management for real-estate workspaces. Requires workspace access and crm::customers access. Seller
|
|
108
|
+
readonly description: "Customer invoice management for real-estate workspaces. Requires workspace access and crm::customers access. Seller finance account, customer, and service must belong to the workspace. Invoice creators can list finance accounts for seller selection without crm::finance access or private account fields.";
|
|
113
109
|
},
|
|
114
110
|
{
|
|
115
111
|
readonly name: "Customer History";
|
|
@@ -129,7 +125,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
129
125
|
},
|
|
130
126
|
{
|
|
131
127
|
readonly name: "Finance";
|
|
132
|
-
readonly description: "Workspace finance accounts (ordered cards with name, color, currency, and
|
|
128
|
+
readonly description: "Workspace finance accounts (ordered cards with name, color, currency, opening balance, and optional company/bank details), ledger transactions (income, expense, refund, transfer), and a numbers-visibility toggle for the default finance view. Requires workspace access and crm::finance read or write.";
|
|
133
129
|
}
|
|
134
130
|
];
|
|
135
131
|
readonly components: {
|
|
@@ -4374,57 +4370,6 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
4374
4370
|
};
|
|
4375
4371
|
};
|
|
4376
4372
|
};
|
|
4377
|
-
readonly CreateBillingSuccess: {
|
|
4378
|
-
readonly type: "object";
|
|
4379
|
-
readonly required: readonly [
|
|
4380
|
-
"success",
|
|
4381
|
-
"billing"
|
|
4382
|
-
];
|
|
4383
|
-
readonly properties: {
|
|
4384
|
-
readonly success: {
|
|
4385
|
-
readonly type: "boolean";
|
|
4386
|
-
readonly const: true;
|
|
4387
|
-
};
|
|
4388
|
-
readonly billing: {
|
|
4389
|
-
readonly $ref: "#/components/schemas/Billing";
|
|
4390
|
-
};
|
|
4391
|
-
};
|
|
4392
|
-
};
|
|
4393
|
-
readonly ListBillingsSuccess: {
|
|
4394
|
-
readonly type: "object";
|
|
4395
|
-
readonly required: readonly [
|
|
4396
|
-
"success",
|
|
4397
|
-
"billings"
|
|
4398
|
-
];
|
|
4399
|
-
readonly properties: {
|
|
4400
|
-
readonly success: {
|
|
4401
|
-
readonly type: "boolean";
|
|
4402
|
-
readonly const: true;
|
|
4403
|
-
};
|
|
4404
|
-
readonly billings: {
|
|
4405
|
-
readonly type: "array";
|
|
4406
|
-
readonly items: {
|
|
4407
|
-
readonly $ref: "#/components/schemas/Billing";
|
|
4408
|
-
};
|
|
4409
|
-
};
|
|
4410
|
-
};
|
|
4411
|
-
};
|
|
4412
|
-
readonly GetBillingSuccess: {
|
|
4413
|
-
readonly type: "object";
|
|
4414
|
-
readonly required: readonly [
|
|
4415
|
-
"success",
|
|
4416
|
-
"billing"
|
|
4417
|
-
];
|
|
4418
|
-
readonly properties: {
|
|
4419
|
-
readonly success: {
|
|
4420
|
-
readonly type: "boolean";
|
|
4421
|
-
readonly const: true;
|
|
4422
|
-
};
|
|
4423
|
-
readonly billing: {
|
|
4424
|
-
readonly $ref: "#/components/schemas/Billing";
|
|
4425
|
-
};
|
|
4426
|
-
};
|
|
4427
|
-
};
|
|
4428
4373
|
readonly CInvoice: {
|
|
4429
4374
|
readonly type: "object";
|
|
4430
4375
|
readonly required: readonly [
|
|
@@ -4432,7 +4377,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
4432
4377
|
"workspaceId",
|
|
4433
4378
|
"invoiceId",
|
|
4434
4379
|
"serviceId",
|
|
4435
|
-
"
|
|
4380
|
+
"SellerFinanceAccountId",
|
|
4436
4381
|
"customerId",
|
|
4437
4382
|
"date",
|
|
4438
4383
|
"language",
|
|
@@ -4462,10 +4407,10 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
4462
4407
|
readonly format: "uuid";
|
|
4463
4408
|
readonly description: "Real-estate service identifier (service_real_estates).";
|
|
4464
4409
|
};
|
|
4465
|
-
readonly
|
|
4410
|
+
readonly SellerFinanceAccountId: {
|
|
4466
4411
|
readonly type: "string";
|
|
4467
4412
|
readonly format: "uuid";
|
|
4468
|
-
readonly description: "Seller
|
|
4413
|
+
readonly description: "Seller finance account identifier.";
|
|
4469
4414
|
};
|
|
4470
4415
|
readonly customerId: {
|
|
4471
4416
|
readonly type: "string";
|
|
@@ -4629,6 +4574,77 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
4629
4574
|
};
|
|
4630
4575
|
};
|
|
4631
4576
|
};
|
|
4577
|
+
readonly CInvoiceFinanceAccountOption: {
|
|
4578
|
+
readonly type: "object";
|
|
4579
|
+
readonly required: readonly [
|
|
4580
|
+
"id",
|
|
4581
|
+
"order",
|
|
4582
|
+
"name",
|
|
4583
|
+
"cardColor",
|
|
4584
|
+
"currency",
|
|
4585
|
+
"active"
|
|
4586
|
+
];
|
|
4587
|
+
readonly properties: {
|
|
4588
|
+
readonly id: {
|
|
4589
|
+
readonly type: "string";
|
|
4590
|
+
readonly format: "uuid";
|
|
4591
|
+
};
|
|
4592
|
+
readonly order: {
|
|
4593
|
+
readonly type: "integer";
|
|
4594
|
+
readonly minimum: 1;
|
|
4595
|
+
readonly description: "1-based display order.";
|
|
4596
|
+
};
|
|
4597
|
+
readonly name: {
|
|
4598
|
+
readonly type: "string";
|
|
4599
|
+
};
|
|
4600
|
+
readonly cardColor: {
|
|
4601
|
+
readonly type: "string";
|
|
4602
|
+
readonly example: "#A1B2C3";
|
|
4603
|
+
readonly description: "Normalized 6-digit hex color including #.";
|
|
4604
|
+
};
|
|
4605
|
+
readonly currency: {
|
|
4606
|
+
readonly type: "string";
|
|
4607
|
+
readonly enum: readonly [
|
|
4608
|
+
"ruble",
|
|
4609
|
+
"dollar",
|
|
4610
|
+
"euro"
|
|
4611
|
+
];
|
|
4612
|
+
};
|
|
4613
|
+
readonly companyName: {
|
|
4614
|
+
readonly type: "string";
|
|
4615
|
+
readonly nullable: true;
|
|
4616
|
+
readonly description: "Seller company name for distinguishing accounts.";
|
|
4617
|
+
};
|
|
4618
|
+
readonly vatRate: {
|
|
4619
|
+
readonly type: "integer";
|
|
4620
|
+
readonly nullable: true;
|
|
4621
|
+
readonly minimum: 0;
|
|
4622
|
+
readonly maximum: 100;
|
|
4623
|
+
};
|
|
4624
|
+
readonly active: {
|
|
4625
|
+
readonly type: "boolean";
|
|
4626
|
+
};
|
|
4627
|
+
};
|
|
4628
|
+
};
|
|
4629
|
+
readonly ListCInvoiceFinanceAccountsSuccess: {
|
|
4630
|
+
readonly type: "object";
|
|
4631
|
+
readonly required: readonly [
|
|
4632
|
+
"success",
|
|
4633
|
+
"accounts"
|
|
4634
|
+
];
|
|
4635
|
+
readonly properties: {
|
|
4636
|
+
readonly success: {
|
|
4637
|
+
readonly type: "boolean";
|
|
4638
|
+
readonly const: true;
|
|
4639
|
+
};
|
|
4640
|
+
readonly accounts: {
|
|
4641
|
+
readonly type: "array";
|
|
4642
|
+
readonly items: {
|
|
4643
|
+
readonly $ref: "#/components/schemas/CInvoiceFinanceAccountOption";
|
|
4644
|
+
};
|
|
4645
|
+
};
|
|
4646
|
+
};
|
|
4647
|
+
};
|
|
4632
4648
|
readonly UpdateCInvoiceSuccess: {
|
|
4633
4649
|
readonly type: "object";
|
|
4634
4650
|
readonly required: readonly [
|
|
@@ -6022,6 +6038,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
6022
6038
|
"cardColor",
|
|
6023
6039
|
"currency",
|
|
6024
6040
|
"openingBalance",
|
|
6041
|
+
"active",
|
|
6025
6042
|
"created_at"
|
|
6026
6043
|
];
|
|
6027
6044
|
readonly properties: {
|
|
@@ -6058,6 +6075,47 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
6058
6075
|
readonly type: "number";
|
|
6059
6076
|
readonly description: "Opening balance in the account currency.";
|
|
6060
6077
|
};
|
|
6078
|
+
readonly country: {
|
|
6079
|
+
readonly type: "string";
|
|
6080
|
+
readonly nullable: true;
|
|
6081
|
+
};
|
|
6082
|
+
readonly companyName: {
|
|
6083
|
+
readonly type: "string";
|
|
6084
|
+
readonly nullable: true;
|
|
6085
|
+
};
|
|
6086
|
+
readonly inn: {
|
|
6087
|
+
readonly type: "string";
|
|
6088
|
+
readonly nullable: true;
|
|
6089
|
+
};
|
|
6090
|
+
readonly kpp: {
|
|
6091
|
+
readonly type: "string";
|
|
6092
|
+
readonly nullable: true;
|
|
6093
|
+
};
|
|
6094
|
+
readonly bankBranch: {
|
|
6095
|
+
readonly type: "string";
|
|
6096
|
+
readonly nullable: true;
|
|
6097
|
+
};
|
|
6098
|
+
readonly bankAccountNumber: {
|
|
6099
|
+
readonly type: "string";
|
|
6100
|
+
readonly nullable: true;
|
|
6101
|
+
};
|
|
6102
|
+
readonly bankBik: {
|
|
6103
|
+
readonly type: "string";
|
|
6104
|
+
readonly nullable: true;
|
|
6105
|
+
};
|
|
6106
|
+
readonly bankKc: {
|
|
6107
|
+
readonly type: "string";
|
|
6108
|
+
readonly nullable: true;
|
|
6109
|
+
};
|
|
6110
|
+
readonly vatRate: {
|
|
6111
|
+
readonly type: "integer";
|
|
6112
|
+
readonly nullable: true;
|
|
6113
|
+
readonly minimum: 0;
|
|
6114
|
+
readonly maximum: 100;
|
|
6115
|
+
};
|
|
6116
|
+
readonly active: {
|
|
6117
|
+
readonly type: "boolean";
|
|
6118
|
+
};
|
|
6061
6119
|
readonly created_at: {
|
|
6062
6120
|
readonly type: "string";
|
|
6063
6121
|
readonly format: "date-time";
|
|
@@ -13885,104 +13943,61 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
13885
13943
|
};
|
|
13886
13944
|
};
|
|
13887
13945
|
};
|
|
13888
|
-
readonly "/
|
|
13889
|
-
readonly
|
|
13946
|
+
readonly "/analytics/{workspace}/task-phase-funnel": {
|
|
13947
|
+
readonly get: {
|
|
13890
13948
|
readonly tags: readonly [
|
|
13891
|
-
"
|
|
13949
|
+
"Analytics"
|
|
13892
13950
|
];
|
|
13893
|
-
readonly summary: "
|
|
13894
|
-
readonly description: "
|
|
13951
|
+
readonly summary: "Get real-estate task-phase funnel and durations";
|
|
13952
|
+
readonly description: "Returns the current task funnel and time-in-phase analytics for a real-estate workspace. taskCount is the number of tasks currently in each phase; when supplied, from and to limit it to tasks created in that period. visitCount and duration averages use phase entries recorded in the period. Active phase visits are measured through now, or through to when supplied. Tracking begins when this API version is deployed, so tasks that have not changed phase since then have no duration sample. Requires workspace access and read access to crm::analytics. Other workspace categories return 400.";
|
|
13895
13953
|
readonly security: readonly [
|
|
13896
13954
|
never
|
|
13897
13955
|
];
|
|
13898
|
-
readonly
|
|
13899
|
-
|
|
13900
|
-
|
|
13901
|
-
readonly "
|
|
13902
|
-
|
|
13903
|
-
|
|
13904
|
-
|
|
13905
|
-
|
|
13906
|
-
"country",
|
|
13907
|
-
"companyName",
|
|
13908
|
-
"inn",
|
|
13909
|
-
"kpp",
|
|
13910
|
-
"bankBranch",
|
|
13911
|
-
"bankAccountNumber",
|
|
13912
|
-
"bankBik",
|
|
13913
|
-
"bankKc",
|
|
13914
|
-
"vat",
|
|
13915
|
-
"vatRate"
|
|
13916
|
-
];
|
|
13917
|
-
readonly properties: {
|
|
13918
|
-
readonly workspace: {
|
|
13919
|
-
readonly type: "string";
|
|
13920
|
-
readonly format: "uuid";
|
|
13921
|
-
readonly description: "Workspace identifier where the billing is created.";
|
|
13922
|
-
};
|
|
13923
|
-
readonly country: {
|
|
13924
|
-
readonly type: "string";
|
|
13925
|
-
readonly enum: readonly [
|
|
13926
|
-
"RU"
|
|
13927
|
-
];
|
|
13928
|
-
readonly description: "Country code.";
|
|
13929
|
-
};
|
|
13930
|
-
readonly companyName: {
|
|
13931
|
-
readonly type: "string";
|
|
13932
|
-
readonly description: "Company name.";
|
|
13933
|
-
};
|
|
13934
|
-
readonly inn: {
|
|
13935
|
-
readonly type: "string";
|
|
13936
|
-
readonly description: "INN (tax ID).";
|
|
13937
|
-
};
|
|
13938
|
-
readonly kpp: {
|
|
13939
|
-
readonly type: "string";
|
|
13940
|
-
readonly description: "KPP.";
|
|
13941
|
-
};
|
|
13942
|
-
readonly bankBranch: {
|
|
13943
|
-
readonly type: "string";
|
|
13944
|
-
readonly description: "Bank branch.";
|
|
13945
|
-
};
|
|
13946
|
-
readonly bankAccountNumber: {
|
|
13947
|
-
readonly type: "string";
|
|
13948
|
-
readonly description: "Bank account number.";
|
|
13949
|
-
};
|
|
13950
|
-
readonly bankBik: {
|
|
13951
|
-
readonly type: "string";
|
|
13952
|
-
readonly description: "Bank BIK.";
|
|
13953
|
-
};
|
|
13954
|
-
readonly bankKc: {
|
|
13955
|
-
readonly type: "string";
|
|
13956
|
-
readonly description: "Bank correspondent account (KC).";
|
|
13957
|
-
};
|
|
13958
|
-
readonly vat: {
|
|
13959
|
-
readonly type: "boolean";
|
|
13960
|
-
readonly description: "Whether VAT applies.";
|
|
13961
|
-
};
|
|
13962
|
-
readonly vatRate: {
|
|
13963
|
-
readonly type: "number";
|
|
13964
|
-
readonly minimum: 0;
|
|
13965
|
-
readonly maximum: 100;
|
|
13966
|
-
readonly description: "VAT rate (0-100) when vat is true.";
|
|
13967
|
-
};
|
|
13968
|
-
};
|
|
13969
|
-
};
|
|
13956
|
+
readonly parameters: readonly [
|
|
13957
|
+
{
|
|
13958
|
+
readonly name: "workspace";
|
|
13959
|
+
readonly in: "path";
|
|
13960
|
+
readonly required: true;
|
|
13961
|
+
readonly schema: {
|
|
13962
|
+
readonly type: "string";
|
|
13963
|
+
readonly format: "uuid";
|
|
13970
13964
|
};
|
|
13971
|
-
|
|
13972
|
-
|
|
13965
|
+
readonly description: "Workspace identifier.";
|
|
13966
|
+
},
|
|
13967
|
+
{
|
|
13968
|
+
readonly name: "from";
|
|
13969
|
+
readonly in: "query";
|
|
13970
|
+
readonly required: false;
|
|
13971
|
+
readonly schema: {
|
|
13972
|
+
readonly type: "string";
|
|
13973
|
+
readonly format: "date-time";
|
|
13974
|
+
};
|
|
13975
|
+
readonly description: "Include phase entries and tasks created at or after this timestamp.";
|
|
13976
|
+
},
|
|
13977
|
+
{
|
|
13978
|
+
readonly name: "to";
|
|
13979
|
+
readonly in: "query";
|
|
13980
|
+
readonly required: false;
|
|
13981
|
+
readonly schema: {
|
|
13982
|
+
readonly type: "string";
|
|
13983
|
+
readonly format: "date-time";
|
|
13984
|
+
};
|
|
13985
|
+
readonly description: "Include phase entries and tasks created before this timestamp; active durations are measured through this timestamp.";
|
|
13986
|
+
}
|
|
13987
|
+
];
|
|
13973
13988
|
readonly responses: {
|
|
13974
|
-
readonly
|
|
13975
|
-
readonly description: "
|
|
13989
|
+
readonly 200: {
|
|
13990
|
+
readonly description: "Task-phase funnel fetched successfully.";
|
|
13976
13991
|
readonly content: {
|
|
13977
13992
|
readonly "application/json": {
|
|
13978
13993
|
readonly schema: {
|
|
13979
|
-
readonly $ref: "#/components/schemas/
|
|
13994
|
+
readonly $ref: "#/components/schemas/TaskPhaseFunnelAnalysisSuccess";
|
|
13980
13995
|
};
|
|
13981
13996
|
};
|
|
13982
13997
|
};
|
|
13983
13998
|
};
|
|
13984
13999
|
readonly 400: {
|
|
13985
|
-
readonly description: "Invalid
|
|
14000
|
+
readonly description: "Invalid query, invalid workspace ID, or unsupported workspace category.";
|
|
13986
14001
|
readonly content: {
|
|
13987
14002
|
readonly "application/json": {
|
|
13988
14003
|
readonly schema: {
|
|
@@ -14002,482 +14017,17 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
14002
14017
|
};
|
|
14003
14018
|
};
|
|
14004
14019
|
readonly 403: {
|
|
14005
|
-
readonly description: "Forbidden - User lacks workspace access, or user lacks
|
|
14006
|
-
readonly content: {
|
|
14007
|
-
readonly "application/json": {
|
|
14008
|
-
readonly schema: {
|
|
14009
|
-
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
14010
|
-
};
|
|
14011
|
-
};
|
|
14012
|
-
};
|
|
14013
|
-
};
|
|
14014
|
-
|
|
14015
|
-
|
|
14016
|
-
};
|
|
14017
|
-
readonly "/billings/list/{workspace}": {
|
|
14018
|
-
readonly get: {
|
|
14019
|
-
readonly tags: readonly [
|
|
14020
|
-
"Billings"
|
|
14021
|
-
];
|
|
14022
|
-
readonly summary: "List billings for a workspace";
|
|
14023
|
-
readonly description: "Returns all billings in the specified workspace. Requires workspace access and read access to crm::general resource.";
|
|
14024
|
-
readonly security: readonly [
|
|
14025
|
-
never
|
|
14026
|
-
];
|
|
14027
|
-
readonly parameters: readonly [
|
|
14028
|
-
{
|
|
14029
|
-
readonly name: "workspace";
|
|
14030
|
-
readonly in: "path";
|
|
14031
|
-
readonly required: true;
|
|
14032
|
-
readonly description: "Workspace identifier to retrieve billings for.";
|
|
14033
|
-
readonly schema: {
|
|
14034
|
-
readonly type: "string";
|
|
14035
|
-
readonly format: "uuid";
|
|
14036
|
-
};
|
|
14037
|
-
}
|
|
14038
|
-
];
|
|
14039
|
-
readonly responses: {
|
|
14040
|
-
readonly 200: {
|
|
14041
|
-
readonly description: "Billings fetched successfully.";
|
|
14042
|
-
readonly content: {
|
|
14043
|
-
readonly "application/json": {
|
|
14044
|
-
readonly schema: {
|
|
14045
|
-
readonly $ref: "#/components/schemas/ListBillingsSuccess";
|
|
14046
|
-
};
|
|
14047
|
-
};
|
|
14048
|
-
};
|
|
14049
|
-
};
|
|
14050
|
-
readonly 400: {
|
|
14051
|
-
readonly description: "Invalid workspace id.";
|
|
14052
|
-
readonly content: {
|
|
14053
|
-
readonly "application/json": {
|
|
14054
|
-
readonly schema: {
|
|
14055
|
-
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
14056
|
-
};
|
|
14057
|
-
};
|
|
14058
|
-
};
|
|
14059
|
-
};
|
|
14060
|
-
readonly 401: {
|
|
14061
|
-
readonly description: "Unauthorized - Missing or invalid access token.";
|
|
14062
|
-
readonly content: {
|
|
14063
|
-
readonly "application/json": {
|
|
14064
|
-
readonly schema: {
|
|
14065
|
-
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
14066
|
-
};
|
|
14067
|
-
};
|
|
14068
|
-
};
|
|
14069
|
-
};
|
|
14070
|
-
readonly 403: {
|
|
14071
|
-
readonly description: "Forbidden - User lacks workspace access, or user lacks read access to crm::general resource.";
|
|
14072
|
-
readonly content: {
|
|
14073
|
-
readonly "application/json": {
|
|
14074
|
-
readonly schema: {
|
|
14075
|
-
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
14076
|
-
};
|
|
14077
|
-
};
|
|
14078
|
-
};
|
|
14079
|
-
};
|
|
14080
|
-
};
|
|
14081
|
-
};
|
|
14082
|
-
};
|
|
14083
|
-
readonly "/billings/get/{workspace}/{billingId}": {
|
|
14084
|
-
readonly get: {
|
|
14085
|
-
readonly tags: readonly [
|
|
14086
|
-
"Billings"
|
|
14087
|
-
];
|
|
14088
|
-
readonly summary: "Get a single billing";
|
|
14089
|
-
readonly description: "Returns a single billing by ID from the specified workspace. Requires workspace access and read access to crm::general resource.";
|
|
14090
|
-
readonly security: readonly [
|
|
14091
|
-
never
|
|
14092
|
-
];
|
|
14093
|
-
readonly parameters: readonly [
|
|
14094
|
-
{
|
|
14095
|
-
readonly name: "workspace";
|
|
14096
|
-
readonly in: "path";
|
|
14097
|
-
readonly required: true;
|
|
14098
|
-
readonly description: "Workspace identifier where the billing belongs.";
|
|
14099
|
-
readonly schema: {
|
|
14100
|
-
readonly type: "string";
|
|
14101
|
-
readonly format: "uuid";
|
|
14102
|
-
};
|
|
14103
|
-
},
|
|
14104
|
-
{
|
|
14105
|
-
readonly name: "billingId";
|
|
14106
|
-
readonly in: "path";
|
|
14107
|
-
readonly required: true;
|
|
14108
|
-
readonly description: "Billing identifier to retrieve.";
|
|
14109
|
-
readonly schema: {
|
|
14110
|
-
readonly type: "string";
|
|
14111
|
-
readonly format: "uuid";
|
|
14112
|
-
};
|
|
14113
|
-
}
|
|
14114
|
-
];
|
|
14115
|
-
readonly responses: {
|
|
14116
|
-
readonly 200: {
|
|
14117
|
-
readonly description: "Billing fetched successfully.";
|
|
14118
|
-
readonly content: {
|
|
14119
|
-
readonly "application/json": {
|
|
14120
|
-
readonly schema: {
|
|
14121
|
-
readonly $ref: "#/components/schemas/GetBillingSuccess";
|
|
14122
|
-
};
|
|
14123
|
-
};
|
|
14124
|
-
};
|
|
14125
|
-
};
|
|
14126
|
-
readonly 400: {
|
|
14127
|
-
readonly description: "Invalid workspace id or billing id.";
|
|
14128
|
-
readonly content: {
|
|
14129
|
-
readonly "application/json": {
|
|
14130
|
-
readonly schema: {
|
|
14131
|
-
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
14132
|
-
};
|
|
14133
|
-
};
|
|
14134
|
-
};
|
|
14135
|
-
};
|
|
14136
|
-
readonly 401: {
|
|
14137
|
-
readonly description: "Unauthorized - Missing or invalid access token.";
|
|
14138
|
-
readonly content: {
|
|
14139
|
-
readonly "application/json": {
|
|
14140
|
-
readonly schema: {
|
|
14141
|
-
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
14142
|
-
};
|
|
14143
|
-
};
|
|
14144
|
-
};
|
|
14145
|
-
};
|
|
14146
|
-
readonly 403: {
|
|
14147
|
-
readonly description: "Forbidden - User lacks workspace access, or user lacks read access to crm::general resource.";
|
|
14148
|
-
readonly content: {
|
|
14149
|
-
readonly "application/json": {
|
|
14150
|
-
readonly schema: {
|
|
14151
|
-
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
14152
|
-
};
|
|
14153
|
-
};
|
|
14154
|
-
};
|
|
14155
|
-
};
|
|
14156
|
-
readonly 404: {
|
|
14157
|
-
readonly description: "Billing not found.";
|
|
14158
|
-
readonly content: {
|
|
14159
|
-
readonly "application/json": {
|
|
14160
|
-
readonly schema: {
|
|
14161
|
-
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
14162
|
-
};
|
|
14163
|
-
};
|
|
14164
|
-
};
|
|
14165
|
-
};
|
|
14166
|
-
};
|
|
14167
|
-
};
|
|
14168
|
-
};
|
|
14169
|
-
readonly "/billings/edit": {
|
|
14170
|
-
readonly post: {
|
|
14171
|
-
readonly tags: readonly [
|
|
14172
|
-
"Billings"
|
|
14173
|
-
];
|
|
14174
|
-
readonly summary: "Edit a billing";
|
|
14175
|
-
readonly description: "Updates a billing in the specified workspace. Requires workspace access and write access to crm::general resource.";
|
|
14176
|
-
readonly security: readonly [
|
|
14177
|
-
never
|
|
14178
|
-
];
|
|
14179
|
-
readonly requestBody: {
|
|
14180
|
-
readonly required: true;
|
|
14181
|
-
readonly content: {
|
|
14182
|
-
readonly "application/json": {
|
|
14183
|
-
readonly schema: {
|
|
14184
|
-
readonly type: "object";
|
|
14185
|
-
readonly required: readonly [
|
|
14186
|
-
"billingId",
|
|
14187
|
-
"workspace",
|
|
14188
|
-
"nds",
|
|
14189
|
-
"ndsRate"
|
|
14190
|
-
];
|
|
14191
|
-
readonly properties: {
|
|
14192
|
-
readonly billingId: {
|
|
14193
|
-
readonly type: "string";
|
|
14194
|
-
readonly format: "uuid";
|
|
14195
|
-
readonly description: "Billing identifier to edit.";
|
|
14196
|
-
};
|
|
14197
|
-
readonly workspace: {
|
|
14198
|
-
readonly type: "string";
|
|
14199
|
-
readonly format: "uuid";
|
|
14200
|
-
readonly description: "Workspace identifier where the billing belongs.";
|
|
14201
|
-
};
|
|
14202
|
-
readonly country: {
|
|
14203
|
-
readonly type: "string";
|
|
14204
|
-
readonly enum: readonly [
|
|
14205
|
-
"RU"
|
|
14206
|
-
];
|
|
14207
|
-
readonly description: "Country code.";
|
|
14208
|
-
};
|
|
14209
|
-
readonly companyName: {
|
|
14210
|
-
readonly type: "string";
|
|
14211
|
-
readonly description: "Company name.";
|
|
14212
|
-
};
|
|
14213
|
-
readonly inn: {
|
|
14214
|
-
readonly type: "string";
|
|
14215
|
-
readonly description: "INN (tax ID).";
|
|
14216
|
-
};
|
|
14217
|
-
readonly kpp: {
|
|
14218
|
-
readonly type: "string";
|
|
14219
|
-
readonly description: "KPP.";
|
|
14220
|
-
};
|
|
14221
|
-
readonly bankBranch: {
|
|
14222
|
-
readonly type: "string";
|
|
14223
|
-
readonly description: "Bank branch.";
|
|
14224
|
-
};
|
|
14225
|
-
readonly bankAccountNumber: {
|
|
14226
|
-
readonly type: "string";
|
|
14227
|
-
readonly description: "Bank account number.";
|
|
14228
|
-
};
|
|
14229
|
-
readonly bankBik: {
|
|
14230
|
-
readonly type: "string";
|
|
14231
|
-
readonly description: "Bank BIK.";
|
|
14232
|
-
};
|
|
14233
|
-
readonly bankKc: {
|
|
14234
|
-
readonly type: "string";
|
|
14235
|
-
readonly description: "Bank correspondent account (KC).";
|
|
14236
|
-
};
|
|
14237
|
-
readonly nds: {
|
|
14238
|
-
readonly type: "boolean";
|
|
14239
|
-
readonly description: "Whether VAT (NDS) applies.";
|
|
14240
|
-
};
|
|
14241
|
-
readonly ndsRate: {
|
|
14242
|
-
readonly type: "number";
|
|
14243
|
-
readonly minimum: 0;
|
|
14244
|
-
readonly maximum: 100;
|
|
14245
|
-
readonly description: "VAT rate (0-100) when nds is true.";
|
|
14246
|
-
};
|
|
14247
|
-
};
|
|
14248
|
-
};
|
|
14249
|
-
};
|
|
14250
|
-
};
|
|
14251
|
-
};
|
|
14252
|
-
readonly responses: {
|
|
14253
|
-
readonly 200: {
|
|
14254
|
-
readonly description: "Billing updated successfully.";
|
|
14255
|
-
readonly content: {
|
|
14256
|
-
readonly "application/json": {
|
|
14257
|
-
readonly schema: {
|
|
14258
|
-
readonly $ref: "#/components/schemas/SimpleSuccess";
|
|
14259
|
-
};
|
|
14260
|
-
};
|
|
14261
|
-
};
|
|
14262
|
-
};
|
|
14263
|
-
readonly 400: {
|
|
14264
|
-
readonly description: "Invalid request payload.";
|
|
14265
|
-
readonly content: {
|
|
14266
|
-
readonly "application/json": {
|
|
14267
|
-
readonly schema: {
|
|
14268
|
-
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
14269
|
-
};
|
|
14270
|
-
};
|
|
14271
|
-
};
|
|
14272
|
-
};
|
|
14273
|
-
readonly 401: {
|
|
14274
|
-
readonly description: "Unauthorized - Missing or invalid access token.";
|
|
14275
|
-
readonly content: {
|
|
14276
|
-
readonly "application/json": {
|
|
14277
|
-
readonly schema: {
|
|
14278
|
-
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
14279
|
-
};
|
|
14280
|
-
};
|
|
14281
|
-
};
|
|
14282
|
-
};
|
|
14283
|
-
readonly 403: {
|
|
14284
|
-
readonly description: "Forbidden - User lacks workspace access, or user lacks write access to crm::general resource.";
|
|
14285
|
-
readonly content: {
|
|
14286
|
-
readonly "application/json": {
|
|
14287
|
-
readonly schema: {
|
|
14288
|
-
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
14289
|
-
};
|
|
14290
|
-
};
|
|
14291
|
-
};
|
|
14292
|
-
};
|
|
14293
|
-
readonly 404: {
|
|
14294
|
-
readonly description: "Billing not found.";
|
|
14295
|
-
readonly content: {
|
|
14296
|
-
readonly "application/json": {
|
|
14297
|
-
readonly schema: {
|
|
14298
|
-
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
14299
|
-
};
|
|
14300
|
-
};
|
|
14301
|
-
};
|
|
14302
|
-
};
|
|
14303
|
-
};
|
|
14304
|
-
};
|
|
14305
|
-
};
|
|
14306
|
-
readonly "/billings/delete": {
|
|
14307
|
-
readonly post: {
|
|
14308
|
-
readonly tags: readonly [
|
|
14309
|
-
"Billings"
|
|
14310
|
-
];
|
|
14311
|
-
readonly summary: "Delete a billing";
|
|
14312
|
-
readonly description: "Deletes a billing from the specified workspace. Requires workspace access and write access to crm::general resource.";
|
|
14313
|
-
readonly security: readonly [
|
|
14314
|
-
never
|
|
14315
|
-
];
|
|
14316
|
-
readonly requestBody: {
|
|
14317
|
-
readonly required: true;
|
|
14318
|
-
readonly content: {
|
|
14319
|
-
readonly "application/json": {
|
|
14320
|
-
readonly schema: {
|
|
14321
|
-
readonly type: "object";
|
|
14322
|
-
readonly required: readonly [
|
|
14323
|
-
"billingId",
|
|
14324
|
-
"workspace"
|
|
14325
|
-
];
|
|
14326
|
-
readonly properties: {
|
|
14327
|
-
readonly billingId: {
|
|
14328
|
-
readonly type: "string";
|
|
14329
|
-
readonly format: "uuid";
|
|
14330
|
-
readonly description: "Billing identifier to delete.";
|
|
14331
|
-
};
|
|
14332
|
-
readonly workspace: {
|
|
14333
|
-
readonly type: "string";
|
|
14334
|
-
readonly format: "uuid";
|
|
14335
|
-
readonly description: "Workspace identifier where the billing belongs.";
|
|
14336
|
-
};
|
|
14337
|
-
};
|
|
14338
|
-
};
|
|
14339
|
-
};
|
|
14340
|
-
};
|
|
14341
|
-
};
|
|
14342
|
-
readonly responses: {
|
|
14343
|
-
readonly 200: {
|
|
14344
|
-
readonly description: "Billing deleted successfully.";
|
|
14345
|
-
readonly content: {
|
|
14346
|
-
readonly "application/json": {
|
|
14347
|
-
readonly schema: {
|
|
14348
|
-
readonly $ref: "#/components/schemas/SimpleSuccess";
|
|
14349
|
-
};
|
|
14350
|
-
};
|
|
14351
|
-
};
|
|
14352
|
-
};
|
|
14353
|
-
readonly 400: {
|
|
14354
|
-
readonly description: "Invalid request payload.";
|
|
14355
|
-
readonly content: {
|
|
14356
|
-
readonly "application/json": {
|
|
14357
|
-
readonly schema: {
|
|
14358
|
-
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
14359
|
-
};
|
|
14360
|
-
};
|
|
14361
|
-
};
|
|
14362
|
-
};
|
|
14363
|
-
readonly 401: {
|
|
14364
|
-
readonly description: "Unauthorized - Missing or invalid access token.";
|
|
14365
|
-
readonly content: {
|
|
14366
|
-
readonly "application/json": {
|
|
14367
|
-
readonly schema: {
|
|
14368
|
-
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
14369
|
-
};
|
|
14370
|
-
};
|
|
14371
|
-
};
|
|
14372
|
-
};
|
|
14373
|
-
readonly 403: {
|
|
14374
|
-
readonly description: "Forbidden - User lacks workspace access, or user lacks write access to crm::general resource.";
|
|
14375
|
-
readonly content: {
|
|
14376
|
-
readonly "application/json": {
|
|
14377
|
-
readonly schema: {
|
|
14378
|
-
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
14379
|
-
};
|
|
14380
|
-
};
|
|
14381
|
-
};
|
|
14382
|
-
};
|
|
14383
|
-
readonly 404: {
|
|
14384
|
-
readonly description: "Billing not found.";
|
|
14385
|
-
readonly content: {
|
|
14386
|
-
readonly "application/json": {
|
|
14387
|
-
readonly schema: {
|
|
14388
|
-
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
14389
|
-
};
|
|
14390
|
-
};
|
|
14391
|
-
};
|
|
14392
|
-
};
|
|
14393
|
-
};
|
|
14394
|
-
};
|
|
14395
|
-
};
|
|
14396
|
-
readonly "/analytics/{workspace}/task-phase-funnel": {
|
|
14397
|
-
readonly get: {
|
|
14398
|
-
readonly tags: readonly [
|
|
14399
|
-
"Analytics"
|
|
14400
|
-
];
|
|
14401
|
-
readonly summary: "Get real-estate task-phase funnel and durations";
|
|
14402
|
-
readonly description: "Returns the current task funnel and time-in-phase analytics for a real-estate workspace. taskCount is the number of tasks currently in each phase; when supplied, from and to limit it to tasks created in that period. visitCount and duration averages use phase entries recorded in the period. Active phase visits are measured through now, or through to when supplied. Tracking begins when this API version is deployed, so tasks that have not changed phase since then have no duration sample. Requires workspace access and read access to crm::analytics. Other workspace categories return 400.";
|
|
14403
|
-
readonly security: readonly [
|
|
14404
|
-
never
|
|
14405
|
-
];
|
|
14406
|
-
readonly parameters: readonly [
|
|
14407
|
-
{
|
|
14408
|
-
readonly name: "workspace";
|
|
14409
|
-
readonly in: "path";
|
|
14410
|
-
readonly required: true;
|
|
14411
|
-
readonly schema: {
|
|
14412
|
-
readonly type: "string";
|
|
14413
|
-
readonly format: "uuid";
|
|
14414
|
-
};
|
|
14415
|
-
readonly description: "Workspace identifier.";
|
|
14416
|
-
},
|
|
14417
|
-
{
|
|
14418
|
-
readonly name: "from";
|
|
14419
|
-
readonly in: "query";
|
|
14420
|
-
readonly required: false;
|
|
14421
|
-
readonly schema: {
|
|
14422
|
-
readonly type: "string";
|
|
14423
|
-
readonly format: "date-time";
|
|
14424
|
-
};
|
|
14425
|
-
readonly description: "Include phase entries and tasks created at or after this timestamp.";
|
|
14426
|
-
},
|
|
14427
|
-
{
|
|
14428
|
-
readonly name: "to";
|
|
14429
|
-
readonly in: "query";
|
|
14430
|
-
readonly required: false;
|
|
14431
|
-
readonly schema: {
|
|
14432
|
-
readonly type: "string";
|
|
14433
|
-
readonly format: "date-time";
|
|
14434
|
-
};
|
|
14435
|
-
readonly description: "Include phase entries and tasks created before this timestamp; active durations are measured through this timestamp.";
|
|
14436
|
-
}
|
|
14437
|
-
];
|
|
14438
|
-
readonly responses: {
|
|
14439
|
-
readonly 200: {
|
|
14440
|
-
readonly description: "Task-phase funnel fetched successfully.";
|
|
14441
|
-
readonly content: {
|
|
14442
|
-
readonly "application/json": {
|
|
14443
|
-
readonly schema: {
|
|
14444
|
-
readonly $ref: "#/components/schemas/TaskPhaseFunnelAnalysisSuccess";
|
|
14445
|
-
};
|
|
14446
|
-
};
|
|
14447
|
-
};
|
|
14448
|
-
};
|
|
14449
|
-
readonly 400: {
|
|
14450
|
-
readonly description: "Invalid query, invalid workspace ID, or unsupported workspace category.";
|
|
14451
|
-
readonly content: {
|
|
14452
|
-
readonly "application/json": {
|
|
14453
|
-
readonly schema: {
|
|
14454
|
-
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
14455
|
-
};
|
|
14456
|
-
};
|
|
14457
|
-
};
|
|
14458
|
-
};
|
|
14459
|
-
readonly 401: {
|
|
14460
|
-
readonly description: "Unauthorized - Missing or invalid access token.";
|
|
14461
|
-
readonly content: {
|
|
14462
|
-
readonly "application/json": {
|
|
14463
|
-
readonly schema: {
|
|
14464
|
-
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
14465
|
-
};
|
|
14466
|
-
};
|
|
14467
|
-
};
|
|
14468
|
-
};
|
|
14469
|
-
readonly 403: {
|
|
14470
|
-
readonly description: "Forbidden - User lacks workspace access, or user lacks read access to crm::analytics resource.";
|
|
14471
|
-
readonly content: {
|
|
14472
|
-
readonly "application/json": {
|
|
14473
|
-
readonly schema: {
|
|
14474
|
-
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
14475
|
-
};
|
|
14476
|
-
};
|
|
14477
|
-
};
|
|
14478
|
-
};
|
|
14479
|
-
readonly 404: {
|
|
14480
|
-
readonly description: "Workspace not found.";
|
|
14020
|
+
readonly description: "Forbidden - User lacks workspace access, or user lacks read access to crm::analytics resource.";
|
|
14021
|
+
readonly content: {
|
|
14022
|
+
readonly "application/json": {
|
|
14023
|
+
readonly schema: {
|
|
14024
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
14025
|
+
};
|
|
14026
|
+
};
|
|
14027
|
+
};
|
|
14028
|
+
};
|
|
14029
|
+
readonly 404: {
|
|
14030
|
+
readonly description: "Workspace not found.";
|
|
14481
14031
|
readonly content: {
|
|
14482
14032
|
readonly "application/json": {
|
|
14483
14033
|
readonly schema: {
|
|
@@ -15167,7 +14717,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
15167
14717
|
"CInvoices"
|
|
15168
14718
|
];
|
|
15169
14719
|
readonly summary: "Create a customer invoice";
|
|
15170
|
-
readonly description: "Creates a customer invoice in the specified workspace. Real-estate workspaces require an existing seller
|
|
14720
|
+
readonly description: "Creates a customer invoice in the specified workspace. Real-estate workspaces require an existing seller finance account, customer_real_estates lead, and service_real_estates listing in the same workspace. created_by is taken from the access token. When status is paid, an income finance transaction is recorded on the seller account for unitPrice \u00D7 unitQuantity \u2212 discount (minor units converted to major units). Requires workspace access and write access to crm::customers. Other workspace categories return 400.";
|
|
15171
14721
|
readonly security: readonly [
|
|
15172
14722
|
never
|
|
15173
14723
|
];
|
|
@@ -15181,7 +14731,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
15181
14731
|
"workspace",
|
|
15182
14732
|
"invoiceId",
|
|
15183
14733
|
"serviceId",
|
|
15184
|
-
"
|
|
14734
|
+
"SellerFinanceAccountId",
|
|
15185
14735
|
"customerId",
|
|
15186
14736
|
"date",
|
|
15187
14737
|
"language",
|
|
@@ -15206,10 +14756,10 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
15206
14756
|
readonly format: "uuid";
|
|
15207
14757
|
readonly description: "Real-estate service identifier.";
|
|
15208
14758
|
};
|
|
15209
|
-
readonly
|
|
14759
|
+
readonly SellerFinanceAccountId: {
|
|
15210
14760
|
readonly type: "string";
|
|
15211
14761
|
readonly format: "uuid";
|
|
15212
|
-
readonly description: "Seller
|
|
14762
|
+
readonly description: "Seller finance account identifier.";
|
|
15213
14763
|
};
|
|
15214
14764
|
readonly customerId: {
|
|
15215
14765
|
readonly type: "string";
|
|
@@ -15345,8 +14895,64 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
15345
14895
|
};
|
|
15346
14896
|
};
|
|
15347
14897
|
};
|
|
15348
|
-
readonly 403: {
|
|
15349
|
-
readonly description: "Forbidden - User lacks workspace access, or user lacks write access to crm::customers resource.";
|
|
14898
|
+
readonly 403: {
|
|
14899
|
+
readonly description: "Forbidden - User lacks workspace access, or user lacks write access to crm::customers resource.";
|
|
14900
|
+
readonly content: {
|
|
14901
|
+
readonly "application/json": {
|
|
14902
|
+
readonly schema: {
|
|
14903
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
14904
|
+
};
|
|
14905
|
+
};
|
|
14906
|
+
};
|
|
14907
|
+
};
|
|
14908
|
+
readonly 404: {
|
|
14909
|
+
readonly description: "Workspace, billing, customer, or service not found.";
|
|
14910
|
+
readonly content: {
|
|
14911
|
+
readonly "application/json": {
|
|
14912
|
+
readonly schema: {
|
|
14913
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
14914
|
+
};
|
|
14915
|
+
};
|
|
14916
|
+
};
|
|
14917
|
+
};
|
|
14918
|
+
};
|
|
14919
|
+
};
|
|
14920
|
+
};
|
|
14921
|
+
readonly "/cinvoices/accounts/list/{workspace}": {
|
|
14922
|
+
readonly get: {
|
|
14923
|
+
readonly tags: readonly [
|
|
14924
|
+
"CInvoices"
|
|
14925
|
+
];
|
|
14926
|
+
readonly summary: "List finance accounts for invoice seller selection";
|
|
14927
|
+
readonly description: "Returns workspace finance accounts for choosing SellerFinanceAccountId when creating or updating a customer invoice. Requires workspace access and read access to crm::customers, not crm::finance. Omits private fields such as opening balance, INN/KPP, and bank details.";
|
|
14928
|
+
readonly security: readonly [
|
|
14929
|
+
never
|
|
14930
|
+
];
|
|
14931
|
+
readonly parameters: readonly [
|
|
14932
|
+
{
|
|
14933
|
+
readonly name: "workspace";
|
|
14934
|
+
readonly in: "path";
|
|
14935
|
+
readonly required: true;
|
|
14936
|
+
readonly schema: {
|
|
14937
|
+
readonly type: "string";
|
|
14938
|
+
readonly format: "uuid";
|
|
14939
|
+
};
|
|
14940
|
+
readonly description: "Workspace identifier.";
|
|
14941
|
+
}
|
|
14942
|
+
];
|
|
14943
|
+
readonly responses: {
|
|
14944
|
+
readonly 200: {
|
|
14945
|
+
readonly description: "Accounts fetched successfully.";
|
|
14946
|
+
readonly content: {
|
|
14947
|
+
readonly "application/json": {
|
|
14948
|
+
readonly schema: {
|
|
14949
|
+
readonly $ref: "#/components/schemas/ListCInvoiceFinanceAccountsSuccess";
|
|
14950
|
+
};
|
|
14951
|
+
};
|
|
14952
|
+
};
|
|
14953
|
+
};
|
|
14954
|
+
readonly 401: {
|
|
14955
|
+
readonly description: "Unauthorized - Missing or invalid access token.";
|
|
15350
14956
|
readonly content: {
|
|
15351
14957
|
readonly "application/json": {
|
|
15352
14958
|
readonly schema: {
|
|
@@ -15355,8 +14961,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
15355
14961
|
};
|
|
15356
14962
|
};
|
|
15357
14963
|
};
|
|
15358
|
-
readonly
|
|
15359
|
-
readonly description: "
|
|
14964
|
+
readonly 403: {
|
|
14965
|
+
readonly description: "Forbidden - User lacks workspace access, or user lacks read access to crm::customers resource.";
|
|
15360
14966
|
readonly content: {
|
|
15361
14967
|
readonly "application/json": {
|
|
15362
14968
|
readonly schema: {
|
|
@@ -15460,7 +15066,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
15460
15066
|
"CInvoices"
|
|
15461
15067
|
];
|
|
15462
15068
|
readonly summary: "Update a customer invoice";
|
|
15463
|
-
readonly description: "Updates specified fields of an invoice in a real-estate workspace. Any replacement seller
|
|
15069
|
+
readonly description: "Updates specified fields of an invoice in a real-estate workspace. Any replacement seller finance account, customer, or service must belong to the workspace. When status changes to paid, an income finance transaction is recorded on the seller account for unitPrice \u00D7 unitQuantity \u2212 discount (minor units converted to major units). Requires workspace access and write access to crm::customers.";
|
|
15464
15070
|
readonly security: readonly [
|
|
15465
15071
|
never
|
|
15466
15072
|
];
|
|
@@ -15494,10 +15100,10 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
15494
15100
|
readonly format: "uuid";
|
|
15495
15101
|
readonly description: "Replacement real-estate service identifier.";
|
|
15496
15102
|
};
|
|
15497
|
-
readonly
|
|
15103
|
+
readonly SellerFinanceAccountId: {
|
|
15498
15104
|
readonly type: "string";
|
|
15499
15105
|
readonly format: "uuid";
|
|
15500
|
-
readonly description: "Replacement seller
|
|
15106
|
+
readonly description: "Replacement seller finance account identifier.";
|
|
15501
15107
|
};
|
|
15502
15108
|
readonly customerId: {
|
|
15503
15109
|
readonly type: "string";
|
|
@@ -20509,6 +20115,39 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
20509
20115
|
readonly openingBalance: {
|
|
20510
20116
|
readonly type: "number";
|
|
20511
20117
|
};
|
|
20118
|
+
readonly country: {
|
|
20119
|
+
readonly type: "string";
|
|
20120
|
+
};
|
|
20121
|
+
readonly companyName: {
|
|
20122
|
+
readonly type: "string";
|
|
20123
|
+
};
|
|
20124
|
+
readonly inn: {
|
|
20125
|
+
readonly type: "string";
|
|
20126
|
+
};
|
|
20127
|
+
readonly kpp: {
|
|
20128
|
+
readonly type: "string";
|
|
20129
|
+
};
|
|
20130
|
+
readonly bankBranch: {
|
|
20131
|
+
readonly type: "string";
|
|
20132
|
+
};
|
|
20133
|
+
readonly bankAccountNumber: {
|
|
20134
|
+
readonly type: "string";
|
|
20135
|
+
};
|
|
20136
|
+
readonly bankBik: {
|
|
20137
|
+
readonly type: "string";
|
|
20138
|
+
};
|
|
20139
|
+
readonly bankKc: {
|
|
20140
|
+
readonly type: "string";
|
|
20141
|
+
};
|
|
20142
|
+
readonly vatRate: {
|
|
20143
|
+
readonly type: "integer";
|
|
20144
|
+
readonly minimum: 0;
|
|
20145
|
+
readonly maximum: 100;
|
|
20146
|
+
};
|
|
20147
|
+
readonly active: {
|
|
20148
|
+
readonly type: "boolean";
|
|
20149
|
+
readonly description: "Defaults to true.";
|
|
20150
|
+
};
|
|
20512
20151
|
};
|
|
20513
20152
|
};
|
|
20514
20153
|
};
|
|
@@ -20564,7 +20203,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
20564
20203
|
"Finance"
|
|
20565
20204
|
];
|
|
20566
20205
|
readonly summary: "Update a finance account";
|
|
20567
|
-
readonly description: "Updates
|
|
20206
|
+
readonly description: "Updates account card fields and optional company/bank details. Requires crm::finance write access.";
|
|
20568
20207
|
readonly security: readonly [
|
|
20569
20208
|
never
|
|
20570
20209
|
];
|
|
@@ -20604,6 +20243,38 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
20604
20243
|
readonly openingBalance: {
|
|
20605
20244
|
readonly type: "number";
|
|
20606
20245
|
};
|
|
20246
|
+
readonly country: {
|
|
20247
|
+
readonly type: "string";
|
|
20248
|
+
};
|
|
20249
|
+
readonly companyName: {
|
|
20250
|
+
readonly type: "string";
|
|
20251
|
+
};
|
|
20252
|
+
readonly inn: {
|
|
20253
|
+
readonly type: "string";
|
|
20254
|
+
};
|
|
20255
|
+
readonly kpp: {
|
|
20256
|
+
readonly type: "string";
|
|
20257
|
+
};
|
|
20258
|
+
readonly bankBranch: {
|
|
20259
|
+
readonly type: "string";
|
|
20260
|
+
};
|
|
20261
|
+
readonly bankAccountNumber: {
|
|
20262
|
+
readonly type: "string";
|
|
20263
|
+
};
|
|
20264
|
+
readonly bankBik: {
|
|
20265
|
+
readonly type: "string";
|
|
20266
|
+
};
|
|
20267
|
+
readonly bankKc: {
|
|
20268
|
+
readonly type: "string";
|
|
20269
|
+
};
|
|
20270
|
+
readonly vatRate: {
|
|
20271
|
+
readonly type: "integer";
|
|
20272
|
+
readonly minimum: 0;
|
|
20273
|
+
readonly maximum: 100;
|
|
20274
|
+
};
|
|
20275
|
+
readonly active: {
|
|
20276
|
+
readonly type: "boolean";
|
|
20277
|
+
};
|
|
20607
20278
|
};
|
|
20608
20279
|
};
|
|
20609
20280
|
};
|
|
@@ -22944,9 +22615,9 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
22944
22615
|
phaseName: string | null;
|
|
22945
22616
|
phaseSortOrder: number | null;
|
|
22946
22617
|
priority: string | null;
|
|
22618
|
+
created_at: string;
|
|
22947
22619
|
workspaceId: string;
|
|
22948
22620
|
created_by: string;
|
|
22949
|
-
created_at: string;
|
|
22950
22621
|
comments_count: number;
|
|
22951
22622
|
tags: {
|
|
22952
22623
|
id: string;
|
|
@@ -24245,185 +23916,6 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
24245
23916
|
};
|
|
24246
23917
|
};
|
|
24247
23918
|
}, "/customers"> | import("hono/types").MergeSchemaPath<{
|
|
24248
|
-
"/create": {
|
|
24249
|
-
$post: {
|
|
24250
|
-
input: {};
|
|
24251
|
-
output: {
|
|
24252
|
-
success: false;
|
|
24253
|
-
error: never;
|
|
24254
|
-
};
|
|
24255
|
-
outputFormat: "json";
|
|
24256
|
-
status: 400;
|
|
24257
|
-
} | {
|
|
24258
|
-
input: {};
|
|
24259
|
-
output: {
|
|
24260
|
-
success: true;
|
|
24261
|
-
billing: {
|
|
24262
|
-
id: string;
|
|
24263
|
-
created_at: string;
|
|
24264
|
-
active: boolean | null;
|
|
24265
|
-
workspaceId: string;
|
|
24266
|
-
country: string;
|
|
24267
|
-
companyName: string;
|
|
24268
|
-
inn: string;
|
|
24269
|
-
kpp: string;
|
|
24270
|
-
bankBranch: string;
|
|
24271
|
-
bankAccountNumber: string;
|
|
24272
|
-
bankBik: string;
|
|
24273
|
-
bankKc: string;
|
|
24274
|
-
vat: boolean;
|
|
24275
|
-
vatRate: number;
|
|
24276
|
-
updated_at: string | null;
|
|
24277
|
-
deleted_at: string | null;
|
|
24278
|
-
verified_at: string | null;
|
|
24279
|
-
suspended_at: string | null;
|
|
24280
|
-
}[];
|
|
24281
|
-
};
|
|
24282
|
-
outputFormat: "json";
|
|
24283
|
-
status: 201;
|
|
24284
|
-
};
|
|
24285
|
-
};
|
|
24286
|
-
} & {
|
|
24287
|
-
"/list/:workspace": {
|
|
24288
|
-
$get: {
|
|
24289
|
-
input: {
|
|
24290
|
-
param: {
|
|
24291
|
-
workspace: string;
|
|
24292
|
-
};
|
|
24293
|
-
};
|
|
24294
|
-
output: {
|
|
24295
|
-
success: true;
|
|
24296
|
-
billings: {
|
|
24297
|
-
updated_at: string | null;
|
|
24298
|
-
deleted_at: string | null;
|
|
24299
|
-
verified_at: string | null;
|
|
24300
|
-
suspended_at: string | null;
|
|
24301
|
-
created_at: string;
|
|
24302
|
-
id: string;
|
|
24303
|
-
workspaceId: string;
|
|
24304
|
-
country: string;
|
|
24305
|
-
companyName: string;
|
|
24306
|
-
inn: string;
|
|
24307
|
-
kpp: string;
|
|
24308
|
-
bankBranch: string;
|
|
24309
|
-
bankAccountNumber: string;
|
|
24310
|
-
bankBik: string;
|
|
24311
|
-
bankKc: string;
|
|
24312
|
-
vat: boolean;
|
|
24313
|
-
vatRate: number;
|
|
24314
|
-
active: boolean | null;
|
|
24315
|
-
}[];
|
|
24316
|
-
};
|
|
24317
|
-
outputFormat: "json";
|
|
24318
|
-
status: 200;
|
|
24319
|
-
};
|
|
24320
|
-
};
|
|
24321
|
-
} & {
|
|
24322
|
-
"/get/:workspace/:billingId": {
|
|
24323
|
-
$get: {
|
|
24324
|
-
input: {
|
|
24325
|
-
param: {
|
|
24326
|
-
workspace: string;
|
|
24327
|
-
} & {
|
|
24328
|
-
billingId: string;
|
|
24329
|
-
};
|
|
24330
|
-
};
|
|
24331
|
-
output: {
|
|
24332
|
-
success: false;
|
|
24333
|
-
error: string;
|
|
24334
|
-
};
|
|
24335
|
-
outputFormat: "json";
|
|
24336
|
-
status: 404;
|
|
24337
|
-
} | {
|
|
24338
|
-
input: {
|
|
24339
|
-
param: {
|
|
24340
|
-
workspace: string;
|
|
24341
|
-
} & {
|
|
24342
|
-
billingId: string;
|
|
24343
|
-
};
|
|
24344
|
-
};
|
|
24345
|
-
output: {
|
|
24346
|
-
success: true;
|
|
24347
|
-
billing: {
|
|
24348
|
-
updated_at: string | null;
|
|
24349
|
-
deleted_at: string | null;
|
|
24350
|
-
verified_at: string | null;
|
|
24351
|
-
suspended_at: string | null;
|
|
24352
|
-
created_at: string;
|
|
24353
|
-
id: string;
|
|
24354
|
-
workspaceId: string;
|
|
24355
|
-
country: string;
|
|
24356
|
-
companyName: string;
|
|
24357
|
-
inn: string;
|
|
24358
|
-
kpp: string;
|
|
24359
|
-
bankBranch: string;
|
|
24360
|
-
bankAccountNumber: string;
|
|
24361
|
-
bankBik: string;
|
|
24362
|
-
bankKc: string;
|
|
24363
|
-
vat: boolean;
|
|
24364
|
-
vatRate: number;
|
|
24365
|
-
active: boolean | null;
|
|
24366
|
-
};
|
|
24367
|
-
};
|
|
24368
|
-
outputFormat: "json";
|
|
24369
|
-
status: 200;
|
|
24370
|
-
};
|
|
24371
|
-
};
|
|
24372
|
-
} & {
|
|
24373
|
-
"/edit": {
|
|
24374
|
-
$post: {
|
|
24375
|
-
input: {};
|
|
24376
|
-
output: {
|
|
24377
|
-
success: false;
|
|
24378
|
-
error: never;
|
|
24379
|
-
};
|
|
24380
|
-
outputFormat: "json";
|
|
24381
|
-
status: 400;
|
|
24382
|
-
} | {
|
|
24383
|
-
input: {};
|
|
24384
|
-
output: {
|
|
24385
|
-
success: false;
|
|
24386
|
-
error: string;
|
|
24387
|
-
};
|
|
24388
|
-
outputFormat: "json";
|
|
24389
|
-
status: 404;
|
|
24390
|
-
} | {
|
|
24391
|
-
input: {};
|
|
24392
|
-
output: {
|
|
24393
|
-
success: true;
|
|
24394
|
-
};
|
|
24395
|
-
outputFormat: "json";
|
|
24396
|
-
status: 200;
|
|
24397
|
-
};
|
|
24398
|
-
};
|
|
24399
|
-
} & {
|
|
24400
|
-
"/delete": {
|
|
24401
|
-
$post: {
|
|
24402
|
-
input: {};
|
|
24403
|
-
output: {
|
|
24404
|
-
success: false;
|
|
24405
|
-
error: never;
|
|
24406
|
-
};
|
|
24407
|
-
outputFormat: "json";
|
|
24408
|
-
status: 400;
|
|
24409
|
-
} | {
|
|
24410
|
-
input: {};
|
|
24411
|
-
output: {
|
|
24412
|
-
success: false;
|
|
24413
|
-
error: string;
|
|
24414
|
-
};
|
|
24415
|
-
outputFormat: "json";
|
|
24416
|
-
status: 404;
|
|
24417
|
-
} | {
|
|
24418
|
-
input: {};
|
|
24419
|
-
output: {
|
|
24420
|
-
success: true;
|
|
24421
|
-
};
|
|
24422
|
-
outputFormat: "json";
|
|
24423
|
-
status: 200;
|
|
24424
|
-
};
|
|
24425
|
-
};
|
|
24426
|
-
}, "/billings"> | import("hono/types").MergeSchemaPath<{
|
|
24427
23919
|
"/create": {
|
|
24428
23920
|
$post: {
|
|
24429
23921
|
input: {};
|
|
@@ -24456,7 +23948,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
24456
23948
|
serviceId: string;
|
|
24457
23949
|
installment: boolean | null;
|
|
24458
23950
|
vatRate: number | null;
|
|
24459
|
-
|
|
23951
|
+
SellerFinanceAccountId: string;
|
|
24460
23952
|
date: string;
|
|
24461
23953
|
language: string;
|
|
24462
23954
|
currency: string;
|
|
@@ -24483,6 +23975,31 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
24483
23975
|
status: 201;
|
|
24484
23976
|
};
|
|
24485
23977
|
};
|
|
23978
|
+
} & {
|
|
23979
|
+
"/accounts/list/:workspace": {
|
|
23980
|
+
$get: {
|
|
23981
|
+
input: {
|
|
23982
|
+
param: {
|
|
23983
|
+
workspace: string;
|
|
23984
|
+
};
|
|
23985
|
+
};
|
|
23986
|
+
output: {
|
|
23987
|
+
success: true;
|
|
23988
|
+
accounts: {
|
|
23989
|
+
id: string;
|
|
23990
|
+
order: number;
|
|
23991
|
+
name: string;
|
|
23992
|
+
cardColor: string;
|
|
23993
|
+
currency: FinanceCurrency;
|
|
23994
|
+
companyName: string | null;
|
|
23995
|
+
vatRate: number | null;
|
|
23996
|
+
active: boolean;
|
|
23997
|
+
}[];
|
|
23998
|
+
};
|
|
23999
|
+
outputFormat: "json";
|
|
24000
|
+
status: 200;
|
|
24001
|
+
};
|
|
24002
|
+
};
|
|
24486
24003
|
} & {
|
|
24487
24004
|
"/list/:workspace/:customerId": {
|
|
24488
24005
|
$get: {
|
|
@@ -24533,7 +24050,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
24533
24050
|
workspaceId: string;
|
|
24534
24051
|
invoiceId: string;
|
|
24535
24052
|
serviceId: string;
|
|
24536
|
-
|
|
24053
|
+
SellerFinanceAccountId: string;
|
|
24537
24054
|
customerId: string;
|
|
24538
24055
|
date: string;
|
|
24539
24056
|
language: string;
|
|
@@ -24594,7 +24111,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
24594
24111
|
serviceId: string;
|
|
24595
24112
|
installment: boolean | null;
|
|
24596
24113
|
vatRate: number | null;
|
|
24597
|
-
|
|
24114
|
+
SellerFinanceAccountId: string;
|
|
24598
24115
|
date: string;
|
|
24599
24116
|
language: string;
|
|
24600
24117
|
currency: string;
|
|
@@ -30563,6 +30080,16 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
30563
30080
|
cardColor: string;
|
|
30564
30081
|
currency: FinanceCurrency;
|
|
30565
30082
|
openingBalance: number;
|
|
30083
|
+
country: string | null;
|
|
30084
|
+
companyName: string | null;
|
|
30085
|
+
inn: string | null;
|
|
30086
|
+
kpp: string | null;
|
|
30087
|
+
bankBranch: string | null;
|
|
30088
|
+
bankAccountNumber: string | null;
|
|
30089
|
+
bankBik: string | null;
|
|
30090
|
+
bankKc: string | null;
|
|
30091
|
+
vatRate: number | null;
|
|
30092
|
+
active: boolean;
|
|
30566
30093
|
created_at: string;
|
|
30567
30094
|
updated_at: string | null;
|
|
30568
30095
|
}[];
|
|
@@ -30605,6 +30132,16 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
30605
30132
|
cardColor: string;
|
|
30606
30133
|
currency: FinanceCurrency;
|
|
30607
30134
|
openingBalance: number;
|
|
30135
|
+
country: string | null;
|
|
30136
|
+
companyName: string | null;
|
|
30137
|
+
inn: string | null;
|
|
30138
|
+
kpp: string | null;
|
|
30139
|
+
bankBranch: string | null;
|
|
30140
|
+
bankAccountNumber: string | null;
|
|
30141
|
+
bankBik: string | null;
|
|
30142
|
+
bankKc: string | null;
|
|
30143
|
+
vatRate: number | null;
|
|
30144
|
+
active: boolean;
|
|
30608
30145
|
created_at: string;
|
|
30609
30146
|
updated_at: string | null;
|
|
30610
30147
|
};
|
|
@@ -30635,6 +30172,16 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
30635
30172
|
cardColor: string;
|
|
30636
30173
|
currency: FinanceCurrency;
|
|
30637
30174
|
openingBalance: number;
|
|
30175
|
+
country: string | null;
|
|
30176
|
+
companyName: string | null;
|
|
30177
|
+
inn: string | null;
|
|
30178
|
+
kpp: string | null;
|
|
30179
|
+
bankBranch: string | null;
|
|
30180
|
+
bankAccountNumber: string | null;
|
|
30181
|
+
bankBik: string | null;
|
|
30182
|
+
bankKc: string | null;
|
|
30183
|
+
vatRate: number | null;
|
|
30184
|
+
active: boolean;
|
|
30638
30185
|
created_at: string;
|
|
30639
30186
|
updated_at: string | null;
|
|
30640
30187
|
};
|
|
@@ -30673,6 +30220,16 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
30673
30220
|
cardColor: string;
|
|
30674
30221
|
currency: FinanceCurrency;
|
|
30675
30222
|
openingBalance: number;
|
|
30223
|
+
country: string | null;
|
|
30224
|
+
companyName: string | null;
|
|
30225
|
+
inn: string | null;
|
|
30226
|
+
kpp: string | null;
|
|
30227
|
+
bankBranch: string | null;
|
|
30228
|
+
bankAccountNumber: string | null;
|
|
30229
|
+
bankBik: string | null;
|
|
30230
|
+
bankKc: string | null;
|
|
30231
|
+
vatRate: number | null;
|
|
30232
|
+
active: boolean;
|
|
30676
30233
|
created_at: string;
|
|
30677
30234
|
updated_at: string | null;
|
|
30678
30235
|
};
|
|
@@ -30703,6 +30260,16 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
30703
30260
|
cardColor: string;
|
|
30704
30261
|
currency: FinanceCurrency;
|
|
30705
30262
|
openingBalance: number;
|
|
30263
|
+
country: string | null;
|
|
30264
|
+
companyName: string | null;
|
|
30265
|
+
inn: string | null;
|
|
30266
|
+
kpp: string | null;
|
|
30267
|
+
bankBranch: string | null;
|
|
30268
|
+
bankAccountNumber: string | null;
|
|
30269
|
+
bankBik: string | null;
|
|
30270
|
+
bankKc: string | null;
|
|
30271
|
+
vatRate: number | null;
|
|
30272
|
+
active: boolean;
|
|
30706
30273
|
created_at: string;
|
|
30707
30274
|
updated_at: string | null;
|
|
30708
30275
|
}[];
|