@levr-one/cli 0.3.1 → 0.5.0
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/README.md +95 -4
- package/dist/{addHandler-boWTd9yY.js → addHandler-K2a4rVv8.js} +14 -14
- package/dist/cli.js +171 -29
- package/dist/completionHandler-DtG_CsK0.js +3 -0
- package/dist/completionHandler-O2G_WZLf.js +95 -0
- package/dist/{currentHandler-Bm7GFMkj.js → currentHandler-CHydiFui.js} +1 -1
- package/dist/{env-NxtzJJPk.js → env-CHeKHu5S.js} +1 -1
- package/dist/importHandler-D27Xrx73.js +285 -0
- package/dist/{listHandler-7DZhE8jn.js → listHandler-8uqFClxw.js} +5 -5
- package/dist/{loginHandler-Dfg89AD2.js → loginHandler-BhvCWTd8.js} +4 -4
- package/dist/{logoutHandler-BC8laIAB.js → logoutHandler-BFutKash.js} +2 -2
- package/dist/{pushHandler-CC709aNJ.js → pushHandler-v4-lHK6A.js} +6 -6
- package/dist/{resolve-token-BRPrqdG-.js → resolve-token-DbQsmn03.js} +2 -2
- package/dist/{resolve-workspace-vJZku4FK.js → resolve-workspace-BnTDxvYq.js} +2 -2
- package/dist/{sdk-client-BWrIbeUg.js → sdk-client-DP7uCfXP.js} +412 -36
- package/dist/{selectHandler-nOUsPW9p.js → selectHandler-DeEZe6PU.js} +5 -5
- package/dist/{statusHandler-DljfUcC2.js → statusHandler-B6XRPg4k.js} +3 -3
- package/dist/{token-refresh-Cz-FqDtC.js → token-refresh-Cu5RpkLJ.js} +1 -1
- package/dist/{workspace-store-4hfvsEHS.js → workspace-store-DDOxnut1.js} +1 -1
- package/package.json +1 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getApiUrl } from "./env-
|
|
1
|
+
import { getApiUrl } from "./env-CHeKHu5S.js";
|
|
2
2
|
import { z } from "zod/v3";
|
|
3
3
|
|
|
4
4
|
//#region ../sdk/dist/gen/_common/zod.js
|
|
@@ -2426,18 +2426,81 @@ const zAppGetHelloV1Data = z.object({ url: z.literal("/v1") });
|
|
|
2426
2426
|
|
|
2427
2427
|
//#endregion
|
|
2428
2428
|
//#region ../sdk/dist/gen/archive/zod.js
|
|
2429
|
+
const zArchiveListResponseDto = z.object({
|
|
2430
|
+
data: z.array(z.object({
|
|
2431
|
+
id: z.string(),
|
|
2432
|
+
entity_type: z.string(),
|
|
2433
|
+
display_name: z.string(),
|
|
2434
|
+
archived_at: z.string().nullable().optional(),
|
|
2435
|
+
deleted_at: z.string().nullable().optional(),
|
|
2436
|
+
created_at: z.string(),
|
|
2437
|
+
created_by: z.string(),
|
|
2438
|
+
deleted_by: z.string().nullable().optional()
|
|
2439
|
+
})),
|
|
2440
|
+
meta: z.object({
|
|
2441
|
+
itemsPerPage: z.number(),
|
|
2442
|
+
totalItems: z.number(),
|
|
2443
|
+
currentPage: z.number(),
|
|
2444
|
+
totalPages: z.number()
|
|
2445
|
+
})
|
|
2446
|
+
});
|
|
2447
|
+
const zArchiveFacetsResponseDto = z.object({
|
|
2448
|
+
entityTypes: z.array(z.object({
|
|
2449
|
+
value: z.string(),
|
|
2450
|
+
count: z.number()
|
|
2451
|
+
})),
|
|
2452
|
+
owners: z.array(z.object({
|
|
2453
|
+
value: z.string(),
|
|
2454
|
+
count: z.number()
|
|
2455
|
+
})),
|
|
2456
|
+
deleters: z.array(z.object({
|
|
2457
|
+
value: z.string(),
|
|
2458
|
+
count: z.number()
|
|
2459
|
+
}))
|
|
2460
|
+
});
|
|
2429
2461
|
const zArchiveActionDto = z.object({
|
|
2430
2462
|
id: z.string(),
|
|
2431
2463
|
entity_type: z.string()
|
|
2432
2464
|
});
|
|
2465
|
+
const zArchiveBulkActionDto = z.object({ items: z.array(z.object({
|
|
2466
|
+
id: z.string(),
|
|
2467
|
+
entity_type: z.string()
|
|
2468
|
+
})) });
|
|
2469
|
+
const zArchiveBulkResultDto = z.object({
|
|
2470
|
+
results: z.array(z.object({
|
|
2471
|
+
id: z.string(),
|
|
2472
|
+
entity_type: z.string(),
|
|
2473
|
+
ok: z.boolean(),
|
|
2474
|
+
error: z.string().optional()
|
|
2475
|
+
})),
|
|
2476
|
+
succeeded: z.number(),
|
|
2477
|
+
failed: z.number()
|
|
2478
|
+
});
|
|
2433
2479
|
const zArchiveFindAllV1Data = z.object({
|
|
2434
2480
|
query: z.object({
|
|
2435
2481
|
"mode": z.enum(["archived", "deleted"]),
|
|
2436
2482
|
"page": z.number().optional(),
|
|
2437
|
-
"limit": z.number().optional()
|
|
2483
|
+
"limit": z.number().optional(),
|
|
2484
|
+
"sortBy": z.enum([
|
|
2485
|
+
"entity_type",
|
|
2486
|
+
"display_name",
|
|
2487
|
+
"archived_at",
|
|
2488
|
+
"deleted_at",
|
|
2489
|
+
"created_at",
|
|
2490
|
+
"created_by",
|
|
2491
|
+
"deleted_by"
|
|
2492
|
+
]).optional(),
|
|
2493
|
+
"sortDir": z.enum(["asc", "desc"]).optional(),
|
|
2494
|
+
"entityType": z.array(z.string()).optional(),
|
|
2495
|
+
"ownerId": z.array(z.string()).optional(),
|
|
2496
|
+
"deletedById": z.array(z.string()).optional()
|
|
2438
2497
|
}).optional(),
|
|
2439
2498
|
url: z.literal("/v1/archives")
|
|
2440
2499
|
});
|
|
2500
|
+
const zArchiveFacetsV1Data = z.object({
|
|
2501
|
+
query: z.object({ "mode": z.enum(["archived", "deleted"]) }).optional(),
|
|
2502
|
+
url: z.literal("/v1/archives/facets")
|
|
2503
|
+
});
|
|
2441
2504
|
const zArchiveArchiveV1Data = z.object({
|
|
2442
2505
|
body: zArchiveActionDto,
|
|
2443
2506
|
url: z.literal("/v1/archives/archive")
|
|
@@ -2450,6 +2513,14 @@ const zArchiveUnarchiveV1Data = z.object({
|
|
|
2450
2513
|
body: zArchiveActionDto,
|
|
2451
2514
|
url: z.literal("/v1/archives/unarchive")
|
|
2452
2515
|
});
|
|
2516
|
+
const zArchiveRestoreBulkV1Data = z.object({
|
|
2517
|
+
body: zArchiveBulkActionDto,
|
|
2518
|
+
url: z.literal("/v1/archives/restore-bulk")
|
|
2519
|
+
});
|
|
2520
|
+
const zArchiveUnarchiveBulkV1Data = z.object({
|
|
2521
|
+
body: zArchiveBulkActionDto,
|
|
2522
|
+
url: z.literal("/v1/archives/unarchive-bulk")
|
|
2523
|
+
});
|
|
2453
2524
|
|
|
2454
2525
|
//#endregion
|
|
2455
2526
|
//#region ../sdk/dist/gen/artifact-sync/zod.js
|
|
@@ -11504,7 +11575,6 @@ const zExplorationFindAllV1Data = z.object({
|
|
|
11504
11575
|
"filter.name": z.array(z.string()).optional(),
|
|
11505
11576
|
"filter.key": z.array(z.string()).optional(),
|
|
11506
11577
|
"filter.is_complete": z.array(z.string()).optional(),
|
|
11507
|
-
"filter.milestone_id": z.array(z.string()).optional(),
|
|
11508
11578
|
"filter.status_id": z.array(z.string()).optional(),
|
|
11509
11579
|
"filter.project_id": z.array(z.string()).optional(),
|
|
11510
11580
|
"filter.team_id": z.array(z.string()).optional(),
|
|
@@ -12757,7 +12827,7 @@ const zFolderWithChildrenDto = z.object({
|
|
|
12757
12827
|
epoch: z.number(),
|
|
12758
12828
|
virtual: z.unknown().optional(),
|
|
12759
12829
|
is_root: z.boolean().optional(),
|
|
12760
|
-
|
|
12830
|
+
assignee_id: z.string().optional(),
|
|
12761
12831
|
folder_path: z.string().optional(),
|
|
12762
12832
|
children: z.array(z.union([
|
|
12763
12833
|
z.object({
|
|
@@ -12774,7 +12844,7 @@ const zFolderWithChildrenDto = z.object({
|
|
|
12774
12844
|
epoch: z.number(),
|
|
12775
12845
|
virtual: z.unknown().optional(),
|
|
12776
12846
|
is_root: z.boolean().optional(),
|
|
12777
|
-
|
|
12847
|
+
assignee_id: z.string().optional(),
|
|
12778
12848
|
folder_path: z.string().optional()
|
|
12779
12849
|
}),
|
|
12780
12850
|
z.object({
|
|
@@ -12793,7 +12863,7 @@ const zFolderWithChildrenDto = z.object({
|
|
|
12793
12863
|
updated_by: z.string(),
|
|
12794
12864
|
epoch: z.number(),
|
|
12795
12865
|
key: z.number(),
|
|
12796
|
-
|
|
12866
|
+
assignee_id: z.string().optional(),
|
|
12797
12867
|
estimate: z.number().optional(),
|
|
12798
12868
|
test_type: z.enum([
|
|
12799
12869
|
"manual",
|
|
@@ -12853,7 +12923,7 @@ const zFolderNodeDto = z.object({
|
|
|
12853
12923
|
epoch: z.number(),
|
|
12854
12924
|
virtual: z.unknown(),
|
|
12855
12925
|
is_root: z.boolean().nullable(),
|
|
12856
|
-
|
|
12926
|
+
assignee_id: z.string().nullable(),
|
|
12857
12927
|
folder_path: z.string().optional()
|
|
12858
12928
|
});
|
|
12859
12929
|
const zFolderChildrenResponseDto = z.object({
|
|
@@ -12872,7 +12942,7 @@ const zFolderChildrenResponseDto = z.object({
|
|
|
12872
12942
|
epoch: z.number(),
|
|
12873
12943
|
virtual: z.unknown(),
|
|
12874
12944
|
is_root: z.boolean().nullable(),
|
|
12875
|
-
|
|
12945
|
+
assignee_id: z.string().nullable(),
|
|
12876
12946
|
folder_path: z.string().optional()
|
|
12877
12947
|
}),
|
|
12878
12948
|
z.object({
|
|
@@ -12891,7 +12961,7 @@ const zFolderChildrenResponseDto = z.object({
|
|
|
12891
12961
|
updated_by: z.string(),
|
|
12892
12962
|
epoch: z.number(),
|
|
12893
12963
|
key: z.number(),
|
|
12894
|
-
|
|
12964
|
+
assignee_id: z.string().optional(),
|
|
12895
12965
|
estimate: z.number().optional(),
|
|
12896
12966
|
test_type: z.enum([
|
|
12897
12967
|
"manual",
|
|
@@ -12959,7 +13029,7 @@ const zBulkFolderOperationDto = z.object({
|
|
|
12959
13029
|
name: z.string(),
|
|
12960
13030
|
description: z.string().optional(),
|
|
12961
13031
|
virtual: z.unknown().optional(),
|
|
12962
|
-
|
|
13032
|
+
assignee_id: z.string().optional(),
|
|
12963
13033
|
parent_id: z.string().optional(),
|
|
12964
13034
|
sequence: z.string().optional(),
|
|
12965
13035
|
labels: z.array(z.string()).optional(),
|
|
@@ -12969,7 +13039,7 @@ const zBulkFolderOperationDto = z.object({
|
|
|
12969
13039
|
name: z.string().optional(),
|
|
12970
13040
|
description: z.string().optional(),
|
|
12971
13041
|
virtual: z.unknown().optional(),
|
|
12972
|
-
|
|
13042
|
+
assignee_id: z.string().optional(),
|
|
12973
13043
|
parent_id: z.string().optional(),
|
|
12974
13044
|
sequence: z.string().optional(),
|
|
12975
13045
|
add_labels: z.array(z.string()).optional(),
|
|
@@ -12995,7 +13065,7 @@ const zBulkFolderResponseDto = z.object({
|
|
|
12995
13065
|
epoch: z.number(),
|
|
12996
13066
|
virtual: z.unknown(),
|
|
12997
13067
|
is_root: z.boolean().nullable(),
|
|
12998
|
-
|
|
13068
|
+
assignee_id: z.string().nullable(),
|
|
12999
13069
|
folder_path: z.string().optional()
|
|
13000
13070
|
}).optional(),
|
|
13001
13071
|
error: z.string().optional(),
|
|
@@ -13012,7 +13082,7 @@ const zCreateFolderDto = z.object({
|
|
|
13012
13082
|
name: z.string(),
|
|
13013
13083
|
description: z.string().optional(),
|
|
13014
13084
|
virtual: z.unknown().optional(),
|
|
13015
|
-
|
|
13085
|
+
assignee_id: z.string().optional(),
|
|
13016
13086
|
parent_id: z.string().optional(),
|
|
13017
13087
|
sequence: z.string().optional(),
|
|
13018
13088
|
labels: z.array(z.string()).optional(),
|
|
@@ -13023,7 +13093,7 @@ const zUpdateFolderDto = z.object({
|
|
|
13023
13093
|
name: z.string().optional(),
|
|
13024
13094
|
description: z.string().optional(),
|
|
13025
13095
|
virtual: z.unknown().optional(),
|
|
13026
|
-
|
|
13096
|
+
assignee_id: z.string().optional(),
|
|
13027
13097
|
parent_id: z.string().optional(),
|
|
13028
13098
|
sequence: z.string().optional(),
|
|
13029
13099
|
add_labels: z.array(z.string()).optional(),
|
|
@@ -13042,7 +13112,7 @@ const zFolderFindAllV1Data = z.object({
|
|
|
13042
13112
|
"filter.updated_at": z.array(z.string()).optional(),
|
|
13043
13113
|
"filter.updated_by": z.array(z.string()).optional(),
|
|
13044
13114
|
"filter.is_root": z.array(z.string()).optional(),
|
|
13045
|
-
"filter.
|
|
13115
|
+
"filter.assignee_id": z.array(z.string()).optional(),
|
|
13046
13116
|
"filter.folder_path": z.array(z.string()).optional(),
|
|
13047
13117
|
"sortBy": z.array(z.enum([
|
|
13048
13118
|
"id:ASC",
|
|
@@ -13918,6 +13988,7 @@ const zGitHubAppClientCreateTeamAndMapV1Data = z.object({
|
|
|
13918
13988
|
|
|
13919
13989
|
//#endregion
|
|
13920
13990
|
//#region ../sdk/dist/gen/git-hub-sync-bridge/zod.js
|
|
13991
|
+
const zGitHubSyncBridgeOutboundAckV1Data = z.object({ url: z.literal("/v1/internal/github/outbound-ack") });
|
|
13921
13992
|
const zGitHubSyncBridgeTransitionIssueV1Data = z.object({ url: z.literal("/v1/internal/github/issue/transition") });
|
|
13922
13993
|
const zGitHubSyncBridgeSyncIssueV1Data = z.object({ url: z.literal("/v1/internal/github/issue/sync") });
|
|
13923
13994
|
const zGitHubSyncBridgeSyncIssueCommentV1Data = z.object({ url: z.literal("/v1/internal/github/issue-comment/sync") });
|
|
@@ -14060,11 +14131,6 @@ const zCreateGithubIssueLinkDto = z.object({
|
|
|
14060
14131
|
sync_direction: z.string().optional().describe(""),
|
|
14061
14132
|
origin: z.string().optional().describe(""),
|
|
14062
14133
|
role: z.string().optional().describe(""),
|
|
14063
|
-
last_synced_fingerprint: z.string().nullable().optional().describe(""),
|
|
14064
|
-
last_synced_origin: z.string().nullable().optional().describe(""),
|
|
14065
|
-
last_synced_snapshot: z.unknown().optional().describe(""),
|
|
14066
|
-
sync_status: z.string().optional().describe(""),
|
|
14067
|
-
conflict_id: z.string().nullable().optional().describe(""),
|
|
14068
14134
|
tq_issue_id: z.string(),
|
|
14069
14135
|
github_repository_id: z.string(),
|
|
14070
14136
|
team_id: z.string()
|
|
@@ -14100,11 +14166,6 @@ const zUpdateGithubIssueLinkDto = z.object({
|
|
|
14100
14166
|
sync_direction: z.string().optional().describe(""),
|
|
14101
14167
|
origin: z.string().optional().describe(""),
|
|
14102
14168
|
role: z.string().optional().describe(""),
|
|
14103
|
-
last_synced_fingerprint: z.string().nullable().optional().describe(""),
|
|
14104
|
-
last_synced_origin: z.string().nullable().optional().describe(""),
|
|
14105
|
-
last_synced_snapshot: z.unknown().optional().describe(""),
|
|
14106
|
-
sync_status: z.string().optional().describe(""),
|
|
14107
|
-
conflict_id: z.string().nullable().optional().describe(""),
|
|
14108
14169
|
tq_issue_id: z.string().optional(),
|
|
14109
14170
|
github_repository_id: z.string().optional(),
|
|
14110
14171
|
team_id: z.string().optional()
|
|
@@ -14155,6 +14216,7 @@ const zGithubIssueLinkFindAllV1Data = z.object({
|
|
|
14155
14216
|
"filter.sync_direction": z.array(z.string()).optional(),
|
|
14156
14217
|
"filter.origin": z.array(z.string()).optional(),
|
|
14157
14218
|
"filter.role": z.array(z.string()).optional(),
|
|
14219
|
+
"filter.sync_status": z.array(z.string()).optional(),
|
|
14158
14220
|
"filter.tq_issue_id": z.array(z.string()).optional(),
|
|
14159
14221
|
"filter.github_repository_id": z.array(z.string()).optional(),
|
|
14160
14222
|
"filter.team_id": z.array(z.string()).optional(),
|
|
@@ -14174,6 +14236,8 @@ const zGithubIssueLinkFindAllV1Data = z.object({
|
|
|
14174
14236
|
"origin:DESC",
|
|
14175
14237
|
"role:ASC",
|
|
14176
14238
|
"role:DESC",
|
|
14239
|
+
"sync_status:ASC",
|
|
14240
|
+
"sync_status:DESC",
|
|
14177
14241
|
"created_at:ASC",
|
|
14178
14242
|
"created_at:DESC",
|
|
14179
14243
|
"updated_at:ASC",
|
|
@@ -17189,6 +17253,7 @@ const zIssueViewRestoreV1Data = z.object({
|
|
|
17189
17253
|
|
|
17190
17254
|
//#endregion
|
|
17191
17255
|
//#region ../sdk/dist/gen/jira/zod.js
|
|
17256
|
+
const zJiraStatusV1Data = z.object({ url: z.literal("/v1/jira/status") });
|
|
17192
17257
|
const zJiraLinkV1Data = z.object({ url: z.literal("/v1/jira/link") });
|
|
17193
17258
|
const zJiraInstallationsV1Data = z.object({
|
|
17194
17259
|
query: z.object({ "panelNonce": z.string().optional() }).optional(),
|
|
@@ -23859,6 +23924,7 @@ const zRunNodeDto = z.object({
|
|
|
23859
23924
|
test_scope_id: z.string().nullable(),
|
|
23860
23925
|
cycle_id: z.string().nullable(),
|
|
23861
23926
|
parent_run_id: z.string().nullable(),
|
|
23927
|
+
original_parent_run_id: z.string().nullable(),
|
|
23862
23928
|
name: z.string(),
|
|
23863
23929
|
key: z.number().optional(),
|
|
23864
23930
|
run_type: z.enum([
|
|
@@ -23968,6 +24034,7 @@ const zRunWithContentDto = z.object({
|
|
|
23968
24034
|
test_scope_id: z.string().nullable(),
|
|
23969
24035
|
cycle_id: z.string().nullable(),
|
|
23970
24036
|
parent_run_id: z.string().nullable(),
|
|
24037
|
+
original_parent_run_id: z.string().nullable(),
|
|
23971
24038
|
name: z.string(),
|
|
23972
24039
|
key: z.number().optional(),
|
|
23973
24040
|
run_type: z.enum([
|
|
@@ -27618,7 +27685,7 @@ const zTestResponseDto = z.object({
|
|
|
27618
27685
|
priority: z.number().optional(),
|
|
27619
27686
|
estimate: z.number().nullable().optional().describe(""),
|
|
27620
27687
|
data: z.unknown().optional().describe(""),
|
|
27621
|
-
|
|
27688
|
+
assignee_id: z.string().nullable().optional().describe(""),
|
|
27622
27689
|
is_automated: z.boolean().optional().describe(""),
|
|
27623
27690
|
key: z.number().optional().describe(""),
|
|
27624
27691
|
identifier: z.string().optional().describe(""),
|
|
@@ -27687,7 +27754,7 @@ const zCreateTestDto = z.object({
|
|
|
27687
27754
|
priority: z.number().optional().describe(""),
|
|
27688
27755
|
estimate: z.number().nullable().optional().describe(""),
|
|
27689
27756
|
data: z.unknown().optional().describe(""),
|
|
27690
|
-
|
|
27757
|
+
assignee_id: z.string().nullable().optional().describe(""),
|
|
27691
27758
|
is_automated: z.boolean().optional().describe(""),
|
|
27692
27759
|
key: z.number().optional().describe(""),
|
|
27693
27760
|
identifier: z.string().optional().describe(""),
|
|
@@ -27724,7 +27791,7 @@ const zUpdateTestDto = z.object({
|
|
|
27724
27791
|
is_automated: z.boolean().optional(),
|
|
27725
27792
|
to_automate: z.boolean().optional(),
|
|
27726
27793
|
state_mask: z.number().optional(),
|
|
27727
|
-
|
|
27794
|
+
assignee_id: z.string().optional(),
|
|
27728
27795
|
data: z.object({
|
|
27729
27796
|
description: z.string().optional(),
|
|
27730
27797
|
shared_precondition_id: z.string().nullable().optional(),
|
|
@@ -27784,7 +27851,6 @@ const zUpdateTestDto = z.object({
|
|
|
27784
27851
|
add_labels: z.array(z.string()).optional(),
|
|
27785
27852
|
remove_labels: z.array(z.string()).optional()
|
|
27786
27853
|
});
|
|
27787
|
-
const zExportTestsDto = z.object({ ids: z.array(z.string()).describe("") });
|
|
27788
27854
|
const zTestBulkOperationDto = z.object({
|
|
27789
27855
|
op: z.enum([
|
|
27790
27856
|
"create",
|
|
@@ -27815,6 +27881,7 @@ const zBulkTestResponseDto = z.object({
|
|
|
27815
27881
|
savepoints_used: z.number().describe("")
|
|
27816
27882
|
}).describe("")
|
|
27817
27883
|
});
|
|
27884
|
+
const zExportTestsDto = z.object({ ids: z.array(z.string()).describe("") });
|
|
27818
27885
|
const zTestFindAllV1Data = z.object({
|
|
27819
27886
|
query: z.object({
|
|
27820
27887
|
"page": z.number().optional(),
|
|
@@ -27824,10 +27891,11 @@ const zTestFindAllV1Data = z.object({
|
|
|
27824
27891
|
"filter.name": z.array(z.string()).optional(),
|
|
27825
27892
|
"filter.priority": z.array(z.string()).optional(),
|
|
27826
27893
|
"filter.test_type": z.array(z.string()).optional(),
|
|
27894
|
+
"filter.case_type_id": z.array(z.string()).optional(),
|
|
27827
27895
|
"filter.is_automated": z.array(z.string()).optional(),
|
|
27828
27896
|
"filter.to_automate": z.array(z.string()).optional(),
|
|
27829
27897
|
"filter.state_mask": z.array(z.string()).optional(),
|
|
27830
|
-
"filter.
|
|
27898
|
+
"filter.assignee_id": z.array(z.string()).optional(),
|
|
27831
27899
|
"filter.estimate": z.array(z.string()).optional(),
|
|
27832
27900
|
"filter.created_at": z.array(z.string()).optional(),
|
|
27833
27901
|
"filter.created_by": z.array(z.string()).optional(),
|
|
@@ -27884,14 +27952,14 @@ const zTestRemoveV1Data = z.object({
|
|
|
27884
27952
|
path: z.object({ "testId": z.string() }),
|
|
27885
27953
|
url: z.literal("/v1/test/{testId}")
|
|
27886
27954
|
});
|
|
27887
|
-
const zTestExportTestsV1Data = z.object({
|
|
27888
|
-
body: zExportTestsDto,
|
|
27889
|
-
url: z.literal("/v1/test/export")
|
|
27890
|
-
});
|
|
27891
27955
|
const zTestBulkOperationV1Data = z.object({
|
|
27892
27956
|
body: zBulkTestRequestDto,
|
|
27893
27957
|
url: z.literal("/v1/test/bulk")
|
|
27894
27958
|
});
|
|
27959
|
+
const zTestExportTestsV1Data = z.object({
|
|
27960
|
+
body: zExportTestsDto,
|
|
27961
|
+
url: z.literal("/v1/test/export")
|
|
27962
|
+
});
|
|
27895
27963
|
|
|
27896
27964
|
//#endregion
|
|
27897
27965
|
//#region ../sdk/dist/gen/test-attachment/zod.js
|
|
@@ -28000,6 +28068,311 @@ const zTestAttachmentRemoveV1Data = z.object({
|
|
|
28000
28068
|
url: z.literal("/v1/test/{testId}/attachment/{attachmentId}")
|
|
28001
28069
|
});
|
|
28002
28070
|
|
|
28071
|
+
//#endregion
|
|
28072
|
+
//#region ../sdk/dist/gen/test-case-import/functions.js
|
|
28073
|
+
/**
|
|
28074
|
+
* Uploads (or references) a CSV/Excel/JSON file or a public Google Sheets URL, proposes a column mapping to the test-case schema with per-column confidence, and stages the source for a later commit. Writes NO tests/folders — the returned token is presented to POST /v1/test-case-import/commit after the user reviews and confirms the mapping. Sample rows are capped at 20; row_count reports the full source total. Staged previews expire after 1 hour.
|
|
28075
|
+
*/
|
|
28076
|
+
const testCaseImportPreviewV1 = (options) => {
|
|
28077
|
+
return (options?.client ?? client).post({
|
|
28078
|
+
security: [{
|
|
28079
|
+
scheme: "bearer",
|
|
28080
|
+
type: "http"
|
|
28081
|
+
}],
|
|
28082
|
+
url: "/v1/test-case-import/preview",
|
|
28083
|
+
bodySerializer: (body) => {
|
|
28084
|
+
const fd = new FormData();
|
|
28085
|
+
if (body && typeof body === "object") for (const [k, v] of Object.entries(body)) {
|
|
28086
|
+
if (v == null) continue;
|
|
28087
|
+
fd.append(k, v instanceof Blob ? v : String(v));
|
|
28088
|
+
}
|
|
28089
|
+
return fd;
|
|
28090
|
+
},
|
|
28091
|
+
...options
|
|
28092
|
+
});
|
|
28093
|
+
};
|
|
28094
|
+
/**
|
|
28095
|
+
* Re-parses the staged source through the user-confirmed column mapping and writes folders (auto-created as needed), tests, steps, and preconditions in bulk chunks. Malformed rows are reported as warnings/errors — the batch never aborts. Rejects: 403 cross-workspace token, 409 concurrent or repeated commit / expired preview, 422 when a required target field is unmapped.
|
|
28096
|
+
*/
|
|
28097
|
+
const testCaseImportCommitV1 = (options) => {
|
|
28098
|
+
return (options?.client ?? client).post({
|
|
28099
|
+
security: [{
|
|
28100
|
+
scheme: "bearer",
|
|
28101
|
+
type: "http"
|
|
28102
|
+
}],
|
|
28103
|
+
url: "/v1/test-case-import/commit",
|
|
28104
|
+
...options
|
|
28105
|
+
});
|
|
28106
|
+
};
|
|
28107
|
+
|
|
28108
|
+
//#endregion
|
|
28109
|
+
//#region ../sdk/dist/gen/test-case-import/zod.js
|
|
28110
|
+
const zPreviewImportDto = z.object({
|
|
28111
|
+
team_id: z.string().describe(""),
|
|
28112
|
+
format: z.enum([
|
|
28113
|
+
"csv",
|
|
28114
|
+
"xlsx",
|
|
28115
|
+
"sheets",
|
|
28116
|
+
"json"
|
|
28117
|
+
]).optional().describe(""),
|
|
28118
|
+
file_id: z.string().optional().describe(""),
|
|
28119
|
+
sheets_url: z.string().optional().describe("")
|
|
28120
|
+
});
|
|
28121
|
+
const zPreviewImportResponseDto = z.object({
|
|
28122
|
+
token: z.string(),
|
|
28123
|
+
filename: z.string(),
|
|
28124
|
+
format: z.enum([
|
|
28125
|
+
"csv",
|
|
28126
|
+
"xlsx",
|
|
28127
|
+
"sheets",
|
|
28128
|
+
"json"
|
|
28129
|
+
]),
|
|
28130
|
+
proposed_mapping: z.array(z.object({
|
|
28131
|
+
originalName: z.string(),
|
|
28132
|
+
targetProperty: z.enum([
|
|
28133
|
+
"row_type",
|
|
28134
|
+
"test_id",
|
|
28135
|
+
"test_key",
|
|
28136
|
+
"folder_id",
|
|
28137
|
+
"folder_path",
|
|
28138
|
+
"folder_name",
|
|
28139
|
+
"test_name",
|
|
28140
|
+
"test_description",
|
|
28141
|
+
"test_type",
|
|
28142
|
+
"case_type_id",
|
|
28143
|
+
"case_type_name",
|
|
28144
|
+
"test_priority",
|
|
28145
|
+
"estimate",
|
|
28146
|
+
"is_automated",
|
|
28147
|
+
"assignee_email",
|
|
28148
|
+
"labels",
|
|
28149
|
+
"attachment_filenames",
|
|
28150
|
+
"data_set_names",
|
|
28151
|
+
"sequence",
|
|
28152
|
+
"item_id",
|
|
28153
|
+
"method",
|
|
28154
|
+
"expected_result",
|
|
28155
|
+
"keyword",
|
|
28156
|
+
"shared_step_id",
|
|
28157
|
+
"shared_precondition_id",
|
|
28158
|
+
"data_table",
|
|
28159
|
+
"steps",
|
|
28160
|
+
"preconditions"
|
|
28161
|
+
]).nullable(),
|
|
28162
|
+
matchType: z.enum([
|
|
28163
|
+
"exact",
|
|
28164
|
+
"prefix",
|
|
28165
|
+
"fuzzy",
|
|
28166
|
+
"llm",
|
|
28167
|
+
"unmapped",
|
|
28168
|
+
"manual",
|
|
28169
|
+
"preset"
|
|
28170
|
+
]),
|
|
28171
|
+
confidence: z.number(),
|
|
28172
|
+
fieldType: z.enum([
|
|
28173
|
+
"string",
|
|
28174
|
+
"number",
|
|
28175
|
+
"boolean",
|
|
28176
|
+
"unknown"
|
|
28177
|
+
]).optional(),
|
|
28178
|
+
labelPrefix: z.string().optional().describe(""),
|
|
28179
|
+
descriptionHeading: z.string().optional().describe("")
|
|
28180
|
+
})),
|
|
28181
|
+
missing_required: z.array(z.string()),
|
|
28182
|
+
sample_rows: z.array(z.record(z.string(), z.unknown())),
|
|
28183
|
+
row_count: z.number(),
|
|
28184
|
+
expires_at: z.unknown(),
|
|
28185
|
+
advisories: z.array(z.object({
|
|
28186
|
+
column: z.string(),
|
|
28187
|
+
target: z.enum([
|
|
28188
|
+
"row_type",
|
|
28189
|
+
"test_id",
|
|
28190
|
+
"test_key",
|
|
28191
|
+
"folder_id",
|
|
28192
|
+
"folder_path",
|
|
28193
|
+
"folder_name",
|
|
28194
|
+
"test_name",
|
|
28195
|
+
"test_description",
|
|
28196
|
+
"test_type",
|
|
28197
|
+
"case_type_id",
|
|
28198
|
+
"case_type_name",
|
|
28199
|
+
"test_priority",
|
|
28200
|
+
"estimate",
|
|
28201
|
+
"is_automated",
|
|
28202
|
+
"assignee_email",
|
|
28203
|
+
"labels",
|
|
28204
|
+
"attachment_filenames",
|
|
28205
|
+
"data_set_names",
|
|
28206
|
+
"sequence",
|
|
28207
|
+
"item_id",
|
|
28208
|
+
"method",
|
|
28209
|
+
"expected_result",
|
|
28210
|
+
"keyword",
|
|
28211
|
+
"shared_step_id",
|
|
28212
|
+
"shared_precondition_id",
|
|
28213
|
+
"data_table",
|
|
28214
|
+
"steps",
|
|
28215
|
+
"preconditions"
|
|
28216
|
+
]),
|
|
28217
|
+
message: z.string(),
|
|
28218
|
+
count: z.number(),
|
|
28219
|
+
values: z.array(z.object({
|
|
28220
|
+
value: z.string(),
|
|
28221
|
+
count: z.number()
|
|
28222
|
+
}))
|
|
28223
|
+
})),
|
|
28224
|
+
detected_vendor: z.string().nullable(),
|
|
28225
|
+
assignee_resolution: z.object({
|
|
28226
|
+
column: z.string(),
|
|
28227
|
+
entries: z.array(z.object({
|
|
28228
|
+
sourceValue: z.string(),
|
|
28229
|
+
count: z.number(),
|
|
28230
|
+
kind: z.enum([
|
|
28231
|
+
"existing",
|
|
28232
|
+
"new_email",
|
|
28233
|
+
"unresolved"
|
|
28234
|
+
]),
|
|
28235
|
+
userId: z.string().optional(),
|
|
28236
|
+
userName: z.string().optional(),
|
|
28237
|
+
suggestedEmail: z.string().optional()
|
|
28238
|
+
}))
|
|
28239
|
+
}).nullable()
|
|
28240
|
+
});
|
|
28241
|
+
const zCommitImportDto = z.object({
|
|
28242
|
+
token: z.string().describe(""),
|
|
28243
|
+
confirmed_mapping: z.array(z.object({
|
|
28244
|
+
originalName: z.string(),
|
|
28245
|
+
targetProperty: z.enum([
|
|
28246
|
+
"row_type",
|
|
28247
|
+
"test_id",
|
|
28248
|
+
"test_key",
|
|
28249
|
+
"folder_id",
|
|
28250
|
+
"folder_path",
|
|
28251
|
+
"folder_name",
|
|
28252
|
+
"test_name",
|
|
28253
|
+
"test_description",
|
|
28254
|
+
"test_type",
|
|
28255
|
+
"case_type_id",
|
|
28256
|
+
"case_type_name",
|
|
28257
|
+
"test_priority",
|
|
28258
|
+
"estimate",
|
|
28259
|
+
"is_automated",
|
|
28260
|
+
"assignee_email",
|
|
28261
|
+
"labels",
|
|
28262
|
+
"attachment_filenames",
|
|
28263
|
+
"data_set_names",
|
|
28264
|
+
"sequence",
|
|
28265
|
+
"item_id",
|
|
28266
|
+
"method",
|
|
28267
|
+
"expected_result",
|
|
28268
|
+
"keyword",
|
|
28269
|
+
"shared_step_id",
|
|
28270
|
+
"shared_precondition_id",
|
|
28271
|
+
"data_table",
|
|
28272
|
+
"steps",
|
|
28273
|
+
"preconditions"
|
|
28274
|
+
]).nullable(),
|
|
28275
|
+
matchType: z.enum([
|
|
28276
|
+
"exact",
|
|
28277
|
+
"prefix",
|
|
28278
|
+
"fuzzy",
|
|
28279
|
+
"llm",
|
|
28280
|
+
"unmapped",
|
|
28281
|
+
"manual",
|
|
28282
|
+
"preset"
|
|
28283
|
+
]),
|
|
28284
|
+
confidence: z.number(),
|
|
28285
|
+
fieldType: z.enum([
|
|
28286
|
+
"string",
|
|
28287
|
+
"number",
|
|
28288
|
+
"boolean",
|
|
28289
|
+
"unknown"
|
|
28290
|
+
]).optional(),
|
|
28291
|
+
labelPrefix: z.string().optional().describe(""),
|
|
28292
|
+
descriptionHeading: z.string().optional().describe("")
|
|
28293
|
+
})).optional().describe(""),
|
|
28294
|
+
assignee_plan: z.object({
|
|
28295
|
+
role: z.enum([
|
|
28296
|
+
"owner",
|
|
28297
|
+
"admin",
|
|
28298
|
+
"member",
|
|
28299
|
+
"guest"
|
|
28300
|
+
]).optional(),
|
|
28301
|
+
teamIds: z.array(z.string()).optional(),
|
|
28302
|
+
entries: z.array(z.object({
|
|
28303
|
+
sourceValue: z.string(),
|
|
28304
|
+
action: z.enum([
|
|
28305
|
+
"assign",
|
|
28306
|
+
"create",
|
|
28307
|
+
"skip"
|
|
28308
|
+
]),
|
|
28309
|
+
userId: z.string().optional(),
|
|
28310
|
+
email: z.string().optional()
|
|
28311
|
+
}))
|
|
28312
|
+
}).optional().describe(""),
|
|
28313
|
+
team_ids: z.array(z.string()).optional()
|
|
28314
|
+
});
|
|
28315
|
+
const zTestCaseImportResultDto = z.object({
|
|
28316
|
+
status: z.enum([
|
|
28317
|
+
"completed",
|
|
28318
|
+
"completed_with_warnings",
|
|
28319
|
+
"failed"
|
|
28320
|
+
]),
|
|
28321
|
+
created_tests: z.array(z.object({
|
|
28322
|
+
id: z.string(),
|
|
28323
|
+
name: z.string()
|
|
28324
|
+
})),
|
|
28325
|
+
stats: z.object({
|
|
28326
|
+
rows_processed: z.number(),
|
|
28327
|
+
tests_created: z.number(),
|
|
28328
|
+
folders_created: z.number(),
|
|
28329
|
+
steps_created: z.number(),
|
|
28330
|
+
preconditions_created: z.number(),
|
|
28331
|
+
rows_failed: z.number(),
|
|
28332
|
+
members_provisioned: z.number().optional()
|
|
28333
|
+
}),
|
|
28334
|
+
warnings: z.array(z.object({
|
|
28335
|
+
type: z.enum([
|
|
28336
|
+
"skipped",
|
|
28337
|
+
"invalid",
|
|
28338
|
+
"unresolved",
|
|
28339
|
+
"write_failed"
|
|
28340
|
+
]),
|
|
28341
|
+
message: z.string(),
|
|
28342
|
+
row_index: z.number().optional(),
|
|
28343
|
+
column: z.string().optional(),
|
|
28344
|
+
count: z.number().optional(),
|
|
28345
|
+
values: z.array(z.object({
|
|
28346
|
+
value: z.string(),
|
|
28347
|
+
count: z.number()
|
|
28348
|
+
})).optional()
|
|
28349
|
+
})),
|
|
28350
|
+
errors: z.array(z.object({
|
|
28351
|
+
type: z.enum([
|
|
28352
|
+
"skipped",
|
|
28353
|
+
"invalid",
|
|
28354
|
+
"unresolved",
|
|
28355
|
+
"write_failed"
|
|
28356
|
+
]),
|
|
28357
|
+
message: z.string(),
|
|
28358
|
+
row_index: z.number().optional(),
|
|
28359
|
+
column: z.string().optional(),
|
|
28360
|
+
count: z.number().optional(),
|
|
28361
|
+
values: z.array(z.object({
|
|
28362
|
+
value: z.string(),
|
|
28363
|
+
count: z.number()
|
|
28364
|
+
})).optional()
|
|
28365
|
+
}))
|
|
28366
|
+
});
|
|
28367
|
+
const zTestCaseImportPreviewV1Data = z.object({
|
|
28368
|
+
body: zPreviewImportDto,
|
|
28369
|
+
url: z.literal("/v1/test-case-import/preview")
|
|
28370
|
+
});
|
|
28371
|
+
const zTestCaseImportCommitV1Data = z.object({
|
|
28372
|
+
body: zCommitImportDto,
|
|
28373
|
+
url: z.literal("/v1/test-case-import/commit")
|
|
28374
|
+
});
|
|
28375
|
+
|
|
28003
28376
|
//#endregion
|
|
28004
28377
|
//#region ../sdk/dist/gen/test-comment/zod.js
|
|
28005
28378
|
const zTestCommentFindAllV1Data = z.object({
|
|
@@ -30312,7 +30685,10 @@ const zInviteMultiUserDto = z.object({
|
|
|
30312
30685
|
workspace_ids: z.array(z.string()).describe(""),
|
|
30313
30686
|
team_ids_by_workspace: z.record(z.string(), z.array(z.string())).optional().describe("")
|
|
30314
30687
|
});
|
|
30315
|
-
const zAcceptByTokenDto = z.object({
|
|
30688
|
+
const zAcceptByTokenDto = z.object({
|
|
30689
|
+
token: z.string().describe(""),
|
|
30690
|
+
password: z.string().optional().describe("")
|
|
30691
|
+
});
|
|
30316
30692
|
const zAcceptByTokenResponseDto = z.object({
|
|
30317
30693
|
access_token: z.string().describe(""),
|
|
30318
30694
|
user: z.object({
|
|
@@ -30746,4 +31122,4 @@ function tryReadMessage(err) {
|
|
|
30746
31122
|
}
|
|
30747
31123
|
|
|
30748
31124
|
//#endregion
|
|
30749
|
-
export { authGetProfileV1, authGetSitesV1, client, configureClient, uploadAutomationIngest, uploadImport };
|
|
31125
|
+
export { authGetProfileV1, authGetSitesV1, client, configureClient, testCaseImportCommitV1, testCaseImportPreviewV1, uploadAutomationIngest, uploadImport };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "./env-
|
|
2
|
-
import { authGetSitesV1, configureClient } from "./sdk-client-
|
|
3
|
-
import { saveWorkspace } from "./workspace-store-
|
|
4
|
-
import "./token-refresh-
|
|
5
|
-
import { resolveToken } from "./resolve-token-
|
|
1
|
+
import "./env-CHeKHu5S.js";
|
|
2
|
+
import { authGetSitesV1, configureClient } from "./sdk-client-DP7uCfXP.js";
|
|
3
|
+
import { saveWorkspace } from "./workspace-store-DDOxnut1.js";
|
|
4
|
+
import "./token-refresh-Cu5RpkLJ.js";
|
|
5
|
+
import { resolveToken } from "./resolve-token-DbQsmn03.js";
|
|
6
6
|
|
|
7
7
|
//#region src/commands/workspace/selectHandler.ts
|
|
8
8
|
async function selectHandler(_flags, workspaceId) {
|