@levr-one/sdk 1.0.7 → 1.0.8

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.
@@ -36,10 +36,11 @@ export type GateConfigImportResultDto = {
36
36
  gate_key: string;
37
37
  repo_key: string | null | null;
38
38
  path_prefix: string | null | null;
39
- action: "create" | "exists" | "differs" | "update" | "delete" | "absent";
39
+ action: "create" | "exists" | "differs" | "update" | "replace" | "delete" | "absent";
40
40
  stored_id?: string;
41
41
  note?: string;
42
42
  applied: boolean;
43
+ technique?: string;
43
44
  }>;
44
45
  };
45
46
 
@@ -61,6 +62,7 @@ export type GateBindingTransferImportConfigV1Data = {
61
62
  path?: never;
62
63
  query?: {
63
64
  dry_run?: "true" | "false";
65
+ replace_judge?: "true" | "false";
64
66
  };
65
67
  url: '/v1/gate/bindings/import';
66
68
  };
@@ -39,10 +39,11 @@ export const zGateConfigImportResultDto = /* @__PURE__ */ z.object({
39
39
  gate_key: z.string(),
40
40
  repo_key: z.string().nullable(),
41
41
  path_prefix: z.string().nullable(),
42
- action: z.enum(["create", "exists", "differs", "update", "delete", "absent"]),
42
+ action: z.enum(["create", "exists", "differs", "update", "replace", "delete", "absent"]),
43
43
  stored_id: z.string().optional(),
44
44
  note: z.string().optional(),
45
45
  applied: z.boolean(),
46
+ technique: z.string().optional(),
46
47
  })),
47
48
  });
48
49
 
@@ -54,6 +55,7 @@ export const zGateBindingTransferImportConfigV1Data = /* @__PURE__ */ z.object({
54
55
  body: zGateConfigFileDto,
55
56
  query: z.object({
56
57
  'dry_run': z.enum(["true", "false"]).optional(),
58
+ 'replace_judge': z.enum(["true", "false"]).optional(),
57
59
  }).optional(),
58
60
  url: z.literal('/v1/gate/bindings/import'),
59
61
  });
@@ -11,6 +11,8 @@ export * from './gate-binding-transfer/index.js';
11
11
  export * from './import/index.js';
12
12
  export * from './issue/index.js';
13
13
  export * from './issue-gate-verification/index.js';
14
+ export * from './repository-ref/index.js';
15
+ export * from './repository-ref-catalog/index.js';
14
16
  export * from './run-api/index.js';
15
17
  export * from './team/index.js';
16
18
  export * from './test-case-import/index.js';
package/dist/gen/index.js CHANGED
@@ -11,6 +11,8 @@ export * from './gate-binding-transfer/index.js';
11
11
  export * from './import/index.js';
12
12
  export * from './issue/index.js';
13
13
  export * from './issue-gate-verification/index.js';
14
+ export * from './repository-ref/index.js';
15
+ export * from './repository-ref-catalog/index.js';
14
16
  export * from './run-api/index.js';
15
17
  export * from './team/index.js';
16
18
  export * from './test-case-import/index.js';
@@ -0,0 +1,14 @@
1
+ // Generated from the Levr OpenAPI specification. Do not edit.
2
+
3
+ import type { Options } from '../../runtime/types.js';
4
+ import type {
5
+ RepositoryRefFindAllV1Data,
6
+ RepositoryRefFindAllV1Responses,
7
+ RepositoryRefFindAllV1Errors,
8
+ } from './types.js';
9
+
10
+ /** GET /v1/repository-ref */
11
+ export declare const repositoryRefFindAllV1: <ThrowOnError extends boolean = false>(
12
+ options?: Options<RepositoryRefFindAllV1Data, ThrowOnError>,
13
+ ) => import('../../runtime/types.js').RequestResult<RepositoryRefFindAllV1Responses, RepositoryRefFindAllV1Errors, ThrowOnError>;
14
+
@@ -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/repository-ref */
6
+ export const repositoryRefFindAllV1 = (options) => {
7
+ return (options?.client ?? _client).get({
8
+ security: [
9
+ {
10
+ scheme: 'bearer',
11
+ type: 'http',
12
+ },
13
+ ],
14
+ url: '/v1/repository-ref',
15
+ ...options,
16
+ });
17
+ };
18
+
@@ -0,0 +1,4 @@
1
+ // Generated from the Levr OpenAPI specification. Do not edit.
2
+ export * from './types.js';
3
+ export * from './functions.js';
4
+ export * from './zod.js';
@@ -0,0 +1,4 @@
1
+ // Generated from the Levr OpenAPI specification. Do not edit.
2
+ export * from './types.js';
3
+ export * from './functions.js';
4
+ export * from './zod.js';
@@ -0,0 +1,51 @@
1
+ // Generated from the Levr OpenAPI specification. Do not edit.
2
+ import type {
3
+ PaginatedDocumented,
4
+ } from '../_common/types.js';
5
+ export type ResponseRepositoryRefDto = {
6
+ id: string;
7
+ provider: "github" | "gitlab" | "bitbucket" | "other";
8
+ host?: string | null | null;
9
+ name: string;
10
+ remote_urls?: unknown;
11
+ github_repository_id?: string | null | null;
12
+ created_at: unknown;
13
+ updated_at: unknown;
14
+ epoch: number;
15
+ created_by: string;
16
+ updated_by: string;
17
+ workspace_id: string;
18
+ deleted_at: unknown | null;
19
+ deleted_by: string | null | null;
20
+ };
21
+
22
+ export type RepositoryRefFindAllV1Data = {
23
+ body?: never;
24
+ path?: never;
25
+ query?: {
26
+ _with?: string;
27
+ page?: number;
28
+ limit?: number;
29
+ 'filter.id'?: Array<string>;
30
+ 'filter.host'?: Array<string>;
31
+ 'filter.name'?: Array<string>;
32
+ 'filter.github_repository_id'?: Array<string>;
33
+ 'filter.created_at'?: Array<string>;
34
+ 'filter.updated_at'?: Array<string>;
35
+ 'filter.deleted_at'?: Array<string>;
36
+ sortBy?: Array<"id:ASC" | "id:DESC" | "host:ASC" | "host:DESC" | "name:ASC" | "name:DESC" | "github_repository_id:ASC" | "github_repository_id:DESC" | "created_at:ASC" | "created_at:DESC" | "updated_at:ASC" | "updated_at:DESC" | "deleted_at:ASC" | "deleted_at:DESC">;
37
+ search?: string;
38
+ searchBy?: Array<string>;
39
+ };
40
+ url: '/v1/repository-ref';
41
+ };
42
+
43
+ export type RepositoryRefFindAllV1Responses = {
44
+ 200: PaginatedDocumented & {
45
+ data?: Array<ResponseRepositoryRefDto>;
46
+ meta?: unknown;
47
+ };
48
+ };
49
+
50
+ export type RepositoryRefFindAllV1Errors = unknown;
51
+
@@ -0,0 +1,2 @@
1
+ // Generated from the Levr OpenAPI specification. Do not edit.
2
+ // Types-only file — JS runtime is empty unless enums exist
@@ -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 zResponseRepositoryRefDto: z.ZodType<import('./types.js').ResponseRepositoryRefDto>;
6
+
7
+ export type ResponseRepositoryRefDtoZodType = z.infer<typeof zResponseRepositoryRefDto>;
8
+
9
+ export declare const zRepositoryRefFindAllV1Data: z.ZodType<import('./types.js').RepositoryRefFindAllV1Data>;
10
+
@@ -0,0 +1,40 @@
1
+ // Generated from the Levr OpenAPI specification. Do not edit.
2
+
3
+ import { z } from 'zod/v3';
4
+
5
+ export const zResponseRepositoryRefDto = /* @__PURE__ */ z.object({
6
+ id: z.string(),
7
+ provider: z.enum(["github", "gitlab", "bitbucket", "other"]),
8
+ host: z.string().nullable().optional(),
9
+ name: z.string(),
10
+ remote_urls: z.unknown().optional(),
11
+ github_repository_id: z.string().nullable().optional(),
12
+ created_at: z.unknown(),
13
+ updated_at: z.unknown(),
14
+ epoch: z.number(),
15
+ created_by: z.string(),
16
+ updated_by: z.string(),
17
+ workspace_id: z.string(),
18
+ deleted_at: z.unknown(),
19
+ deleted_by: z.string().nullable(),
20
+ });
21
+
22
+ export const zRepositoryRefFindAllV1Data = /* @__PURE__ */ z.object({
23
+ query: z.object({
24
+ '_with': z.string().optional(),
25
+ 'page': z.number().optional(),
26
+ 'limit': z.number().optional(),
27
+ 'filter.id': z.array(z.string()).optional(),
28
+ 'filter.host': z.array(z.string()).optional(),
29
+ 'filter.name': z.array(z.string()).optional(),
30
+ 'filter.github_repository_id': z.array(z.string()).optional(),
31
+ 'filter.created_at': z.array(z.string()).optional(),
32
+ 'filter.updated_at': z.array(z.string()).optional(),
33
+ 'filter.deleted_at': z.array(z.string()).optional(),
34
+ 'sortBy': z.array(z.enum(["id:ASC", "id:DESC", "host:ASC", "host:DESC", "name:ASC", "name:DESC", "github_repository_id:ASC", "github_repository_id:DESC", "created_at:ASC", "created_at:DESC", "updated_at:ASC", "updated_at:DESC", "deleted_at:ASC", "deleted_at:DESC"])).optional(),
35
+ 'search': z.string().optional(),
36
+ 'searchBy': z.array(z.string()).optional(),
37
+ }).optional(),
38
+ url: z.literal('/v1/repository-ref'),
39
+ });
40
+
@@ -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
+ RepositoryRefCatalogResolveByRemoteV1Data,
6
+ RepositoryRefCatalogResolveByRemoteV1Responses,
7
+ RepositoryRefCatalogResolveByRemoteV1Errors,
8
+ RepositoryRefCatalogCreateV1Data,
9
+ RepositoryRefCatalogCreateV1Responses,
10
+ RepositoryRefCatalogCreateV1Errors,
11
+ } from './types.js';
12
+
13
+ /** GET /v1/repository-catalog/resolve */
14
+ export declare const repositoryRefCatalogResolveByRemoteV1: <ThrowOnError extends boolean = false>(
15
+ options?: Options<RepositoryRefCatalogResolveByRemoteV1Data, ThrowOnError>,
16
+ ) => import('../../runtime/types.js').RequestResult<RepositoryRefCatalogResolveByRemoteV1Responses, RepositoryRefCatalogResolveByRemoteV1Errors, ThrowOnError>;
17
+
18
+ /** POST /v1/repository-catalog */
19
+ export declare const repositoryRefCatalogCreateV1: <ThrowOnError extends boolean = false>(
20
+ options: Options<RepositoryRefCatalogCreateV1Data, ThrowOnError>,
21
+ ) => import('../../runtime/types.js').RequestResult<RepositoryRefCatalogCreateV1Responses, RepositoryRefCatalogCreateV1Errors, ThrowOnError>;
22
+
@@ -0,0 +1,32 @@
1
+ // Generated from the Levr OpenAPI specification. Do not edit.
2
+
3
+ import { client as _client } from '../../runtime/index.js';
4
+
5
+ /** GET /v1/repository-catalog/resolve */
6
+ export const repositoryRefCatalogResolveByRemoteV1 = (options) => {
7
+ return (options?.client ?? _client).get({
8
+ security: [
9
+ {
10
+ scheme: 'bearer',
11
+ type: 'http',
12
+ },
13
+ ],
14
+ url: '/v1/repository-catalog/resolve',
15
+ ...options,
16
+ });
17
+ };
18
+
19
+ /** POST /v1/repository-catalog */
20
+ export const repositoryRefCatalogCreateV1 = (options) => {
21
+ return (options?.client ?? _client).post({
22
+ security: [
23
+ {
24
+ scheme: 'bearer',
25
+ type: 'http',
26
+ },
27
+ ],
28
+ url: '/v1/repository-catalog',
29
+ ...options,
30
+ });
31
+ };
32
+
@@ -0,0 +1,4 @@
1
+ // Generated from the Levr OpenAPI specification. Do not edit.
2
+ export * from './types.js';
3
+ export * from './functions.js';
4
+ export * from './zod.js';
@@ -0,0 +1,4 @@
1
+ // Generated from the Levr OpenAPI specification. Do not edit.
2
+ export * from './types.js';
3
+ export * from './functions.js';
4
+ export * from './zod.js';
@@ -0,0 +1,57 @@
1
+ // Generated from the Levr OpenAPI specification. Do not edit.
2
+ export type ResolveByRemoteResultDto = {
3
+ repository: {
4
+ repository_ref_id: string | null | null;
5
+ github_repository_id: string | null | null;
6
+ provider: "github" | "gitlab" | "bitbucket" | "other";
7
+ host: string | null | null;
8
+ name: string;
9
+ repo_key: string;
10
+ } | null;
11
+ };
12
+
13
+ export type CreateRepositoryRefDto = {
14
+ remote: string;
15
+ provider?: "github" | "gitlab" | "bitbucket" | "other";
16
+ github_repository_id?: string;
17
+ };
18
+
19
+ export type CreatedRepositoryRefDto = {
20
+ id: string;
21
+ workspace_id: string;
22
+ provider: "github" | "gitlab" | "bitbucket" | "other";
23
+ host: string | null | null;
24
+ name: string;
25
+ remote_urls: Array<string>;
26
+ github_repository_id: string | null | null;
27
+ repo_key: string;
28
+ };
29
+
30
+ export type RepositoryRefCatalogResolveByRemoteV1Data = {
31
+ body?: never;
32
+ path?: never;
33
+ query?: {
34
+ remote: string;
35
+ };
36
+ url: '/v1/repository-catalog/resolve';
37
+ };
38
+
39
+ export type RepositoryRefCatalogResolveByRemoteV1Responses = {
40
+ 200: ResolveByRemoteResultDto;
41
+ };
42
+
43
+ export type RepositoryRefCatalogResolveByRemoteV1Errors = unknown;
44
+
45
+ export type RepositoryRefCatalogCreateV1Data = {
46
+ body: CreateRepositoryRefDto;
47
+ path?: never;
48
+ query?: never;
49
+ url: '/v1/repository-catalog';
50
+ };
51
+
52
+ export type RepositoryRefCatalogCreateV1Responses = {
53
+ 201: CreatedRepositoryRefDto;
54
+ };
55
+
56
+ export type RepositoryRefCatalogCreateV1Errors = unknown;
57
+
@@ -0,0 +1,2 @@
1
+ // Generated from the Levr OpenAPI specification. Do not edit.
2
+ // Types-only file — JS runtime is empty unless enums exist
@@ -0,0 +1,20 @@
1
+ // Generated from the Levr OpenAPI specification. Do not edit.
2
+
3
+ import { z } from 'zod/v3';
4
+
5
+ export declare const zResolveByRemoteResultDto: z.ZodType<import('./types.js').ResolveByRemoteResultDto>;
6
+
7
+ export type ResolveByRemoteResultDtoZodType = z.infer<typeof zResolveByRemoteResultDto>;
8
+
9
+ export declare const zCreateRepositoryRefDto: z.ZodType<import('./types.js').CreateRepositoryRefDto>;
10
+
11
+ export type CreateRepositoryRefDtoZodType = z.infer<typeof zCreateRepositoryRefDto>;
12
+
13
+ export declare const zCreatedRepositoryRefDto: z.ZodType<import('./types.js').CreatedRepositoryRefDto>;
14
+
15
+ export type CreatedRepositoryRefDtoZodType = z.infer<typeof zCreatedRepositoryRefDto>;
16
+
17
+ export declare const zRepositoryRefCatalogResolveByRemoteV1Data: z.ZodType<import('./types.js').RepositoryRefCatalogResolveByRemoteV1Data>;
18
+
19
+ export declare const zRepositoryRefCatalogCreateV1Data: z.ZodType<import('./types.js').RepositoryRefCatalogCreateV1Data>;
20
+
@@ -0,0 +1,44 @@
1
+ // Generated from the Levr OpenAPI specification. Do not edit.
2
+
3
+ import { z } from 'zod/v3';
4
+
5
+ export const zResolveByRemoteResultDto = /* @__PURE__ */ z.object({
6
+ repository: z.object({
7
+ repository_ref_id: z.string().nullable(),
8
+ github_repository_id: z.string().nullable(),
9
+ provider: z.enum(["github", "gitlab", "bitbucket", "other"]),
10
+ host: z.string().nullable(),
11
+ name: z.string(),
12
+ repo_key: z.string(),
13
+ }).nullable(),
14
+ });
15
+
16
+ export const zCreateRepositoryRefDto = /* @__PURE__ */ z.object({
17
+ remote: z.string().max(2048),
18
+ provider: z.enum(["github", "gitlab", "bitbucket", "other"]).optional(),
19
+ github_repository_id: z.string().optional(),
20
+ });
21
+
22
+ export const zCreatedRepositoryRefDto = /* @__PURE__ */ z.object({
23
+ id: z.string(),
24
+ workspace_id: z.string(),
25
+ provider: z.enum(["github", "gitlab", "bitbucket", "other"]),
26
+ host: z.string().nullable(),
27
+ name: z.string(),
28
+ remote_urls: z.array(z.string()),
29
+ github_repository_id: z.string().nullable(),
30
+ repo_key: z.string(),
31
+ });
32
+
33
+ export const zRepositoryRefCatalogResolveByRemoteV1Data = /* @__PURE__ */ z.object({
34
+ query: z.object({
35
+ 'remote': z.string().max(2048),
36
+ }).optional(),
37
+ url: z.literal('/v1/repository-catalog/resolve'),
38
+ });
39
+
40
+ export const zRepositoryRefCatalogCreateV1Data = /* @__PURE__ */ z.object({
41
+ body: zCreateRepositoryRefDto,
42
+ url: z.literal('/v1/repository-catalog'),
43
+ });
44
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@levr-one/sdk",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "TypeScript SDK for the Levr API",
5
5
  "type": "module",
6
6
  "sideEffects": false,