@mestra-dev/contract 0.0.209 → 0.0.211
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 +1933 -234
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import type { JwtVariables } from 'hono/jwt';
|
|
|
3
3
|
|
|
4
4
|
type GrowthDirection = "positive" | "negative" | "none";
|
|
5
5
|
type FinanceCurrency = "ruble" | "dollar" | "euro";
|
|
6
|
+
type FinanceTransactionType = "refund" | "income" | "expense" | "transfer";
|
|
6
7
|
type Variables = JwtVariables;
|
|
7
8
|
/** Shared error body for middleware / HTTPException responses (typed into AppType). */
|
|
8
9
|
export type ApiError = {
|
|
@@ -76,7 +77,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
76
77
|
},
|
|
77
78
|
{
|
|
78
79
|
readonly name: "Tags";
|
|
79
|
-
readonly description: "Workspace tag CRUD and assignment to tasks or
|
|
80
|
+
readonly description: "Workspace tag CRUD and assignment to tasks, real-estate customers, or services; list/create accept crm::tasks, crm::customers, or crm::services access; update/delete require crm::general write.";
|
|
80
81
|
},
|
|
81
82
|
{
|
|
82
83
|
readonly name: "Failure Reasons";
|
|
@@ -116,7 +117,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
116
117
|
},
|
|
117
118
|
{
|
|
118
119
|
readonly name: "Files";
|
|
119
|
-
readonly description: "S3 file upload (presigned POST to a temporary `.tmp` key), confirm (magic-byte validation then promote to final key), optional nested folder destination under `{workspace}/folders/{path}/`, profile and workspace picture upload/confirm/delete, comment attachment upload/confirm, list task comment files with download URLs, service file upload/confirm/delete, list service files with download URLs, folder create/delete (nested paths), list (includes pin metadata; excludes `.tmp` objects), storage usage, pin/unpin, download by relative path, move, and file delete. General uploads accept JPEG/PNG/WebP/PDF; profile/workspace pictures accept JPEG/PNG only (0.5 MB). Workspace file routes require active collaborator status and crm::files access; comment attachments require crm::tasks write/read; service files require crm::services write/read.";
|
|
120
|
+
readonly description: "S3 file upload (presigned POST to a temporary `.tmp` key), confirm (magic-byte validation then promote to final key), optional nested folder destination under `{workspace}/folders/{path}/`, profile and workspace picture upload/confirm/delete, comment attachment upload/confirm, list task comment files with download URLs, service file upload/confirm/delete, list service files with download URLs, customer file upload/confirm/delete, finance receipt upload/confirm/delete, folder create/delete (nested paths), list (includes pin metadata; excludes `.tmp` objects), storage usage, pin/unpin, download by relative path, move, and file delete. General uploads accept JPEG/PNG/WebP/PDF; profile/workspace pictures accept JPEG/PNG only (0.5 MB). Workspace file routes require active collaborator status and crm::files access; comment attachments require crm::tasks write/read; service files require crm::services write/read; customer files require crm::customers write/read; finance receipts require crm::finance write/read.";
|
|
120
121
|
},
|
|
121
122
|
{
|
|
122
123
|
readonly name: "Chat";
|
|
@@ -128,7 +129,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
128
129
|
},
|
|
129
130
|
{
|
|
130
131
|
readonly name: "Finance";
|
|
131
|
-
readonly description: "Workspace finance accounts (ordered cards with name, color, currency, and opening balance) and a numbers-visibility toggle for the default finance view. Requires workspace access and crm::finance read or write.";
|
|
132
|
+
readonly description: "Workspace finance accounts (ordered cards with name, color, currency, and opening balance), 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.";
|
|
132
133
|
}
|
|
133
134
|
];
|
|
134
135
|
readonly components: {
|
|
@@ -1369,6 +1370,13 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
1369
1370
|
readonly nullable: true;
|
|
1370
1371
|
readonly description: "Total number of comments attached to the task.";
|
|
1371
1372
|
};
|
|
1373
|
+
readonly tags: {
|
|
1374
|
+
readonly type: "array";
|
|
1375
|
+
readonly items: {
|
|
1376
|
+
readonly $ref: "#/components/schemas/TagListItem";
|
|
1377
|
+
};
|
|
1378
|
+
readonly description: "Tags assigned to the task (id, name, description).";
|
|
1379
|
+
};
|
|
1372
1380
|
};
|
|
1373
1381
|
};
|
|
1374
1382
|
readonly TaskPhase: {
|
|
@@ -1486,9 +1494,15 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
1486
1494
|
readonly TagListItem: {
|
|
1487
1495
|
readonly type: "object";
|
|
1488
1496
|
readonly required: readonly [
|
|
1497
|
+
"id",
|
|
1489
1498
|
"name"
|
|
1490
1499
|
];
|
|
1491
1500
|
readonly properties: {
|
|
1501
|
+
readonly id: {
|
|
1502
|
+
readonly type: "string";
|
|
1503
|
+
readonly format: "uuid";
|
|
1504
|
+
readonly description: "Tag identifier.";
|
|
1505
|
+
};
|
|
1492
1506
|
readonly name: {
|
|
1493
1507
|
readonly type: "string";
|
|
1494
1508
|
readonly description: "Tag label.";
|
|
@@ -1499,7 +1513,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
1499
1513
|
readonly description: "Tag description when set.";
|
|
1500
1514
|
};
|
|
1501
1515
|
};
|
|
1502
|
-
readonly description: "
|
|
1516
|
+
readonly description: "Tag fields returned on list endpoints (id, name, description).";
|
|
1503
1517
|
};
|
|
1504
1518
|
readonly CreateTagSuccess: {
|
|
1505
1519
|
readonly type: "object";
|
|
@@ -1555,7 +1569,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
1555
1569
|
readonly items: {
|
|
1556
1570
|
readonly $ref: "#/components/schemas/TagListItem";
|
|
1557
1571
|
};
|
|
1558
|
-
readonly description: "Tags in the workspace (name and description
|
|
1572
|
+
readonly description: "Tags in the workspace (id, name, and description).";
|
|
1559
1573
|
};
|
|
1560
1574
|
};
|
|
1561
1575
|
};
|
|
@@ -2377,6 +2391,186 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
2377
2391
|
};
|
|
2378
2392
|
};
|
|
2379
2393
|
};
|
|
2394
|
+
readonly UploadToFinanceRequest: {
|
|
2395
|
+
readonly type: "object";
|
|
2396
|
+
readonly required: readonly [
|
|
2397
|
+
"filename",
|
|
2398
|
+
"contentType",
|
|
2399
|
+
"contentLength",
|
|
2400
|
+
"workspace",
|
|
2401
|
+
"transactionId"
|
|
2402
|
+
];
|
|
2403
|
+
readonly properties: {
|
|
2404
|
+
readonly filename: {
|
|
2405
|
+
readonly type: "string";
|
|
2406
|
+
readonly minLength: 1;
|
|
2407
|
+
readonly maxLength: 200;
|
|
2408
|
+
readonly description: "Safe file name (no path separators, not `.tmp`).";
|
|
2409
|
+
readonly example: "receipt.pdf";
|
|
2410
|
+
};
|
|
2411
|
+
readonly contentType: {
|
|
2412
|
+
readonly $ref: "#/components/schemas/FileContentType";
|
|
2413
|
+
};
|
|
2414
|
+
readonly contentLength: {
|
|
2415
|
+
readonly type: "integer";
|
|
2416
|
+
readonly minimum: 1;
|
|
2417
|
+
readonly maximum: 15728640;
|
|
2418
|
+
readonly description: "Exact file byte length.";
|
|
2419
|
+
};
|
|
2420
|
+
readonly workspace: {
|
|
2421
|
+
readonly type: "string";
|
|
2422
|
+
readonly format: "uuid";
|
|
2423
|
+
readonly description: "Workspace identifier.";
|
|
2424
|
+
};
|
|
2425
|
+
readonly transactionId: {
|
|
2426
|
+
readonly type: "string";
|
|
2427
|
+
readonly format: "uuid";
|
|
2428
|
+
readonly description: "Finance transaction the receipt is attached to.";
|
|
2429
|
+
};
|
|
2430
|
+
};
|
|
2431
|
+
};
|
|
2432
|
+
readonly UploadToFinanceSuccess: {
|
|
2433
|
+
readonly type: "object";
|
|
2434
|
+
readonly required: readonly [
|
|
2435
|
+
"success",
|
|
2436
|
+
"url",
|
|
2437
|
+
"fields",
|
|
2438
|
+
"key",
|
|
2439
|
+
"maxSize"
|
|
2440
|
+
];
|
|
2441
|
+
readonly properties: {
|
|
2442
|
+
readonly success: {
|
|
2443
|
+
readonly type: "boolean";
|
|
2444
|
+
readonly const: true;
|
|
2445
|
+
};
|
|
2446
|
+
readonly url: {
|
|
2447
|
+
readonly type: "string";
|
|
2448
|
+
readonly description: "S3 presigned POST URL.";
|
|
2449
|
+
};
|
|
2450
|
+
readonly fields: {
|
|
2451
|
+
readonly type: "object";
|
|
2452
|
+
readonly additionalProperties: {
|
|
2453
|
+
readonly type: "string";
|
|
2454
|
+
};
|
|
2455
|
+
readonly description: "Form fields to include in the multipart upload POST.";
|
|
2456
|
+
};
|
|
2457
|
+
readonly key: {
|
|
2458
|
+
readonly type: "string";
|
|
2459
|
+
readonly description: "Temporary S3 object key (`{workspace}_finance/{transactionId}/{filename}.tmp`).";
|
|
2460
|
+
};
|
|
2461
|
+
readonly maxSize: {
|
|
2462
|
+
readonly type: "integer";
|
|
2463
|
+
readonly description: "Exact requested upload size in bytes.";
|
|
2464
|
+
};
|
|
2465
|
+
};
|
|
2466
|
+
};
|
|
2467
|
+
readonly ConfirmFinanceFileRequest: {
|
|
2468
|
+
readonly type: "object";
|
|
2469
|
+
readonly required: readonly [
|
|
2470
|
+
"filename",
|
|
2471
|
+
"workspace",
|
|
2472
|
+
"transactionId"
|
|
2473
|
+
];
|
|
2474
|
+
readonly properties: {
|
|
2475
|
+
readonly filename: {
|
|
2476
|
+
readonly type: "string";
|
|
2477
|
+
readonly minLength: 1;
|
|
2478
|
+
readonly maxLength: 200;
|
|
2479
|
+
readonly description: "Original file name used for `/files/upload-to-finance`.";
|
|
2480
|
+
readonly example: "receipt.pdf";
|
|
2481
|
+
};
|
|
2482
|
+
readonly workspace: {
|
|
2483
|
+
readonly type: "string";
|
|
2484
|
+
readonly format: "uuid";
|
|
2485
|
+
readonly description: "Workspace identifier.";
|
|
2486
|
+
};
|
|
2487
|
+
readonly transactionId: {
|
|
2488
|
+
readonly type: "string";
|
|
2489
|
+
readonly format: "uuid";
|
|
2490
|
+
readonly description: "Finance transaction the receipt is attached to.";
|
|
2491
|
+
};
|
|
2492
|
+
};
|
|
2493
|
+
};
|
|
2494
|
+
readonly DeleteFinanceFileRequest: {
|
|
2495
|
+
readonly type: "object";
|
|
2496
|
+
readonly required: readonly [
|
|
2497
|
+
"filename",
|
|
2498
|
+
"workspace",
|
|
2499
|
+
"transactionId"
|
|
2500
|
+
];
|
|
2501
|
+
readonly properties: {
|
|
2502
|
+
readonly filename: {
|
|
2503
|
+
readonly type: "string";
|
|
2504
|
+
readonly minLength: 1;
|
|
2505
|
+
readonly maxLength: 200;
|
|
2506
|
+
readonly description: "Safe file name (no path separators, not `.tmp`).";
|
|
2507
|
+
readonly example: "receipt.pdf";
|
|
2508
|
+
};
|
|
2509
|
+
readonly workspace: {
|
|
2510
|
+
readonly type: "string";
|
|
2511
|
+
readonly format: "uuid";
|
|
2512
|
+
readonly description: "Workspace identifier.";
|
|
2513
|
+
};
|
|
2514
|
+
readonly transactionId: {
|
|
2515
|
+
readonly type: "string";
|
|
2516
|
+
readonly format: "uuid";
|
|
2517
|
+
readonly description: "Finance transaction the receipt is attached to.";
|
|
2518
|
+
};
|
|
2519
|
+
};
|
|
2520
|
+
};
|
|
2521
|
+
readonly FinanceFile: {
|
|
2522
|
+
readonly type: "object";
|
|
2523
|
+
readonly required: readonly [
|
|
2524
|
+
"key",
|
|
2525
|
+
"filename",
|
|
2526
|
+
"size",
|
|
2527
|
+
"downloadUrl"
|
|
2528
|
+
];
|
|
2529
|
+
readonly properties: {
|
|
2530
|
+
readonly key: {
|
|
2531
|
+
readonly type: "string";
|
|
2532
|
+
readonly description: "Full S3 object key (`{workspace}_finance/{transactionId}/{filename}`).";
|
|
2533
|
+
};
|
|
2534
|
+
readonly filename: {
|
|
2535
|
+
readonly type: "string";
|
|
2536
|
+
readonly description: "File name under `{workspace}_finance/{transactionId}/`.";
|
|
2537
|
+
};
|
|
2538
|
+
readonly size: {
|
|
2539
|
+
readonly type: "integer";
|
|
2540
|
+
readonly description: "Object size in bytes.";
|
|
2541
|
+
};
|
|
2542
|
+
readonly lastModified: {
|
|
2543
|
+
readonly type: "string";
|
|
2544
|
+
readonly format: "date-time";
|
|
2545
|
+
readonly nullable: true;
|
|
2546
|
+
readonly description: "Last modified timestamp from S3 (ISO string).";
|
|
2547
|
+
};
|
|
2548
|
+
readonly downloadUrl: {
|
|
2549
|
+
readonly type: "string";
|
|
2550
|
+
readonly description: "Presigned GET URL (5-minute expiry).";
|
|
2551
|
+
};
|
|
2552
|
+
};
|
|
2553
|
+
};
|
|
2554
|
+
readonly ListFinanceFilesSuccess: {
|
|
2555
|
+
readonly type: "object";
|
|
2556
|
+
readonly required: readonly [
|
|
2557
|
+
"success",
|
|
2558
|
+
"files"
|
|
2559
|
+
];
|
|
2560
|
+
readonly properties: {
|
|
2561
|
+
readonly success: {
|
|
2562
|
+
readonly type: "boolean";
|
|
2563
|
+
readonly const: true;
|
|
2564
|
+
};
|
|
2565
|
+
readonly files: {
|
|
2566
|
+
readonly type: "array";
|
|
2567
|
+
readonly items: {
|
|
2568
|
+
readonly $ref: "#/components/schemas/FinanceFile";
|
|
2569
|
+
};
|
|
2570
|
+
readonly description: "All non-prefix, non-`.tmp` objects under `{workspace}_finance/{transactionId}/`.";
|
|
2571
|
+
};
|
|
2572
|
+
};
|
|
2573
|
+
};
|
|
2380
2574
|
readonly UploadProfilePictureRequest: {
|
|
2381
2575
|
readonly type: "object";
|
|
2382
2576
|
readonly required: readonly [
|
|
@@ -2637,6 +2831,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
2637
2831
|
"commentsBytes",
|
|
2638
2832
|
"customerBytes",
|
|
2639
2833
|
"servicesBytes",
|
|
2834
|
+
"financeBytes",
|
|
2640
2835
|
"limitBytes"
|
|
2641
2836
|
];
|
|
2642
2837
|
readonly properties: {
|
|
@@ -2646,7 +2841,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
2646
2841
|
};
|
|
2647
2842
|
readonly usedBytes: {
|
|
2648
2843
|
readonly type: "integer";
|
|
2649
|
-
readonly description: "Total finalized storage in bytes (`filesBytes` + `commentsBytes` + `customerBytes` + `servicesBytes`). Excludes `.tmp` objects.";
|
|
2844
|
+
readonly description: "Total finalized storage in bytes (`filesBytes` + `commentsBytes` + `customerBytes` + `servicesBytes` + `financeBytes`). Excludes `.tmp` objects.";
|
|
2650
2845
|
readonly example: 348320;
|
|
2651
2846
|
};
|
|
2652
2847
|
readonly filesBytes: {
|
|
@@ -2669,6 +2864,11 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
2669
2864
|
readonly description: "Finalized service file storage under `{workspace}_services/`. Excludes `.tmp`.";
|
|
2670
2865
|
readonly example: 50000;
|
|
2671
2866
|
};
|
|
2867
|
+
readonly financeBytes: {
|
|
2868
|
+
readonly type: "integer";
|
|
2869
|
+
readonly description: "Finalized finance receipt storage under `{workspace}_finance/`. Excludes `.tmp`.";
|
|
2870
|
+
readonly example: 25000;
|
|
2871
|
+
};
|
|
2672
2872
|
readonly limitBytes: {
|
|
2673
2873
|
readonly type: "integer";
|
|
2674
2874
|
readonly nullable: true;
|
|
@@ -3682,6 +3882,13 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
3682
3882
|
readonly format: "date-time";
|
|
3683
3883
|
readonly nullable: true;
|
|
3684
3884
|
};
|
|
3885
|
+
readonly tags: {
|
|
3886
|
+
readonly type: "array";
|
|
3887
|
+
readonly items: {
|
|
3888
|
+
readonly $ref: "#/components/schemas/TagListItem";
|
|
3889
|
+
};
|
|
3890
|
+
readonly description: "Tags assigned to the customer (id, name, description).";
|
|
3891
|
+
};
|
|
3685
3892
|
};
|
|
3686
3893
|
};
|
|
3687
3894
|
readonly CreateCustomerSuccess: {
|
|
@@ -4000,6 +4207,13 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
4000
4207
|
readonly format: "date-time";
|
|
4001
4208
|
readonly nullable: true;
|
|
4002
4209
|
};
|
|
4210
|
+
readonly tags: {
|
|
4211
|
+
readonly type: "array";
|
|
4212
|
+
readonly items: {
|
|
4213
|
+
readonly $ref: "#/components/schemas/TagListItem";
|
|
4214
|
+
};
|
|
4215
|
+
readonly description: "Tags assigned to the service (id, name, description).";
|
|
4216
|
+
};
|
|
4003
4217
|
};
|
|
4004
4218
|
};
|
|
4005
4219
|
readonly CreateServiceSuccess: {
|
|
@@ -5907,66 +6121,191 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
5907
6121
|
};
|
|
5908
6122
|
};
|
|
5909
6123
|
};
|
|
5910
|
-
|
|
5911
|
-
|
|
5912
|
-
|
|
5913
|
-
|
|
5914
|
-
|
|
5915
|
-
|
|
5916
|
-
"
|
|
6124
|
+
readonly FinanceTransaction: {
|
|
6125
|
+
readonly type: "object";
|
|
6126
|
+
readonly required: readonly [
|
|
6127
|
+
"id",
|
|
6128
|
+
"workspaceId",
|
|
6129
|
+
"type",
|
|
6130
|
+
"amount",
|
|
6131
|
+
"date",
|
|
6132
|
+
"created_at"
|
|
5917
6133
|
];
|
|
5918
|
-
readonly
|
|
5919
|
-
|
|
5920
|
-
|
|
5921
|
-
readonly
|
|
5922
|
-
readonly content: {
|
|
5923
|
-
readonly "application/json": {
|
|
5924
|
-
readonly schema: {
|
|
5925
|
-
readonly type: "object";
|
|
5926
|
-
readonly required: readonly [
|
|
5927
|
-
"status"
|
|
5928
|
-
];
|
|
5929
|
-
readonly properties: {
|
|
5930
|
-
readonly status: {
|
|
5931
|
-
readonly type: "string";
|
|
5932
|
-
readonly example: "ok";
|
|
5933
|
-
};
|
|
5934
|
-
};
|
|
5935
|
-
};
|
|
5936
|
-
};
|
|
5937
|
-
};
|
|
6134
|
+
readonly properties: {
|
|
6135
|
+
readonly id: {
|
|
6136
|
+
readonly type: "string";
|
|
6137
|
+
readonly format: "uuid";
|
|
5938
6138
|
};
|
|
5939
|
-
|
|
5940
|
-
|
|
5941
|
-
|
|
5942
|
-
readonly "/auth/vk": {
|
|
5943
|
-
readonly get: {
|
|
5944
|
-
readonly tags: readonly [
|
|
5945
|
-
"Auth"
|
|
5946
|
-
];
|
|
5947
|
-
readonly summary: "Start VK ID OAuth";
|
|
5948
|
-
readonly description: "Redirects the browser to VK ID authorization. A PKCE code verifier is stored in Redis under the returned state parameter.";
|
|
5949
|
-
readonly responses: {
|
|
5950
|
-
readonly 302: {
|
|
5951
|
-
readonly description: "Redirect to VK ID authorize URL.";
|
|
5952
|
-
readonly headers: {
|
|
5953
|
-
readonly Location: {
|
|
5954
|
-
readonly schema: {
|
|
5955
|
-
readonly type: "string";
|
|
5956
|
-
};
|
|
5957
|
-
readonly description: "VK ID authorization URL.";
|
|
5958
|
-
};
|
|
5959
|
-
};
|
|
6139
|
+
readonly workspaceId: {
|
|
6140
|
+
readonly type: "string";
|
|
6141
|
+
readonly format: "uuid";
|
|
5960
6142
|
};
|
|
5961
|
-
readonly
|
|
5962
|
-
readonly
|
|
5963
|
-
readonly
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
|
|
5968
|
-
|
|
5969
|
-
|
|
6143
|
+
readonly type: {
|
|
6144
|
+
readonly type: "string";
|
|
6145
|
+
readonly enum: readonly [
|
|
6146
|
+
"refund",
|
|
6147
|
+
"income",
|
|
6148
|
+
"expense",
|
|
6149
|
+
"transfer"
|
|
6150
|
+
];
|
|
6151
|
+
};
|
|
6152
|
+
readonly customerId: {
|
|
6153
|
+
readonly type: "string";
|
|
6154
|
+
readonly format: "uuid";
|
|
6155
|
+
readonly nullable: true;
|
|
6156
|
+
};
|
|
6157
|
+
readonly serviceId: {
|
|
6158
|
+
readonly type: "string";
|
|
6159
|
+
readonly format: "uuid";
|
|
6160
|
+
readonly nullable: true;
|
|
6161
|
+
};
|
|
6162
|
+
readonly accountId: {
|
|
6163
|
+
readonly type: "string";
|
|
6164
|
+
readonly format: "uuid";
|
|
6165
|
+
readonly nullable: true;
|
|
6166
|
+
readonly description: "Source account. Required for transfers.";
|
|
6167
|
+
};
|
|
6168
|
+
readonly destinationAccountId: {
|
|
6169
|
+
readonly type: "string";
|
|
6170
|
+
readonly format: "uuid";
|
|
6171
|
+
readonly nullable: true;
|
|
6172
|
+
readonly description: "Destination account. Required for transfers; omitted for other types.";
|
|
6173
|
+
};
|
|
6174
|
+
readonly paymentMethod: {
|
|
6175
|
+
readonly type: "string";
|
|
6176
|
+
readonly nullable: true;
|
|
6177
|
+
};
|
|
6178
|
+
readonly amount: {
|
|
6179
|
+
readonly type: "number";
|
|
6180
|
+
readonly minimum: 0.01;
|
|
6181
|
+
readonly description: "Positive amount. Direction is implied by type.";
|
|
6182
|
+
};
|
|
6183
|
+
readonly description: {
|
|
6184
|
+
readonly type: "string";
|
|
6185
|
+
readonly nullable: true;
|
|
6186
|
+
};
|
|
6187
|
+
readonly date: {
|
|
6188
|
+
readonly type: "string";
|
|
6189
|
+
readonly format: "date-time";
|
|
6190
|
+
readonly description: "Transaction date; defaults to now on create when omitted.";
|
|
6191
|
+
};
|
|
6192
|
+
readonly vat: {
|
|
6193
|
+
readonly type: "integer";
|
|
6194
|
+
readonly nullable: true;
|
|
6195
|
+
readonly minimum: 0;
|
|
6196
|
+
readonly maximum: 100;
|
|
6197
|
+
readonly description: "VAT rate 0-100.";
|
|
6198
|
+
};
|
|
6199
|
+
readonly reason: {
|
|
6200
|
+
readonly type: "string";
|
|
6201
|
+
readonly nullable: true;
|
|
6202
|
+
};
|
|
6203
|
+
readonly created_at: {
|
|
6204
|
+
readonly type: "string";
|
|
6205
|
+
readonly format: "date-time";
|
|
6206
|
+
};
|
|
6207
|
+
readonly updated_at: {
|
|
6208
|
+
readonly type: "string";
|
|
6209
|
+
readonly format: "date-time";
|
|
6210
|
+
readonly nullable: true;
|
|
6211
|
+
};
|
|
6212
|
+
};
|
|
6213
|
+
};
|
|
6214
|
+
readonly FinanceTransactionSuccess: {
|
|
6215
|
+
readonly type: "object";
|
|
6216
|
+
readonly required: readonly [
|
|
6217
|
+
"success",
|
|
6218
|
+
"transaction"
|
|
6219
|
+
];
|
|
6220
|
+
readonly properties: {
|
|
6221
|
+
readonly success: {
|
|
6222
|
+
readonly type: "boolean";
|
|
6223
|
+
readonly const: true;
|
|
6224
|
+
};
|
|
6225
|
+
readonly transaction: {
|
|
6226
|
+
readonly $ref: "#/components/schemas/FinanceTransaction";
|
|
6227
|
+
};
|
|
6228
|
+
};
|
|
6229
|
+
};
|
|
6230
|
+
readonly ListFinanceTransactionsSuccess: {
|
|
6231
|
+
readonly type: "object";
|
|
6232
|
+
readonly required: readonly [
|
|
6233
|
+
"success",
|
|
6234
|
+
"transactions"
|
|
6235
|
+
];
|
|
6236
|
+
readonly properties: {
|
|
6237
|
+
readonly success: {
|
|
6238
|
+
readonly type: "boolean";
|
|
6239
|
+
readonly const: true;
|
|
6240
|
+
};
|
|
6241
|
+
readonly transactions: {
|
|
6242
|
+
readonly type: "array";
|
|
6243
|
+
readonly items: {
|
|
6244
|
+
readonly $ref: "#/components/schemas/FinanceTransaction";
|
|
6245
|
+
};
|
|
6246
|
+
};
|
|
6247
|
+
};
|
|
6248
|
+
};
|
|
6249
|
+
};
|
|
6250
|
+
};
|
|
6251
|
+
readonly paths: {
|
|
6252
|
+
readonly "/health": {
|
|
6253
|
+
readonly get: {
|
|
6254
|
+
readonly tags: readonly [
|
|
6255
|
+
"System"
|
|
6256
|
+
];
|
|
6257
|
+
readonly summary: "Service health check";
|
|
6258
|
+
readonly responses: {
|
|
6259
|
+
readonly 200: {
|
|
6260
|
+
readonly description: "Service is healthy";
|
|
6261
|
+
readonly content: {
|
|
6262
|
+
readonly "application/json": {
|
|
6263
|
+
readonly schema: {
|
|
6264
|
+
readonly type: "object";
|
|
6265
|
+
readonly required: readonly [
|
|
6266
|
+
"status"
|
|
6267
|
+
];
|
|
6268
|
+
readonly properties: {
|
|
6269
|
+
readonly status: {
|
|
6270
|
+
readonly type: "string";
|
|
6271
|
+
readonly example: "ok";
|
|
6272
|
+
};
|
|
6273
|
+
};
|
|
6274
|
+
};
|
|
6275
|
+
};
|
|
6276
|
+
};
|
|
6277
|
+
};
|
|
6278
|
+
};
|
|
6279
|
+
};
|
|
6280
|
+
};
|
|
6281
|
+
readonly "/auth/vk": {
|
|
6282
|
+
readonly get: {
|
|
6283
|
+
readonly tags: readonly [
|
|
6284
|
+
"Auth"
|
|
6285
|
+
];
|
|
6286
|
+
readonly summary: "Start VK ID OAuth";
|
|
6287
|
+
readonly description: "Redirects the browser to VK ID authorization. A PKCE code verifier is stored in Redis under the returned state parameter.";
|
|
6288
|
+
readonly responses: {
|
|
6289
|
+
readonly 302: {
|
|
6290
|
+
readonly description: "Redirect to VK ID authorize URL.";
|
|
6291
|
+
readonly headers: {
|
|
6292
|
+
readonly Location: {
|
|
6293
|
+
readonly schema: {
|
|
6294
|
+
readonly type: "string";
|
|
6295
|
+
};
|
|
6296
|
+
readonly description: "VK ID authorization URL.";
|
|
6297
|
+
};
|
|
6298
|
+
};
|
|
6299
|
+
};
|
|
6300
|
+
readonly 429: {
|
|
6301
|
+
readonly description: "Too Many Requests - Rate limit exceeded.";
|
|
6302
|
+
readonly content: {
|
|
6303
|
+
readonly "application/json": {
|
|
6304
|
+
readonly schema: {
|
|
6305
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
6306
|
+
};
|
|
6307
|
+
};
|
|
6308
|
+
};
|
|
5970
6309
|
};
|
|
5971
6310
|
};
|
|
5972
6311
|
};
|
|
@@ -15792,7 +16131,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
15792
16131
|
"Tags"
|
|
15793
16132
|
];
|
|
15794
16133
|
readonly summary: "List tags by workspace";
|
|
15795
|
-
readonly description: "Returns all tags for the given workspace. Requires workspace access and read access to crm::tasks or crm::
|
|
16134
|
+
readonly description: "Returns all tags for the given workspace. Requires workspace access and read access to crm::tasks, crm::customers, or crm::services.";
|
|
15796
16135
|
readonly security: readonly [
|
|
15797
16136
|
never
|
|
15798
16137
|
];
|
|
@@ -15830,7 +16169,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
15830
16169
|
};
|
|
15831
16170
|
};
|
|
15832
16171
|
readonly 403: {
|
|
15833
|
-
readonly description: "Forbidden - User lacks workspace access, or user lacks read access to
|
|
16172
|
+
readonly description: "Forbidden - User lacks workspace access, or user lacks read access to crm::tasks, crm::customers, and crm::services.";
|
|
15834
16173
|
readonly content: {
|
|
15835
16174
|
readonly "application/json": {
|
|
15836
16175
|
readonly schema: {
|
|
@@ -15848,7 +16187,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
15848
16187
|
"Tags"
|
|
15849
16188
|
];
|
|
15850
16189
|
readonly summary: "Create a tag";
|
|
15851
|
-
readonly description: "Creates a tag in the specified workspace. Requires workspace access and write access to crm::tasks or crm::
|
|
16190
|
+
readonly description: "Creates a tag in the specified workspace. Requires workspace access and write access to crm::tasks, crm::customers, or crm::services.";
|
|
15852
16191
|
readonly security: readonly [
|
|
15853
16192
|
never
|
|
15854
16193
|
];
|
|
@@ -15913,7 +16252,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
15913
16252
|
};
|
|
15914
16253
|
};
|
|
15915
16254
|
readonly 403: {
|
|
15916
|
-
readonly description: "Forbidden - User lacks workspace access, or user lacks write access to
|
|
16255
|
+
readonly description: "Forbidden - User lacks workspace access, or user lacks write access to crm::tasks, crm::customers, and crm::services.";
|
|
15917
16256
|
readonly content: {
|
|
15918
16257
|
readonly "application/json": {
|
|
15919
16258
|
readonly schema: {
|
|
@@ -16019,7 +16358,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
16019
16358
|
"Tags"
|
|
16020
16359
|
];
|
|
16021
16360
|
readonly summary: "Delete a tag";
|
|
16022
|
-
readonly description: "Removes the tag from all linked tasks and
|
|
16361
|
+
readonly description: "Removes the tag from all linked tasks, customers, and services, then deletes it from the workspace. Requires workspace access and write access to crm::general.";
|
|
16023
16362
|
readonly security: readonly [
|
|
16024
16363
|
never
|
|
16025
16364
|
];
|
|
@@ -16187,7 +16526,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
16187
16526
|
};
|
|
16188
16527
|
};
|
|
16189
16528
|
readonly 404: {
|
|
16190
|
-
readonly description: "Tag not found.";
|
|
16529
|
+
readonly description: "Tag or task not found.";
|
|
16191
16530
|
readonly content: {
|
|
16192
16531
|
readonly "application/json": {
|
|
16193
16532
|
readonly schema: {
|
|
@@ -16391,13 +16730,13 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
16391
16730
|
};
|
|
16392
16731
|
};
|
|
16393
16732
|
};
|
|
16394
|
-
readonly "/tags/
|
|
16733
|
+
readonly "/tags/assign-to-service": {
|
|
16395
16734
|
readonly post: {
|
|
16396
16735
|
readonly tags: readonly [
|
|
16397
16736
|
"Tags"
|
|
16398
16737
|
];
|
|
16399
|
-
readonly summary: "
|
|
16400
|
-
readonly description: "
|
|
16738
|
+
readonly summary: "Assign a tag to a service";
|
|
16739
|
+
readonly description: "Links an existing workspace tag to a category-specific service. Real-estate workspaces resolve the service from service_real_estates. Requires workspace access and write access to crm::services resource.";
|
|
16401
16740
|
readonly security: readonly [
|
|
16402
16741
|
never
|
|
16403
16742
|
];
|
|
@@ -16409,7 +16748,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
16409
16748
|
readonly type: "object";
|
|
16410
16749
|
readonly required: readonly [
|
|
16411
16750
|
"workspace",
|
|
16412
|
-
"
|
|
16751
|
+
"serviceId",
|
|
16413
16752
|
"tagId"
|
|
16414
16753
|
];
|
|
16415
16754
|
readonly properties: {
|
|
@@ -16418,10 +16757,10 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
16418
16757
|
readonly format: "uuid";
|
|
16419
16758
|
readonly description: "Workspace identifier.";
|
|
16420
16759
|
};
|
|
16421
|
-
readonly
|
|
16760
|
+
readonly serviceId: {
|
|
16422
16761
|
readonly type: "string";
|
|
16423
16762
|
readonly format: "uuid";
|
|
16424
|
-
readonly description: "
|
|
16763
|
+
readonly description: "Service identifier.";
|
|
16425
16764
|
};
|
|
16426
16765
|
readonly tagId: {
|
|
16427
16766
|
readonly type: "string";
|
|
@@ -16435,7 +16774,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
16435
16774
|
};
|
|
16436
16775
|
readonly responses: {
|
|
16437
16776
|
readonly 200: {
|
|
16438
|
-
readonly description: "Tag
|
|
16777
|
+
readonly description: "Tag assigned to service successfully.";
|
|
16439
16778
|
readonly content: {
|
|
16440
16779
|
readonly "application/json": {
|
|
16441
16780
|
readonly schema: {
|
|
@@ -16445,7 +16784,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
16445
16784
|
};
|
|
16446
16785
|
};
|
|
16447
16786
|
readonly 400: {
|
|
16448
|
-
readonly description: "Invalid request payload.";
|
|
16787
|
+
readonly description: "Invalid request payload or unsupported workspace category.";
|
|
16449
16788
|
readonly content: {
|
|
16450
16789
|
readonly "application/json": {
|
|
16451
16790
|
readonly schema: {
|
|
@@ -16465,7 +16804,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
16465
16804
|
};
|
|
16466
16805
|
};
|
|
16467
16806
|
readonly 403: {
|
|
16468
|
-
readonly description: "Forbidden - User lacks workspace access, or user lacks write access to crm::
|
|
16807
|
+
readonly description: "Forbidden - User lacks workspace access, or user lacks write access to crm::services resource.";
|
|
16469
16808
|
readonly content: {
|
|
16470
16809
|
readonly "application/json": {
|
|
16471
16810
|
readonly schema: {
|
|
@@ -16475,7 +16814,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
16475
16814
|
};
|
|
16476
16815
|
};
|
|
16477
16816
|
readonly 404: {
|
|
16478
|
-
readonly description: "
|
|
16817
|
+
readonly description: "Workspace, tag, or service not found.";
|
|
16479
16818
|
readonly content: {
|
|
16480
16819
|
readonly "application/json": {
|
|
16481
16820
|
readonly schema: {
|
|
@@ -16487,35 +16826,65 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
16487
16826
|
};
|
|
16488
16827
|
};
|
|
16489
16828
|
};
|
|
16490
|
-
readonly "/
|
|
16491
|
-
readonly
|
|
16829
|
+
readonly "/tags/remove-from-service": {
|
|
16830
|
+
readonly post: {
|
|
16492
16831
|
readonly tags: readonly [
|
|
16493
|
-
"
|
|
16832
|
+
"Tags"
|
|
16494
16833
|
];
|
|
16495
|
-
readonly summary: "
|
|
16496
|
-
readonly description: "
|
|
16834
|
+
readonly summary: "Remove a tag from a service";
|
|
16835
|
+
readonly description: "Unlinks a tag from a category-specific service. Requires workspace access and write access to crm::services resource.";
|
|
16497
16836
|
readonly security: readonly [
|
|
16498
16837
|
never
|
|
16499
16838
|
];
|
|
16500
|
-
readonly
|
|
16501
|
-
|
|
16502
|
-
|
|
16503
|
-
readonly
|
|
16504
|
-
|
|
16505
|
-
|
|
16506
|
-
|
|
16507
|
-
|
|
16839
|
+
readonly requestBody: {
|
|
16840
|
+
readonly required: true;
|
|
16841
|
+
readonly content: {
|
|
16842
|
+
readonly "application/json": {
|
|
16843
|
+
readonly schema: {
|
|
16844
|
+
readonly type: "object";
|
|
16845
|
+
readonly required: readonly [
|
|
16846
|
+
"workspace",
|
|
16847
|
+
"serviceId",
|
|
16848
|
+
"tagId"
|
|
16849
|
+
];
|
|
16850
|
+
readonly properties: {
|
|
16851
|
+
readonly workspace: {
|
|
16852
|
+
readonly type: "string";
|
|
16853
|
+
readonly format: "uuid";
|
|
16854
|
+
readonly description: "Workspace identifier.";
|
|
16855
|
+
};
|
|
16856
|
+
readonly serviceId: {
|
|
16857
|
+
readonly type: "string";
|
|
16858
|
+
readonly format: "uuid";
|
|
16859
|
+
readonly description: "Service identifier.";
|
|
16860
|
+
};
|
|
16861
|
+
readonly tagId: {
|
|
16862
|
+
readonly type: "string";
|
|
16863
|
+
readonly format: "uuid";
|
|
16864
|
+
readonly description: "Tag identifier.";
|
|
16865
|
+
};
|
|
16866
|
+
};
|
|
16867
|
+
};
|
|
16508
16868
|
};
|
|
16509
|
-
|
|
16510
|
-
|
|
16511
|
-
];
|
|
16869
|
+
};
|
|
16870
|
+
};
|
|
16512
16871
|
readonly responses: {
|
|
16513
16872
|
readonly 200: {
|
|
16514
|
-
readonly description: "
|
|
16873
|
+
readonly description: "Tag removed from service successfully.";
|
|
16515
16874
|
readonly content: {
|
|
16516
16875
|
readonly "application/json": {
|
|
16517
16876
|
readonly schema: {
|
|
16518
|
-
readonly $ref: "#/components/schemas/
|
|
16877
|
+
readonly $ref: "#/components/schemas/SimpleSuccess";
|
|
16878
|
+
};
|
|
16879
|
+
};
|
|
16880
|
+
};
|
|
16881
|
+
};
|
|
16882
|
+
readonly 400: {
|
|
16883
|
+
readonly description: "Invalid request payload or unsupported workspace category.";
|
|
16884
|
+
readonly content: {
|
|
16885
|
+
readonly "application/json": {
|
|
16886
|
+
readonly schema: {
|
|
16887
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
16519
16888
|
};
|
|
16520
16889
|
};
|
|
16521
16890
|
};
|
|
@@ -16531,7 +16900,17 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
16531
16900
|
};
|
|
16532
16901
|
};
|
|
16533
16902
|
readonly 403: {
|
|
16534
|
-
readonly description: "Forbidden - User lacks workspace access or
|
|
16903
|
+
readonly description: "Forbidden - User lacks workspace access, or user lacks write access to crm::services resource.";
|
|
16904
|
+
readonly content: {
|
|
16905
|
+
readonly "application/json": {
|
|
16906
|
+
readonly schema: {
|
|
16907
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
16908
|
+
};
|
|
16909
|
+
};
|
|
16910
|
+
};
|
|
16911
|
+
};
|
|
16912
|
+
readonly 404: {
|
|
16913
|
+
readonly description: "Workspace, tag, or service not found.";
|
|
16535
16914
|
readonly content: {
|
|
16536
16915
|
readonly "application/json": {
|
|
16537
16916
|
readonly schema: {
|
|
@@ -16543,29 +16922,181 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
16543
16922
|
};
|
|
16544
16923
|
};
|
|
16545
16924
|
};
|
|
16546
|
-
readonly "/
|
|
16547
|
-
readonly
|
|
16925
|
+
readonly "/tags/remove-from-task": {
|
|
16926
|
+
readonly post: {
|
|
16548
16927
|
readonly tags: readonly [
|
|
16549
|
-
"
|
|
16928
|
+
"Tags"
|
|
16550
16929
|
];
|
|
16551
|
-
readonly summary: "
|
|
16552
|
-
readonly description: "
|
|
16930
|
+
readonly summary: "Remove a tag from a task";
|
|
16931
|
+
readonly description: "Unlinks a tag from a task. Requires workspace access and write access to crm::tasks resource.";
|
|
16553
16932
|
readonly security: readonly [
|
|
16554
16933
|
never
|
|
16555
16934
|
];
|
|
16556
|
-
readonly
|
|
16557
|
-
|
|
16558
|
-
|
|
16559
|
-
readonly
|
|
16560
|
-
|
|
16561
|
-
|
|
16562
|
-
|
|
16563
|
-
|
|
16564
|
-
|
|
16565
|
-
|
|
16566
|
-
|
|
16567
|
-
|
|
16568
|
-
|
|
16935
|
+
readonly requestBody: {
|
|
16936
|
+
readonly required: true;
|
|
16937
|
+
readonly content: {
|
|
16938
|
+
readonly "application/json": {
|
|
16939
|
+
readonly schema: {
|
|
16940
|
+
readonly type: "object";
|
|
16941
|
+
readonly required: readonly [
|
|
16942
|
+
"workspace",
|
|
16943
|
+
"taskId",
|
|
16944
|
+
"tagId"
|
|
16945
|
+
];
|
|
16946
|
+
readonly properties: {
|
|
16947
|
+
readonly workspace: {
|
|
16948
|
+
readonly type: "string";
|
|
16949
|
+
readonly format: "uuid";
|
|
16950
|
+
readonly description: "Workspace identifier.";
|
|
16951
|
+
};
|
|
16952
|
+
readonly taskId: {
|
|
16953
|
+
readonly type: "string";
|
|
16954
|
+
readonly format: "uuid";
|
|
16955
|
+
readonly description: "Task identifier.";
|
|
16956
|
+
};
|
|
16957
|
+
readonly tagId: {
|
|
16958
|
+
readonly type: "string";
|
|
16959
|
+
readonly format: "uuid";
|
|
16960
|
+
readonly description: "Tag identifier.";
|
|
16961
|
+
};
|
|
16962
|
+
};
|
|
16963
|
+
};
|
|
16964
|
+
};
|
|
16965
|
+
};
|
|
16966
|
+
};
|
|
16967
|
+
readonly responses: {
|
|
16968
|
+
readonly 200: {
|
|
16969
|
+
readonly description: "Tag removed from task successfully.";
|
|
16970
|
+
readonly content: {
|
|
16971
|
+
readonly "application/json": {
|
|
16972
|
+
readonly schema: {
|
|
16973
|
+
readonly $ref: "#/components/schemas/SimpleSuccess";
|
|
16974
|
+
};
|
|
16975
|
+
};
|
|
16976
|
+
};
|
|
16977
|
+
};
|
|
16978
|
+
readonly 400: {
|
|
16979
|
+
readonly description: "Invalid request payload.";
|
|
16980
|
+
readonly content: {
|
|
16981
|
+
readonly "application/json": {
|
|
16982
|
+
readonly schema: {
|
|
16983
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
16984
|
+
};
|
|
16985
|
+
};
|
|
16986
|
+
};
|
|
16987
|
+
};
|
|
16988
|
+
readonly 401: {
|
|
16989
|
+
readonly description: "Unauthorized - Missing or invalid access token.";
|
|
16990
|
+
readonly content: {
|
|
16991
|
+
readonly "application/json": {
|
|
16992
|
+
readonly schema: {
|
|
16993
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
16994
|
+
};
|
|
16995
|
+
};
|
|
16996
|
+
};
|
|
16997
|
+
};
|
|
16998
|
+
readonly 403: {
|
|
16999
|
+
readonly description: "Forbidden - User lacks workspace access, or user lacks write access to crm::tasks resource.";
|
|
17000
|
+
readonly content: {
|
|
17001
|
+
readonly "application/json": {
|
|
17002
|
+
readonly schema: {
|
|
17003
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
17004
|
+
};
|
|
17005
|
+
};
|
|
17006
|
+
};
|
|
17007
|
+
};
|
|
17008
|
+
readonly 404: {
|
|
17009
|
+
readonly description: "Tag or task not found.";
|
|
17010
|
+
readonly content: {
|
|
17011
|
+
readonly "application/json": {
|
|
17012
|
+
readonly schema: {
|
|
17013
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
17014
|
+
};
|
|
17015
|
+
};
|
|
17016
|
+
};
|
|
17017
|
+
};
|
|
17018
|
+
};
|
|
17019
|
+
};
|
|
17020
|
+
};
|
|
17021
|
+
readonly "/freason/list/{workspace}": {
|
|
17022
|
+
readonly get: {
|
|
17023
|
+
readonly tags: readonly [
|
|
17024
|
+
"Failure Reasons"
|
|
17025
|
+
];
|
|
17026
|
+
readonly summary: "List failure reasons by workspace";
|
|
17027
|
+
readonly description: "Returns all failure reasons for the given workspace. Requires workspace access and read access to crm::tasks.";
|
|
17028
|
+
readonly security: readonly [
|
|
17029
|
+
never
|
|
17030
|
+
];
|
|
17031
|
+
readonly parameters: readonly [
|
|
17032
|
+
{
|
|
17033
|
+
readonly name: "workspace";
|
|
17034
|
+
readonly in: "path";
|
|
17035
|
+
readonly required: true;
|
|
17036
|
+
readonly schema: {
|
|
17037
|
+
readonly type: "string";
|
|
17038
|
+
readonly format: "uuid";
|
|
17039
|
+
};
|
|
17040
|
+
readonly description: "Workspace identifier.";
|
|
17041
|
+
}
|
|
17042
|
+
];
|
|
17043
|
+
readonly responses: {
|
|
17044
|
+
readonly 200: {
|
|
17045
|
+
readonly description: "Failure reasons fetched successfully.";
|
|
17046
|
+
readonly content: {
|
|
17047
|
+
readonly "application/json": {
|
|
17048
|
+
readonly schema: {
|
|
17049
|
+
readonly $ref: "#/components/schemas/ListFailureReasonsSuccess";
|
|
17050
|
+
};
|
|
17051
|
+
};
|
|
17052
|
+
};
|
|
17053
|
+
};
|
|
17054
|
+
readonly 401: {
|
|
17055
|
+
readonly description: "Unauthorized - Missing or invalid access token.";
|
|
17056
|
+
readonly content: {
|
|
17057
|
+
readonly "application/json": {
|
|
17058
|
+
readonly schema: {
|
|
17059
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
17060
|
+
};
|
|
17061
|
+
};
|
|
17062
|
+
};
|
|
17063
|
+
};
|
|
17064
|
+
readonly 403: {
|
|
17065
|
+
readonly description: "Forbidden - User lacks workspace access or read access to crm::tasks.";
|
|
17066
|
+
readonly content: {
|
|
17067
|
+
readonly "application/json": {
|
|
17068
|
+
readonly schema: {
|
|
17069
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
17070
|
+
};
|
|
17071
|
+
};
|
|
17072
|
+
};
|
|
17073
|
+
};
|
|
17074
|
+
};
|
|
17075
|
+
};
|
|
17076
|
+
};
|
|
17077
|
+
readonly "/freason/get/{workspace}/{failureReasonId}": {
|
|
17078
|
+
readonly get: {
|
|
17079
|
+
readonly tags: readonly [
|
|
17080
|
+
"Failure Reasons"
|
|
17081
|
+
];
|
|
17082
|
+
readonly summary: "Get a failure reason";
|
|
17083
|
+
readonly description: "Returns a single failure reason by id. Requires workspace access and read access to crm::tasks.";
|
|
17084
|
+
readonly security: readonly [
|
|
17085
|
+
never
|
|
17086
|
+
];
|
|
17087
|
+
readonly parameters: readonly [
|
|
17088
|
+
{
|
|
17089
|
+
readonly name: "workspace";
|
|
17090
|
+
readonly in: "path";
|
|
17091
|
+
readonly required: true;
|
|
17092
|
+
readonly schema: {
|
|
17093
|
+
readonly type: "string";
|
|
17094
|
+
readonly format: "uuid";
|
|
17095
|
+
};
|
|
17096
|
+
readonly description: "Workspace identifier.";
|
|
17097
|
+
},
|
|
17098
|
+
{
|
|
17099
|
+
readonly name: "failureReasonId";
|
|
16569
17100
|
readonly in: "path";
|
|
16570
17101
|
readonly required: true;
|
|
16571
17102
|
readonly schema: {
|
|
@@ -17566,7 +18097,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
17566
18097
|
"Files"
|
|
17567
18098
|
];
|
|
17568
18099
|
readonly summary: "Get workspace storage usage";
|
|
17569
|
-
readonly description: "Returns finalized storage usage broken down by workspace files (`filesBytes`), comment attachments (`commentsBytes`), customer files (`customerBytes`),
|
|
18100
|
+
readonly description: "Returns finalized storage usage broken down by workspace files (`filesBytes`), comment attachments (`commentsBytes`), customer files (`customerBytes`), service files (`servicesBytes`), and finance receipts (`financeBytes`), plus the combined total and plan limit. Temporary `.tmp` objects are excluded. Requires workspace access and read access to crm::files.";
|
|
17570
18101
|
readonly security: readonly [
|
|
17571
18102
|
never
|
|
17572
18103
|
];
|
|
@@ -18597,13 +19128,13 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
18597
19128
|
};
|
|
18598
19129
|
};
|
|
18599
19130
|
};
|
|
18600
|
-
readonly "/files/
|
|
19131
|
+
readonly "/files/upload-to-finance": {
|
|
18601
19132
|
readonly post: {
|
|
18602
19133
|
readonly tags: readonly [
|
|
18603
19134
|
"Files"
|
|
18604
19135
|
];
|
|
18605
|
-
readonly summary: "
|
|
18606
|
-
readonly description: "
|
|
19136
|
+
readonly summary: "Create presigned upload for a finance receipt";
|
|
19137
|
+
readonly description: "Returns a presigned POST for `{workspace}_finance/{transactionId}/{filename}.tmp`. JPEG, PNG, WebP, and PDF files up to 15 MB are supported. The transaction must belong to the workspace. Confirm the upload with `/files/confirm-finance-file`. Requires crm::finance write access and an active billing grant.";
|
|
18607
19138
|
readonly security: readonly [
|
|
18608
19139
|
never
|
|
18609
19140
|
];
|
|
@@ -18612,24 +19143,24 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
18612
19143
|
readonly content: {
|
|
18613
19144
|
readonly "application/json": {
|
|
18614
19145
|
readonly schema: {
|
|
18615
|
-
readonly $ref: "#/components/schemas/
|
|
19146
|
+
readonly $ref: "#/components/schemas/UploadToFinanceRequest";
|
|
18616
19147
|
};
|
|
18617
19148
|
};
|
|
18618
19149
|
};
|
|
18619
19150
|
};
|
|
18620
19151
|
readonly responses: {
|
|
18621
19152
|
readonly 200: {
|
|
18622
|
-
readonly description: "
|
|
19153
|
+
readonly description: "Presigned finance upload created.";
|
|
18623
19154
|
readonly content: {
|
|
18624
19155
|
readonly "application/json": {
|
|
18625
19156
|
readonly schema: {
|
|
18626
|
-
readonly $ref: "#/components/schemas/
|
|
19157
|
+
readonly $ref: "#/components/schemas/UploadToFinanceSuccess";
|
|
18627
19158
|
};
|
|
18628
19159
|
};
|
|
18629
19160
|
};
|
|
18630
19161
|
};
|
|
18631
19162
|
readonly 400: {
|
|
18632
|
-
readonly description: "Invalid
|
|
19163
|
+
readonly description: "Invalid payload.";
|
|
18633
19164
|
readonly content: {
|
|
18634
19165
|
readonly "application/json": {
|
|
18635
19166
|
readonly schema: {
|
|
@@ -18638,8 +19169,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
18638
19169
|
};
|
|
18639
19170
|
};
|
|
18640
19171
|
};
|
|
18641
|
-
readonly
|
|
18642
|
-
readonly description: "
|
|
19172
|
+
readonly 404: {
|
|
19173
|
+
readonly description: "Transaction not found.";
|
|
18643
19174
|
readonly content: {
|
|
18644
19175
|
readonly "application/json": {
|
|
18645
19176
|
readonly schema: {
|
|
@@ -18648,32 +19179,56 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
18648
19179
|
};
|
|
18649
19180
|
};
|
|
18650
19181
|
};
|
|
18651
|
-
|
|
18652
|
-
|
|
19182
|
+
};
|
|
19183
|
+
};
|
|
19184
|
+
};
|
|
19185
|
+
readonly "/files/confirm-finance-file": {
|
|
19186
|
+
readonly post: {
|
|
19187
|
+
readonly tags: readonly [
|
|
19188
|
+
"Files"
|
|
19189
|
+
];
|
|
19190
|
+
readonly summary: "Confirm a finance receipt upload";
|
|
19191
|
+
readonly description: "Validates and promotes `{workspace}_finance/{transactionId}/{filename}.tmp` to its finalized key. Confirmed bytes contribute to `financeBytes`.";
|
|
19192
|
+
readonly security: readonly [
|
|
19193
|
+
never
|
|
19194
|
+
];
|
|
19195
|
+
readonly requestBody: {
|
|
19196
|
+
readonly required: true;
|
|
19197
|
+
readonly content: {
|
|
19198
|
+
readonly "application/json": {
|
|
19199
|
+
readonly schema: {
|
|
19200
|
+
readonly $ref: "#/components/schemas/ConfirmFinanceFileRequest";
|
|
19201
|
+
};
|
|
19202
|
+
};
|
|
19203
|
+
};
|
|
19204
|
+
};
|
|
19205
|
+
readonly responses: {
|
|
19206
|
+
readonly 200: {
|
|
19207
|
+
readonly description: "Finance file confirmed.";
|
|
18653
19208
|
readonly content: {
|
|
18654
19209
|
readonly "application/json": {
|
|
18655
19210
|
readonly schema: {
|
|
18656
|
-
readonly $ref: "#/components/schemas/
|
|
19211
|
+
readonly $ref: "#/components/schemas/ConfirmFileSuccess";
|
|
18657
19212
|
};
|
|
18658
19213
|
};
|
|
18659
19214
|
};
|
|
18660
19215
|
};
|
|
18661
|
-
readonly
|
|
18662
|
-
readonly description: "
|
|
19216
|
+
readonly 400: {
|
|
19217
|
+
readonly description: "Invalid request, missing temporary object, oversized file, or invalid file type.";
|
|
18663
19218
|
readonly content: {
|
|
18664
19219
|
readonly "application/json": {
|
|
18665
19220
|
readonly schema: {
|
|
18666
|
-
readonly $ref: "#/components/schemas/
|
|
19221
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
18667
19222
|
};
|
|
18668
19223
|
};
|
|
18669
19224
|
};
|
|
18670
19225
|
};
|
|
18671
|
-
readonly
|
|
18672
|
-
readonly description: "
|
|
19226
|
+
readonly 404: {
|
|
19227
|
+
readonly description: "Transaction not found.";
|
|
18673
19228
|
readonly content: {
|
|
18674
19229
|
readonly "application/json": {
|
|
18675
19230
|
readonly schema: {
|
|
18676
|
-
readonly $ref: "#/components/schemas/
|
|
19231
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
18677
19232
|
};
|
|
18678
19233
|
};
|
|
18679
19234
|
};
|
|
@@ -18681,13 +19236,13 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
18681
19236
|
};
|
|
18682
19237
|
};
|
|
18683
19238
|
};
|
|
18684
|
-
readonly "/files/download-from-
|
|
19239
|
+
readonly "/files/download-from-finance/{workspace}/{transactionId}": {
|
|
18685
19240
|
readonly get: {
|
|
18686
19241
|
readonly tags: readonly [
|
|
18687
19242
|
"Files"
|
|
18688
19243
|
];
|
|
18689
|
-
readonly summary: "List
|
|
18690
|
-
readonly description: "Lists
|
|
19244
|
+
readonly summary: "List files for a finance transaction";
|
|
19245
|
+
readonly description: "Lists finalized objects under `{workspace}_finance/{transactionId}/`, each with a 5-minute presigned download URL. Requires workspace access and read access to crm::finance.";
|
|
18691
19246
|
readonly security: readonly [
|
|
18692
19247
|
never
|
|
18693
19248
|
];
|
|
@@ -18703,49 +19258,29 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
18703
19258
|
readonly description: "Workspace identifier.";
|
|
18704
19259
|
},
|
|
18705
19260
|
{
|
|
18706
|
-
readonly name: "
|
|
19261
|
+
readonly name: "transactionId";
|
|
18707
19262
|
readonly in: "path";
|
|
18708
19263
|
readonly required: true;
|
|
18709
19264
|
readonly schema: {
|
|
18710
19265
|
readonly type: "string";
|
|
18711
19266
|
readonly format: "uuid";
|
|
18712
19267
|
};
|
|
18713
|
-
readonly description: "
|
|
19268
|
+
readonly description: "Finance transaction identifier.";
|
|
18714
19269
|
}
|
|
18715
19270
|
];
|
|
18716
19271
|
readonly responses: {
|
|
18717
19272
|
readonly 200: {
|
|
18718
|
-
readonly description: "
|
|
18719
|
-
readonly content: {
|
|
18720
|
-
readonly "application/json": {
|
|
18721
|
-
readonly schema: {
|
|
18722
|
-
readonly $ref: "#/components/schemas/ListTaskCommentFilesSuccess";
|
|
18723
|
-
};
|
|
18724
|
-
};
|
|
18725
|
-
};
|
|
18726
|
-
};
|
|
18727
|
-
readonly 400: {
|
|
18728
|
-
readonly description: "Invalid workspace or task id.";
|
|
18729
|
-
readonly content: {
|
|
18730
|
-
readonly "application/json": {
|
|
18731
|
-
readonly schema: {
|
|
18732
|
-
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
18733
|
-
};
|
|
18734
|
-
};
|
|
18735
|
-
};
|
|
18736
|
-
};
|
|
18737
|
-
readonly 401: {
|
|
18738
|
-
readonly description: "Unauthorized - Missing or invalid access token.";
|
|
19273
|
+
readonly description: "Finance files listed.";
|
|
18739
19274
|
readonly content: {
|
|
18740
19275
|
readonly "application/json": {
|
|
18741
19276
|
readonly schema: {
|
|
18742
|
-
readonly $ref: "#/components/schemas/
|
|
19277
|
+
readonly $ref: "#/components/schemas/ListFinanceFilesSuccess";
|
|
18743
19278
|
};
|
|
18744
19279
|
};
|
|
18745
19280
|
};
|
|
18746
19281
|
};
|
|
18747
19282
|
readonly 403: {
|
|
18748
|
-
readonly description: "
|
|
19283
|
+
readonly description: "Workspace or finance read access is missing.";
|
|
18749
19284
|
readonly content: {
|
|
18750
19285
|
readonly "application/json": {
|
|
18751
19286
|
readonly schema: {
|
|
@@ -18755,7 +19290,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
18755
19290
|
};
|
|
18756
19291
|
};
|
|
18757
19292
|
readonly 404: {
|
|
18758
|
-
readonly description: "
|
|
19293
|
+
readonly description: "Transaction not found.";
|
|
18759
19294
|
readonly content: {
|
|
18760
19295
|
readonly "application/json": {
|
|
18761
19296
|
readonly schema: {
|
|
@@ -18767,13 +19302,13 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
18767
19302
|
};
|
|
18768
19303
|
};
|
|
18769
19304
|
};
|
|
18770
|
-
readonly "/files/
|
|
19305
|
+
readonly "/files/delete-finance-file": {
|
|
18771
19306
|
readonly post: {
|
|
18772
19307
|
readonly tags: readonly [
|
|
18773
19308
|
"Files"
|
|
18774
19309
|
];
|
|
18775
|
-
readonly summary: "
|
|
18776
|
-
readonly description: "
|
|
19310
|
+
readonly summary: "Delete a finance receipt";
|
|
19311
|
+
readonly description: "Deletes `{workspace}_finance/{transactionId}/{filename}`. Requires workspace access and write access to crm::finance. This deletion remains available for a frozen Free-trial workspace so it can reduce storage before selecting a paid plan.";
|
|
18777
19312
|
readonly security: readonly [
|
|
18778
19313
|
never
|
|
18779
19314
|
];
|
|
@@ -18782,33 +19317,247 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
18782
19317
|
readonly content: {
|
|
18783
19318
|
readonly "application/json": {
|
|
18784
19319
|
readonly schema: {
|
|
18785
|
-
readonly $ref: "#/components/schemas/
|
|
19320
|
+
readonly $ref: "#/components/schemas/DeleteFinanceFileRequest";
|
|
18786
19321
|
};
|
|
18787
19322
|
};
|
|
18788
19323
|
};
|
|
18789
19324
|
};
|
|
18790
19325
|
readonly responses: {
|
|
18791
19326
|
readonly 200: {
|
|
18792
|
-
readonly description: "
|
|
19327
|
+
readonly description: "Finance file deleted.";
|
|
18793
19328
|
readonly content: {
|
|
18794
19329
|
readonly "application/json": {
|
|
18795
19330
|
readonly schema: {
|
|
18796
|
-
readonly
|
|
18797
|
-
{
|
|
18798
|
-
readonly $ref: "#/components/schemas/PresignedUploadSuccess";
|
|
18799
|
-
}
|
|
18800
|
-
];
|
|
18801
|
-
readonly description: "key is `profiles/clients/{userId}/temp`; maxSize is 524288 (0.5 MB).";
|
|
19331
|
+
readonly $ref: "#/components/schemas/DeleteFileSuccess";
|
|
18802
19332
|
};
|
|
18803
19333
|
};
|
|
18804
19334
|
};
|
|
18805
19335
|
};
|
|
18806
|
-
readonly
|
|
18807
|
-
readonly description: "
|
|
19336
|
+
readonly 404: {
|
|
19337
|
+
readonly description: "File or transaction not found.";
|
|
18808
19338
|
readonly content: {
|
|
18809
19339
|
readonly "application/json": {
|
|
18810
19340
|
readonly schema: {
|
|
18811
|
-
readonly $ref: "#/components/schemas/
|
|
19341
|
+
readonly $ref: "#/components/schemas/DeleteFileFailure";
|
|
19342
|
+
};
|
|
19343
|
+
};
|
|
19344
|
+
};
|
|
19345
|
+
};
|
|
19346
|
+
};
|
|
19347
|
+
};
|
|
19348
|
+
};
|
|
19349
|
+
readonly "/files/delete-comment-file": {
|
|
19350
|
+
readonly post: {
|
|
19351
|
+
readonly tags: readonly [
|
|
19352
|
+
"Files"
|
|
19353
|
+
];
|
|
19354
|
+
readonly summary: "Delete a comment attachment";
|
|
19355
|
+
readonly description: "Deletes the S3 object at `{workspace}_comments/{taskId}/{commentId}/{filename}`. Verifies the object exists before deletion and confirms removal afterward. Requires workspace access and write access to crm::tasks. This deletion remains available for a frozen Free-trial workspace so it can reduce storage before selecting a paid plan.";
|
|
19356
|
+
readonly security: readonly [
|
|
19357
|
+
never
|
|
19358
|
+
];
|
|
19359
|
+
readonly requestBody: {
|
|
19360
|
+
readonly required: true;
|
|
19361
|
+
readonly content: {
|
|
19362
|
+
readonly "application/json": {
|
|
19363
|
+
readonly schema: {
|
|
19364
|
+
readonly $ref: "#/components/schemas/DeleteCommentFileRequest";
|
|
19365
|
+
};
|
|
19366
|
+
};
|
|
19367
|
+
};
|
|
19368
|
+
};
|
|
19369
|
+
readonly responses: {
|
|
19370
|
+
readonly 200: {
|
|
19371
|
+
readonly description: "Comment file deleted successfully.";
|
|
19372
|
+
readonly content: {
|
|
19373
|
+
readonly "application/json": {
|
|
19374
|
+
readonly schema: {
|
|
19375
|
+
readonly $ref: "#/components/schemas/DeleteFileSuccess";
|
|
19376
|
+
};
|
|
19377
|
+
};
|
|
19378
|
+
};
|
|
19379
|
+
};
|
|
19380
|
+
readonly 400: {
|
|
19381
|
+
readonly description: "Invalid request payload.";
|
|
19382
|
+
readonly content: {
|
|
19383
|
+
readonly "application/json": {
|
|
19384
|
+
readonly schema: {
|
|
19385
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
19386
|
+
};
|
|
19387
|
+
};
|
|
19388
|
+
};
|
|
19389
|
+
};
|
|
19390
|
+
readonly 401: {
|
|
19391
|
+
readonly description: "Unauthorized - Missing or invalid access token.";
|
|
19392
|
+
readonly content: {
|
|
19393
|
+
readonly "application/json": {
|
|
19394
|
+
readonly schema: {
|
|
19395
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
19396
|
+
};
|
|
19397
|
+
};
|
|
19398
|
+
};
|
|
19399
|
+
};
|
|
19400
|
+
readonly 403: {
|
|
19401
|
+
readonly description: "Forbidden - User lacks workspace access, or user lacks write access to crm::tasks.";
|
|
19402
|
+
readonly content: {
|
|
19403
|
+
readonly "application/json": {
|
|
19404
|
+
readonly schema: {
|
|
19405
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
19406
|
+
};
|
|
19407
|
+
};
|
|
19408
|
+
};
|
|
19409
|
+
};
|
|
19410
|
+
readonly 404: {
|
|
19411
|
+
readonly description: "File not found at the given comment attachment key.";
|
|
19412
|
+
readonly content: {
|
|
19413
|
+
readonly "application/json": {
|
|
19414
|
+
readonly schema: {
|
|
19415
|
+
readonly $ref: "#/components/schemas/DeleteFileFailure";
|
|
19416
|
+
};
|
|
19417
|
+
};
|
|
19418
|
+
};
|
|
19419
|
+
};
|
|
19420
|
+
readonly 500: {
|
|
19421
|
+
readonly description: "Delete command ran but the object still exists.";
|
|
19422
|
+
readonly content: {
|
|
19423
|
+
readonly "application/json": {
|
|
19424
|
+
readonly schema: {
|
|
19425
|
+
readonly $ref: "#/components/schemas/DeleteFileFailure";
|
|
19426
|
+
};
|
|
19427
|
+
};
|
|
19428
|
+
};
|
|
19429
|
+
};
|
|
19430
|
+
};
|
|
19431
|
+
};
|
|
19432
|
+
};
|
|
19433
|
+
readonly "/files/download-from-task/{workspace}/{taskId}": {
|
|
19434
|
+
readonly get: {
|
|
19435
|
+
readonly tags: readonly [
|
|
19436
|
+
"Files"
|
|
19437
|
+
];
|
|
19438
|
+
readonly summary: "List comment files for a task";
|
|
19439
|
+
readonly description: "Lists all comment attachment objects under `{workspace}_comments/{taskId}/` and returns each with a 5-minute presigned download URL. Requires workspace access and read access to crm::tasks.";
|
|
19440
|
+
readonly security: readonly [
|
|
19441
|
+
never
|
|
19442
|
+
];
|
|
19443
|
+
readonly parameters: readonly [
|
|
19444
|
+
{
|
|
19445
|
+
readonly name: "workspace";
|
|
19446
|
+
readonly in: "path";
|
|
19447
|
+
readonly required: true;
|
|
19448
|
+
readonly schema: {
|
|
19449
|
+
readonly type: "string";
|
|
19450
|
+
readonly format: "uuid";
|
|
19451
|
+
};
|
|
19452
|
+
readonly description: "Workspace identifier.";
|
|
19453
|
+
},
|
|
19454
|
+
{
|
|
19455
|
+
readonly name: "taskId";
|
|
19456
|
+
readonly in: "path";
|
|
19457
|
+
readonly required: true;
|
|
19458
|
+
readonly schema: {
|
|
19459
|
+
readonly type: "string";
|
|
19460
|
+
readonly format: "uuid";
|
|
19461
|
+
};
|
|
19462
|
+
readonly description: "Task identifier whose comment attachments are listed.";
|
|
19463
|
+
}
|
|
19464
|
+
];
|
|
19465
|
+
readonly responses: {
|
|
19466
|
+
readonly 200: {
|
|
19467
|
+
readonly description: "Task comment files listed successfully.";
|
|
19468
|
+
readonly content: {
|
|
19469
|
+
readonly "application/json": {
|
|
19470
|
+
readonly schema: {
|
|
19471
|
+
readonly $ref: "#/components/schemas/ListTaskCommentFilesSuccess";
|
|
19472
|
+
};
|
|
19473
|
+
};
|
|
19474
|
+
};
|
|
19475
|
+
};
|
|
19476
|
+
readonly 400: {
|
|
19477
|
+
readonly description: "Invalid workspace or task id.";
|
|
19478
|
+
readonly content: {
|
|
19479
|
+
readonly "application/json": {
|
|
19480
|
+
readonly schema: {
|
|
19481
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
19482
|
+
};
|
|
19483
|
+
};
|
|
19484
|
+
};
|
|
19485
|
+
};
|
|
19486
|
+
readonly 401: {
|
|
19487
|
+
readonly description: "Unauthorized - Missing or invalid access token.";
|
|
19488
|
+
readonly content: {
|
|
19489
|
+
readonly "application/json": {
|
|
19490
|
+
readonly schema: {
|
|
19491
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
19492
|
+
};
|
|
19493
|
+
};
|
|
19494
|
+
};
|
|
19495
|
+
};
|
|
19496
|
+
readonly 403: {
|
|
19497
|
+
readonly description: "Forbidden - User lacks workspace access, or user lacks read access to crm::tasks.";
|
|
19498
|
+
readonly content: {
|
|
19499
|
+
readonly "application/json": {
|
|
19500
|
+
readonly schema: {
|
|
19501
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
19502
|
+
};
|
|
19503
|
+
};
|
|
19504
|
+
};
|
|
19505
|
+
};
|
|
19506
|
+
readonly 404: {
|
|
19507
|
+
readonly description: "Workspace not found.";
|
|
19508
|
+
readonly content: {
|
|
19509
|
+
readonly "application/json": {
|
|
19510
|
+
readonly schema: {
|
|
19511
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
19512
|
+
};
|
|
19513
|
+
};
|
|
19514
|
+
};
|
|
19515
|
+
};
|
|
19516
|
+
};
|
|
19517
|
+
};
|
|
19518
|
+
};
|
|
19519
|
+
readonly "/files/upload-profile-picture": {
|
|
19520
|
+
readonly post: {
|
|
19521
|
+
readonly tags: readonly [
|
|
19522
|
+
"Files"
|
|
19523
|
+
];
|
|
19524
|
+
readonly summary: "Create presigned upload for profile picture";
|
|
19525
|
+
readonly description: "Returns a presigned POST URL and form fields for uploading a temporary profile picture to `profiles/clients/{userId}/temp` (max 0.5 MB, 5-minute expiry). Accepts JPEG and PNG. After the multipart upload succeeds, call `/files/confirm-profile-picture` to validate, optimize, and persist the image. Requires a valid access token (no workspace policy check).";
|
|
19526
|
+
readonly security: readonly [
|
|
19527
|
+
never
|
|
19528
|
+
];
|
|
19529
|
+
readonly requestBody: {
|
|
19530
|
+
readonly required: true;
|
|
19531
|
+
readonly content: {
|
|
19532
|
+
readonly "application/json": {
|
|
19533
|
+
readonly schema: {
|
|
19534
|
+
readonly $ref: "#/components/schemas/UploadProfilePictureRequest";
|
|
19535
|
+
};
|
|
19536
|
+
};
|
|
19537
|
+
};
|
|
19538
|
+
};
|
|
19539
|
+
readonly responses: {
|
|
19540
|
+
readonly 200: {
|
|
19541
|
+
readonly description: "Presigned profile picture upload created.";
|
|
19542
|
+
readonly content: {
|
|
19543
|
+
readonly "application/json": {
|
|
19544
|
+
readonly schema: {
|
|
19545
|
+
readonly allOf: readonly [
|
|
19546
|
+
{
|
|
19547
|
+
readonly $ref: "#/components/schemas/PresignedUploadSuccess";
|
|
19548
|
+
}
|
|
19549
|
+
];
|
|
19550
|
+
readonly description: "key is `profiles/clients/{userId}/temp`; maxSize is 524288 (0.5 MB).";
|
|
19551
|
+
};
|
|
19552
|
+
};
|
|
19553
|
+
};
|
|
19554
|
+
};
|
|
19555
|
+
readonly 400: {
|
|
19556
|
+
readonly description: "Invalid request payload or unsupported content type.";
|
|
19557
|
+
readonly content: {
|
|
19558
|
+
readonly "application/json": {
|
|
19559
|
+
readonly schema: {
|
|
19560
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
18812
19561
|
};
|
|
18813
19562
|
};
|
|
18814
19563
|
};
|
|
@@ -19834,26 +20583,490 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
19834
20583
|
readonly type: "string";
|
|
19835
20584
|
readonly format: "uuid";
|
|
19836
20585
|
};
|
|
19837
|
-
readonly workspace: {
|
|
20586
|
+
readonly workspace: {
|
|
20587
|
+
readonly type: "string";
|
|
20588
|
+
readonly format: "uuid";
|
|
20589
|
+
};
|
|
20590
|
+
readonly name: {
|
|
20591
|
+
readonly type: "string";
|
|
20592
|
+
};
|
|
20593
|
+
readonly cardColor: {
|
|
20594
|
+
readonly type: "string";
|
|
20595
|
+
};
|
|
20596
|
+
readonly currency: {
|
|
20597
|
+
readonly type: "string";
|
|
20598
|
+
readonly enum: readonly [
|
|
20599
|
+
"ruble",
|
|
20600
|
+
"dollar",
|
|
20601
|
+
"euro"
|
|
20602
|
+
];
|
|
20603
|
+
};
|
|
20604
|
+
readonly openingBalance: {
|
|
20605
|
+
readonly type: "number";
|
|
20606
|
+
};
|
|
20607
|
+
};
|
|
20608
|
+
};
|
|
20609
|
+
};
|
|
20610
|
+
};
|
|
20611
|
+
};
|
|
20612
|
+
readonly responses: {
|
|
20613
|
+
readonly 200: {
|
|
20614
|
+
readonly description: "Account updated successfully.";
|
|
20615
|
+
readonly content: {
|
|
20616
|
+
readonly "application/json": {
|
|
20617
|
+
readonly schema: {
|
|
20618
|
+
readonly $ref: "#/components/schemas/FinanceAccountSuccess";
|
|
20619
|
+
};
|
|
20620
|
+
};
|
|
20621
|
+
};
|
|
20622
|
+
};
|
|
20623
|
+
readonly 400: {
|
|
20624
|
+
readonly description: "Invalid request payload.";
|
|
20625
|
+
readonly content: {
|
|
20626
|
+
readonly "application/json": {
|
|
20627
|
+
readonly schema: {
|
|
20628
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
20629
|
+
};
|
|
20630
|
+
};
|
|
20631
|
+
};
|
|
20632
|
+
};
|
|
20633
|
+
readonly 401: {
|
|
20634
|
+
readonly description: "Unauthorized.";
|
|
20635
|
+
readonly content: {
|
|
20636
|
+
readonly "application/json": {
|
|
20637
|
+
readonly schema: {
|
|
20638
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
20639
|
+
};
|
|
20640
|
+
};
|
|
20641
|
+
};
|
|
20642
|
+
};
|
|
20643
|
+
readonly 403: {
|
|
20644
|
+
readonly description: "Forbidden - missing workspace or crm::finance write access.";
|
|
20645
|
+
readonly content: {
|
|
20646
|
+
readonly "application/json": {
|
|
20647
|
+
readonly schema: {
|
|
20648
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
20649
|
+
};
|
|
20650
|
+
};
|
|
20651
|
+
};
|
|
20652
|
+
};
|
|
20653
|
+
readonly 404: {
|
|
20654
|
+
readonly description: "Account not found.";
|
|
20655
|
+
readonly content: {
|
|
20656
|
+
readonly "application/json": {
|
|
20657
|
+
readonly schema: {
|
|
20658
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
20659
|
+
};
|
|
20660
|
+
};
|
|
20661
|
+
};
|
|
20662
|
+
};
|
|
20663
|
+
};
|
|
20664
|
+
};
|
|
20665
|
+
};
|
|
20666
|
+
readonly "/finance/accounts/reorder": {
|
|
20667
|
+
readonly post: {
|
|
20668
|
+
readonly tags: readonly [
|
|
20669
|
+
"Finance"
|
|
20670
|
+
];
|
|
20671
|
+
readonly summary: "Reorder finance accounts";
|
|
20672
|
+
readonly description: "Sets display order to 1..n from the given accountIds list. The list must contain every workspace account exactly once. Requires crm::finance write access.";
|
|
20673
|
+
readonly security: readonly [
|
|
20674
|
+
never
|
|
20675
|
+
];
|
|
20676
|
+
readonly requestBody: {
|
|
20677
|
+
readonly required: true;
|
|
20678
|
+
readonly content: {
|
|
20679
|
+
readonly "application/json": {
|
|
20680
|
+
readonly schema: {
|
|
20681
|
+
readonly type: "object";
|
|
20682
|
+
readonly required: readonly [
|
|
20683
|
+
"workspace",
|
|
20684
|
+
"accountIds"
|
|
20685
|
+
];
|
|
20686
|
+
readonly properties: {
|
|
20687
|
+
readonly workspace: {
|
|
20688
|
+
readonly type: "string";
|
|
20689
|
+
readonly format: "uuid";
|
|
20690
|
+
};
|
|
20691
|
+
readonly accountIds: {
|
|
20692
|
+
readonly type: "array";
|
|
20693
|
+
readonly items: {
|
|
20694
|
+
readonly type: "string";
|
|
20695
|
+
readonly format: "uuid";
|
|
20696
|
+
};
|
|
20697
|
+
readonly minItems: 1;
|
|
20698
|
+
};
|
|
20699
|
+
};
|
|
20700
|
+
};
|
|
20701
|
+
};
|
|
20702
|
+
};
|
|
20703
|
+
};
|
|
20704
|
+
readonly responses: {
|
|
20705
|
+
readonly 200: {
|
|
20706
|
+
readonly description: "Accounts reordered successfully.";
|
|
20707
|
+
readonly content: {
|
|
20708
|
+
readonly "application/json": {
|
|
20709
|
+
readonly schema: {
|
|
20710
|
+
readonly $ref: "#/components/schemas/ListFinanceAccountsSuccess";
|
|
20711
|
+
};
|
|
20712
|
+
};
|
|
20713
|
+
};
|
|
20714
|
+
};
|
|
20715
|
+
readonly 400: {
|
|
20716
|
+
readonly description: "Invalid request payload or incomplete accountIds list.";
|
|
20717
|
+
readonly content: {
|
|
20718
|
+
readonly "application/json": {
|
|
20719
|
+
readonly schema: {
|
|
20720
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
20721
|
+
};
|
|
20722
|
+
};
|
|
20723
|
+
};
|
|
20724
|
+
};
|
|
20725
|
+
readonly 401: {
|
|
20726
|
+
readonly description: "Unauthorized.";
|
|
20727
|
+
readonly content: {
|
|
20728
|
+
readonly "application/json": {
|
|
20729
|
+
readonly schema: {
|
|
20730
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
20731
|
+
};
|
|
20732
|
+
};
|
|
20733
|
+
};
|
|
20734
|
+
};
|
|
20735
|
+
readonly 403: {
|
|
20736
|
+
readonly description: "Forbidden - missing workspace or crm::finance write access.";
|
|
20737
|
+
readonly content: {
|
|
20738
|
+
readonly "application/json": {
|
|
20739
|
+
readonly schema: {
|
|
20740
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
20741
|
+
};
|
|
20742
|
+
};
|
|
20743
|
+
};
|
|
20744
|
+
};
|
|
20745
|
+
};
|
|
20746
|
+
};
|
|
20747
|
+
};
|
|
20748
|
+
readonly "/finance/accounts/delete": {
|
|
20749
|
+
readonly post: {
|
|
20750
|
+
readonly tags: readonly [
|
|
20751
|
+
"Finance"
|
|
20752
|
+
];
|
|
20753
|
+
readonly summary: "Delete a finance account";
|
|
20754
|
+
readonly description: "Deletes an account and compact remaining display orders. Requires crm::finance write access. Available in frozen Free-trial workspaces.";
|
|
20755
|
+
readonly security: readonly [
|
|
20756
|
+
never
|
|
20757
|
+
];
|
|
20758
|
+
readonly requestBody: {
|
|
20759
|
+
readonly required: true;
|
|
20760
|
+
readonly content: {
|
|
20761
|
+
readonly "application/json": {
|
|
20762
|
+
readonly schema: {
|
|
20763
|
+
readonly type: "object";
|
|
20764
|
+
readonly required: readonly [
|
|
20765
|
+
"accountId",
|
|
20766
|
+
"workspace"
|
|
20767
|
+
];
|
|
20768
|
+
readonly properties: {
|
|
20769
|
+
readonly accountId: {
|
|
20770
|
+
readonly type: "string";
|
|
20771
|
+
readonly format: "uuid";
|
|
20772
|
+
};
|
|
20773
|
+
readonly workspace: {
|
|
20774
|
+
readonly type: "string";
|
|
20775
|
+
readonly format: "uuid";
|
|
20776
|
+
};
|
|
20777
|
+
};
|
|
20778
|
+
};
|
|
20779
|
+
};
|
|
20780
|
+
};
|
|
20781
|
+
};
|
|
20782
|
+
readonly responses: {
|
|
20783
|
+
readonly 200: {
|
|
20784
|
+
readonly description: "Account deleted successfully.";
|
|
20785
|
+
readonly content: {
|
|
20786
|
+
readonly "application/json": {
|
|
20787
|
+
readonly schema: {
|
|
20788
|
+
readonly $ref: "#/components/schemas/SimpleSuccess";
|
|
20789
|
+
};
|
|
20790
|
+
};
|
|
20791
|
+
};
|
|
20792
|
+
};
|
|
20793
|
+
readonly 400: {
|
|
20794
|
+
readonly description: "Invalid request payload.";
|
|
20795
|
+
readonly content: {
|
|
20796
|
+
readonly "application/json": {
|
|
20797
|
+
readonly schema: {
|
|
20798
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
20799
|
+
};
|
|
20800
|
+
};
|
|
20801
|
+
};
|
|
20802
|
+
};
|
|
20803
|
+
readonly 401: {
|
|
20804
|
+
readonly description: "Unauthorized.";
|
|
20805
|
+
readonly content: {
|
|
20806
|
+
readonly "application/json": {
|
|
20807
|
+
readonly schema: {
|
|
20808
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
20809
|
+
};
|
|
20810
|
+
};
|
|
20811
|
+
};
|
|
20812
|
+
};
|
|
20813
|
+
readonly 403: {
|
|
20814
|
+
readonly description: "Forbidden - missing workspace or crm::finance write access.";
|
|
20815
|
+
readonly content: {
|
|
20816
|
+
readonly "application/json": {
|
|
20817
|
+
readonly schema: {
|
|
20818
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
20819
|
+
};
|
|
20820
|
+
};
|
|
20821
|
+
};
|
|
20822
|
+
};
|
|
20823
|
+
readonly 404: {
|
|
20824
|
+
readonly description: "Account not found.";
|
|
20825
|
+
readonly content: {
|
|
20826
|
+
readonly "application/json": {
|
|
20827
|
+
readonly schema: {
|
|
20828
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
20829
|
+
};
|
|
20830
|
+
};
|
|
20831
|
+
};
|
|
20832
|
+
};
|
|
20833
|
+
};
|
|
20834
|
+
};
|
|
20835
|
+
};
|
|
20836
|
+
readonly "/finance/transactions/list/{workspace}": {
|
|
20837
|
+
readonly get: {
|
|
20838
|
+
readonly tags: readonly [
|
|
20839
|
+
"Finance"
|
|
20840
|
+
];
|
|
20841
|
+
readonly summary: "List finance transactions";
|
|
20842
|
+
readonly description: "Returns workspace finance transactions newest first. Optional `accountId` matches source or destination account; optional `type` filters by transaction type. Requires crm::finance read access.";
|
|
20843
|
+
readonly security: readonly [
|
|
20844
|
+
never
|
|
20845
|
+
];
|
|
20846
|
+
readonly parameters: readonly [
|
|
20847
|
+
{
|
|
20848
|
+
readonly name: "workspace";
|
|
20849
|
+
readonly in: "path";
|
|
20850
|
+
readonly required: true;
|
|
20851
|
+
readonly schema: {
|
|
20852
|
+
readonly type: "string";
|
|
20853
|
+
readonly format: "uuid";
|
|
20854
|
+
};
|
|
20855
|
+
},
|
|
20856
|
+
{
|
|
20857
|
+
readonly name: "accountId";
|
|
20858
|
+
readonly in: "query";
|
|
20859
|
+
readonly required: false;
|
|
20860
|
+
readonly schema: {
|
|
20861
|
+
readonly type: "string";
|
|
20862
|
+
readonly format: "uuid";
|
|
20863
|
+
};
|
|
20864
|
+
},
|
|
20865
|
+
{
|
|
20866
|
+
readonly name: "type";
|
|
20867
|
+
readonly in: "query";
|
|
20868
|
+
readonly required: false;
|
|
20869
|
+
readonly schema: {
|
|
20870
|
+
readonly type: "string";
|
|
20871
|
+
readonly enum: readonly [
|
|
20872
|
+
"refund",
|
|
20873
|
+
"income",
|
|
20874
|
+
"expense",
|
|
20875
|
+
"transfer"
|
|
20876
|
+
];
|
|
20877
|
+
};
|
|
20878
|
+
}
|
|
20879
|
+
];
|
|
20880
|
+
readonly responses: {
|
|
20881
|
+
readonly 200: {
|
|
20882
|
+
readonly description: "Transactions fetched successfully.";
|
|
20883
|
+
readonly content: {
|
|
20884
|
+
readonly "application/json": {
|
|
20885
|
+
readonly schema: {
|
|
20886
|
+
readonly $ref: "#/components/schemas/ListFinanceTransactionsSuccess";
|
|
20887
|
+
};
|
|
20888
|
+
};
|
|
20889
|
+
};
|
|
20890
|
+
};
|
|
20891
|
+
readonly 400: {
|
|
20892
|
+
readonly description: "Invalid query.";
|
|
20893
|
+
readonly content: {
|
|
20894
|
+
readonly "application/json": {
|
|
20895
|
+
readonly schema: {
|
|
20896
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
20897
|
+
};
|
|
20898
|
+
};
|
|
20899
|
+
};
|
|
20900
|
+
};
|
|
20901
|
+
readonly 401: {
|
|
20902
|
+
readonly description: "Unauthorized.";
|
|
20903
|
+
readonly content: {
|
|
20904
|
+
readonly "application/json": {
|
|
20905
|
+
readonly schema: {
|
|
20906
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
20907
|
+
};
|
|
20908
|
+
};
|
|
20909
|
+
};
|
|
20910
|
+
};
|
|
20911
|
+
readonly 403: {
|
|
20912
|
+
readonly description: "Forbidden - missing workspace or crm::finance access.";
|
|
20913
|
+
readonly content: {
|
|
20914
|
+
readonly "application/json": {
|
|
20915
|
+
readonly schema: {
|
|
20916
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
20917
|
+
};
|
|
20918
|
+
};
|
|
20919
|
+
};
|
|
20920
|
+
};
|
|
20921
|
+
};
|
|
20922
|
+
};
|
|
20923
|
+
};
|
|
20924
|
+
readonly "/finance/transactions/get/{workspace}/{transactionId}": {
|
|
20925
|
+
readonly get: {
|
|
20926
|
+
readonly tags: readonly [
|
|
20927
|
+
"Finance"
|
|
20928
|
+
];
|
|
20929
|
+
readonly summary: "Get a finance transaction";
|
|
20930
|
+
readonly description: "Returns a single finance transaction. Requires crm::finance read access.";
|
|
20931
|
+
readonly security: readonly [
|
|
20932
|
+
never
|
|
20933
|
+
];
|
|
20934
|
+
readonly parameters: readonly [
|
|
20935
|
+
{
|
|
20936
|
+
readonly name: "workspace";
|
|
20937
|
+
readonly in: "path";
|
|
20938
|
+
readonly required: true;
|
|
20939
|
+
readonly schema: {
|
|
20940
|
+
readonly type: "string";
|
|
20941
|
+
readonly format: "uuid";
|
|
20942
|
+
};
|
|
20943
|
+
},
|
|
20944
|
+
{
|
|
20945
|
+
readonly name: "transactionId";
|
|
20946
|
+
readonly in: "path";
|
|
20947
|
+
readonly required: true;
|
|
20948
|
+
readonly schema: {
|
|
20949
|
+
readonly type: "string";
|
|
20950
|
+
readonly format: "uuid";
|
|
20951
|
+
};
|
|
20952
|
+
}
|
|
20953
|
+
];
|
|
20954
|
+
readonly responses: {
|
|
20955
|
+
readonly 200: {
|
|
20956
|
+
readonly description: "Transaction fetched successfully.";
|
|
20957
|
+
readonly content: {
|
|
20958
|
+
readonly "application/json": {
|
|
20959
|
+
readonly schema: {
|
|
20960
|
+
readonly $ref: "#/components/schemas/FinanceTransactionSuccess";
|
|
20961
|
+
};
|
|
20962
|
+
};
|
|
20963
|
+
};
|
|
20964
|
+
};
|
|
20965
|
+
readonly 401: {
|
|
20966
|
+
readonly description: "Unauthorized.";
|
|
20967
|
+
readonly content: {
|
|
20968
|
+
readonly "application/json": {
|
|
20969
|
+
readonly schema: {
|
|
20970
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
20971
|
+
};
|
|
20972
|
+
};
|
|
20973
|
+
};
|
|
20974
|
+
};
|
|
20975
|
+
readonly 403: {
|
|
20976
|
+
readonly description: "Forbidden - missing workspace or crm::finance access.";
|
|
20977
|
+
readonly content: {
|
|
20978
|
+
readonly "application/json": {
|
|
20979
|
+
readonly schema: {
|
|
20980
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
20981
|
+
};
|
|
20982
|
+
};
|
|
20983
|
+
};
|
|
20984
|
+
};
|
|
20985
|
+
readonly 404: {
|
|
20986
|
+
readonly description: "Transaction not found.";
|
|
20987
|
+
readonly content: {
|
|
20988
|
+
readonly "application/json": {
|
|
20989
|
+
readonly schema: {
|
|
20990
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
20991
|
+
};
|
|
20992
|
+
};
|
|
20993
|
+
};
|
|
20994
|
+
};
|
|
20995
|
+
};
|
|
20996
|
+
};
|
|
20997
|
+
};
|
|
20998
|
+
readonly "/finance/transactions/create": {
|
|
20999
|
+
readonly post: {
|
|
21000
|
+
readonly tags: readonly [
|
|
21001
|
+
"Finance"
|
|
21002
|
+
];
|
|
21003
|
+
readonly summary: "Create a finance transaction";
|
|
21004
|
+
readonly description: "Creates a ledger transaction. Transfers require distinct source `accountId` and `destinationAccountId`. Optional customerId/serviceId are validated against the workspace CRM. Opening balances are not rewritten. Requires crm::finance write access.";
|
|
21005
|
+
readonly security: readonly [
|
|
21006
|
+
never
|
|
21007
|
+
];
|
|
21008
|
+
readonly requestBody: {
|
|
21009
|
+
readonly required: true;
|
|
21010
|
+
readonly content: {
|
|
21011
|
+
readonly "application/json": {
|
|
21012
|
+
readonly schema: {
|
|
21013
|
+
readonly type: "object";
|
|
21014
|
+
readonly required: readonly [
|
|
21015
|
+
"workspace",
|
|
21016
|
+
"type",
|
|
21017
|
+
"amount"
|
|
21018
|
+
];
|
|
21019
|
+
readonly properties: {
|
|
21020
|
+
readonly workspace: {
|
|
21021
|
+
readonly type: "string";
|
|
21022
|
+
readonly format: "uuid";
|
|
21023
|
+
};
|
|
21024
|
+
readonly type: {
|
|
21025
|
+
readonly type: "string";
|
|
21026
|
+
readonly enum: readonly [
|
|
21027
|
+
"refund",
|
|
21028
|
+
"income",
|
|
21029
|
+
"expense",
|
|
21030
|
+
"transfer"
|
|
21031
|
+
];
|
|
21032
|
+
};
|
|
21033
|
+
readonly customerId: {
|
|
21034
|
+
readonly type: "string";
|
|
21035
|
+
readonly format: "uuid";
|
|
21036
|
+
};
|
|
21037
|
+
readonly serviceId: {
|
|
19838
21038
|
readonly type: "string";
|
|
19839
21039
|
readonly format: "uuid";
|
|
19840
21040
|
};
|
|
19841
|
-
readonly
|
|
21041
|
+
readonly accountId: {
|
|
19842
21042
|
readonly type: "string";
|
|
21043
|
+
readonly format: "uuid";
|
|
19843
21044
|
};
|
|
19844
|
-
readonly
|
|
21045
|
+
readonly destinationAccountId: {
|
|
19845
21046
|
readonly type: "string";
|
|
21047
|
+
readonly format: "uuid";
|
|
19846
21048
|
};
|
|
19847
|
-
readonly
|
|
21049
|
+
readonly paymentMethod: {
|
|
19848
21050
|
readonly type: "string";
|
|
19849
|
-
readonly enum: readonly [
|
|
19850
|
-
"ruble",
|
|
19851
|
-
"dollar",
|
|
19852
|
-
"euro"
|
|
19853
|
-
];
|
|
19854
21051
|
};
|
|
19855
|
-
readonly
|
|
21052
|
+
readonly amount: {
|
|
19856
21053
|
readonly type: "number";
|
|
21054
|
+
readonly minimum: 0.01;
|
|
21055
|
+
};
|
|
21056
|
+
readonly description: {
|
|
21057
|
+
readonly type: "string";
|
|
21058
|
+
};
|
|
21059
|
+
readonly date: {
|
|
21060
|
+
readonly type: "string";
|
|
21061
|
+
readonly format: "date-time";
|
|
21062
|
+
};
|
|
21063
|
+
readonly vat: {
|
|
21064
|
+
readonly type: "integer";
|
|
21065
|
+
readonly minimum: 0;
|
|
21066
|
+
readonly maximum: 100;
|
|
21067
|
+
};
|
|
21068
|
+
readonly reason: {
|
|
21069
|
+
readonly type: "string";
|
|
19857
21070
|
};
|
|
19858
21071
|
};
|
|
19859
21072
|
};
|
|
@@ -19861,18 +21074,18 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
19861
21074
|
};
|
|
19862
21075
|
};
|
|
19863
21076
|
readonly responses: {
|
|
19864
|
-
readonly
|
|
19865
|
-
readonly description: "
|
|
21077
|
+
readonly 201: {
|
|
21078
|
+
readonly description: "Transaction created successfully.";
|
|
19866
21079
|
readonly content: {
|
|
19867
21080
|
readonly "application/json": {
|
|
19868
21081
|
readonly schema: {
|
|
19869
|
-
readonly $ref: "#/components/schemas/
|
|
21082
|
+
readonly $ref: "#/components/schemas/FinanceTransactionSuccess";
|
|
19870
21083
|
};
|
|
19871
21084
|
};
|
|
19872
21085
|
};
|
|
19873
21086
|
};
|
|
19874
21087
|
readonly 400: {
|
|
19875
|
-
readonly description: "Invalid request payload.";
|
|
21088
|
+
readonly description: "Invalid request payload or transfer pairing.";
|
|
19876
21089
|
readonly content: {
|
|
19877
21090
|
readonly "application/json": {
|
|
19878
21091
|
readonly schema: {
|
|
@@ -19902,7 +21115,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
19902
21115
|
};
|
|
19903
21116
|
};
|
|
19904
21117
|
readonly 404: {
|
|
19905
|
-
readonly description: "Account not found.";
|
|
21118
|
+
readonly description: "Account, customer, or service not found.";
|
|
19906
21119
|
readonly content: {
|
|
19907
21120
|
readonly "application/json": {
|
|
19908
21121
|
readonly schema: {
|
|
@@ -19914,13 +21127,13 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
19914
21127
|
};
|
|
19915
21128
|
};
|
|
19916
21129
|
};
|
|
19917
|
-
readonly "/finance/
|
|
21130
|
+
readonly "/finance/transactions/update": {
|
|
19918
21131
|
readonly post: {
|
|
19919
21132
|
readonly tags: readonly [
|
|
19920
21133
|
"Finance"
|
|
19921
21134
|
];
|
|
19922
|
-
readonly summary: "
|
|
19923
|
-
readonly description: "
|
|
21135
|
+
readonly summary: "Update a finance transaction";
|
|
21136
|
+
readonly description: "Updates transaction fields. Changing type away from transfer clears destinationAccountId. Requires crm::finance write access.";
|
|
19924
21137
|
readonly security: readonly [
|
|
19925
21138
|
never
|
|
19926
21139
|
];
|
|
@@ -19931,21 +21144,64 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
19931
21144
|
readonly schema: {
|
|
19932
21145
|
readonly type: "object";
|
|
19933
21146
|
readonly required: readonly [
|
|
19934
|
-
"
|
|
19935
|
-
"
|
|
21147
|
+
"transactionId",
|
|
21148
|
+
"workspace"
|
|
19936
21149
|
];
|
|
19937
21150
|
readonly properties: {
|
|
21151
|
+
readonly transactionId: {
|
|
21152
|
+
readonly type: "string";
|
|
21153
|
+
readonly format: "uuid";
|
|
21154
|
+
};
|
|
19938
21155
|
readonly workspace: {
|
|
19939
21156
|
readonly type: "string";
|
|
19940
21157
|
readonly format: "uuid";
|
|
19941
21158
|
};
|
|
19942
|
-
readonly
|
|
19943
|
-
readonly type: "
|
|
19944
|
-
readonly
|
|
19945
|
-
|
|
19946
|
-
|
|
19947
|
-
|
|
19948
|
-
|
|
21159
|
+
readonly type: {
|
|
21160
|
+
readonly type: "string";
|
|
21161
|
+
readonly enum: readonly [
|
|
21162
|
+
"refund",
|
|
21163
|
+
"income",
|
|
21164
|
+
"expense",
|
|
21165
|
+
"transfer"
|
|
21166
|
+
];
|
|
21167
|
+
};
|
|
21168
|
+
readonly customerId: {
|
|
21169
|
+
readonly type: "string";
|
|
21170
|
+
readonly format: "uuid";
|
|
21171
|
+
};
|
|
21172
|
+
readonly serviceId: {
|
|
21173
|
+
readonly type: "string";
|
|
21174
|
+
readonly format: "uuid";
|
|
21175
|
+
};
|
|
21176
|
+
readonly accountId: {
|
|
21177
|
+
readonly type: "string";
|
|
21178
|
+
readonly format: "uuid";
|
|
21179
|
+
};
|
|
21180
|
+
readonly destinationAccountId: {
|
|
21181
|
+
readonly type: "string";
|
|
21182
|
+
readonly format: "uuid";
|
|
21183
|
+
};
|
|
21184
|
+
readonly paymentMethod: {
|
|
21185
|
+
readonly type: "string";
|
|
21186
|
+
};
|
|
21187
|
+
readonly amount: {
|
|
21188
|
+
readonly type: "number";
|
|
21189
|
+
readonly minimum: 0.01;
|
|
21190
|
+
};
|
|
21191
|
+
readonly description: {
|
|
21192
|
+
readonly type: "string";
|
|
21193
|
+
};
|
|
21194
|
+
readonly date: {
|
|
21195
|
+
readonly type: "string";
|
|
21196
|
+
readonly format: "date-time";
|
|
21197
|
+
};
|
|
21198
|
+
readonly vat: {
|
|
21199
|
+
readonly type: "integer";
|
|
21200
|
+
readonly minimum: 0;
|
|
21201
|
+
readonly maximum: 100;
|
|
21202
|
+
};
|
|
21203
|
+
readonly reason: {
|
|
21204
|
+
readonly type: "string";
|
|
19949
21205
|
};
|
|
19950
21206
|
};
|
|
19951
21207
|
};
|
|
@@ -19954,17 +21210,17 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
19954
21210
|
};
|
|
19955
21211
|
readonly responses: {
|
|
19956
21212
|
readonly 200: {
|
|
19957
|
-
readonly description: "
|
|
21213
|
+
readonly description: "Transaction updated successfully.";
|
|
19958
21214
|
readonly content: {
|
|
19959
21215
|
readonly "application/json": {
|
|
19960
21216
|
readonly schema: {
|
|
19961
|
-
readonly $ref: "#/components/schemas/
|
|
21217
|
+
readonly $ref: "#/components/schemas/FinanceTransactionSuccess";
|
|
19962
21218
|
};
|
|
19963
21219
|
};
|
|
19964
21220
|
};
|
|
19965
21221
|
};
|
|
19966
21222
|
readonly 400: {
|
|
19967
|
-
readonly description: "Invalid request payload or
|
|
21223
|
+
readonly description: "Invalid request payload or transfer pairing.";
|
|
19968
21224
|
readonly content: {
|
|
19969
21225
|
readonly "application/json": {
|
|
19970
21226
|
readonly schema: {
|
|
@@ -19993,16 +21249,26 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
19993
21249
|
};
|
|
19994
21250
|
};
|
|
19995
21251
|
};
|
|
21252
|
+
readonly 404: {
|
|
21253
|
+
readonly description: "Transaction, account, customer, or service not found.";
|
|
21254
|
+
readonly content: {
|
|
21255
|
+
readonly "application/json": {
|
|
21256
|
+
readonly schema: {
|
|
21257
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
21258
|
+
};
|
|
21259
|
+
};
|
|
21260
|
+
};
|
|
21261
|
+
};
|
|
19996
21262
|
};
|
|
19997
21263
|
};
|
|
19998
21264
|
};
|
|
19999
|
-
readonly "/finance/
|
|
21265
|
+
readonly "/finance/transactions/delete": {
|
|
20000
21266
|
readonly post: {
|
|
20001
21267
|
readonly tags: readonly [
|
|
20002
21268
|
"Finance"
|
|
20003
21269
|
];
|
|
20004
|
-
readonly summary: "Delete a finance
|
|
20005
|
-
readonly description: "Deletes
|
|
21270
|
+
readonly summary: "Delete a finance transaction";
|
|
21271
|
+
readonly description: "Deletes a transaction and its receipt prefix `{workspace}_finance/{transactionId}/`. Requires crm::finance write access. Available in frozen Free-trial workspaces.";
|
|
20006
21272
|
readonly security: readonly [
|
|
20007
21273
|
never
|
|
20008
21274
|
];
|
|
@@ -20013,11 +21279,11 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
20013
21279
|
readonly schema: {
|
|
20014
21280
|
readonly type: "object";
|
|
20015
21281
|
readonly required: readonly [
|
|
20016
|
-
"
|
|
21282
|
+
"transactionId",
|
|
20017
21283
|
"workspace"
|
|
20018
21284
|
];
|
|
20019
21285
|
readonly properties: {
|
|
20020
|
-
readonly
|
|
21286
|
+
readonly transactionId: {
|
|
20021
21287
|
readonly type: "string";
|
|
20022
21288
|
readonly format: "uuid";
|
|
20023
21289
|
};
|
|
@@ -20032,7 +21298,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
20032
21298
|
};
|
|
20033
21299
|
readonly responses: {
|
|
20034
21300
|
readonly 200: {
|
|
20035
|
-
readonly description: "
|
|
21301
|
+
readonly description: "Transaction deleted successfully.";
|
|
20036
21302
|
readonly content: {
|
|
20037
21303
|
readonly "application/json": {
|
|
20038
21304
|
readonly schema: {
|
|
@@ -20072,7 +21338,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
20072
21338
|
};
|
|
20073
21339
|
};
|
|
20074
21340
|
readonly 404: {
|
|
20075
|
-
readonly description: "
|
|
21341
|
+
readonly description: "Transaction not found.";
|
|
20076
21342
|
readonly content: {
|
|
20077
21343
|
readonly "application/json": {
|
|
20078
21344
|
readonly schema: {
|
|
@@ -21607,6 +22873,11 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
21607
22873
|
workspaceId: string;
|
|
21608
22874
|
created_by: string;
|
|
21609
22875
|
comments_count: number;
|
|
22876
|
+
tags: {
|
|
22877
|
+
id: string;
|
|
22878
|
+
name: string;
|
|
22879
|
+
description: string | null;
|
|
22880
|
+
}[];
|
|
21610
22881
|
}[] | undefined;
|
|
21611
22882
|
collaborators: {
|
|
21612
22883
|
id: string;
|
|
@@ -21677,6 +22948,11 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
21677
22948
|
created_by: string;
|
|
21678
22949
|
created_at: string;
|
|
21679
22950
|
comments_count: number;
|
|
22951
|
+
tags: {
|
|
22952
|
+
id: string;
|
|
22953
|
+
name: string;
|
|
22954
|
+
description: string | null;
|
|
22955
|
+
}[];
|
|
21680
22956
|
};
|
|
21681
22957
|
collaborators: {
|
|
21682
22958
|
id: string;
|
|
@@ -21685,6 +22961,11 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
21685
22961
|
profilePicture: string | null;
|
|
21686
22962
|
}[];
|
|
21687
22963
|
customer: {
|
|
22964
|
+
tags: {
|
|
22965
|
+
id: string;
|
|
22966
|
+
name: string;
|
|
22967
|
+
description: string | null;
|
|
22968
|
+
}[];
|
|
21688
22969
|
updated_at: string | null;
|
|
21689
22970
|
deleted_at: string | null;
|
|
21690
22971
|
verified_at: string | null;
|
|
@@ -22302,6 +23583,11 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
22302
23583
|
lastName: string | null;
|
|
22303
23584
|
profilePicture: string | null;
|
|
22304
23585
|
} | null;
|
|
23586
|
+
tags: {
|
|
23587
|
+
id: string;
|
|
23588
|
+
name: string;
|
|
23589
|
+
description: string | null;
|
|
23590
|
+
}[];
|
|
22305
23591
|
updated_at: string | null;
|
|
22306
23592
|
deleted_at: string | null;
|
|
22307
23593
|
verified_at: string | null;
|
|
@@ -22416,6 +23702,11 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
22416
23702
|
lastName: string | null;
|
|
22417
23703
|
profilePicture: string | null;
|
|
22418
23704
|
} | null;
|
|
23705
|
+
tags: {
|
|
23706
|
+
id: string;
|
|
23707
|
+
name: string;
|
|
23708
|
+
description: string | null;
|
|
23709
|
+
}[];
|
|
22419
23710
|
updated_at: string | null;
|
|
22420
23711
|
deleted_at: string | null;
|
|
22421
23712
|
verified_at: string | null;
|
|
@@ -22620,6 +23911,11 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
22620
23911
|
lastName: string | null;
|
|
22621
23912
|
profilePicture: string | null;
|
|
22622
23913
|
} | null;
|
|
23914
|
+
tags: {
|
|
23915
|
+
id: string;
|
|
23916
|
+
name: string;
|
|
23917
|
+
description: string | null;
|
|
23918
|
+
}[];
|
|
22623
23919
|
updated_at: string | null;
|
|
22624
23920
|
deleted_at: string | null;
|
|
22625
23921
|
verified_at: string | null;
|
|
@@ -22721,6 +24017,11 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
22721
24017
|
lastName: string | null;
|
|
22722
24018
|
profilePicture: string | null;
|
|
22723
24019
|
} | null;
|
|
24020
|
+
tags: {
|
|
24021
|
+
id: string;
|
|
24022
|
+
name: string;
|
|
24023
|
+
description: string | null;
|
|
24024
|
+
}[];
|
|
22724
24025
|
updated_at: string | null;
|
|
22725
24026
|
deleted_at: string | null;
|
|
22726
24027
|
verified_at: string | null;
|
|
@@ -22932,6 +24233,11 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
22932
24233
|
workspaceId: string;
|
|
22933
24234
|
created_by: string;
|
|
22934
24235
|
comments_count: number;
|
|
24236
|
+
tags: {
|
|
24237
|
+
id: string;
|
|
24238
|
+
name: string;
|
|
24239
|
+
description: string | null;
|
|
24240
|
+
}[];
|
|
22935
24241
|
}[] | null;
|
|
22936
24242
|
};
|
|
22937
24243
|
outputFormat: "json";
|
|
@@ -23689,6 +24995,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
23689
24995
|
output: {
|
|
23690
24996
|
success: true;
|
|
23691
24997
|
tags: {
|
|
24998
|
+
id: string;
|
|
23692
24999
|
name: string;
|
|
23693
25000
|
description: string | null;
|
|
23694
25001
|
}[];
|
|
@@ -23869,6 +25176,60 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
23869
25176
|
status: 200;
|
|
23870
25177
|
};
|
|
23871
25178
|
};
|
|
25179
|
+
} & {
|
|
25180
|
+
"/assign-to-service": {
|
|
25181
|
+
$post: {
|
|
25182
|
+
input: {};
|
|
25183
|
+
output: {
|
|
25184
|
+
success: false;
|
|
25185
|
+
error: string;
|
|
25186
|
+
};
|
|
25187
|
+
outputFormat: "json";
|
|
25188
|
+
status: 404;
|
|
25189
|
+
} | {
|
|
25190
|
+
input: {};
|
|
25191
|
+
output: {
|
|
25192
|
+
success: false;
|
|
25193
|
+
error: string;
|
|
25194
|
+
};
|
|
25195
|
+
outputFormat: "json";
|
|
25196
|
+
status: 400;
|
|
25197
|
+
} | {
|
|
25198
|
+
input: {};
|
|
25199
|
+
output: {
|
|
25200
|
+
success: true;
|
|
25201
|
+
};
|
|
25202
|
+
outputFormat: "json";
|
|
25203
|
+
status: 200;
|
|
25204
|
+
};
|
|
25205
|
+
};
|
|
25206
|
+
} & {
|
|
25207
|
+
"/remove-from-service": {
|
|
25208
|
+
$post: {
|
|
25209
|
+
input: {};
|
|
25210
|
+
output: {
|
|
25211
|
+
success: false;
|
|
25212
|
+
error: string;
|
|
25213
|
+
};
|
|
25214
|
+
outputFormat: "json";
|
|
25215
|
+
status: 404;
|
|
25216
|
+
} | {
|
|
25217
|
+
input: {};
|
|
25218
|
+
output: {
|
|
25219
|
+
success: false;
|
|
25220
|
+
error: string;
|
|
25221
|
+
};
|
|
25222
|
+
outputFormat: "json";
|
|
25223
|
+
status: 400;
|
|
25224
|
+
} | {
|
|
25225
|
+
input: {};
|
|
25226
|
+
output: {
|
|
25227
|
+
success: true;
|
|
25228
|
+
};
|
|
25229
|
+
outputFormat: "json";
|
|
25230
|
+
status: 200;
|
|
25231
|
+
};
|
|
25232
|
+
};
|
|
23872
25233
|
} & {
|
|
23873
25234
|
"/remove-from-task": {
|
|
23874
25235
|
$post: {
|
|
@@ -27461,6 +28822,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
27461
28822
|
commentsBytes: number;
|
|
27462
28823
|
customerBytes: number;
|
|
27463
28824
|
servicesBytes: number;
|
|
28825
|
+
financeBytes: number;
|
|
27464
28826
|
limitBytes: number | null;
|
|
27465
28827
|
};
|
|
27466
28828
|
outputFormat: "json";
|
|
@@ -27804,18 +29166,99 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
27804
29166
|
};
|
|
27805
29167
|
};
|
|
27806
29168
|
} & {
|
|
27807
|
-
"/upload-workspace-picture": {
|
|
29169
|
+
"/upload-workspace-picture": {
|
|
29170
|
+
$post: {
|
|
29171
|
+
input: {};
|
|
29172
|
+
output: {
|
|
29173
|
+
success: false;
|
|
29174
|
+
error: never;
|
|
29175
|
+
};
|
|
29176
|
+
outputFormat: "json";
|
|
29177
|
+
status: 400;
|
|
29178
|
+
} | {
|
|
29179
|
+
input: {};
|
|
29180
|
+
output: {
|
|
29181
|
+
url: string;
|
|
29182
|
+
fields: {
|
|
29183
|
+
[x: string]: string;
|
|
29184
|
+
};
|
|
29185
|
+
key: string;
|
|
29186
|
+
maxSize: number;
|
|
29187
|
+
};
|
|
29188
|
+
outputFormat: "json";
|
|
29189
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
29190
|
+
};
|
|
29191
|
+
};
|
|
29192
|
+
} & {
|
|
29193
|
+
"/confirm-workspace-picture": {
|
|
29194
|
+
$post: {
|
|
29195
|
+
input: {};
|
|
29196
|
+
output: {
|
|
29197
|
+
success: true;
|
|
29198
|
+
url: string;
|
|
29199
|
+
};
|
|
29200
|
+
outputFormat: "json";
|
|
29201
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
29202
|
+
} | {
|
|
29203
|
+
input: {};
|
|
29204
|
+
output: {
|
|
29205
|
+
success: false;
|
|
29206
|
+
error: string;
|
|
29207
|
+
};
|
|
29208
|
+
outputFormat: "json";
|
|
29209
|
+
status: 400;
|
|
29210
|
+
};
|
|
29211
|
+
};
|
|
29212
|
+
} & {
|
|
29213
|
+
"/delete-workspace-picture": {
|
|
29214
|
+
$post: {
|
|
29215
|
+
input: {};
|
|
29216
|
+
output: {
|
|
29217
|
+
success: false;
|
|
29218
|
+
error: never;
|
|
29219
|
+
};
|
|
29220
|
+
outputFormat: "json";
|
|
29221
|
+
status: 400;
|
|
29222
|
+
} | {
|
|
29223
|
+
input: {};
|
|
29224
|
+
output: {
|
|
29225
|
+
success: true;
|
|
29226
|
+
message: string;
|
|
29227
|
+
};
|
|
29228
|
+
outputFormat: "json";
|
|
29229
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
29230
|
+
} | {
|
|
29231
|
+
input: {};
|
|
29232
|
+
output: {
|
|
29233
|
+
success: false;
|
|
29234
|
+
error: string;
|
|
29235
|
+
};
|
|
29236
|
+
outputFormat: "json";
|
|
29237
|
+
status: 500;
|
|
29238
|
+
};
|
|
29239
|
+
};
|
|
29240
|
+
} & {
|
|
29241
|
+
"/upload-to-service": {
|
|
27808
29242
|
$post: {
|
|
27809
29243
|
input: {};
|
|
27810
29244
|
output: {
|
|
27811
29245
|
success: false;
|
|
27812
|
-
error:
|
|
29246
|
+
error: string;
|
|
27813
29247
|
};
|
|
27814
29248
|
outputFormat: "json";
|
|
27815
29249
|
status: 400;
|
|
27816
29250
|
} | {
|
|
27817
29251
|
input: {};
|
|
27818
29252
|
output: {
|
|
29253
|
+
success: false;
|
|
29254
|
+
error: string;
|
|
29255
|
+
};
|
|
29256
|
+
outputFormat: "json";
|
|
29257
|
+
status: 404;
|
|
29258
|
+
} | {
|
|
29259
|
+
input: {};
|
|
29260
|
+
output: {
|
|
29261
|
+
success: true;
|
|
27819
29262
|
url: string;
|
|
27820
29263
|
fields: {
|
|
27821
29264
|
[x: string]: string;
|
|
@@ -27828,12 +29271,12 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
27828
29271
|
};
|
|
27829
29272
|
};
|
|
27830
29273
|
} & {
|
|
27831
|
-
"/confirm-
|
|
29274
|
+
"/confirm-service-file": {
|
|
27832
29275
|
$post: {
|
|
27833
29276
|
input: {};
|
|
27834
29277
|
output: {
|
|
27835
29278
|
success: true;
|
|
27836
|
-
|
|
29279
|
+
key: string;
|
|
27837
29280
|
};
|
|
27838
29281
|
outputFormat: "json";
|
|
27839
29282
|
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
@@ -27848,7 +29291,31 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
27848
29291
|
};
|
|
27849
29292
|
};
|
|
27850
29293
|
} & {
|
|
27851
|
-
"/
|
|
29294
|
+
"/download-from-service/:workspace/:serviceId": {
|
|
29295
|
+
$get: {
|
|
29296
|
+
input: {
|
|
29297
|
+
param: {
|
|
29298
|
+
workspace: string;
|
|
29299
|
+
} & {
|
|
29300
|
+
serviceId: string;
|
|
29301
|
+
};
|
|
29302
|
+
};
|
|
29303
|
+
output: {
|
|
29304
|
+
success: true;
|
|
29305
|
+
files: {
|
|
29306
|
+
key: string;
|
|
29307
|
+
filename: string;
|
|
29308
|
+
size: number;
|
|
29309
|
+
lastModified: string | null;
|
|
29310
|
+
downloadUrl: string;
|
|
29311
|
+
}[];
|
|
29312
|
+
};
|
|
29313
|
+
outputFormat: "json";
|
|
29314
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
29315
|
+
};
|
|
29316
|
+
};
|
|
29317
|
+
} & {
|
|
29318
|
+
"/delete-service-file": {
|
|
27852
29319
|
$post: {
|
|
27853
29320
|
input: {};
|
|
27854
29321
|
output: {
|
|
@@ -27860,23 +29327,34 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
27860
29327
|
} | {
|
|
27861
29328
|
input: {};
|
|
27862
29329
|
output: {
|
|
27863
|
-
success:
|
|
29330
|
+
success: false;
|
|
27864
29331
|
message: string;
|
|
29332
|
+
key: string;
|
|
27865
29333
|
};
|
|
27866
29334
|
outputFormat: "json";
|
|
27867
|
-
status:
|
|
29335
|
+
status: 404;
|
|
27868
29336
|
} | {
|
|
27869
29337
|
input: {};
|
|
27870
29338
|
output: {
|
|
27871
29339
|
success: false;
|
|
27872
|
-
|
|
29340
|
+
message: string;
|
|
29341
|
+
key: string;
|
|
27873
29342
|
};
|
|
27874
29343
|
outputFormat: "json";
|
|
27875
29344
|
status: 500;
|
|
29345
|
+
} | {
|
|
29346
|
+
input: {};
|
|
29347
|
+
output: {
|
|
29348
|
+
success: true;
|
|
29349
|
+
message: string;
|
|
29350
|
+
key: string;
|
|
29351
|
+
};
|
|
29352
|
+
outputFormat: "json";
|
|
29353
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
27876
29354
|
};
|
|
27877
29355
|
};
|
|
27878
29356
|
} & {
|
|
27879
|
-
"/upload-to-
|
|
29357
|
+
"/upload-to-customer": {
|
|
27880
29358
|
$post: {
|
|
27881
29359
|
input: {};
|
|
27882
29360
|
output: {
|
|
@@ -27909,7 +29387,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
27909
29387
|
};
|
|
27910
29388
|
};
|
|
27911
29389
|
} & {
|
|
27912
|
-
"/confirm-
|
|
29390
|
+
"/confirm-customer-file": {
|
|
27913
29391
|
$post: {
|
|
27914
29392
|
input: {};
|
|
27915
29393
|
output: {
|
|
@@ -27929,13 +29407,13 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
27929
29407
|
};
|
|
27930
29408
|
};
|
|
27931
29409
|
} & {
|
|
27932
|
-
"/download-from-
|
|
29410
|
+
"/download-from-customer/:workspace/:customerId": {
|
|
27933
29411
|
$get: {
|
|
27934
29412
|
input: {
|
|
27935
29413
|
param: {
|
|
27936
29414
|
workspace: string;
|
|
27937
29415
|
} & {
|
|
27938
|
-
|
|
29416
|
+
customerId: string;
|
|
27939
29417
|
};
|
|
27940
29418
|
};
|
|
27941
29419
|
output: {
|
|
@@ -27953,7 +29431,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
27953
29431
|
};
|
|
27954
29432
|
};
|
|
27955
29433
|
} & {
|
|
27956
|
-
"/delete-
|
|
29434
|
+
"/delete-customer-file": {
|
|
27957
29435
|
$post: {
|
|
27958
29436
|
input: {};
|
|
27959
29437
|
output: {
|
|
@@ -27992,12 +29470,12 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
27992
29470
|
};
|
|
27993
29471
|
};
|
|
27994
29472
|
} & {
|
|
27995
|
-
"/upload-to-
|
|
29473
|
+
"/upload-to-finance": {
|
|
27996
29474
|
$post: {
|
|
27997
29475
|
input: {};
|
|
27998
29476
|
output: {
|
|
27999
29477
|
success: false;
|
|
28000
|
-
error:
|
|
29478
|
+
error: never;
|
|
28001
29479
|
};
|
|
28002
29480
|
outputFormat: "json";
|
|
28003
29481
|
status: 400;
|
|
@@ -28025,8 +29503,16 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
28025
29503
|
};
|
|
28026
29504
|
};
|
|
28027
29505
|
} & {
|
|
28028
|
-
"/confirm-
|
|
29506
|
+
"/confirm-finance-file": {
|
|
28029
29507
|
$post: {
|
|
29508
|
+
input: {};
|
|
29509
|
+
output: {
|
|
29510
|
+
success: false;
|
|
29511
|
+
error: string;
|
|
29512
|
+
};
|
|
29513
|
+
outputFormat: "json";
|
|
29514
|
+
status: 404;
|
|
29515
|
+
} | {
|
|
28030
29516
|
input: {};
|
|
28031
29517
|
output: {
|
|
28032
29518
|
success: true;
|
|
@@ -28045,13 +29531,27 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
28045
29531
|
};
|
|
28046
29532
|
};
|
|
28047
29533
|
} & {
|
|
28048
|
-
"/download-from-
|
|
29534
|
+
"/download-from-finance/:workspace/:transactionId": {
|
|
28049
29535
|
$get: {
|
|
28050
29536
|
input: {
|
|
28051
29537
|
param: {
|
|
28052
29538
|
workspace: string;
|
|
28053
29539
|
} & {
|
|
28054
|
-
|
|
29540
|
+
transactionId: string;
|
|
29541
|
+
};
|
|
29542
|
+
};
|
|
29543
|
+
output: {
|
|
29544
|
+
success: false;
|
|
29545
|
+
error: string;
|
|
29546
|
+
};
|
|
29547
|
+
outputFormat: "json";
|
|
29548
|
+
status: 404;
|
|
29549
|
+
} | {
|
|
29550
|
+
input: {
|
|
29551
|
+
param: {
|
|
29552
|
+
workspace: string;
|
|
29553
|
+
} & {
|
|
29554
|
+
transactionId: string;
|
|
28055
29555
|
};
|
|
28056
29556
|
};
|
|
28057
29557
|
output: {
|
|
@@ -28069,7 +29569,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
28069
29569
|
};
|
|
28070
29570
|
};
|
|
28071
29571
|
} & {
|
|
28072
|
-
"/delete-
|
|
29572
|
+
"/delete-finance-file": {
|
|
28073
29573
|
$post: {
|
|
28074
29574
|
input: {};
|
|
28075
29575
|
output: {
|
|
@@ -28078,6 +29578,14 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
28078
29578
|
};
|
|
28079
29579
|
outputFormat: "json";
|
|
28080
29580
|
status: 400;
|
|
29581
|
+
} | {
|
|
29582
|
+
input: {};
|
|
29583
|
+
output: {
|
|
29584
|
+
success: false;
|
|
29585
|
+
error: string;
|
|
29586
|
+
};
|
|
29587
|
+
outputFormat: "json";
|
|
29588
|
+
status: 404;
|
|
28081
29589
|
} | {
|
|
28082
29590
|
input: {};
|
|
28083
29591
|
output: {
|
|
@@ -29230,6 +30738,197 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
29230
30738
|
status: 200;
|
|
29231
30739
|
};
|
|
29232
30740
|
};
|
|
30741
|
+
} & {
|
|
30742
|
+
"/transactions/list/:workspace": {
|
|
30743
|
+
$get: {
|
|
30744
|
+
input: {
|
|
30745
|
+
param: {
|
|
30746
|
+
workspace: string;
|
|
30747
|
+
};
|
|
30748
|
+
};
|
|
30749
|
+
output: {
|
|
30750
|
+
success: false;
|
|
30751
|
+
error: string;
|
|
30752
|
+
};
|
|
30753
|
+
outputFormat: "json";
|
|
30754
|
+
status: 400;
|
|
30755
|
+
} | {
|
|
30756
|
+
input: {
|
|
30757
|
+
param: {
|
|
30758
|
+
workspace: string;
|
|
30759
|
+
};
|
|
30760
|
+
};
|
|
30761
|
+
output: {
|
|
30762
|
+
success: true;
|
|
30763
|
+
transactions: {
|
|
30764
|
+
id: string;
|
|
30765
|
+
workspaceId: string;
|
|
30766
|
+
type: FinanceTransactionType;
|
|
30767
|
+
customerId: string | null;
|
|
30768
|
+
serviceId: string | null;
|
|
30769
|
+
accountId: string | null;
|
|
30770
|
+
destinationAccountId: string | null;
|
|
30771
|
+
paymentMethod: string | null;
|
|
30772
|
+
amount: number;
|
|
30773
|
+
description: string | null;
|
|
30774
|
+
date: string;
|
|
30775
|
+
vat: number | null;
|
|
30776
|
+
reason: string | null;
|
|
30777
|
+
created_at: string;
|
|
30778
|
+
updated_at: string | null;
|
|
30779
|
+
}[];
|
|
30780
|
+
};
|
|
30781
|
+
outputFormat: "json";
|
|
30782
|
+
status: 200;
|
|
30783
|
+
};
|
|
30784
|
+
};
|
|
30785
|
+
} & {
|
|
30786
|
+
"/transactions/get/:workspace/:transactionId": {
|
|
30787
|
+
$get: {
|
|
30788
|
+
input: {
|
|
30789
|
+
param: {
|
|
30790
|
+
workspace: string;
|
|
30791
|
+
} & {
|
|
30792
|
+
transactionId: string;
|
|
30793
|
+
};
|
|
30794
|
+
};
|
|
30795
|
+
output: {
|
|
30796
|
+
success: false;
|
|
30797
|
+
error: string;
|
|
30798
|
+
};
|
|
30799
|
+
outputFormat: "json";
|
|
30800
|
+
status: 404;
|
|
30801
|
+
} | {
|
|
30802
|
+
input: {
|
|
30803
|
+
param: {
|
|
30804
|
+
workspace: string;
|
|
30805
|
+
} & {
|
|
30806
|
+
transactionId: string;
|
|
30807
|
+
};
|
|
30808
|
+
};
|
|
30809
|
+
output: {
|
|
30810
|
+
success: true;
|
|
30811
|
+
transaction: {
|
|
30812
|
+
id: string;
|
|
30813
|
+
workspaceId: string;
|
|
30814
|
+
type: FinanceTransactionType;
|
|
30815
|
+
customerId: string | null;
|
|
30816
|
+
serviceId: string | null;
|
|
30817
|
+
accountId: string | null;
|
|
30818
|
+
destinationAccountId: string | null;
|
|
30819
|
+
paymentMethod: string | null;
|
|
30820
|
+
amount: number;
|
|
30821
|
+
description: string | null;
|
|
30822
|
+
date: string;
|
|
30823
|
+
vat: number | null;
|
|
30824
|
+
reason: string | null;
|
|
30825
|
+
created_at: string;
|
|
30826
|
+
updated_at: string | null;
|
|
30827
|
+
};
|
|
30828
|
+
};
|
|
30829
|
+
outputFormat: "json";
|
|
30830
|
+
status: 200;
|
|
30831
|
+
};
|
|
30832
|
+
};
|
|
30833
|
+
} & {
|
|
30834
|
+
"/transactions/create": {
|
|
30835
|
+
$post: {
|
|
30836
|
+
input: {};
|
|
30837
|
+
output: {
|
|
30838
|
+
success: false;
|
|
30839
|
+
error: string;
|
|
30840
|
+
};
|
|
30841
|
+
outputFormat: "json";
|
|
30842
|
+
status: 400 | 404;
|
|
30843
|
+
} | {
|
|
30844
|
+
input: {};
|
|
30845
|
+
output: {
|
|
30846
|
+
success: true;
|
|
30847
|
+
transaction: {
|
|
30848
|
+
id: string;
|
|
30849
|
+
workspaceId: string;
|
|
30850
|
+
type: FinanceTransactionType;
|
|
30851
|
+
customerId: string | null;
|
|
30852
|
+
serviceId: string | null;
|
|
30853
|
+
accountId: string | null;
|
|
30854
|
+
destinationAccountId: string | null;
|
|
30855
|
+
paymentMethod: string | null;
|
|
30856
|
+
amount: number;
|
|
30857
|
+
description: string | null;
|
|
30858
|
+
date: string;
|
|
30859
|
+
vat: number | null;
|
|
30860
|
+
reason: string | null;
|
|
30861
|
+
created_at: string;
|
|
30862
|
+
updated_at: string | null;
|
|
30863
|
+
};
|
|
30864
|
+
};
|
|
30865
|
+
outputFormat: "json";
|
|
30866
|
+
status: 201;
|
|
30867
|
+
};
|
|
30868
|
+
};
|
|
30869
|
+
} & {
|
|
30870
|
+
"/transactions/update": {
|
|
30871
|
+
$post: {
|
|
30872
|
+
input: {};
|
|
30873
|
+
output: {
|
|
30874
|
+
success: false;
|
|
30875
|
+
error: string;
|
|
30876
|
+
};
|
|
30877
|
+
outputFormat: "json";
|
|
30878
|
+
status: 400 | 404;
|
|
30879
|
+
} | {
|
|
30880
|
+
input: {};
|
|
30881
|
+
output: {
|
|
30882
|
+
success: true;
|
|
30883
|
+
transaction: {
|
|
30884
|
+
id: string;
|
|
30885
|
+
workspaceId: string;
|
|
30886
|
+
type: FinanceTransactionType;
|
|
30887
|
+
customerId: string | null;
|
|
30888
|
+
serviceId: string | null;
|
|
30889
|
+
accountId: string | null;
|
|
30890
|
+
destinationAccountId: string | null;
|
|
30891
|
+
paymentMethod: string | null;
|
|
30892
|
+
amount: number;
|
|
30893
|
+
description: string | null;
|
|
30894
|
+
date: string;
|
|
30895
|
+
vat: number | null;
|
|
30896
|
+
reason: string | null;
|
|
30897
|
+
created_at: string;
|
|
30898
|
+
updated_at: string | null;
|
|
30899
|
+
};
|
|
30900
|
+
};
|
|
30901
|
+
outputFormat: "json";
|
|
30902
|
+
status: 200;
|
|
30903
|
+
};
|
|
30904
|
+
};
|
|
30905
|
+
} & {
|
|
30906
|
+
"/transactions/delete": {
|
|
30907
|
+
$post: {
|
|
30908
|
+
input: {};
|
|
30909
|
+
output: {
|
|
30910
|
+
success: false;
|
|
30911
|
+
error: never;
|
|
30912
|
+
};
|
|
30913
|
+
outputFormat: "json";
|
|
30914
|
+
status: 400;
|
|
30915
|
+
} | {
|
|
30916
|
+
input: {};
|
|
30917
|
+
output: {
|
|
30918
|
+
success: false;
|
|
30919
|
+
error: string;
|
|
30920
|
+
};
|
|
30921
|
+
outputFormat: "json";
|
|
30922
|
+
status: 404;
|
|
30923
|
+
} | {
|
|
30924
|
+
input: {};
|
|
30925
|
+
output: {
|
|
30926
|
+
success: true;
|
|
30927
|
+
};
|
|
30928
|
+
outputFormat: "json";
|
|
30929
|
+
status: 200;
|
|
30930
|
+
};
|
|
30931
|
+
};
|
|
29233
30932
|
} & {
|
|
29234
30933
|
"/visibility/:workspace": {
|
|
29235
30934
|
$get: {
|