@mestra-dev/contract 0.0.141 → 0.0.143
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 +661 -104
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
26
26
|
readonly openapi: "3.0.3";
|
|
27
27
|
readonly info: {
|
|
28
28
|
readonly title: "Auth Service API";
|
|
29
|
-
readonly version: "1.5.
|
|
29
|
+
readonly version: "1.5.12";
|
|
30
30
|
readonly description: "OpenAPI specification for the Auth, Integrations, Workspace, Payments, Tasks, Templates, Tags, Comments, Assignees, Chat, Events, Billings, CInvoices, Files, and Notifications endpoints exposed by the k3-core platform. Unhandled HTTPException and unexpected errors are normalized by the global error handler to `{ success: false, error: string }` (status preserved for HTTPException; 500 otherwise).";
|
|
31
31
|
};
|
|
32
32
|
readonly servers: readonly [
|
|
@@ -4107,6 +4107,14 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
4107
4107
|
readonly minimum: 0;
|
|
4108
4108
|
readonly maximum: 100;
|
|
4109
4109
|
};
|
|
4110
|
+
readonly status: {
|
|
4111
|
+
readonly type: "string";
|
|
4112
|
+
readonly enum: readonly [
|
|
4113
|
+
"pending",
|
|
4114
|
+
"paid",
|
|
4115
|
+
"canceled"
|
|
4116
|
+
];
|
|
4117
|
+
};
|
|
4110
4118
|
readonly buyerInn: {
|
|
4111
4119
|
readonly type: "string";
|
|
4112
4120
|
readonly nullable: true;
|
|
@@ -4176,6 +4184,44 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
4176
4184
|
};
|
|
4177
4185
|
};
|
|
4178
4186
|
};
|
|
4187
|
+
readonly ListCInvoicesSuccess: {
|
|
4188
|
+
readonly type: "object";
|
|
4189
|
+
readonly required: readonly [
|
|
4190
|
+
"success",
|
|
4191
|
+
"cinvoices"
|
|
4192
|
+
];
|
|
4193
|
+
readonly properties: {
|
|
4194
|
+
readonly success: {
|
|
4195
|
+
readonly type: "boolean";
|
|
4196
|
+
readonly const: true;
|
|
4197
|
+
};
|
|
4198
|
+
readonly cinvoices: {
|
|
4199
|
+
readonly type: "array";
|
|
4200
|
+
readonly items: {
|
|
4201
|
+
readonly $ref: "#/components/schemas/CInvoice";
|
|
4202
|
+
};
|
|
4203
|
+
};
|
|
4204
|
+
};
|
|
4205
|
+
};
|
|
4206
|
+
readonly UpdateCInvoiceSuccess: {
|
|
4207
|
+
readonly type: "object";
|
|
4208
|
+
readonly required: readonly [
|
|
4209
|
+
"success",
|
|
4210
|
+
"cinvoice"
|
|
4211
|
+
];
|
|
4212
|
+
readonly properties: {
|
|
4213
|
+
readonly success: {
|
|
4214
|
+
readonly type: "boolean";
|
|
4215
|
+
readonly const: true;
|
|
4216
|
+
};
|
|
4217
|
+
readonly cinvoice: {
|
|
4218
|
+
readonly type: "array";
|
|
4219
|
+
readonly items: {
|
|
4220
|
+
readonly $ref: "#/components/schemas/CInvoice";
|
|
4221
|
+
};
|
|
4222
|
+
};
|
|
4223
|
+
};
|
|
4224
|
+
};
|
|
4179
4225
|
readonly BillingInterval: {
|
|
4180
4226
|
readonly type: "string";
|
|
4181
4227
|
readonly enum: readonly [
|
|
@@ -12323,6 +12369,15 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
12323
12369
|
readonly maximum: 100;
|
|
12324
12370
|
readonly description: "VAT rate (0-100).";
|
|
12325
12371
|
};
|
|
12372
|
+
readonly status: {
|
|
12373
|
+
readonly type: "string";
|
|
12374
|
+
readonly enum: readonly [
|
|
12375
|
+
"pending",
|
|
12376
|
+
"paid",
|
|
12377
|
+
"canceled"
|
|
12378
|
+
];
|
|
12379
|
+
readonly description: "Invoice payment status. Defaults to pending.";
|
|
12380
|
+
};
|
|
12326
12381
|
readonly buyerInn: {
|
|
12327
12382
|
readonly type: "string";
|
|
12328
12383
|
readonly description: "Buyer INN (tax ID).";
|
|
@@ -12410,13 +12465,13 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
12410
12465
|
};
|
|
12411
12466
|
};
|
|
12412
12467
|
};
|
|
12413
|
-
readonly "/
|
|
12468
|
+
readonly "/cinvoices/list/{workspace}/{customerId}": {
|
|
12414
12469
|
readonly get: {
|
|
12415
12470
|
readonly tags: readonly [
|
|
12416
|
-
"
|
|
12471
|
+
"CInvoices"
|
|
12417
12472
|
];
|
|
12418
|
-
readonly summary: "List
|
|
12419
|
-
readonly description: "Returns all
|
|
12473
|
+
readonly summary: "List a real-estate customer's invoices";
|
|
12474
|
+
readonly description: "Returns all invoices for a customer_real_estates lead in the specified real-estate workspace. Requires workspace access and read access to crm::customers.";
|
|
12420
12475
|
readonly security: readonly [
|
|
12421
12476
|
never
|
|
12422
12477
|
];
|
|
@@ -12430,31 +12485,31 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
12430
12485
|
readonly format: "uuid";
|
|
12431
12486
|
};
|
|
12432
12487
|
readonly description: "Workspace identifier.";
|
|
12488
|
+
},
|
|
12489
|
+
{
|
|
12490
|
+
readonly name: "customerId";
|
|
12491
|
+
readonly in: "path";
|
|
12492
|
+
readonly required: true;
|
|
12493
|
+
readonly schema: {
|
|
12494
|
+
readonly type: "string";
|
|
12495
|
+
readonly format: "uuid";
|
|
12496
|
+
};
|
|
12497
|
+
readonly description: "Real-estate customer identifier.";
|
|
12433
12498
|
}
|
|
12434
12499
|
];
|
|
12435
12500
|
readonly responses: {
|
|
12436
12501
|
readonly 200: {
|
|
12437
|
-
readonly description: "
|
|
12438
|
-
readonly content: {
|
|
12439
|
-
readonly "application/json": {
|
|
12440
|
-
readonly schema: {
|
|
12441
|
-
readonly $ref: "#/components/schemas/ListTagsSuccess";
|
|
12442
|
-
};
|
|
12443
|
-
};
|
|
12444
|
-
};
|
|
12445
|
-
};
|
|
12446
|
-
readonly 401: {
|
|
12447
|
-
readonly description: "Unauthorized - Missing or invalid access token.";
|
|
12502
|
+
readonly description: "Invoices fetched successfully.";
|
|
12448
12503
|
readonly content: {
|
|
12449
12504
|
readonly "application/json": {
|
|
12450
12505
|
readonly schema: {
|
|
12451
|
-
readonly $ref: "#/components/schemas/
|
|
12506
|
+
readonly $ref: "#/components/schemas/ListCInvoicesSuccess";
|
|
12452
12507
|
};
|
|
12453
12508
|
};
|
|
12454
12509
|
};
|
|
12455
12510
|
};
|
|
12456
|
-
readonly
|
|
12457
|
-
readonly description: "
|
|
12511
|
+
readonly 400: {
|
|
12512
|
+
readonly description: "Unsupported workspace category.";
|
|
12458
12513
|
readonly content: {
|
|
12459
12514
|
readonly "application/json": {
|
|
12460
12515
|
readonly schema: {
|
|
@@ -12463,61 +12518,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
12463
12518
|
};
|
|
12464
12519
|
};
|
|
12465
12520
|
};
|
|
12466
|
-
|
|
12467
|
-
|
|
12468
|
-
};
|
|
12469
|
-
readonly "/tags/create": {
|
|
12470
|
-
readonly post: {
|
|
12471
|
-
readonly tags: readonly [
|
|
12472
|
-
"Tags"
|
|
12473
|
-
];
|
|
12474
|
-
readonly summary: "Create a tag";
|
|
12475
|
-
readonly description: "Creates a tag in the specified workspace. Requires workspace access and write access to crm::tasks or crm::customers.";
|
|
12476
|
-
readonly security: readonly [
|
|
12477
|
-
never
|
|
12478
|
-
];
|
|
12479
|
-
readonly requestBody: {
|
|
12480
|
-
readonly required: true;
|
|
12481
|
-
readonly content: {
|
|
12482
|
-
readonly "application/json": {
|
|
12483
|
-
readonly schema: {
|
|
12484
|
-
readonly type: "object";
|
|
12485
|
-
readonly required: readonly [
|
|
12486
|
-
"workspace",
|
|
12487
|
-
"name"
|
|
12488
|
-
];
|
|
12489
|
-
readonly properties: {
|
|
12490
|
-
readonly workspace: {
|
|
12491
|
-
readonly type: "string";
|
|
12492
|
-
readonly format: "uuid";
|
|
12493
|
-
readonly description: "Workspace identifier.";
|
|
12494
|
-
};
|
|
12495
|
-
readonly name: {
|
|
12496
|
-
readonly type: "string";
|
|
12497
|
-
readonly description: "Tag label.";
|
|
12498
|
-
};
|
|
12499
|
-
readonly description: {
|
|
12500
|
-
readonly type: "string";
|
|
12501
|
-
readonly description: "Optional tag description.";
|
|
12502
|
-
};
|
|
12503
|
-
};
|
|
12504
|
-
};
|
|
12505
|
-
};
|
|
12506
|
-
};
|
|
12507
|
-
};
|
|
12508
|
-
readonly responses: {
|
|
12509
|
-
readonly 201: {
|
|
12510
|
-
readonly description: "Tag created successfully.";
|
|
12511
|
-
readonly content: {
|
|
12512
|
-
readonly "application/json": {
|
|
12513
|
-
readonly schema: {
|
|
12514
|
-
readonly $ref: "#/components/schemas/CreateTagSuccess";
|
|
12515
|
-
};
|
|
12516
|
-
};
|
|
12517
|
-
};
|
|
12518
|
-
};
|
|
12519
|
-
readonly 400: {
|
|
12520
|
-
readonly description: "Invalid request payload.";
|
|
12521
|
+
readonly 401: {
|
|
12522
|
+
readonly description: "Unauthorized - Missing or invalid access token.";
|
|
12521
12523
|
readonly content: {
|
|
12522
12524
|
readonly "application/json": {
|
|
12523
12525
|
readonly schema: {
|
|
@@ -12526,8 +12528,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
12526
12528
|
};
|
|
12527
12529
|
};
|
|
12528
12530
|
};
|
|
12529
|
-
readonly
|
|
12530
|
-
readonly description: "
|
|
12531
|
+
readonly 403: {
|
|
12532
|
+
readonly description: "Forbidden - Token issuer is not 'access', user lacks workspace access, or user lacks read access to crm::customers resource.";
|
|
12531
12533
|
readonly content: {
|
|
12532
12534
|
readonly "application/json": {
|
|
12533
12535
|
readonly schema: {
|
|
@@ -12536,8 +12538,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
12536
12538
|
};
|
|
12537
12539
|
};
|
|
12538
12540
|
};
|
|
12539
|
-
readonly
|
|
12540
|
-
readonly description: "
|
|
12541
|
+
readonly 404: {
|
|
12542
|
+
readonly description: "Workspace or customer not found.";
|
|
12541
12543
|
readonly content: {
|
|
12542
12544
|
readonly "application/json": {
|
|
12543
12545
|
readonly schema: {
|
|
@@ -12549,13 +12551,13 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
12549
12551
|
};
|
|
12550
12552
|
};
|
|
12551
12553
|
};
|
|
12552
|
-
readonly "/
|
|
12554
|
+
readonly "/cinvoices/update": {
|
|
12553
12555
|
readonly post: {
|
|
12554
12556
|
readonly tags: readonly [
|
|
12555
|
-
"
|
|
12557
|
+
"CInvoices"
|
|
12556
12558
|
];
|
|
12557
|
-
readonly summary: "Update a
|
|
12558
|
-
readonly description: "Updates a
|
|
12559
|
+
readonly summary: "Update a customer invoice";
|
|
12560
|
+
readonly description: "Updates specified fields of an invoice in a real-estate workspace. Any replacement seller billing, customer, or service must belong to the workspace. Requires workspace access and write access to crm::customers.";
|
|
12559
12561
|
readonly security: readonly [
|
|
12560
12562
|
never
|
|
12561
12563
|
];
|
|
@@ -12566,27 +12568,101 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
12566
12568
|
readonly schema: {
|
|
12567
12569
|
readonly type: "object";
|
|
12568
12570
|
readonly required: readonly [
|
|
12569
|
-
"
|
|
12571
|
+
"cinvoiceId",
|
|
12570
12572
|
"workspace"
|
|
12571
12573
|
];
|
|
12572
12574
|
readonly properties: {
|
|
12573
|
-
readonly
|
|
12575
|
+
readonly cinvoiceId: {
|
|
12574
12576
|
readonly type: "string";
|
|
12575
12577
|
readonly format: "uuid";
|
|
12576
|
-
readonly description: "
|
|
12578
|
+
readonly description: "Invoice identifier.";
|
|
12577
12579
|
};
|
|
12578
12580
|
readonly workspace: {
|
|
12579
12581
|
readonly type: "string";
|
|
12580
12582
|
readonly format: "uuid";
|
|
12581
12583
|
readonly description: "Workspace identifier.";
|
|
12582
12584
|
};
|
|
12583
|
-
readonly
|
|
12585
|
+
readonly invoiceId: {
|
|
12584
12586
|
readonly type: "string";
|
|
12585
|
-
readonly description: "
|
|
12587
|
+
readonly description: "User-facing invoice number.";
|
|
12586
12588
|
};
|
|
12587
|
-
readonly
|
|
12589
|
+
readonly serviceId: {
|
|
12588
12590
|
readonly type: "string";
|
|
12589
|
-
readonly
|
|
12591
|
+
readonly format: "uuid";
|
|
12592
|
+
readonly description: "Replacement real-estate service identifier.";
|
|
12593
|
+
};
|
|
12594
|
+
readonly SellerBillingId: {
|
|
12595
|
+
readonly type: "string";
|
|
12596
|
+
readonly format: "uuid";
|
|
12597
|
+
readonly description: "Replacement seller billing/requisites identifier.";
|
|
12598
|
+
};
|
|
12599
|
+
readonly customerId: {
|
|
12600
|
+
readonly type: "string";
|
|
12601
|
+
readonly format: "uuid";
|
|
12602
|
+
readonly description: "Replacement real-estate customer identifier.";
|
|
12603
|
+
};
|
|
12604
|
+
readonly date: {
|
|
12605
|
+
readonly type: "string";
|
|
12606
|
+
readonly format: "date-time";
|
|
12607
|
+
};
|
|
12608
|
+
readonly language: {
|
|
12609
|
+
readonly type: "string";
|
|
12610
|
+
readonly enum: readonly [
|
|
12611
|
+
"ru",
|
|
12612
|
+
"en"
|
|
12613
|
+
];
|
|
12614
|
+
};
|
|
12615
|
+
readonly currency: {
|
|
12616
|
+
readonly type: "string";
|
|
12617
|
+
readonly enum: readonly [
|
|
12618
|
+
"RUB",
|
|
12619
|
+
"USD",
|
|
12620
|
+
"EUR"
|
|
12621
|
+
];
|
|
12622
|
+
};
|
|
12623
|
+
readonly vatOption: {
|
|
12624
|
+
readonly type: "string";
|
|
12625
|
+
readonly enum: readonly [
|
|
12626
|
+
"vat_included",
|
|
12627
|
+
"vat_excluded"
|
|
12628
|
+
];
|
|
12629
|
+
};
|
|
12630
|
+
readonly vatRate: {
|
|
12631
|
+
readonly type: "integer";
|
|
12632
|
+
readonly minimum: 0;
|
|
12633
|
+
readonly maximum: 100;
|
|
12634
|
+
};
|
|
12635
|
+
readonly status: {
|
|
12636
|
+
readonly type: "string";
|
|
12637
|
+
readonly enum: readonly [
|
|
12638
|
+
"pending",
|
|
12639
|
+
"paid",
|
|
12640
|
+
"canceled"
|
|
12641
|
+
];
|
|
12642
|
+
};
|
|
12643
|
+
readonly buyerInn: {
|
|
12644
|
+
readonly type: "string";
|
|
12645
|
+
};
|
|
12646
|
+
readonly buyerKpp: {
|
|
12647
|
+
readonly type: "string";
|
|
12648
|
+
};
|
|
12649
|
+
readonly unitName: {
|
|
12650
|
+
readonly type: "string";
|
|
12651
|
+
};
|
|
12652
|
+
readonly unitPrice: {
|
|
12653
|
+
readonly type: "integer";
|
|
12654
|
+
readonly minimum: 0;
|
|
12655
|
+
};
|
|
12656
|
+
readonly unitQuantity: {
|
|
12657
|
+
readonly type: "integer";
|
|
12658
|
+
readonly minimum: 1;
|
|
12659
|
+
};
|
|
12660
|
+
readonly notes: {
|
|
12661
|
+
readonly type: "string";
|
|
12662
|
+
};
|
|
12663
|
+
readonly discount: {
|
|
12664
|
+
readonly type: "integer";
|
|
12665
|
+
readonly minimum: 0;
|
|
12590
12666
|
};
|
|
12591
12667
|
};
|
|
12592
12668
|
};
|
|
@@ -12595,17 +12671,17 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
12595
12671
|
};
|
|
12596
12672
|
readonly responses: {
|
|
12597
12673
|
readonly 200: {
|
|
12598
|
-
readonly description: "
|
|
12674
|
+
readonly description: "Invoice updated successfully.";
|
|
12599
12675
|
readonly content: {
|
|
12600
12676
|
readonly "application/json": {
|
|
12601
12677
|
readonly schema: {
|
|
12602
|
-
readonly $ref: "#/components/schemas/
|
|
12678
|
+
readonly $ref: "#/components/schemas/UpdateCInvoiceSuccess";
|
|
12603
12679
|
};
|
|
12604
12680
|
};
|
|
12605
12681
|
};
|
|
12606
12682
|
};
|
|
12607
12683
|
readonly 400: {
|
|
12608
|
-
readonly description: "Invalid request payload.";
|
|
12684
|
+
readonly description: "Invalid request payload or unsupported workspace category.";
|
|
12609
12685
|
readonly content: {
|
|
12610
12686
|
readonly "application/json": {
|
|
12611
12687
|
readonly schema: {
|
|
@@ -12625,7 +12701,17 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
12625
12701
|
};
|
|
12626
12702
|
};
|
|
12627
12703
|
readonly 403: {
|
|
12628
|
-
readonly description: "Forbidden - Token issuer is not 'access', user lacks workspace access, or user lacks write access to crm::
|
|
12704
|
+
readonly description: "Forbidden - Token issuer is not 'access', user lacks workspace access, or user lacks write access to crm::customers resource.";
|
|
12705
|
+
readonly content: {
|
|
12706
|
+
readonly "application/json": {
|
|
12707
|
+
readonly schema: {
|
|
12708
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
12709
|
+
};
|
|
12710
|
+
};
|
|
12711
|
+
};
|
|
12712
|
+
};
|
|
12713
|
+
readonly 404: {
|
|
12714
|
+
readonly description: "Workspace, invoice, billing, customer, or service not found.";
|
|
12629
12715
|
readonly content: {
|
|
12630
12716
|
readonly "application/json": {
|
|
12631
12717
|
readonly schema: {
|
|
@@ -12637,13 +12723,13 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
12637
12723
|
};
|
|
12638
12724
|
};
|
|
12639
12725
|
};
|
|
12640
|
-
readonly "/
|
|
12726
|
+
readonly "/cinvoices/delete": {
|
|
12641
12727
|
readonly post: {
|
|
12642
12728
|
readonly tags: readonly [
|
|
12643
|
-
"
|
|
12729
|
+
"CInvoices"
|
|
12644
12730
|
];
|
|
12645
|
-
readonly summary: "Delete a
|
|
12646
|
-
readonly description: "
|
|
12731
|
+
readonly summary: "Delete a customer invoice";
|
|
12732
|
+
readonly description: "Deletes an invoice from a real-estate workspace. Requires workspace access and write access to crm::customers.";
|
|
12647
12733
|
readonly security: readonly [
|
|
12648
12734
|
never
|
|
12649
12735
|
];
|
|
@@ -12654,14 +12740,14 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
12654
12740
|
readonly schema: {
|
|
12655
12741
|
readonly type: "object";
|
|
12656
12742
|
readonly required: readonly [
|
|
12657
|
-
"
|
|
12743
|
+
"cinvoiceId",
|
|
12658
12744
|
"workspace"
|
|
12659
12745
|
];
|
|
12660
12746
|
readonly properties: {
|
|
12661
|
-
readonly
|
|
12747
|
+
readonly cinvoiceId: {
|
|
12662
12748
|
readonly type: "string";
|
|
12663
12749
|
readonly format: "uuid";
|
|
12664
|
-
readonly description: "
|
|
12750
|
+
readonly description: "Invoice identifier.";
|
|
12665
12751
|
};
|
|
12666
12752
|
readonly workspace: {
|
|
12667
12753
|
readonly type: "string";
|
|
@@ -12675,7 +12761,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
12675
12761
|
};
|
|
12676
12762
|
readonly responses: {
|
|
12677
12763
|
readonly 200: {
|
|
12678
|
-
readonly description: "
|
|
12764
|
+
readonly description: "Invoice deleted successfully.";
|
|
12679
12765
|
readonly content: {
|
|
12680
12766
|
readonly "application/json": {
|
|
12681
12767
|
readonly schema: {
|
|
@@ -12685,7 +12771,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
12685
12771
|
};
|
|
12686
12772
|
};
|
|
12687
12773
|
readonly 400: {
|
|
12688
|
-
readonly description: "Invalid request payload.";
|
|
12774
|
+
readonly description: "Invalid request payload or unsupported workspace category.";
|
|
12689
12775
|
readonly content: {
|
|
12690
12776
|
readonly "application/json": {
|
|
12691
12777
|
readonly schema: {
|
|
@@ -12705,7 +12791,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
12705
12791
|
};
|
|
12706
12792
|
};
|
|
12707
12793
|
readonly 403: {
|
|
12708
|
-
readonly description: "Forbidden - Token issuer is not 'access', user lacks workspace access, or user lacks write access to crm::
|
|
12794
|
+
readonly description: "Forbidden - Token issuer is not 'access', user lacks workspace access, or user lacks write access to crm::customers resource.";
|
|
12709
12795
|
readonly content: {
|
|
12710
12796
|
readonly "application/json": {
|
|
12711
12797
|
readonly schema: {
|
|
@@ -12715,7 +12801,324 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
12715
12801
|
};
|
|
12716
12802
|
};
|
|
12717
12803
|
readonly 404: {
|
|
12718
|
-
readonly description: "
|
|
12804
|
+
readonly description: "Workspace or invoice not found.";
|
|
12805
|
+
readonly content: {
|
|
12806
|
+
readonly "application/json": {
|
|
12807
|
+
readonly schema: {
|
|
12808
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
12809
|
+
};
|
|
12810
|
+
};
|
|
12811
|
+
};
|
|
12812
|
+
};
|
|
12813
|
+
};
|
|
12814
|
+
};
|
|
12815
|
+
};
|
|
12816
|
+
readonly "/tags/list/{workspace}": {
|
|
12817
|
+
readonly get: {
|
|
12818
|
+
readonly tags: readonly [
|
|
12819
|
+
"Tags"
|
|
12820
|
+
];
|
|
12821
|
+
readonly summary: "List tags by workspace";
|
|
12822
|
+
readonly description: "Returns all tags for the given workspace. Requires workspace access and read access to crm::tasks or crm::customers.";
|
|
12823
|
+
readonly security: readonly [
|
|
12824
|
+
never
|
|
12825
|
+
];
|
|
12826
|
+
readonly parameters: readonly [
|
|
12827
|
+
{
|
|
12828
|
+
readonly name: "workspace";
|
|
12829
|
+
readonly in: "path";
|
|
12830
|
+
readonly required: true;
|
|
12831
|
+
readonly schema: {
|
|
12832
|
+
readonly type: "string";
|
|
12833
|
+
readonly format: "uuid";
|
|
12834
|
+
};
|
|
12835
|
+
readonly description: "Workspace identifier.";
|
|
12836
|
+
}
|
|
12837
|
+
];
|
|
12838
|
+
readonly responses: {
|
|
12839
|
+
readonly 200: {
|
|
12840
|
+
readonly description: "Tags fetched successfully.";
|
|
12841
|
+
readonly content: {
|
|
12842
|
+
readonly "application/json": {
|
|
12843
|
+
readonly schema: {
|
|
12844
|
+
readonly $ref: "#/components/schemas/ListTagsSuccess";
|
|
12845
|
+
};
|
|
12846
|
+
};
|
|
12847
|
+
};
|
|
12848
|
+
};
|
|
12849
|
+
readonly 401: {
|
|
12850
|
+
readonly description: "Unauthorized - Missing or invalid access token.";
|
|
12851
|
+
readonly content: {
|
|
12852
|
+
readonly "application/json": {
|
|
12853
|
+
readonly schema: {
|
|
12854
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
12855
|
+
};
|
|
12856
|
+
};
|
|
12857
|
+
};
|
|
12858
|
+
};
|
|
12859
|
+
readonly 403: {
|
|
12860
|
+
readonly description: "Forbidden - Token issuer is not 'access', user lacks workspace access, or user lacks read access to both crm::tasks and crm::customers.";
|
|
12861
|
+
readonly content: {
|
|
12862
|
+
readonly "application/json": {
|
|
12863
|
+
readonly schema: {
|
|
12864
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
12865
|
+
};
|
|
12866
|
+
};
|
|
12867
|
+
};
|
|
12868
|
+
};
|
|
12869
|
+
};
|
|
12870
|
+
};
|
|
12871
|
+
};
|
|
12872
|
+
readonly "/tags/create": {
|
|
12873
|
+
readonly post: {
|
|
12874
|
+
readonly tags: readonly [
|
|
12875
|
+
"Tags"
|
|
12876
|
+
];
|
|
12877
|
+
readonly summary: "Create a tag";
|
|
12878
|
+
readonly description: "Creates a tag in the specified workspace. Requires workspace access and write access to crm::tasks or crm::customers.";
|
|
12879
|
+
readonly security: readonly [
|
|
12880
|
+
never
|
|
12881
|
+
];
|
|
12882
|
+
readonly requestBody: {
|
|
12883
|
+
readonly required: true;
|
|
12884
|
+
readonly content: {
|
|
12885
|
+
readonly "application/json": {
|
|
12886
|
+
readonly schema: {
|
|
12887
|
+
readonly type: "object";
|
|
12888
|
+
readonly required: readonly [
|
|
12889
|
+
"workspace",
|
|
12890
|
+
"name"
|
|
12891
|
+
];
|
|
12892
|
+
readonly properties: {
|
|
12893
|
+
readonly workspace: {
|
|
12894
|
+
readonly type: "string";
|
|
12895
|
+
readonly format: "uuid";
|
|
12896
|
+
readonly description: "Workspace identifier.";
|
|
12897
|
+
};
|
|
12898
|
+
readonly name: {
|
|
12899
|
+
readonly type: "string";
|
|
12900
|
+
readonly description: "Tag label.";
|
|
12901
|
+
};
|
|
12902
|
+
readonly description: {
|
|
12903
|
+
readonly type: "string";
|
|
12904
|
+
readonly description: "Optional tag description.";
|
|
12905
|
+
};
|
|
12906
|
+
};
|
|
12907
|
+
};
|
|
12908
|
+
};
|
|
12909
|
+
};
|
|
12910
|
+
};
|
|
12911
|
+
readonly responses: {
|
|
12912
|
+
readonly 201: {
|
|
12913
|
+
readonly description: "Tag created successfully.";
|
|
12914
|
+
readonly content: {
|
|
12915
|
+
readonly "application/json": {
|
|
12916
|
+
readonly schema: {
|
|
12917
|
+
readonly $ref: "#/components/schemas/CreateTagSuccess";
|
|
12918
|
+
};
|
|
12919
|
+
};
|
|
12920
|
+
};
|
|
12921
|
+
};
|
|
12922
|
+
readonly 400: {
|
|
12923
|
+
readonly description: "Invalid request payload.";
|
|
12924
|
+
readonly content: {
|
|
12925
|
+
readonly "application/json": {
|
|
12926
|
+
readonly schema: {
|
|
12927
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
12928
|
+
};
|
|
12929
|
+
};
|
|
12930
|
+
};
|
|
12931
|
+
};
|
|
12932
|
+
readonly 401: {
|
|
12933
|
+
readonly description: "Unauthorized - Missing or invalid access token.";
|
|
12934
|
+
readonly content: {
|
|
12935
|
+
readonly "application/json": {
|
|
12936
|
+
readonly schema: {
|
|
12937
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
12938
|
+
};
|
|
12939
|
+
};
|
|
12940
|
+
};
|
|
12941
|
+
};
|
|
12942
|
+
readonly 403: {
|
|
12943
|
+
readonly description: "Forbidden - Token issuer is not 'access', user lacks workspace access, or user lacks write access to both crm::tasks and crm::customers.";
|
|
12944
|
+
readonly content: {
|
|
12945
|
+
readonly "application/json": {
|
|
12946
|
+
readonly schema: {
|
|
12947
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
12948
|
+
};
|
|
12949
|
+
};
|
|
12950
|
+
};
|
|
12951
|
+
};
|
|
12952
|
+
};
|
|
12953
|
+
};
|
|
12954
|
+
};
|
|
12955
|
+
readonly "/tags/update": {
|
|
12956
|
+
readonly post: {
|
|
12957
|
+
readonly tags: readonly [
|
|
12958
|
+
"Tags"
|
|
12959
|
+
];
|
|
12960
|
+
readonly summary: "Update a tag";
|
|
12961
|
+
readonly description: "Updates a tag's name and/or description. Requires workspace access and write access to crm::general.";
|
|
12962
|
+
readonly security: readonly [
|
|
12963
|
+
never
|
|
12964
|
+
];
|
|
12965
|
+
readonly requestBody: {
|
|
12966
|
+
readonly required: true;
|
|
12967
|
+
readonly content: {
|
|
12968
|
+
readonly "application/json": {
|
|
12969
|
+
readonly schema: {
|
|
12970
|
+
readonly type: "object";
|
|
12971
|
+
readonly required: readonly [
|
|
12972
|
+
"tagId",
|
|
12973
|
+
"workspace"
|
|
12974
|
+
];
|
|
12975
|
+
readonly properties: {
|
|
12976
|
+
readonly tagId: {
|
|
12977
|
+
readonly type: "string";
|
|
12978
|
+
readonly format: "uuid";
|
|
12979
|
+
readonly description: "Tag identifier.";
|
|
12980
|
+
};
|
|
12981
|
+
readonly workspace: {
|
|
12982
|
+
readonly type: "string";
|
|
12983
|
+
readonly format: "uuid";
|
|
12984
|
+
readonly description: "Workspace identifier.";
|
|
12985
|
+
};
|
|
12986
|
+
readonly name: {
|
|
12987
|
+
readonly type: "string";
|
|
12988
|
+
readonly description: "Updated tag label.";
|
|
12989
|
+
};
|
|
12990
|
+
readonly description: {
|
|
12991
|
+
readonly type: "string";
|
|
12992
|
+
readonly description: "Updated tag description.";
|
|
12993
|
+
};
|
|
12994
|
+
};
|
|
12995
|
+
};
|
|
12996
|
+
};
|
|
12997
|
+
};
|
|
12998
|
+
};
|
|
12999
|
+
readonly responses: {
|
|
13000
|
+
readonly 200: {
|
|
13001
|
+
readonly description: "Tag updated successfully.";
|
|
13002
|
+
readonly content: {
|
|
13003
|
+
readonly "application/json": {
|
|
13004
|
+
readonly schema: {
|
|
13005
|
+
readonly $ref: "#/components/schemas/TagUpdateSuccess";
|
|
13006
|
+
};
|
|
13007
|
+
};
|
|
13008
|
+
};
|
|
13009
|
+
};
|
|
13010
|
+
readonly 400: {
|
|
13011
|
+
readonly description: "Invalid request payload.";
|
|
13012
|
+
readonly content: {
|
|
13013
|
+
readonly "application/json": {
|
|
13014
|
+
readonly schema: {
|
|
13015
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
13016
|
+
};
|
|
13017
|
+
};
|
|
13018
|
+
};
|
|
13019
|
+
};
|
|
13020
|
+
readonly 401: {
|
|
13021
|
+
readonly description: "Unauthorized - Missing or invalid access token.";
|
|
13022
|
+
readonly content: {
|
|
13023
|
+
readonly "application/json": {
|
|
13024
|
+
readonly schema: {
|
|
13025
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
13026
|
+
};
|
|
13027
|
+
};
|
|
13028
|
+
};
|
|
13029
|
+
};
|
|
13030
|
+
readonly 403: {
|
|
13031
|
+
readonly description: "Forbidden - Token issuer is not 'access', user lacks workspace access, or user lacks write access to crm::general.";
|
|
13032
|
+
readonly content: {
|
|
13033
|
+
readonly "application/json": {
|
|
13034
|
+
readonly schema: {
|
|
13035
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
13036
|
+
};
|
|
13037
|
+
};
|
|
13038
|
+
};
|
|
13039
|
+
};
|
|
13040
|
+
};
|
|
13041
|
+
};
|
|
13042
|
+
};
|
|
13043
|
+
readonly "/tags/delete": {
|
|
13044
|
+
readonly post: {
|
|
13045
|
+
readonly tags: readonly [
|
|
13046
|
+
"Tags"
|
|
13047
|
+
];
|
|
13048
|
+
readonly summary: "Delete a tag";
|
|
13049
|
+
readonly description: "Removes the tag from all linked tasks and customers, then deletes it from the workspace. Requires workspace access and write access to crm::general.";
|
|
13050
|
+
readonly security: readonly [
|
|
13051
|
+
never
|
|
13052
|
+
];
|
|
13053
|
+
readonly requestBody: {
|
|
13054
|
+
readonly required: true;
|
|
13055
|
+
readonly content: {
|
|
13056
|
+
readonly "application/json": {
|
|
13057
|
+
readonly schema: {
|
|
13058
|
+
readonly type: "object";
|
|
13059
|
+
readonly required: readonly [
|
|
13060
|
+
"tagId",
|
|
13061
|
+
"workspace"
|
|
13062
|
+
];
|
|
13063
|
+
readonly properties: {
|
|
13064
|
+
readonly tagId: {
|
|
13065
|
+
readonly type: "string";
|
|
13066
|
+
readonly format: "uuid";
|
|
13067
|
+
readonly description: "Tag identifier.";
|
|
13068
|
+
};
|
|
13069
|
+
readonly workspace: {
|
|
13070
|
+
readonly type: "string";
|
|
13071
|
+
readonly format: "uuid";
|
|
13072
|
+
readonly description: "Workspace identifier.";
|
|
13073
|
+
};
|
|
13074
|
+
};
|
|
13075
|
+
};
|
|
13076
|
+
};
|
|
13077
|
+
};
|
|
13078
|
+
};
|
|
13079
|
+
readonly responses: {
|
|
13080
|
+
readonly 200: {
|
|
13081
|
+
readonly description: "Tag deleted successfully.";
|
|
13082
|
+
readonly content: {
|
|
13083
|
+
readonly "application/json": {
|
|
13084
|
+
readonly schema: {
|
|
13085
|
+
readonly $ref: "#/components/schemas/SimpleSuccess";
|
|
13086
|
+
};
|
|
13087
|
+
};
|
|
13088
|
+
};
|
|
13089
|
+
};
|
|
13090
|
+
readonly 400: {
|
|
13091
|
+
readonly description: "Invalid request payload.";
|
|
13092
|
+
readonly content: {
|
|
13093
|
+
readonly "application/json": {
|
|
13094
|
+
readonly schema: {
|
|
13095
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
13096
|
+
};
|
|
13097
|
+
};
|
|
13098
|
+
};
|
|
13099
|
+
};
|
|
13100
|
+
readonly 401: {
|
|
13101
|
+
readonly description: "Unauthorized - Missing or invalid access token.";
|
|
13102
|
+
readonly content: {
|
|
13103
|
+
readonly "application/json": {
|
|
13104
|
+
readonly schema: {
|
|
13105
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
13106
|
+
};
|
|
13107
|
+
};
|
|
13108
|
+
};
|
|
13109
|
+
};
|
|
13110
|
+
readonly 403: {
|
|
13111
|
+
readonly description: "Forbidden - Token issuer is not 'access', user lacks workspace access, or user lacks write access to crm::general.";
|
|
13112
|
+
readonly content: {
|
|
13113
|
+
readonly "application/json": {
|
|
13114
|
+
readonly schema: {
|
|
13115
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
13116
|
+
};
|
|
13117
|
+
};
|
|
13118
|
+
};
|
|
13119
|
+
};
|
|
13120
|
+
readonly 404: {
|
|
13121
|
+
readonly description: "Tag not found.";
|
|
12719
13122
|
readonly content: {
|
|
12720
13123
|
readonly "application/json": {
|
|
12721
13124
|
readonly schema: {
|
|
@@ -18045,6 +18448,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
18045
18448
|
id: string;
|
|
18046
18449
|
created_at: string;
|
|
18047
18450
|
invoiceId: string;
|
|
18451
|
+
status: string;
|
|
18048
18452
|
workspaceId: string;
|
|
18049
18453
|
created_by: string;
|
|
18050
18454
|
customerId: string;
|
|
@@ -18072,6 +18476,159 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
18072
18476
|
status: 201;
|
|
18073
18477
|
};
|
|
18074
18478
|
};
|
|
18479
|
+
} & {
|
|
18480
|
+
"/list/:workspace/:customerId": {
|
|
18481
|
+
$get: {
|
|
18482
|
+
input: {
|
|
18483
|
+
param: {
|
|
18484
|
+
workspace: string;
|
|
18485
|
+
} & {
|
|
18486
|
+
customerId: string;
|
|
18487
|
+
};
|
|
18488
|
+
};
|
|
18489
|
+
output: {
|
|
18490
|
+
success: false;
|
|
18491
|
+
error: string;
|
|
18492
|
+
};
|
|
18493
|
+
outputFormat: "json";
|
|
18494
|
+
status: 404;
|
|
18495
|
+
} | {
|
|
18496
|
+
input: {
|
|
18497
|
+
param: {
|
|
18498
|
+
workspace: string;
|
|
18499
|
+
} & {
|
|
18500
|
+
customerId: string;
|
|
18501
|
+
};
|
|
18502
|
+
};
|
|
18503
|
+
output: {
|
|
18504
|
+
success: false;
|
|
18505
|
+
error: string;
|
|
18506
|
+
};
|
|
18507
|
+
outputFormat: "json";
|
|
18508
|
+
status: 400;
|
|
18509
|
+
} | {
|
|
18510
|
+
input: {
|
|
18511
|
+
param: {
|
|
18512
|
+
workspace: string;
|
|
18513
|
+
} & {
|
|
18514
|
+
customerId: string;
|
|
18515
|
+
};
|
|
18516
|
+
};
|
|
18517
|
+
output: {
|
|
18518
|
+
success: true;
|
|
18519
|
+
cinvoices: {
|
|
18520
|
+
updated_at: string | null;
|
|
18521
|
+
deleted_at: string | null;
|
|
18522
|
+
verified_at: string | null;
|
|
18523
|
+
suspended_at: string | null;
|
|
18524
|
+
created_at: string;
|
|
18525
|
+
id: string;
|
|
18526
|
+
workspaceId: string;
|
|
18527
|
+
invoiceId: string;
|
|
18528
|
+
serviceId: string;
|
|
18529
|
+
SellerBillingId: string;
|
|
18530
|
+
customerId: string;
|
|
18531
|
+
date: string;
|
|
18532
|
+
language: string;
|
|
18533
|
+
currency: string;
|
|
18534
|
+
vatOption: string;
|
|
18535
|
+
vatRate: number | null;
|
|
18536
|
+
buyerInn: string | null;
|
|
18537
|
+
buyerKpp: string | null;
|
|
18538
|
+
unitName: string;
|
|
18539
|
+
unitPrice: number;
|
|
18540
|
+
unitQuantity: number;
|
|
18541
|
+
notes: string | null;
|
|
18542
|
+
discount: number | null;
|
|
18543
|
+
status: string;
|
|
18544
|
+
created_by: string;
|
|
18545
|
+
}[];
|
|
18546
|
+
};
|
|
18547
|
+
outputFormat: "json";
|
|
18548
|
+
status: 200;
|
|
18549
|
+
};
|
|
18550
|
+
};
|
|
18551
|
+
} & {
|
|
18552
|
+
"/update": {
|
|
18553
|
+
$post: {
|
|
18554
|
+
input: {};
|
|
18555
|
+
output: {
|
|
18556
|
+
success: false;
|
|
18557
|
+
error: string;
|
|
18558
|
+
};
|
|
18559
|
+
outputFormat: "json";
|
|
18560
|
+
status: 404;
|
|
18561
|
+
} | {
|
|
18562
|
+
input: {};
|
|
18563
|
+
output: {
|
|
18564
|
+
success: false;
|
|
18565
|
+
error: string;
|
|
18566
|
+
};
|
|
18567
|
+
outputFormat: "json";
|
|
18568
|
+
status: 400;
|
|
18569
|
+
} | {
|
|
18570
|
+
input: {};
|
|
18571
|
+
output: {
|
|
18572
|
+
success: true;
|
|
18573
|
+
cinvoice: {
|
|
18574
|
+
updated_at: string | null;
|
|
18575
|
+
deleted_at: string | null;
|
|
18576
|
+
verified_at: string | null;
|
|
18577
|
+
suspended_at: string | null;
|
|
18578
|
+
created_at: string;
|
|
18579
|
+
id: string;
|
|
18580
|
+
workspaceId: string;
|
|
18581
|
+
invoiceId: string;
|
|
18582
|
+
serviceId: string;
|
|
18583
|
+
SellerBillingId: string;
|
|
18584
|
+
customerId: string;
|
|
18585
|
+
date: string;
|
|
18586
|
+
language: string;
|
|
18587
|
+
currency: string;
|
|
18588
|
+
vatOption: string;
|
|
18589
|
+
vatRate: number | null;
|
|
18590
|
+
buyerInn: string | null;
|
|
18591
|
+
buyerKpp: string | null;
|
|
18592
|
+
unitName: string;
|
|
18593
|
+
unitPrice: number;
|
|
18594
|
+
unitQuantity: number;
|
|
18595
|
+
notes: string | null;
|
|
18596
|
+
discount: number | null;
|
|
18597
|
+
status: string;
|
|
18598
|
+
created_by: string;
|
|
18599
|
+
}[];
|
|
18600
|
+
};
|
|
18601
|
+
outputFormat: "json";
|
|
18602
|
+
status: 200;
|
|
18603
|
+
};
|
|
18604
|
+
};
|
|
18605
|
+
} & {
|
|
18606
|
+
"/delete": {
|
|
18607
|
+
$post: {
|
|
18608
|
+
input: {};
|
|
18609
|
+
output: {
|
|
18610
|
+
success: false;
|
|
18611
|
+
error: string;
|
|
18612
|
+
};
|
|
18613
|
+
outputFormat: "json";
|
|
18614
|
+
status: 404;
|
|
18615
|
+
} | {
|
|
18616
|
+
input: {};
|
|
18617
|
+
output: {
|
|
18618
|
+
success: false;
|
|
18619
|
+
error: string;
|
|
18620
|
+
};
|
|
18621
|
+
outputFormat: "json";
|
|
18622
|
+
status: 400;
|
|
18623
|
+
} | {
|
|
18624
|
+
input: {};
|
|
18625
|
+
output: {
|
|
18626
|
+
success: true;
|
|
18627
|
+
};
|
|
18628
|
+
outputFormat: "json";
|
|
18629
|
+
status: 200;
|
|
18630
|
+
};
|
|
18631
|
+
};
|
|
18075
18632
|
}, "/cinvoices"> | import("hono/types").MergeSchemaPath<{
|
|
18076
18633
|
"/list/:workspace": {
|
|
18077
18634
|
$get: {
|