@mestra-dev/contract 0.0.182 → 0.0.184
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 +517 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -4458,6 +4458,103 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
4458
4458
|
};
|
|
4459
4459
|
};
|
|
4460
4460
|
};
|
|
4461
|
+
readonly ChannelPerformanceTotal: {
|
|
4462
|
+
readonly type: "object";
|
|
4463
|
+
readonly required: readonly [
|
|
4464
|
+
"leadSource",
|
|
4465
|
+
"currency",
|
|
4466
|
+
"paidAmountMinor",
|
|
4467
|
+
"paidInvoiceCount",
|
|
4468
|
+
"pendingAmountMinor",
|
|
4469
|
+
"pendingInvoiceCount"
|
|
4470
|
+
];
|
|
4471
|
+
readonly properties: {
|
|
4472
|
+
readonly leadSource: {
|
|
4473
|
+
readonly type: "string";
|
|
4474
|
+
readonly enum: readonly [
|
|
4475
|
+
"cian",
|
|
4476
|
+
"avito",
|
|
4477
|
+
"vk",
|
|
4478
|
+
"yandex",
|
|
4479
|
+
"website",
|
|
4480
|
+
"referral",
|
|
4481
|
+
"walk_in",
|
|
4482
|
+
"unattributed"
|
|
4483
|
+
];
|
|
4484
|
+
readonly description: "Lead acquisition source, or unattributed when no source was recorded.";
|
|
4485
|
+
};
|
|
4486
|
+
readonly currency: {
|
|
4487
|
+
readonly type: "string";
|
|
4488
|
+
readonly description: "Invoice currency.";
|
|
4489
|
+
};
|
|
4490
|
+
readonly paidAmountMinor: {
|
|
4491
|
+
readonly type: "integer";
|
|
4492
|
+
readonly description: "Paid invoice revenue in minor units after discount, excluding VAT.";
|
|
4493
|
+
};
|
|
4494
|
+
readonly paidInvoiceCount: {
|
|
4495
|
+
readonly type: "integer";
|
|
4496
|
+
readonly description: "Number of paid invoices included in the total.";
|
|
4497
|
+
};
|
|
4498
|
+
readonly pendingAmountMinor: {
|
|
4499
|
+
readonly type: "integer";
|
|
4500
|
+
readonly description: "Pending invoice value in minor units after discount, excluding VAT.";
|
|
4501
|
+
};
|
|
4502
|
+
readonly pendingInvoiceCount: {
|
|
4503
|
+
readonly type: "integer";
|
|
4504
|
+
readonly description: "Number of pending invoices included in the total.";
|
|
4505
|
+
};
|
|
4506
|
+
};
|
|
4507
|
+
};
|
|
4508
|
+
readonly ChannelPerformanceAnalysisSuccess: {
|
|
4509
|
+
readonly type: "object";
|
|
4510
|
+
readonly required: readonly [
|
|
4511
|
+
"success",
|
|
4512
|
+
"workspaceId",
|
|
4513
|
+
"category",
|
|
4514
|
+
"period",
|
|
4515
|
+
"channels"
|
|
4516
|
+
];
|
|
4517
|
+
readonly properties: {
|
|
4518
|
+
readonly success: {
|
|
4519
|
+
readonly type: "boolean";
|
|
4520
|
+
readonly const: true;
|
|
4521
|
+
};
|
|
4522
|
+
readonly workspaceId: {
|
|
4523
|
+
readonly type: "string";
|
|
4524
|
+
readonly format: "uuid";
|
|
4525
|
+
};
|
|
4526
|
+
readonly category: {
|
|
4527
|
+
readonly type: "string";
|
|
4528
|
+
readonly description: "Workspace category.";
|
|
4529
|
+
};
|
|
4530
|
+
readonly period: {
|
|
4531
|
+
readonly type: "object";
|
|
4532
|
+
readonly required: readonly [
|
|
4533
|
+
"from",
|
|
4534
|
+
"to"
|
|
4535
|
+
];
|
|
4536
|
+
readonly properties: {
|
|
4537
|
+
readonly from: {
|
|
4538
|
+
readonly type: "string";
|
|
4539
|
+
readonly format: "date-time";
|
|
4540
|
+
readonly nullable: true;
|
|
4541
|
+
};
|
|
4542
|
+
readonly to: {
|
|
4543
|
+
readonly type: "string";
|
|
4544
|
+
readonly format: "date-time";
|
|
4545
|
+
readonly nullable: true;
|
|
4546
|
+
};
|
|
4547
|
+
};
|
|
4548
|
+
};
|
|
4549
|
+
readonly channels: {
|
|
4550
|
+
readonly type: "array";
|
|
4551
|
+
readonly items: {
|
|
4552
|
+
readonly $ref: "#/components/schemas/ChannelPerformanceTotal";
|
|
4553
|
+
};
|
|
4554
|
+
readonly description: "Revenue grouped by lead source and invoice currency. Empty when no paid or pending invoices match the period.";
|
|
4555
|
+
};
|
|
4556
|
+
};
|
|
4557
|
+
};
|
|
4461
4558
|
readonly ConversionRateAnalysisSuccess: {
|
|
4462
4559
|
readonly type: "object";
|
|
4463
4560
|
readonly required: readonly [
|
|
@@ -4623,6 +4720,99 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
4623
4720
|
};
|
|
4624
4721
|
};
|
|
4625
4722
|
};
|
|
4723
|
+
readonly TaskPhaseFunnelItem: {
|
|
4724
|
+
readonly type: "object";
|
|
4725
|
+
readonly required: readonly [
|
|
4726
|
+
"phaseId",
|
|
4727
|
+
"phaseName",
|
|
4728
|
+
"sortOrder",
|
|
4729
|
+
"taskCount",
|
|
4730
|
+
"visitCount",
|
|
4731
|
+
"averageDurationDays",
|
|
4732
|
+
"averageCurrentDurationDays"
|
|
4733
|
+
];
|
|
4734
|
+
readonly properties: {
|
|
4735
|
+
readonly phaseId: {
|
|
4736
|
+
readonly type: "string";
|
|
4737
|
+
readonly format: "uuid";
|
|
4738
|
+
};
|
|
4739
|
+
readonly phaseName: {
|
|
4740
|
+
readonly type: "string";
|
|
4741
|
+
readonly description: "Workspace-defined task phase name.";
|
|
4742
|
+
};
|
|
4743
|
+
readonly sortOrder: {
|
|
4744
|
+
readonly type: "integer";
|
|
4745
|
+
readonly description: "Phase position in the workspace funnel.";
|
|
4746
|
+
};
|
|
4747
|
+
readonly taskCount: {
|
|
4748
|
+
readonly type: "integer";
|
|
4749
|
+
readonly description: "Tasks currently in this phase, optionally limited to tasks created in the reporting period.";
|
|
4750
|
+
};
|
|
4751
|
+
readonly visitCount: {
|
|
4752
|
+
readonly type: "integer";
|
|
4753
|
+
readonly description: "Recorded entries into this phase in the reporting period.";
|
|
4754
|
+
};
|
|
4755
|
+
readonly averageDurationDays: {
|
|
4756
|
+
readonly type: "number";
|
|
4757
|
+
readonly nullable: true;
|
|
4758
|
+
readonly description: "Average elapsed days for recorded phase visits. Active visits end at now, or at the to timestamp when supplied.";
|
|
4759
|
+
};
|
|
4760
|
+
readonly averageCurrentDurationDays: {
|
|
4761
|
+
readonly type: "number";
|
|
4762
|
+
readonly nullable: true;
|
|
4763
|
+
readonly description: "Average days that tasks currently in this phase have been there. Null when no tracked task is currently in the phase.";
|
|
4764
|
+
};
|
|
4765
|
+
};
|
|
4766
|
+
};
|
|
4767
|
+
readonly TaskPhaseFunnelAnalysisSuccess: {
|
|
4768
|
+
readonly type: "object";
|
|
4769
|
+
readonly required: readonly [
|
|
4770
|
+
"success",
|
|
4771
|
+
"workspaceId",
|
|
4772
|
+
"category",
|
|
4773
|
+
"period",
|
|
4774
|
+
"phases"
|
|
4775
|
+
];
|
|
4776
|
+
readonly properties: {
|
|
4777
|
+
readonly success: {
|
|
4778
|
+
readonly type: "boolean";
|
|
4779
|
+
readonly const: true;
|
|
4780
|
+
};
|
|
4781
|
+
readonly workspaceId: {
|
|
4782
|
+
readonly type: "string";
|
|
4783
|
+
readonly format: "uuid";
|
|
4784
|
+
};
|
|
4785
|
+
readonly category: {
|
|
4786
|
+
readonly type: "string";
|
|
4787
|
+
readonly description: "Workspace category.";
|
|
4788
|
+
};
|
|
4789
|
+
readonly period: {
|
|
4790
|
+
readonly type: "object";
|
|
4791
|
+
readonly required: readonly [
|
|
4792
|
+
"from",
|
|
4793
|
+
"to"
|
|
4794
|
+
];
|
|
4795
|
+
readonly properties: {
|
|
4796
|
+
readonly from: {
|
|
4797
|
+
readonly type: "string";
|
|
4798
|
+
readonly format: "date-time";
|
|
4799
|
+
readonly nullable: true;
|
|
4800
|
+
};
|
|
4801
|
+
readonly to: {
|
|
4802
|
+
readonly type: "string";
|
|
4803
|
+
readonly format: "date-time";
|
|
4804
|
+
readonly nullable: true;
|
|
4805
|
+
};
|
|
4806
|
+
};
|
|
4807
|
+
};
|
|
4808
|
+
readonly phases: {
|
|
4809
|
+
readonly type: "array";
|
|
4810
|
+
readonly items: {
|
|
4811
|
+
readonly $ref: "#/components/schemas/TaskPhaseFunnelItem";
|
|
4812
|
+
};
|
|
4813
|
+
};
|
|
4814
|
+
};
|
|
4815
|
+
};
|
|
4626
4816
|
readonly CHistory: {
|
|
4627
4817
|
readonly type: "object";
|
|
4628
4818
|
readonly required: readonly [
|
|
@@ -13433,6 +13623,102 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
13433
13623
|
};
|
|
13434
13624
|
};
|
|
13435
13625
|
};
|
|
13626
|
+
readonly "/analytics/{workspace}/task-phase-funnel": {
|
|
13627
|
+
readonly get: {
|
|
13628
|
+
readonly tags: readonly [
|
|
13629
|
+
"Analytics"
|
|
13630
|
+
];
|
|
13631
|
+
readonly summary: "Get real-estate task-phase funnel and durations";
|
|
13632
|
+
readonly description: "Returns the current task funnel and time-in-phase analytics for a real-estate workspace. taskCount is the number of tasks currently in each phase; when supplied, from and to limit it to tasks created in that period. visitCount and duration averages use phase entries recorded in the period. Active phase visits are measured through now, or through to when supplied. Tracking begins when this API version is deployed, so tasks that have not changed phase since then have no duration sample. Requires workspace access and read access to crm::analytics. Other workspace categories return 400.";
|
|
13633
|
+
readonly security: readonly [
|
|
13634
|
+
never
|
|
13635
|
+
];
|
|
13636
|
+
readonly parameters: readonly [
|
|
13637
|
+
{
|
|
13638
|
+
readonly name: "workspace";
|
|
13639
|
+
readonly in: "path";
|
|
13640
|
+
readonly required: true;
|
|
13641
|
+
readonly schema: {
|
|
13642
|
+
readonly type: "string";
|
|
13643
|
+
readonly format: "uuid";
|
|
13644
|
+
};
|
|
13645
|
+
readonly description: "Workspace identifier.";
|
|
13646
|
+
},
|
|
13647
|
+
{
|
|
13648
|
+
readonly name: "from";
|
|
13649
|
+
readonly in: "query";
|
|
13650
|
+
readonly required: false;
|
|
13651
|
+
readonly schema: {
|
|
13652
|
+
readonly type: "string";
|
|
13653
|
+
readonly format: "date-time";
|
|
13654
|
+
};
|
|
13655
|
+
readonly description: "Include phase entries and tasks created at or after this timestamp.";
|
|
13656
|
+
},
|
|
13657
|
+
{
|
|
13658
|
+
readonly name: "to";
|
|
13659
|
+
readonly in: "query";
|
|
13660
|
+
readonly required: false;
|
|
13661
|
+
readonly schema: {
|
|
13662
|
+
readonly type: "string";
|
|
13663
|
+
readonly format: "date-time";
|
|
13664
|
+
};
|
|
13665
|
+
readonly description: "Include phase entries and tasks created before this timestamp; active durations are measured through this timestamp.";
|
|
13666
|
+
}
|
|
13667
|
+
];
|
|
13668
|
+
readonly responses: {
|
|
13669
|
+
readonly 200: {
|
|
13670
|
+
readonly description: "Task-phase funnel fetched successfully.";
|
|
13671
|
+
readonly content: {
|
|
13672
|
+
readonly "application/json": {
|
|
13673
|
+
readonly schema: {
|
|
13674
|
+
readonly $ref: "#/components/schemas/TaskPhaseFunnelAnalysisSuccess";
|
|
13675
|
+
};
|
|
13676
|
+
};
|
|
13677
|
+
};
|
|
13678
|
+
};
|
|
13679
|
+
readonly 400: {
|
|
13680
|
+
readonly description: "Invalid query, invalid workspace ID, or unsupported workspace category.";
|
|
13681
|
+
readonly content: {
|
|
13682
|
+
readonly "application/json": {
|
|
13683
|
+
readonly schema: {
|
|
13684
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
13685
|
+
};
|
|
13686
|
+
};
|
|
13687
|
+
};
|
|
13688
|
+
};
|
|
13689
|
+
readonly 401: {
|
|
13690
|
+
readonly description: "Unauthorized - Missing or invalid access token.";
|
|
13691
|
+
readonly content: {
|
|
13692
|
+
readonly "application/json": {
|
|
13693
|
+
readonly schema: {
|
|
13694
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
13695
|
+
};
|
|
13696
|
+
};
|
|
13697
|
+
};
|
|
13698
|
+
};
|
|
13699
|
+
readonly 403: {
|
|
13700
|
+
readonly description: "Forbidden - Token issuer is not 'access', user lacks workspace access, or user lacks read access to crm::analytics resource.";
|
|
13701
|
+
readonly content: {
|
|
13702
|
+
readonly "application/json": {
|
|
13703
|
+
readonly schema: {
|
|
13704
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
13705
|
+
};
|
|
13706
|
+
};
|
|
13707
|
+
};
|
|
13708
|
+
};
|
|
13709
|
+
readonly 404: {
|
|
13710
|
+
readonly description: "Workspace not found.";
|
|
13711
|
+
readonly content: {
|
|
13712
|
+
readonly "application/json": {
|
|
13713
|
+
readonly schema: {
|
|
13714
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
13715
|
+
};
|
|
13716
|
+
};
|
|
13717
|
+
};
|
|
13718
|
+
};
|
|
13719
|
+
};
|
|
13720
|
+
};
|
|
13721
|
+
};
|
|
13436
13722
|
readonly "/analytics/{workspace}/total-revenue": {
|
|
13437
13723
|
readonly get: {
|
|
13438
13724
|
readonly tags: readonly [
|
|
@@ -13625,6 +13911,102 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
13625
13911
|
};
|
|
13626
13912
|
};
|
|
13627
13913
|
};
|
|
13914
|
+
readonly "/analytics/{workspace}/channel-performance": {
|
|
13915
|
+
readonly get: {
|
|
13916
|
+
readonly tags: readonly [
|
|
13917
|
+
"Analytics"
|
|
13918
|
+
];
|
|
13919
|
+
readonly summary: "Get real-estate channel performance";
|
|
13920
|
+
readonly description: "Returns paid and pending CInvoice revenue grouped by the linked customer's acquisition source and invoice currency. Paid invoices are filtered by paidAt; pending invoices are filtered by invoice date; both period bounds are from inclusive and to exclusive. Amounts are post-discount minor units and exclude VAT. Customers without a recorded source are grouped as unattributed. Soft-deleted invoices and customers, plus cancelled and refunded invoices, are excluded. Requires workspace access and read access to crm::analytics. Other workspace categories return 400.";
|
|
13921
|
+
readonly security: readonly [
|
|
13922
|
+
never
|
|
13923
|
+
];
|
|
13924
|
+
readonly parameters: readonly [
|
|
13925
|
+
{
|
|
13926
|
+
readonly name: "workspace";
|
|
13927
|
+
readonly in: "path";
|
|
13928
|
+
readonly required: true;
|
|
13929
|
+
readonly schema: {
|
|
13930
|
+
readonly type: "string";
|
|
13931
|
+
readonly format: "uuid";
|
|
13932
|
+
};
|
|
13933
|
+
readonly description: "Workspace identifier.";
|
|
13934
|
+
},
|
|
13935
|
+
{
|
|
13936
|
+
readonly name: "from";
|
|
13937
|
+
readonly in: "query";
|
|
13938
|
+
readonly required: false;
|
|
13939
|
+
readonly schema: {
|
|
13940
|
+
readonly type: "string";
|
|
13941
|
+
readonly format: "date-time";
|
|
13942
|
+
};
|
|
13943
|
+
readonly description: "Include pending invoices dated and paid invoices paid at or after this timestamp.";
|
|
13944
|
+
},
|
|
13945
|
+
{
|
|
13946
|
+
readonly name: "to";
|
|
13947
|
+
readonly in: "query";
|
|
13948
|
+
readonly required: false;
|
|
13949
|
+
readonly schema: {
|
|
13950
|
+
readonly type: "string";
|
|
13951
|
+
readonly format: "date-time";
|
|
13952
|
+
};
|
|
13953
|
+
readonly description: "Include pending invoices dated and paid invoices paid before this timestamp.";
|
|
13954
|
+
}
|
|
13955
|
+
];
|
|
13956
|
+
readonly responses: {
|
|
13957
|
+
readonly 200: {
|
|
13958
|
+
readonly description: "Channel performance fetched successfully.";
|
|
13959
|
+
readonly content: {
|
|
13960
|
+
readonly "application/json": {
|
|
13961
|
+
readonly schema: {
|
|
13962
|
+
readonly $ref: "#/components/schemas/ChannelPerformanceAnalysisSuccess";
|
|
13963
|
+
};
|
|
13964
|
+
};
|
|
13965
|
+
};
|
|
13966
|
+
};
|
|
13967
|
+
readonly 400: {
|
|
13968
|
+
readonly description: "Invalid query, invalid workspace ID, or unsupported workspace category.";
|
|
13969
|
+
readonly content: {
|
|
13970
|
+
readonly "application/json": {
|
|
13971
|
+
readonly schema: {
|
|
13972
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
13973
|
+
};
|
|
13974
|
+
};
|
|
13975
|
+
};
|
|
13976
|
+
};
|
|
13977
|
+
readonly 401: {
|
|
13978
|
+
readonly description: "Unauthorized - Missing or invalid access token.";
|
|
13979
|
+
readonly content: {
|
|
13980
|
+
readonly "application/json": {
|
|
13981
|
+
readonly schema: {
|
|
13982
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
13983
|
+
};
|
|
13984
|
+
};
|
|
13985
|
+
};
|
|
13986
|
+
};
|
|
13987
|
+
readonly 403: {
|
|
13988
|
+
readonly description: "Forbidden - Token issuer is not 'access', user lacks workspace access, or user lacks read access to crm::analytics resource.";
|
|
13989
|
+
readonly content: {
|
|
13990
|
+
readonly "application/json": {
|
|
13991
|
+
readonly schema: {
|
|
13992
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
13993
|
+
};
|
|
13994
|
+
};
|
|
13995
|
+
};
|
|
13996
|
+
};
|
|
13997
|
+
readonly 404: {
|
|
13998
|
+
readonly description: "Workspace not found.";
|
|
13999
|
+
readonly content: {
|
|
14000
|
+
readonly "application/json": {
|
|
14001
|
+
readonly schema: {
|
|
14002
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
14003
|
+
};
|
|
14004
|
+
};
|
|
14005
|
+
};
|
|
14006
|
+
};
|
|
14007
|
+
};
|
|
14008
|
+
};
|
|
14009
|
+
};
|
|
13628
14010
|
readonly "/analytics/{workspace}/conversion-rate": {
|
|
13629
14011
|
readonly get: {
|
|
13630
14012
|
readonly tags: readonly [
|
|
@@ -25926,6 +26308,74 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
25926
26308
|
};
|
|
25927
26309
|
};
|
|
25928
26310
|
}, "/payments"> | import("hono/types").MergeSchemaPath<{
|
|
26311
|
+
"/:workspace/task-phase-funnel": {
|
|
26312
|
+
$get: {
|
|
26313
|
+
input: {
|
|
26314
|
+
param: {
|
|
26315
|
+
workspace: string;
|
|
26316
|
+
};
|
|
26317
|
+
};
|
|
26318
|
+
output: {
|
|
26319
|
+
success: false;
|
|
26320
|
+
error: {
|
|
26321
|
+
[x: string]: import("hono/utils/types").JSONValue;
|
|
26322
|
+
};
|
|
26323
|
+
};
|
|
26324
|
+
outputFormat: "json";
|
|
26325
|
+
status: 400;
|
|
26326
|
+
} | {
|
|
26327
|
+
input: {
|
|
26328
|
+
param: {
|
|
26329
|
+
workspace: string;
|
|
26330
|
+
};
|
|
26331
|
+
};
|
|
26332
|
+
output: {
|
|
26333
|
+
success: false;
|
|
26334
|
+
error: string;
|
|
26335
|
+
};
|
|
26336
|
+
outputFormat: "json";
|
|
26337
|
+
status: 400;
|
|
26338
|
+
} | {
|
|
26339
|
+
input: {
|
|
26340
|
+
param: {
|
|
26341
|
+
workspace: string;
|
|
26342
|
+
};
|
|
26343
|
+
};
|
|
26344
|
+
output: {
|
|
26345
|
+
success: false;
|
|
26346
|
+
error: string;
|
|
26347
|
+
};
|
|
26348
|
+
outputFormat: "json";
|
|
26349
|
+
status: 404;
|
|
26350
|
+
} | {
|
|
26351
|
+
input: {
|
|
26352
|
+
param: {
|
|
26353
|
+
workspace: string;
|
|
26354
|
+
};
|
|
26355
|
+
};
|
|
26356
|
+
output: {
|
|
26357
|
+
success: true;
|
|
26358
|
+
workspaceId: string;
|
|
26359
|
+
category: string;
|
|
26360
|
+
period: {
|
|
26361
|
+
from: string | null;
|
|
26362
|
+
to: string | null;
|
|
26363
|
+
};
|
|
26364
|
+
phases: {
|
|
26365
|
+
averageDurationDays: number | null;
|
|
26366
|
+
averageCurrentDurationDays: number | null;
|
|
26367
|
+
phaseId: string;
|
|
26368
|
+
phaseName: string;
|
|
26369
|
+
sortOrder: number;
|
|
26370
|
+
taskCount: number;
|
|
26371
|
+
visitCount: number;
|
|
26372
|
+
}[];
|
|
26373
|
+
};
|
|
26374
|
+
outputFormat: "json";
|
|
26375
|
+
status: 200;
|
|
26376
|
+
};
|
|
26377
|
+
};
|
|
26378
|
+
} & {
|
|
25929
26379
|
"/:workspace/total-revenue": {
|
|
25930
26380
|
$get: {
|
|
25931
26381
|
input: {
|
|
@@ -26114,6 +26564,73 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
26114
26564
|
status: 200;
|
|
26115
26565
|
};
|
|
26116
26566
|
};
|
|
26567
|
+
} & {
|
|
26568
|
+
"/:workspace/channel-performance": {
|
|
26569
|
+
$get: {
|
|
26570
|
+
input: {
|
|
26571
|
+
param: {
|
|
26572
|
+
workspace: string;
|
|
26573
|
+
};
|
|
26574
|
+
};
|
|
26575
|
+
output: {
|
|
26576
|
+
success: false;
|
|
26577
|
+
error: {
|
|
26578
|
+
[x: string]: import("hono/utils/types").JSONValue;
|
|
26579
|
+
};
|
|
26580
|
+
};
|
|
26581
|
+
outputFormat: "json";
|
|
26582
|
+
status: 400;
|
|
26583
|
+
} | {
|
|
26584
|
+
input: {
|
|
26585
|
+
param: {
|
|
26586
|
+
workspace: string;
|
|
26587
|
+
};
|
|
26588
|
+
};
|
|
26589
|
+
output: {
|
|
26590
|
+
success: false;
|
|
26591
|
+
error: string;
|
|
26592
|
+
};
|
|
26593
|
+
outputFormat: "json";
|
|
26594
|
+
status: 400;
|
|
26595
|
+
} | {
|
|
26596
|
+
input: {
|
|
26597
|
+
param: {
|
|
26598
|
+
workspace: string;
|
|
26599
|
+
};
|
|
26600
|
+
};
|
|
26601
|
+
output: {
|
|
26602
|
+
success: false;
|
|
26603
|
+
error: string;
|
|
26604
|
+
};
|
|
26605
|
+
outputFormat: "json";
|
|
26606
|
+
status: 404;
|
|
26607
|
+
} | {
|
|
26608
|
+
input: {
|
|
26609
|
+
param: {
|
|
26610
|
+
workspace: string;
|
|
26611
|
+
};
|
|
26612
|
+
};
|
|
26613
|
+
output: {
|
|
26614
|
+
success: true;
|
|
26615
|
+
workspaceId: string;
|
|
26616
|
+
category: string;
|
|
26617
|
+
period: {
|
|
26618
|
+
from: string | null;
|
|
26619
|
+
to: string | null;
|
|
26620
|
+
};
|
|
26621
|
+
channels: {
|
|
26622
|
+
leadSource: string;
|
|
26623
|
+
currency: string;
|
|
26624
|
+
paidAmountMinor: number;
|
|
26625
|
+
paidInvoiceCount: number;
|
|
26626
|
+
pendingAmountMinor: number;
|
|
26627
|
+
pendingInvoiceCount: number;
|
|
26628
|
+
}[];
|
|
26629
|
+
};
|
|
26630
|
+
outputFormat: "json";
|
|
26631
|
+
status: 200;
|
|
26632
|
+
};
|
|
26633
|
+
};
|
|
26117
26634
|
} & {
|
|
26118
26635
|
"/:workspace/forecast-revenue": {
|
|
26119
26636
|
$get: {
|