@mestra-dev/contract 0.0.185 → 0.0.187
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 +273 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1367,7 +1367,8 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
1367
1367
|
"id",
|
|
1368
1368
|
"workspaceId",
|
|
1369
1369
|
"name",
|
|
1370
|
-
"sortOrder"
|
|
1370
|
+
"sortOrder",
|
|
1371
|
+
"isBuiltin"
|
|
1371
1372
|
];
|
|
1372
1373
|
readonly properties: {
|
|
1373
1374
|
readonly id: {
|
|
@@ -1386,6 +1387,10 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
1386
1387
|
readonly type: "integer";
|
|
1387
1388
|
readonly minimum: 0;
|
|
1388
1389
|
};
|
|
1390
|
+
readonly isBuiltin: {
|
|
1391
|
+
readonly type: "boolean";
|
|
1392
|
+
readonly description: "Whether this phase is built-in and cannot be deleted.";
|
|
1393
|
+
};
|
|
1389
1394
|
readonly created_at: {
|
|
1390
1395
|
readonly type: "string";
|
|
1391
1396
|
readonly format: "date-time";
|
|
@@ -4719,6 +4724,103 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
4719
4724
|
};
|
|
4720
4725
|
};
|
|
4721
4726
|
};
|
|
4727
|
+
readonly WorkloadDistributionEmployee: {
|
|
4728
|
+
readonly type: "object";
|
|
4729
|
+
readonly required: readonly [
|
|
4730
|
+
"collaboratorId",
|
|
4731
|
+
"userId",
|
|
4732
|
+
"firstName",
|
|
4733
|
+
"lastName",
|
|
4734
|
+
"profilePicture",
|
|
4735
|
+
"status",
|
|
4736
|
+
"taskCount"
|
|
4737
|
+
];
|
|
4738
|
+
readonly properties: {
|
|
4739
|
+
readonly collaboratorId: {
|
|
4740
|
+
readonly type: "string";
|
|
4741
|
+
readonly format: "uuid";
|
|
4742
|
+
readonly description: "Workspace collaborator identifier.";
|
|
4743
|
+
};
|
|
4744
|
+
readonly userId: {
|
|
4745
|
+
readonly type: "string";
|
|
4746
|
+
readonly format: "uuid";
|
|
4747
|
+
readonly description: "Underlying user identifier.";
|
|
4748
|
+
};
|
|
4749
|
+
readonly firstName: {
|
|
4750
|
+
readonly type: "string";
|
|
4751
|
+
readonly nullable: true;
|
|
4752
|
+
readonly description: "Collaborator first name.";
|
|
4753
|
+
};
|
|
4754
|
+
readonly lastName: {
|
|
4755
|
+
readonly type: "string";
|
|
4756
|
+
readonly nullable: true;
|
|
4757
|
+
readonly description: "Collaborator last name.";
|
|
4758
|
+
};
|
|
4759
|
+
readonly profilePicture: {
|
|
4760
|
+
readonly type: "string";
|
|
4761
|
+
readonly nullable: true;
|
|
4762
|
+
readonly description: "Collaborator profile image URL.";
|
|
4763
|
+
};
|
|
4764
|
+
readonly status: {
|
|
4765
|
+
readonly type: "string";
|
|
4766
|
+
readonly description: "Collaborator status, including active or inactive states.";
|
|
4767
|
+
};
|
|
4768
|
+
readonly taskCount: {
|
|
4769
|
+
readonly type: "integer";
|
|
4770
|
+
readonly description: "Distinct tasks assigned to this collaborator in the reporting period.";
|
|
4771
|
+
};
|
|
4772
|
+
};
|
|
4773
|
+
};
|
|
4774
|
+
readonly WorkloadDistributionAnalysisSuccess: {
|
|
4775
|
+
readonly type: "object";
|
|
4776
|
+
readonly required: readonly [
|
|
4777
|
+
"success",
|
|
4778
|
+
"workspaceId",
|
|
4779
|
+
"category",
|
|
4780
|
+
"period",
|
|
4781
|
+
"employees"
|
|
4782
|
+
];
|
|
4783
|
+
readonly properties: {
|
|
4784
|
+
readonly success: {
|
|
4785
|
+
readonly type: "boolean";
|
|
4786
|
+
readonly const: true;
|
|
4787
|
+
};
|
|
4788
|
+
readonly workspaceId: {
|
|
4789
|
+
readonly type: "string";
|
|
4790
|
+
readonly format: "uuid";
|
|
4791
|
+
};
|
|
4792
|
+
readonly category: {
|
|
4793
|
+
readonly type: "string";
|
|
4794
|
+
readonly description: "Workspace category.";
|
|
4795
|
+
};
|
|
4796
|
+
readonly period: {
|
|
4797
|
+
readonly type: "object";
|
|
4798
|
+
readonly required: readonly [
|
|
4799
|
+
"from",
|
|
4800
|
+
"to"
|
|
4801
|
+
];
|
|
4802
|
+
readonly properties: {
|
|
4803
|
+
readonly from: {
|
|
4804
|
+
readonly type: "string";
|
|
4805
|
+
readonly format: "date-time";
|
|
4806
|
+
readonly nullable: true;
|
|
4807
|
+
};
|
|
4808
|
+
readonly to: {
|
|
4809
|
+
readonly type: "string";
|
|
4810
|
+
readonly format: "date-time";
|
|
4811
|
+
readonly nullable: true;
|
|
4812
|
+
};
|
|
4813
|
+
};
|
|
4814
|
+
};
|
|
4815
|
+
readonly employees: {
|
|
4816
|
+
readonly type: "array";
|
|
4817
|
+
readonly items: {
|
|
4818
|
+
readonly $ref: "#/components/schemas/WorkloadDistributionEmployee";
|
|
4819
|
+
};
|
|
4820
|
+
readonly description: "All workspace collaborators, ordered by assigned task count descending.";
|
|
4821
|
+
};
|
|
4822
|
+
};
|
|
4823
|
+
};
|
|
4722
4824
|
readonly ForecastRevenueTotal: {
|
|
4723
4825
|
readonly type: "object";
|
|
4724
4826
|
readonly required: readonly [
|
|
@@ -9646,7 +9748,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
9646
9748
|
"Tasks"
|
|
9647
9749
|
];
|
|
9648
9750
|
readonly summary: "Delete a workspace task phase";
|
|
9649
|
-
readonly description: "A phase cannot be deleted while tasks use it, and each workspace must retain at least one phase. Requires crm::tasks write access.";
|
|
9751
|
+
readonly description: "Built-in phases cannot be deleted. A custom phase cannot be deleted while tasks use it, and each workspace must retain at least one phase. Requires crm::tasks write access.";
|
|
9650
9752
|
readonly security: readonly [
|
|
9651
9753
|
never
|
|
9652
9754
|
];
|
|
@@ -9688,7 +9790,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
9688
9790
|
readonly description: "Task phase not found.";
|
|
9689
9791
|
};
|
|
9690
9792
|
readonly 409: {
|
|
9691
|
-
readonly description: "Task phase is in use.";
|
|
9793
|
+
readonly description: "Task phase is built-in, in use, or the workspace's last phase.";
|
|
9692
9794
|
};
|
|
9693
9795
|
};
|
|
9694
9796
|
};
|
|
@@ -14306,6 +14408,102 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
14306
14408
|
};
|
|
14307
14409
|
};
|
|
14308
14410
|
};
|
|
14411
|
+
readonly "/analytics/{workspace}/workload-distribution": {
|
|
14412
|
+
readonly get: {
|
|
14413
|
+
readonly tags: readonly [
|
|
14414
|
+
"Analytics"
|
|
14415
|
+
];
|
|
14416
|
+
readonly summary: "Get real-estate workload distribution";
|
|
14417
|
+
readonly description: "Returns every workspace collaborator with their distinct assigned-task count, ordered from highest to lowest workload. Tasks are filtered by creation time when a reporting period is supplied (from inclusive, to exclusive). A task assigned to several collaborators contributes once to each assignee's workload. Requires workspace access and read access to crm::analytics. Other workspace categories return 400.";
|
|
14418
|
+
readonly security: readonly [
|
|
14419
|
+
never
|
|
14420
|
+
];
|
|
14421
|
+
readonly parameters: readonly [
|
|
14422
|
+
{
|
|
14423
|
+
readonly name: "workspace";
|
|
14424
|
+
readonly in: "path";
|
|
14425
|
+
readonly required: true;
|
|
14426
|
+
readonly schema: {
|
|
14427
|
+
readonly type: "string";
|
|
14428
|
+
readonly format: "uuid";
|
|
14429
|
+
};
|
|
14430
|
+
readonly description: "Workspace identifier.";
|
|
14431
|
+
},
|
|
14432
|
+
{
|
|
14433
|
+
readonly name: "from";
|
|
14434
|
+
readonly in: "query";
|
|
14435
|
+
readonly required: false;
|
|
14436
|
+
readonly schema: {
|
|
14437
|
+
readonly type: "string";
|
|
14438
|
+
readonly format: "date-time";
|
|
14439
|
+
};
|
|
14440
|
+
readonly description: "Include tasks created at or after this timestamp.";
|
|
14441
|
+
},
|
|
14442
|
+
{
|
|
14443
|
+
readonly name: "to";
|
|
14444
|
+
readonly in: "query";
|
|
14445
|
+
readonly required: false;
|
|
14446
|
+
readonly schema: {
|
|
14447
|
+
readonly type: "string";
|
|
14448
|
+
readonly format: "date-time";
|
|
14449
|
+
};
|
|
14450
|
+
readonly description: "Include tasks created before this timestamp.";
|
|
14451
|
+
}
|
|
14452
|
+
];
|
|
14453
|
+
readonly responses: {
|
|
14454
|
+
readonly 200: {
|
|
14455
|
+
readonly description: "Workload distribution fetched successfully.";
|
|
14456
|
+
readonly content: {
|
|
14457
|
+
readonly "application/json": {
|
|
14458
|
+
readonly schema: {
|
|
14459
|
+
readonly $ref: "#/components/schemas/WorkloadDistributionAnalysisSuccess";
|
|
14460
|
+
};
|
|
14461
|
+
};
|
|
14462
|
+
};
|
|
14463
|
+
};
|
|
14464
|
+
readonly 400: {
|
|
14465
|
+
readonly description: "Invalid query, invalid workspace ID, or unsupported workspace category.";
|
|
14466
|
+
readonly content: {
|
|
14467
|
+
readonly "application/json": {
|
|
14468
|
+
readonly schema: {
|
|
14469
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
14470
|
+
};
|
|
14471
|
+
};
|
|
14472
|
+
};
|
|
14473
|
+
};
|
|
14474
|
+
readonly 401: {
|
|
14475
|
+
readonly description: "Unauthorized - Missing or invalid access token.";
|
|
14476
|
+
readonly content: {
|
|
14477
|
+
readonly "application/json": {
|
|
14478
|
+
readonly schema: {
|
|
14479
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
14480
|
+
};
|
|
14481
|
+
};
|
|
14482
|
+
};
|
|
14483
|
+
};
|
|
14484
|
+
readonly 403: {
|
|
14485
|
+
readonly description: "Forbidden - Token issuer is not 'access', user lacks workspace access, or user lacks read access to crm::analytics resource.";
|
|
14486
|
+
readonly content: {
|
|
14487
|
+
readonly "application/json": {
|
|
14488
|
+
readonly schema: {
|
|
14489
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
14490
|
+
};
|
|
14491
|
+
};
|
|
14492
|
+
};
|
|
14493
|
+
};
|
|
14494
|
+
readonly 404: {
|
|
14495
|
+
readonly description: "Workspace not found.";
|
|
14496
|
+
readonly content: {
|
|
14497
|
+
readonly "application/json": {
|
|
14498
|
+
readonly schema: {
|
|
14499
|
+
readonly $ref: "#/components/schemas/ErrorResponse";
|
|
14500
|
+
};
|
|
14501
|
+
};
|
|
14502
|
+
};
|
|
14503
|
+
};
|
|
14504
|
+
};
|
|
14505
|
+
};
|
|
14506
|
+
};
|
|
14309
14507
|
readonly "/analytics/{workspace}/forecast-revenue": {
|
|
14310
14508
|
readonly get: {
|
|
14311
14509
|
readonly tags: readonly [
|
|
@@ -20168,6 +20366,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
20168
20366
|
workspaceId: string;
|
|
20169
20367
|
name: string;
|
|
20170
20368
|
sortOrder: number;
|
|
20369
|
+
isBuiltin: boolean;
|
|
20171
20370
|
}[];
|
|
20172
20371
|
};
|
|
20173
20372
|
outputFormat: "json";
|
|
@@ -20202,6 +20401,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
20202
20401
|
name: string;
|
|
20203
20402
|
workspaceId: string;
|
|
20204
20403
|
sortOrder: number;
|
|
20404
|
+
isBuiltin: boolean;
|
|
20205
20405
|
updated_at: string | null;
|
|
20206
20406
|
deleted_at: string | null;
|
|
20207
20407
|
verified_at: string | null;
|
|
@@ -20252,6 +20452,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
20252
20452
|
workspaceId: string;
|
|
20253
20453
|
name: string;
|
|
20254
20454
|
sortOrder: number;
|
|
20455
|
+
isBuiltin: boolean;
|
|
20255
20456
|
};
|
|
20256
20457
|
};
|
|
20257
20458
|
outputFormat: "json";
|
|
@@ -20282,6 +20483,7 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
20282
20483
|
workspaceId: string;
|
|
20283
20484
|
name: string;
|
|
20284
20485
|
sortOrder: number;
|
|
20486
|
+
isBuiltin: boolean;
|
|
20285
20487
|
}[];
|
|
20286
20488
|
};
|
|
20287
20489
|
outputFormat: "json";
|
|
@@ -26837,6 +27039,74 @@ declare const routes: import("hono/hono-base").HonoBase<{
|
|
|
26837
27039
|
status: 200;
|
|
26838
27040
|
};
|
|
26839
27041
|
};
|
|
27042
|
+
} & {
|
|
27043
|
+
"/:workspace/workload-distribution": {
|
|
27044
|
+
$get: {
|
|
27045
|
+
input: {
|
|
27046
|
+
param: {
|
|
27047
|
+
workspace: string;
|
|
27048
|
+
};
|
|
27049
|
+
};
|
|
27050
|
+
output: {
|
|
27051
|
+
success: false;
|
|
27052
|
+
error: {
|
|
27053
|
+
[x: string]: import("hono/utils/types").JSONValue;
|
|
27054
|
+
};
|
|
27055
|
+
};
|
|
27056
|
+
outputFormat: "json";
|
|
27057
|
+
status: 400;
|
|
27058
|
+
} | {
|
|
27059
|
+
input: {
|
|
27060
|
+
param: {
|
|
27061
|
+
workspace: string;
|
|
27062
|
+
};
|
|
27063
|
+
};
|
|
27064
|
+
output: {
|
|
27065
|
+
success: false;
|
|
27066
|
+
error: string;
|
|
27067
|
+
};
|
|
27068
|
+
outputFormat: "json";
|
|
27069
|
+
status: 400;
|
|
27070
|
+
} | {
|
|
27071
|
+
input: {
|
|
27072
|
+
param: {
|
|
27073
|
+
workspace: string;
|
|
27074
|
+
};
|
|
27075
|
+
};
|
|
27076
|
+
output: {
|
|
27077
|
+
success: false;
|
|
27078
|
+
error: string;
|
|
27079
|
+
};
|
|
27080
|
+
outputFormat: "json";
|
|
27081
|
+
status: 404;
|
|
27082
|
+
} | {
|
|
27083
|
+
input: {
|
|
27084
|
+
param: {
|
|
27085
|
+
workspace: string;
|
|
27086
|
+
};
|
|
27087
|
+
};
|
|
27088
|
+
output: {
|
|
27089
|
+
success: true;
|
|
27090
|
+
workspaceId: string;
|
|
27091
|
+
category: string;
|
|
27092
|
+
period: {
|
|
27093
|
+
from: string | null;
|
|
27094
|
+
to: string | null;
|
|
27095
|
+
};
|
|
27096
|
+
employees: {
|
|
27097
|
+
taskCount: number;
|
|
27098
|
+
collaboratorId: string;
|
|
27099
|
+
userId: string;
|
|
27100
|
+
firstName: string | null;
|
|
27101
|
+
lastName: string | null;
|
|
27102
|
+
profilePicture: string | null;
|
|
27103
|
+
status: string;
|
|
27104
|
+
}[];
|
|
27105
|
+
};
|
|
27106
|
+
outputFormat: "json";
|
|
27107
|
+
status: 200;
|
|
27108
|
+
};
|
|
27109
|
+
};
|
|
26840
27110
|
} & {
|
|
26841
27111
|
"/:workspace/channel-performance": {
|
|
26842
27112
|
$get: {
|