@levr-one/sdk 0.0.0-stage → 1.0.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 +132 -2
- package/dist/client.config.d.ts +3 -0
- package/dist/client.config.js +5 -0
- package/dist/gen/_common/index.d.ts +3 -0
- package/dist/gen/_common/index.js +3 -0
- package/dist/gen/_common/types.d.ts +29 -0
- package/dist/gen/_common/types.js +2 -0
- package/dist/gen/_common/zod.d.ts +10 -0
- package/dist/gen/_common/zod.js +31 -0
- package/dist/gen/attachment-upload/functions.d.ts +14 -0
- package/dist/gen/attachment-upload/functions.js +28 -0
- package/dist/gen/attachment-upload/index.d.ts +4 -0
- package/dist/gen/attachment-upload/index.js +4 -0
- package/dist/gen/attachment-upload/types.d.ts +40 -0
- package/dist/gen/attachment-upload/types.js +2 -0
- package/dist/gen/attachment-upload/zod.d.ts +14 -0
- package/dist/gen/attachment-upload/zod.js +34 -0
- package/dist/gen/auth/functions.d.ts +22 -0
- package/dist/gen/auth/functions.js +32 -0
- package/dist/gen/auth/index.d.ts +4 -0
- package/dist/gen/auth/index.js +4 -0
- package/dist/gen/auth/types.d.ts +52 -0
- package/dist/gen/auth/types.js +2 -0
- package/dist/gen/auth/zod.d.ts +16 -0
- package/dist/gen/auth/zod.js +37 -0
- package/dist/gen/comment-issue/functions.d.ts +14 -0
- package/dist/gen/comment-issue/functions.js +18 -0
- package/dist/gen/comment-issue/index.d.ts +4 -0
- package/dist/gen/comment-issue/index.js +4 -0
- package/dist/gen/comment-issue/types.d.ts +40 -0
- package/dist/gen/comment-issue/types.js +2 -0
- package/dist/gen/comment-issue/zod.d.ts +14 -0
- package/dist/gen/comment-issue/zod.js +35 -0
- package/dist/gen/comment-run/functions.d.ts +14 -0
- package/dist/gen/comment-run/functions.js +18 -0
- package/dist/gen/comment-run/index.d.ts +4 -0
- package/dist/gen/comment-run/index.js +4 -0
- package/dist/gen/comment-run/types.d.ts +40 -0
- package/dist/gen/comment-run/types.js +2 -0
- package/dist/gen/comment-run/zod.d.ts +14 -0
- package/dist/gen/comment-run/zod.js +35 -0
- package/dist/gen/comment-test/functions.d.ts +14 -0
- package/dist/gen/comment-test/functions.js +18 -0
- package/dist/gen/comment-test/index.d.ts +4 -0
- package/dist/gen/comment-test/index.js +4 -0
- package/dist/gen/comment-test/types.d.ts +40 -0
- package/dist/gen/comment-test/types.js +2 -0
- package/dist/gen/comment-test/zod.d.ts +14 -0
- package/dist/gen/comment-test/zod.js +35 -0
- package/dist/gen/import/functions.d.ts +14 -0
- package/dist/gen/import/functions.js +28 -0
- package/dist/gen/import/index.d.ts +4 -0
- package/dist/gen/import/index.js +4 -0
- package/dist/gen/import/types.d.ts +90 -0
- package/dist/gen/import/types.js +2 -0
- package/dist/gen/import/zod.d.ts +14 -0
- package/dist/gen/import/zod.js +85 -0
- package/dist/gen/index.d.ts +15 -0
- package/dist/gen/index.js +15 -0
- package/dist/gen/issue/functions.d.ts +14 -0
- package/dist/gen/issue/functions.js +18 -0
- package/dist/gen/issue/index.d.ts +4 -0
- package/dist/gen/issue/index.js +4 -0
- package/dist/gen/issue/types.d.ts +125 -0
- package/dist/gen/issue/types.js +2 -0
- package/dist/gen/issue/zod.d.ts +10 -0
- package/dist/gen/issue/zod.js +114 -0
- package/dist/gen/issue-gate-verification/functions.d.ts +22 -0
- package/dist/gen/issue-gate-verification/functions.js +32 -0
- package/dist/gen/issue-gate-verification/index.d.ts +4 -0
- package/dist/gen/issue-gate-verification/index.js +4 -0
- package/dist/gen/issue-gate-verification/types.d.ts +46 -0
- package/dist/gen/issue-gate-verification/types.js +2 -0
- package/dist/gen/issue-gate-verification/zod.d.ts +12 -0
- package/dist/gen/issue-gate-verification/zod.js +38 -0
- package/dist/gen/run-api/functions.d.ts +14 -0
- package/dist/gen/run-api/functions.js +18 -0
- package/dist/gen/run-api/index.d.ts +4 -0
- package/dist/gen/run-api/index.js +4 -0
- package/dist/gen/run-api/types.d.ts +93 -0
- package/dist/gen/run-api/types.js +2 -0
- package/dist/gen/run-api/zod.d.ts +14 -0
- package/dist/gen/run-api/zod.js +57 -0
- package/dist/gen/team/functions.d.ts +14 -0
- package/dist/gen/team/functions.js +18 -0
- package/dist/gen/team/index.d.ts +4 -0
- package/dist/gen/team/index.js +4 -0
- package/dist/gen/team/types.d.ts +69 -0
- package/dist/gen/team/types.js +2 -0
- package/dist/gen/team/zod.d.ts +10 -0
- package/dist/gen/team/zod.js +58 -0
- package/dist/gen/test-case-import/functions.d.ts +22 -0
- package/dist/gen/test-case-import/functions.js +42 -0
- package/dist/gen/test-case-import/index.d.ts +4 -0
- package/dist/gen/test-case-import/index.js +4 -0
- package/dist/gen/test-case-import/types.d.ts +142 -0
- package/dist/gen/test-case-import/types.js +2 -0
- package/dist/gen/test-case-import/zod.d.ts +24 -0
- package/dist/gen/test-case-import/zod.js +129 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +5 -0
- package/dist/runtime/client.d.ts +2 -0
- package/dist/runtime/client.js +229 -0
- package/dist/runtime/index.d.ts +3 -0
- package/dist/runtime/index.js +8 -0
- package/dist/runtime/types.d.ts +83 -0
- package/dist/runtime/types.js +1 -0
- package/package.json +41 -4
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Generated from the Levr OpenAPI specification. Do not edit.
|
|
2
|
+
|
|
3
|
+
import { client as _client } from '../../runtime/index.js';
|
|
4
|
+
|
|
5
|
+
/** GET /v1/team */
|
|
6
|
+
export const teamFindAllV1 = (options) => {
|
|
7
|
+
return (options?.client ?? _client).get({
|
|
8
|
+
security: [
|
|
9
|
+
{
|
|
10
|
+
scheme: 'bearer',
|
|
11
|
+
type: 'http',
|
|
12
|
+
},
|
|
13
|
+
],
|
|
14
|
+
url: '/v1/team',
|
|
15
|
+
...options,
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// Generated from the Levr OpenAPI specification. Do not edit.
|
|
2
|
+
import type {
|
|
3
|
+
PaginatedDocumented,
|
|
4
|
+
} from '../_common/types.js';
|
|
5
|
+
export type ResponseTeamDto = {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
key?: string;
|
|
9
|
+
description?: string | null | null;
|
|
10
|
+
icon?: string | null | null;
|
|
11
|
+
color?: string | null | null;
|
|
12
|
+
is_private?: boolean;
|
|
13
|
+
issue_count?: number;
|
|
14
|
+
settings?: unknown | null;
|
|
15
|
+
estimation_scale?: "none" | "fibonacci" | "linear" | "tshirt";
|
|
16
|
+
estimation_allow_zero?: boolean;
|
|
17
|
+
estimation_unestimated_value?: number;
|
|
18
|
+
is_system?: boolean;
|
|
19
|
+
created_at: unknown;
|
|
20
|
+
updated_at: unknown;
|
|
21
|
+
epoch: number;
|
|
22
|
+
created_by: string;
|
|
23
|
+
updated_by: string;
|
|
24
|
+
workspace_id: string;
|
|
25
|
+
deleted_at: unknown | null;
|
|
26
|
+
deleted_by: string | null | null;
|
|
27
|
+
archived_at: unknown | null;
|
|
28
|
+
archived_by: string | null | null;
|
|
29
|
+
web_url?: string | null | null;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export type TeamFindAllV1Data = {
|
|
33
|
+
body?: never;
|
|
34
|
+
path?: never;
|
|
35
|
+
query?: {
|
|
36
|
+
_with?: string;
|
|
37
|
+
page?: number;
|
|
38
|
+
limit?: number;
|
|
39
|
+
'filter.id'?: Array<string>;
|
|
40
|
+
'filter.name'?: Array<string>;
|
|
41
|
+
'filter.key'?: Array<string>;
|
|
42
|
+
'filter.description'?: Array<string>;
|
|
43
|
+
'filter.icon'?: Array<string>;
|
|
44
|
+
'filter.color'?: Array<string>;
|
|
45
|
+
'filter.is_private'?: Array<string>;
|
|
46
|
+
'filter.issue_count'?: Array<string>;
|
|
47
|
+
'filter.estimation_allow_zero'?: Array<string>;
|
|
48
|
+
'filter.estimation_unestimated_value'?: Array<string>;
|
|
49
|
+
'filter.is_system'?: Array<string>;
|
|
50
|
+
'filter.created_at'?: Array<string>;
|
|
51
|
+
'filter.updated_at'?: Array<string>;
|
|
52
|
+
'filter.deleted_at'?: Array<string>;
|
|
53
|
+
'filter.archived_at'?: Array<string>;
|
|
54
|
+
sortBy?: Array<"id:ASC" | "id:DESC" | "name:ASC" | "name:DESC" | "key:ASC" | "key:DESC" | "description:ASC" | "description:DESC" | "icon:ASC" | "icon:DESC" | "color:ASC" | "color:DESC" | "issue_count:ASC" | "issue_count:DESC" | "estimation_unestimated_value:ASC" | "estimation_unestimated_value:DESC" | "created_at:ASC" | "created_at:DESC" | "updated_at:ASC" | "updated_at:DESC" | "deleted_at:ASC" | "deleted_at:DESC" | "archived_at:ASC" | "archived_at:DESC">;
|
|
55
|
+
search?: string;
|
|
56
|
+
searchBy?: Array<string>;
|
|
57
|
+
};
|
|
58
|
+
url: '/v1/team';
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export type TeamFindAllV1Responses = {
|
|
62
|
+
200: PaginatedDocumented & {
|
|
63
|
+
data?: Array<ResponseTeamDto>;
|
|
64
|
+
meta?: unknown;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export type TeamFindAllV1Errors = unknown;
|
|
69
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// Generated from the Levr OpenAPI specification. Do not edit.
|
|
2
|
+
|
|
3
|
+
import { z } from 'zod/v3';
|
|
4
|
+
|
|
5
|
+
export declare const zResponseTeamDto: z.ZodType<import('./types.js').ResponseTeamDto>;
|
|
6
|
+
|
|
7
|
+
export type ResponseTeamDtoZodType = z.infer<typeof zResponseTeamDto>;
|
|
8
|
+
|
|
9
|
+
export declare const zTeamFindAllV1Data: z.ZodType<import('./types.js').TeamFindAllV1Data>;
|
|
10
|
+
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// Generated from the Levr OpenAPI specification. Do not edit.
|
|
2
|
+
|
|
3
|
+
import { z } from 'zod/v3';
|
|
4
|
+
|
|
5
|
+
export const zResponseTeamDto = /* @__PURE__ */ z.object({
|
|
6
|
+
id: z.string(),
|
|
7
|
+
name: z.string(),
|
|
8
|
+
key: z.string().optional(),
|
|
9
|
+
description: z.string().nullable().optional(),
|
|
10
|
+
icon: z.string().nullable().optional(),
|
|
11
|
+
color: z.string().nullable().optional(),
|
|
12
|
+
is_private: z.boolean().optional(),
|
|
13
|
+
issue_count: z.number().optional(),
|
|
14
|
+
settings: z.unknown().optional(),
|
|
15
|
+
estimation_scale: z.enum(["none", "fibonacci", "linear", "tshirt"]).optional(),
|
|
16
|
+
estimation_allow_zero: z.boolean().optional(),
|
|
17
|
+
estimation_unestimated_value: z.number().optional(),
|
|
18
|
+
is_system: z.boolean().optional(),
|
|
19
|
+
created_at: z.unknown(),
|
|
20
|
+
updated_at: z.unknown(),
|
|
21
|
+
epoch: z.number(),
|
|
22
|
+
created_by: z.string(),
|
|
23
|
+
updated_by: z.string(),
|
|
24
|
+
workspace_id: z.string(),
|
|
25
|
+
deleted_at: z.unknown(),
|
|
26
|
+
deleted_by: z.string().nullable(),
|
|
27
|
+
archived_at: z.unknown(),
|
|
28
|
+
archived_by: z.string().nullable(),
|
|
29
|
+
web_url: z.string().nullable().optional(),
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
export const zTeamFindAllV1Data = /* @__PURE__ */ z.object({
|
|
33
|
+
query: z.object({
|
|
34
|
+
'_with': z.string().optional(),
|
|
35
|
+
'page': z.number().optional(),
|
|
36
|
+
'limit': z.number().optional(),
|
|
37
|
+
'filter.id': z.array(z.string()).optional(),
|
|
38
|
+
'filter.name': z.array(z.string()).optional(),
|
|
39
|
+
'filter.key': z.array(z.string()).optional(),
|
|
40
|
+
'filter.description': z.array(z.string()).optional(),
|
|
41
|
+
'filter.icon': z.array(z.string()).optional(),
|
|
42
|
+
'filter.color': z.array(z.string()).optional(),
|
|
43
|
+
'filter.is_private': z.array(z.string()).optional(),
|
|
44
|
+
'filter.issue_count': z.array(z.string()).optional(),
|
|
45
|
+
'filter.estimation_allow_zero': z.array(z.string()).optional(),
|
|
46
|
+
'filter.estimation_unestimated_value': z.array(z.string()).optional(),
|
|
47
|
+
'filter.is_system': z.array(z.string()).optional(),
|
|
48
|
+
'filter.created_at': z.array(z.string()).optional(),
|
|
49
|
+
'filter.updated_at': z.array(z.string()).optional(),
|
|
50
|
+
'filter.deleted_at': z.array(z.string()).optional(),
|
|
51
|
+
'filter.archived_at': z.array(z.string()).optional(),
|
|
52
|
+
'sortBy': z.array(z.enum(["id:ASC", "id:DESC", "name:ASC", "name:DESC", "key:ASC", "key:DESC", "description:ASC", "description:DESC", "icon:ASC", "icon:DESC", "color:ASC", "color:DESC", "issue_count:ASC", "issue_count:DESC", "estimation_unestimated_value:ASC", "estimation_unestimated_value:DESC", "created_at:ASC", "created_at:DESC", "updated_at:ASC", "updated_at:DESC", "deleted_at:ASC", "deleted_at:DESC", "archived_at:ASC", "archived_at:DESC"])).optional(),
|
|
53
|
+
'search': z.string().optional(),
|
|
54
|
+
'searchBy': z.array(z.string()).optional(),
|
|
55
|
+
}).optional(),
|
|
56
|
+
url: z.literal('/v1/team'),
|
|
57
|
+
});
|
|
58
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Generated from the Levr OpenAPI specification. Do not edit.
|
|
2
|
+
|
|
3
|
+
import type { Options } from '../../runtime/types.js';
|
|
4
|
+
import type {
|
|
5
|
+
TestCaseImportPreviewV1Data,
|
|
6
|
+
TestCaseImportPreviewV1Responses,
|
|
7
|
+
TestCaseImportPreviewV1Errors,
|
|
8
|
+
TestCaseImportCommitV1Data,
|
|
9
|
+
TestCaseImportCommitV1Responses,
|
|
10
|
+
TestCaseImportCommitV1Errors,
|
|
11
|
+
} from './types.js';
|
|
12
|
+
|
|
13
|
+
/** POST /v1/test-case-import/preview */
|
|
14
|
+
export declare const testCaseImportPreviewV1: <ThrowOnError extends boolean = false>(
|
|
15
|
+
options: Options<TestCaseImportPreviewV1Data, ThrowOnError>,
|
|
16
|
+
) => import('../../runtime/types.js').RequestResult<TestCaseImportPreviewV1Responses, TestCaseImportPreviewV1Errors, ThrowOnError>;
|
|
17
|
+
|
|
18
|
+
/** POST /v1/test-case-import/commit */
|
|
19
|
+
export declare const testCaseImportCommitV1: <ThrowOnError extends boolean = false>(
|
|
20
|
+
options: Options<TestCaseImportCommitV1Data, ThrowOnError>,
|
|
21
|
+
) => import('../../runtime/types.js').RequestResult<TestCaseImportCommitV1Responses, TestCaseImportCommitV1Errors, ThrowOnError>;
|
|
22
|
+
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// Generated from the Levr OpenAPI specification. Do not edit.
|
|
2
|
+
|
|
3
|
+
import { client as _client } from '../../runtime/index.js';
|
|
4
|
+
|
|
5
|
+
/** POST /v1/test-case-import/preview */
|
|
6
|
+
export const testCaseImportPreviewV1 = (options) => {
|
|
7
|
+
return (options?.client ?? _client).post({
|
|
8
|
+
security: [
|
|
9
|
+
{
|
|
10
|
+
scheme: 'bearer',
|
|
11
|
+
type: 'http',
|
|
12
|
+
},
|
|
13
|
+
],
|
|
14
|
+
url: '/v1/test-case-import/preview',
|
|
15
|
+
bodySerializer: (body) => {
|
|
16
|
+
const fd = new FormData();
|
|
17
|
+
if (body && typeof body === 'object') {
|
|
18
|
+
for (const [k, v] of Object.entries(body)) {
|
|
19
|
+
if (v == null) continue;
|
|
20
|
+
fd.append(k, v instanceof Blob ? v : String(v));
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return fd;
|
|
24
|
+
},
|
|
25
|
+
...options,
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/** POST /v1/test-case-import/commit */
|
|
30
|
+
export const testCaseImportCommitV1 = (options) => {
|
|
31
|
+
return (options?.client ?? _client).post({
|
|
32
|
+
security: [
|
|
33
|
+
{
|
|
34
|
+
scheme: 'bearer',
|
|
35
|
+
type: 'http',
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
url: '/v1/test-case-import/commit',
|
|
39
|
+
...options,
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
// Generated from the Levr OpenAPI specification. Do not edit.
|
|
2
|
+
export type PreviewImportDto = {
|
|
3
|
+
team_id: string;
|
|
4
|
+
format?: "csv" | "xlsx" | "sheets" | "json";
|
|
5
|
+
file_id?: string;
|
|
6
|
+
sheets_url?: string;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export type PreviewImportResponseDto = {
|
|
10
|
+
token: string;
|
|
11
|
+
filename: string;
|
|
12
|
+
format: "csv" | "xlsx" | "sheets" | "json";
|
|
13
|
+
proposed_mapping: Array<{
|
|
14
|
+
originalName: string;
|
|
15
|
+
targetProperty: "row_type" | "test_id" | "test_key" | "folder_id" | "folder_path" | "folder_name" | "test_name" | "test_description" | "automation_status" | "automation_type" | "case_type_id" | "case_type_name" | "test_priority" | "estimate" | "assignee_email" | "labels" | "teams" | "attachment_filenames" | "data_set_names" | "sequence" | "item_id" | "method" | "expected_result" | "keyword" | "shared_step_id" | "shared_precondition_id" | "data_table" | "steps" | "preconditions" | null;
|
|
16
|
+
matchType: "exact" | "prefix" | "fuzzy" | "llm" | "unmapped" | "manual" | "preset";
|
|
17
|
+
confidence: number;
|
|
18
|
+
fieldType?: "string" | "number" | "boolean" | "unknown";
|
|
19
|
+
labelPrefix?: string;
|
|
20
|
+
descriptionHeading?: string;
|
|
21
|
+
teamQualifier?: string;
|
|
22
|
+
team_id?: string;
|
|
23
|
+
}>;
|
|
24
|
+
missing_required: Array<string>;
|
|
25
|
+
sample_rows: Array<Record<string, unknown>>;
|
|
26
|
+
row_count: number;
|
|
27
|
+
expires_at: unknown;
|
|
28
|
+
advisories: Array<{
|
|
29
|
+
column: string;
|
|
30
|
+
target: "row_type" | "test_id" | "test_key" | "folder_id" | "folder_path" | "folder_name" | "test_name" | "test_description" | "automation_status" | "automation_type" | "case_type_id" | "case_type_name" | "test_priority" | "estimate" | "assignee_email" | "labels" | "teams" | "attachment_filenames" | "data_set_names" | "sequence" | "item_id" | "method" | "expected_result" | "keyword" | "shared_step_id" | "shared_precondition_id" | "data_table" | "steps" | "preconditions";
|
|
31
|
+
message: string;
|
|
32
|
+
count: number;
|
|
33
|
+
values: Array<{
|
|
34
|
+
value: string;
|
|
35
|
+
count: number;
|
|
36
|
+
}>;
|
|
37
|
+
}>;
|
|
38
|
+
detected_vendor: string | null | null;
|
|
39
|
+
assignee_resolution: {
|
|
40
|
+
column: string;
|
|
41
|
+
entries: Array<{
|
|
42
|
+
sourceValue: string;
|
|
43
|
+
count: number;
|
|
44
|
+
kind: "existing" | "new_email" | "unresolved";
|
|
45
|
+
userId?: string;
|
|
46
|
+
userName?: string;
|
|
47
|
+
suggestedEmail?: string;
|
|
48
|
+
}>;
|
|
49
|
+
} | null;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export type CommitImportDto = {
|
|
53
|
+
token: string;
|
|
54
|
+
confirmed_mapping?: Array<{
|
|
55
|
+
originalName: string;
|
|
56
|
+
targetProperty: "row_type" | "test_id" | "test_key" | "folder_id" | "folder_path" | "folder_name" | "test_name" | "test_description" | "automation_status" | "automation_type" | "case_type_id" | "case_type_name" | "test_priority" | "estimate" | "assignee_email" | "labels" | "teams" | "attachment_filenames" | "data_set_names" | "sequence" | "item_id" | "method" | "expected_result" | "keyword" | "shared_step_id" | "shared_precondition_id" | "data_table" | "steps" | "preconditions" | null;
|
|
57
|
+
matchType: "exact" | "prefix" | "fuzzy" | "llm" | "unmapped" | "manual" | "preset";
|
|
58
|
+
confidence: number;
|
|
59
|
+
fieldType?: "string" | "number" | "boolean" | "unknown";
|
|
60
|
+
labelPrefix?: string;
|
|
61
|
+
descriptionHeading?: string;
|
|
62
|
+
teamQualifier?: string;
|
|
63
|
+
team_id?: string;
|
|
64
|
+
}>;
|
|
65
|
+
assignee_plan?: {
|
|
66
|
+
role?: "owner" | "admin" | "member" | "guest";
|
|
67
|
+
teamIds?: Array<string>;
|
|
68
|
+
entries: Array<{
|
|
69
|
+
sourceValue: string;
|
|
70
|
+
action: "assign" | "create" | "skip";
|
|
71
|
+
userId?: string;
|
|
72
|
+
email?: string;
|
|
73
|
+
}>;
|
|
74
|
+
};
|
|
75
|
+
team_ids?: Array<string>;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export type TestCaseImportResultDto = {
|
|
79
|
+
status: "completed" | "completed_with_warnings" | "failed";
|
|
80
|
+
created_tests: Array<{
|
|
81
|
+
id: string;
|
|
82
|
+
name: string;
|
|
83
|
+
}>;
|
|
84
|
+
stats: {
|
|
85
|
+
rows_processed: number;
|
|
86
|
+
tests_created: number;
|
|
87
|
+
folders_created: number;
|
|
88
|
+
steps_created: number;
|
|
89
|
+
preconditions_created: number;
|
|
90
|
+
rows_failed: number;
|
|
91
|
+
members_provisioned?: number;
|
|
92
|
+
};
|
|
93
|
+
warnings: Array<{
|
|
94
|
+
type: "skipped" | "invalid" | "unresolved" | "write_failed";
|
|
95
|
+
message: string;
|
|
96
|
+
row_index?: number;
|
|
97
|
+
column?: string;
|
|
98
|
+
count?: number;
|
|
99
|
+
values?: Array<{
|
|
100
|
+
value: string;
|
|
101
|
+
count: number;
|
|
102
|
+
}>;
|
|
103
|
+
}>;
|
|
104
|
+
errors: Array<{
|
|
105
|
+
type: "skipped" | "invalid" | "unresolved" | "write_failed";
|
|
106
|
+
message: string;
|
|
107
|
+
row_index?: number;
|
|
108
|
+
column?: string;
|
|
109
|
+
count?: number;
|
|
110
|
+
values?: Array<{
|
|
111
|
+
value: string;
|
|
112
|
+
count: number;
|
|
113
|
+
}>;
|
|
114
|
+
}>;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
export type TestCaseImportPreviewV1Data = {
|
|
118
|
+
body: PreviewImportDto;
|
|
119
|
+
path?: never;
|
|
120
|
+
query?: never;
|
|
121
|
+
url: '/v1/test-case-import/preview';
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
export type TestCaseImportPreviewV1Responses = {
|
|
125
|
+
200: PreviewImportResponseDto;
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
export type TestCaseImportPreviewV1Errors = unknown;
|
|
129
|
+
|
|
130
|
+
export type TestCaseImportCommitV1Data = {
|
|
131
|
+
body: CommitImportDto;
|
|
132
|
+
path?: never;
|
|
133
|
+
query?: never;
|
|
134
|
+
url: '/v1/test-case-import/commit';
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
export type TestCaseImportCommitV1Responses = {
|
|
138
|
+
200: TestCaseImportResultDto;
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
export type TestCaseImportCommitV1Errors = unknown;
|
|
142
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Generated from the Levr OpenAPI specification. Do not edit.
|
|
2
|
+
|
|
3
|
+
import { z } from 'zod/v3';
|
|
4
|
+
|
|
5
|
+
export declare const zPreviewImportDto: z.ZodType<import('./types.js').PreviewImportDto>;
|
|
6
|
+
|
|
7
|
+
export type PreviewImportDtoZodType = z.infer<typeof zPreviewImportDto>;
|
|
8
|
+
|
|
9
|
+
export declare const zPreviewImportResponseDto: z.ZodType<import('./types.js').PreviewImportResponseDto>;
|
|
10
|
+
|
|
11
|
+
export type PreviewImportResponseDtoZodType = z.infer<typeof zPreviewImportResponseDto>;
|
|
12
|
+
|
|
13
|
+
export declare const zCommitImportDto: z.ZodType<import('./types.js').CommitImportDto>;
|
|
14
|
+
|
|
15
|
+
export type CommitImportDtoZodType = z.infer<typeof zCommitImportDto>;
|
|
16
|
+
|
|
17
|
+
export declare const zTestCaseImportResultDto: z.ZodType<import('./types.js').TestCaseImportResultDto>;
|
|
18
|
+
|
|
19
|
+
export type TestCaseImportResultDtoZodType = z.infer<typeof zTestCaseImportResultDto>;
|
|
20
|
+
|
|
21
|
+
export declare const zTestCaseImportPreviewV1Data: z.ZodType<import('./types.js').TestCaseImportPreviewV1Data>;
|
|
22
|
+
|
|
23
|
+
export declare const zTestCaseImportCommitV1Data: z.ZodType<import('./types.js').TestCaseImportCommitV1Data>;
|
|
24
|
+
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
// Generated from the Levr OpenAPI specification. Do not edit.
|
|
2
|
+
|
|
3
|
+
import { z } from 'zod/v3';
|
|
4
|
+
|
|
5
|
+
export const zPreviewImportDto = /* @__PURE__ */ z.object({
|
|
6
|
+
team_id: z.string(),
|
|
7
|
+
format: z.enum(["csv", "xlsx", "sheets", "json"]).optional(),
|
|
8
|
+
file_id: z.string().optional(),
|
|
9
|
+
sheets_url: z.string().optional(),
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export const zPreviewImportResponseDto = /* @__PURE__ */ z.object({
|
|
13
|
+
token: z.string(),
|
|
14
|
+
filename: z.string(),
|
|
15
|
+
format: z.enum(["csv", "xlsx", "sheets", "json"]),
|
|
16
|
+
proposed_mapping: z.array(z.object({
|
|
17
|
+
originalName: z.string(),
|
|
18
|
+
targetProperty: z.enum(["row_type", "test_id", "test_key", "folder_id", "folder_path", "folder_name", "test_name", "test_description", "automation_status", "automation_type", "case_type_id", "case_type_name", "test_priority", "estimate", "assignee_email", "labels", "teams", "attachment_filenames", "data_set_names", "sequence", "item_id", "method", "expected_result", "keyword", "shared_step_id", "shared_precondition_id", "data_table", "steps", "preconditions"]).nullable(),
|
|
19
|
+
matchType: z.enum(["exact", "prefix", "fuzzy", "llm", "unmapped", "manual", "preset"]),
|
|
20
|
+
confidence: z.number(),
|
|
21
|
+
fieldType: z.enum(["string", "number", "boolean", "unknown"]).optional(),
|
|
22
|
+
labelPrefix: z.string().max(60).optional(),
|
|
23
|
+
descriptionHeading: z.string().max(80).optional(),
|
|
24
|
+
teamQualifier: z.string().max(80).optional(),
|
|
25
|
+
team_id: z.string().optional(),
|
|
26
|
+
})),
|
|
27
|
+
missing_required: z.array(z.string()),
|
|
28
|
+
sample_rows: z.array(z.record(z.string(), z.unknown())),
|
|
29
|
+
row_count: z.number(),
|
|
30
|
+
expires_at: z.unknown(),
|
|
31
|
+
advisories: z.array(z.object({
|
|
32
|
+
column: z.string(),
|
|
33
|
+
target: z.enum(["row_type", "test_id", "test_key", "folder_id", "folder_path", "folder_name", "test_name", "test_description", "automation_status", "automation_type", "case_type_id", "case_type_name", "test_priority", "estimate", "assignee_email", "labels", "teams", "attachment_filenames", "data_set_names", "sequence", "item_id", "method", "expected_result", "keyword", "shared_step_id", "shared_precondition_id", "data_table", "steps", "preconditions"]),
|
|
34
|
+
message: z.string(),
|
|
35
|
+
count: z.number(),
|
|
36
|
+
values: z.array(z.object({
|
|
37
|
+
value: z.string(),
|
|
38
|
+
count: z.number(),
|
|
39
|
+
})),
|
|
40
|
+
})),
|
|
41
|
+
detected_vendor: z.string().nullable(),
|
|
42
|
+
assignee_resolution: z.object({
|
|
43
|
+
column: z.string(),
|
|
44
|
+
entries: z.array(z.object({
|
|
45
|
+
sourceValue: z.string(),
|
|
46
|
+
count: z.number(),
|
|
47
|
+
kind: z.enum(["existing", "new_email", "unresolved"]),
|
|
48
|
+
userId: z.string().optional(),
|
|
49
|
+
userName: z.string().optional(),
|
|
50
|
+
suggestedEmail: z.string().optional(),
|
|
51
|
+
})),
|
|
52
|
+
}).nullable(),
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
export const zCommitImportDto = /* @__PURE__ */ z.object({
|
|
56
|
+
token: z.string(),
|
|
57
|
+
confirmed_mapping: z.array(z.object({
|
|
58
|
+
originalName: z.string(),
|
|
59
|
+
targetProperty: z.enum(["row_type", "test_id", "test_key", "folder_id", "folder_path", "folder_name", "test_name", "test_description", "automation_status", "automation_type", "case_type_id", "case_type_name", "test_priority", "estimate", "assignee_email", "labels", "teams", "attachment_filenames", "data_set_names", "sequence", "item_id", "method", "expected_result", "keyword", "shared_step_id", "shared_precondition_id", "data_table", "steps", "preconditions"]).nullable(),
|
|
60
|
+
matchType: z.enum(["exact", "prefix", "fuzzy", "llm", "unmapped", "manual", "preset"]),
|
|
61
|
+
confidence: z.number(),
|
|
62
|
+
fieldType: z.enum(["string", "number", "boolean", "unknown"]).optional(),
|
|
63
|
+
labelPrefix: z.string().max(60).optional(),
|
|
64
|
+
descriptionHeading: z.string().max(80).optional(),
|
|
65
|
+
teamQualifier: z.string().max(80).optional(),
|
|
66
|
+
team_id: z.string().optional(),
|
|
67
|
+
})).optional(),
|
|
68
|
+
assignee_plan: z.object({
|
|
69
|
+
role: z.enum(["owner", "admin", "member", "guest"]).optional(),
|
|
70
|
+
teamIds: z.array(z.string()).optional(),
|
|
71
|
+
entries: z.array(z.object({
|
|
72
|
+
sourceValue: z.string(),
|
|
73
|
+
action: z.enum(["assign", "create", "skip"]),
|
|
74
|
+
userId: z.string().optional(),
|
|
75
|
+
email: z.string().optional(),
|
|
76
|
+
})),
|
|
77
|
+
}).optional(),
|
|
78
|
+
team_ids: z.array(z.string()).optional(),
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
export const zTestCaseImportResultDto = /* @__PURE__ */ z.object({
|
|
82
|
+
status: z.enum(["completed", "completed_with_warnings", "failed"]),
|
|
83
|
+
created_tests: z.array(z.object({
|
|
84
|
+
id: z.string(),
|
|
85
|
+
name: z.string(),
|
|
86
|
+
})),
|
|
87
|
+
stats: z.object({
|
|
88
|
+
rows_processed: z.number(),
|
|
89
|
+
tests_created: z.number(),
|
|
90
|
+
folders_created: z.number(),
|
|
91
|
+
steps_created: z.number(),
|
|
92
|
+
preconditions_created: z.number(),
|
|
93
|
+
rows_failed: z.number(),
|
|
94
|
+
members_provisioned: z.number().optional(),
|
|
95
|
+
}),
|
|
96
|
+
warnings: z.array(z.object({
|
|
97
|
+
type: z.enum(["skipped", "invalid", "unresolved", "write_failed"]),
|
|
98
|
+
message: z.string(),
|
|
99
|
+
row_index: z.number().optional(),
|
|
100
|
+
column: z.string().optional(),
|
|
101
|
+
count: z.number().optional(),
|
|
102
|
+
values: z.array(z.object({
|
|
103
|
+
value: z.string(),
|
|
104
|
+
count: z.number(),
|
|
105
|
+
})).optional(),
|
|
106
|
+
})),
|
|
107
|
+
errors: z.array(z.object({
|
|
108
|
+
type: z.enum(["skipped", "invalid", "unresolved", "write_failed"]),
|
|
109
|
+
message: z.string(),
|
|
110
|
+
row_index: z.number().optional(),
|
|
111
|
+
column: z.string().optional(),
|
|
112
|
+
count: z.number().optional(),
|
|
113
|
+
values: z.array(z.object({
|
|
114
|
+
value: z.string(),
|
|
115
|
+
count: z.number(),
|
|
116
|
+
})).optional(),
|
|
117
|
+
})),
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
export const zTestCaseImportPreviewV1Data = /* @__PURE__ */ z.object({
|
|
121
|
+
body: zPreviewImportDto,
|
|
122
|
+
url: z.literal('/v1/test-case-import/preview'),
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
export const zTestCaseImportCommitV1Data = /* @__PURE__ */ z.object({
|
|
126
|
+
body: zCommitImportDto,
|
|
127
|
+
url: z.literal('/v1/test-case-import/commit'),
|
|
128
|
+
});
|
|
129
|
+
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export * from './gen/index.js';
|
|
2
|
+
export { client, createClient } from './runtime/index.js';
|
|
3
|
+
export type { Client, ClientConfig, Config, CreateClientConfig, RequestOptions, RequestResult, Options, TDataShape, AuthScheme, } from './runtime/types.js';
|
|
4
|
+
export { createClientConfig } from './client.config.js';
|
package/dist/index.js
ADDED