@haikeilabs/connector-contracts 0.0.0-stage → 0.1.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 +35 -2
- package/dist/kei/connectors/database/v1/query_pb.d.ts +117 -0
- package/dist/kei/connectors/database/v1/query_pb.js +72 -0
- package/dist/kei/connectors/github/v1/contents_pb.d.ts +121 -0
- package/dist/kei/connectors/github/v1/contents_pb.js +39 -0
- package/dist/kei/connectors/github/v1/issues_pb.d.ts +151 -0
- package/dist/kei/connectors/github/v1/issues_pb.js +44 -0
- package/dist/kei/connectors/github/v1/pulls_pb.d.ts +75 -0
- package/dist/kei/connectors/github/v1/pulls_pb.js +29 -0
- package/dist/kei/connectors/http_api/v1/records_pb.d.ts +86 -0
- package/dist/kei/connectors/http_api/v1/records_pb.js +40 -0
- package/dist/kei/connectors/linear/v1/issues_pb.d.ts +192 -0
- package/dist/kei/connectors/linear/v1/issues_pb.js +59 -0
- package/dist/kei/connectors/mcp/v1/tool_pb.d.ts +59 -0
- package/dist/kei/connectors/mcp/v1/tool_pb.js +29 -0
- package/dist/kei/contracts/v1/options_pb.d.ts +123 -0
- package/dist/kei/contracts/v1/options_pb.js +93 -0
- package/package.json +28 -4
package/README.md
CHANGED
|
@@ -1,3 +1,36 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Connector contracts for TypeScript
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Install with `npm install @haikeilabs/connector-contracts`.
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
import { fromJson } from "@bufbuild/protobuf";
|
|
7
|
+
import { GetIssueResponseSchema } from "@haikeilabs/connector-contracts/kei/connectors/github/v1/issues_pb";
|
|
8
|
+
|
|
9
|
+
const response = fromJson(GetIssueResponseSchema, { number: 1347 }, {
|
|
10
|
+
ignoreUnknownFields: true,
|
|
11
|
+
});
|
|
12
|
+
console.log(response.number);
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Provider JSON may contain int64 values as JSON numbers larger than JavaScript's
|
|
16
|
+
safe integer range. `JSON.parse` rounds those values before `fromJson` sees them.
|
|
17
|
+
Parse the original response text losslessly, converting unsafe integers to
|
|
18
|
+
decimal strings, which protobuf-es accepts for int64 fields. For example, after
|
|
19
|
+
installing `lossless-json`:
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
import { isInteger, parse } from "lossless-json";
|
|
23
|
+
import type { JsonValue } from "@bufbuild/protobuf";
|
|
24
|
+
|
|
25
|
+
const json = parse(responseText, undefined, {
|
|
26
|
+
parseNumber: (value) => {
|
|
27
|
+
if (isInteger(value)) {
|
|
28
|
+
const integer = BigInt(value);
|
|
29
|
+
if (integer > BigInt(Number.MAX_SAFE_INTEGER) ||
|
|
30
|
+
integer < BigInt(Number.MIN_SAFE_INTEGER)) return value;
|
|
31
|
+
}
|
|
32
|
+
return Number(value);
|
|
33
|
+
},
|
|
34
|
+
}) as JsonValue;
|
|
35
|
+
const issue = fromJson(GetIssueResponseSchema, json, { ignoreUnknownFields: true });
|
|
36
|
+
```
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
|
|
2
|
+
import type { ListValue, Value } from "@bufbuild/protobuf/wkt";
|
|
3
|
+
import type { Message } from "@bufbuild/protobuf";
|
|
4
|
+
/**
|
|
5
|
+
* Describes the file kei/connectors/database/v1/query.proto.
|
|
6
|
+
*/
|
|
7
|
+
export declare const file_kei_connectors_database_v1_query: GenFile;
|
|
8
|
+
/**
|
|
9
|
+
* RunQueryRequest runs one read-only SQL statement. params are positional
|
|
10
|
+
* bind parameters; max_rows caps the rows the runtime returns.
|
|
11
|
+
*
|
|
12
|
+
* @generated from message kei.connectors.database.v1.RunQueryRequest
|
|
13
|
+
*/
|
|
14
|
+
export type RunQueryRequest = Message<"kei.connectors.database.v1.RunQueryRequest"> & {
|
|
15
|
+
/**
|
|
16
|
+
* @generated from field: kei.connectors.database.v1.Dialect dialect = 1;
|
|
17
|
+
*/
|
|
18
|
+
dialect: Dialect;
|
|
19
|
+
/**
|
|
20
|
+
* @generated from field: string sql = 2;
|
|
21
|
+
*/
|
|
22
|
+
sql: string;
|
|
23
|
+
/**
|
|
24
|
+
* @generated from field: repeated google.protobuf.Value params = 3;
|
|
25
|
+
*/
|
|
26
|
+
params: Value[];
|
|
27
|
+
/**
|
|
28
|
+
* @generated from field: optional int64 max_rows = 4;
|
|
29
|
+
*/
|
|
30
|
+
maxRows?: bigint | undefined;
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Describes the message kei.connectors.database.v1.RunQueryRequest.
|
|
34
|
+
* Use `create(RunQueryRequestSchema)` to create a new message.
|
|
35
|
+
*/
|
|
36
|
+
export declare const RunQueryRequestSchema: GenMessage<RunQueryRequest>;
|
|
37
|
+
/**
|
|
38
|
+
* Column describes one result column: its name and the engine's type name.
|
|
39
|
+
*
|
|
40
|
+
* @generated from message kei.connectors.database.v1.Column
|
|
41
|
+
*/
|
|
42
|
+
export type Column = Message<"kei.connectors.database.v1.Column"> & {
|
|
43
|
+
/**
|
|
44
|
+
* @generated from field: string name = 1;
|
|
45
|
+
*/
|
|
46
|
+
name: string;
|
|
47
|
+
/**
|
|
48
|
+
* @generated from field: string type = 2;
|
|
49
|
+
*/
|
|
50
|
+
type: string;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Describes the message kei.connectors.database.v1.Column.
|
|
54
|
+
* Use `create(ColumnSchema)` to create a new message.
|
|
55
|
+
*/
|
|
56
|
+
export declare const ColumnSchema: GenMessage<Column>;
|
|
57
|
+
/**
|
|
58
|
+
* RunQueryResponse models a result set. rows are positional ListValues in
|
|
59
|
+
* column order; truncated is true when max_rows cut the result set short.
|
|
60
|
+
*
|
|
61
|
+
* @generated from message kei.connectors.database.v1.RunQueryResponse
|
|
62
|
+
*/
|
|
63
|
+
export type RunQueryResponse = Message<"kei.connectors.database.v1.RunQueryResponse"> & {
|
|
64
|
+
/**
|
|
65
|
+
* @generated from field: repeated kei.connectors.database.v1.Column columns = 1;
|
|
66
|
+
*/
|
|
67
|
+
columns: Column[];
|
|
68
|
+
/**
|
|
69
|
+
* @generated from field: repeated google.protobuf.ListValue rows = 2;
|
|
70
|
+
*/
|
|
71
|
+
rows: ListValue[];
|
|
72
|
+
/**
|
|
73
|
+
* @generated from field: bool truncated = 3;
|
|
74
|
+
*/
|
|
75
|
+
truncated: boolean;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Describes the message kei.connectors.database.v1.RunQueryResponse.
|
|
79
|
+
* Use `create(RunQueryResponseSchema)` to create a new message.
|
|
80
|
+
*/
|
|
81
|
+
export declare const RunQueryResponseSchema: GenMessage<RunQueryResponse>;
|
|
82
|
+
/**
|
|
83
|
+
* Dialect is the SQL engine a query.run statement targets. Buf's STANDARD
|
|
84
|
+
* lint requires the DIALECT_ prefix and a _UNSPECIFIED zero value.
|
|
85
|
+
*
|
|
86
|
+
* @generated from enum kei.connectors.database.v1.Dialect
|
|
87
|
+
*/
|
|
88
|
+
export declare enum Dialect {
|
|
89
|
+
/**
|
|
90
|
+
* @generated from enum value: DIALECT_UNSPECIFIED = 0;
|
|
91
|
+
*/
|
|
92
|
+
UNSPECIFIED = 0,
|
|
93
|
+
/**
|
|
94
|
+
* @generated from enum value: DIALECT_POSTGRES = 1;
|
|
95
|
+
*/
|
|
96
|
+
POSTGRES = 1,
|
|
97
|
+
/**
|
|
98
|
+
* @generated from enum value: DIALECT_MYSQL = 2;
|
|
99
|
+
*/
|
|
100
|
+
MYSQL = 2,
|
|
101
|
+
/**
|
|
102
|
+
* @generated from enum value: DIALECT_MSSQL = 3;
|
|
103
|
+
*/
|
|
104
|
+
MSSQL = 3,
|
|
105
|
+
/**
|
|
106
|
+
* @generated from enum value: DIALECT_SNOWFLAKE = 4;
|
|
107
|
+
*/
|
|
108
|
+
SNOWFLAKE = 4,
|
|
109
|
+
/**
|
|
110
|
+
* @generated from enum value: DIALECT_SUPABASE = 5;
|
|
111
|
+
*/
|
|
112
|
+
SUPABASE = 5
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Describes the enum kei.connectors.database.v1.Dialect.
|
|
116
|
+
*/
|
|
117
|
+
export declare const DialectSchema: GenEnum<Dialect>;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
// Copyright 2026 Haikei Labs
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
import { enumDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
|
|
15
|
+
import { file_google_protobuf_struct } from "@bufbuild/protobuf/wkt";
|
|
16
|
+
import { file_kei_contracts_v1_options } from "../../../contracts/v1/options_pb.js";
|
|
17
|
+
/**
|
|
18
|
+
* Describes the file kei/connectors/database/v1/query.proto.
|
|
19
|
+
*/
|
|
20
|
+
export const file_kei_connectors_database_v1_query = /*@__PURE__*/ fileDesc("CiZrZWkvY29ubmVjdG9ycy9kYXRhYmFzZS92MS9xdWVyeS5wcm90bxIaa2VpLmNvbm5lY3RvcnMuZGF0YWJhc2UudjEi4gEKD1J1blF1ZXJ5UmVxdWVzdBI0CgdkaWFsZWN0GAEgASgOMiMua2VpLmNvbm5lY3RvcnMuZGF0YWJhc2UudjEuRGlhbGVjdBILCgNzcWwYAiABKAkSJgoGcGFyYW1zGAMgAygLMhYuZ29vZ2xlLnByb3RvYnVmLlZhbHVlEhUKCG1heF9yb3dzGAQgASgDSACIAQE6QJKCGTwKEmRhdGFiYXNlLnF1ZXJ5LnJ1bhIIZGF0YWJhc2UYASoEUE9TVDIGL3F1ZXJ5OgpxdWVyeTpyZWFkQAVCCwoJX21heF9yb3dzIiQKBkNvbHVtbhIMCgRuYW1lGAEgASgJEgwKBHR5cGUYAiABKAkihAEKEFJ1blF1ZXJ5UmVzcG9uc2USMwoHY29sdW1ucxgBIAMoCzIiLmtlaS5jb25uZWN0b3JzLmRhdGFiYXNlLnYxLkNvbHVtbhIoCgRyb3dzGAIgAygLMhouZ29vZ2xlLnByb3RvYnVmLkxpc3RWYWx1ZRIRCgl0cnVuY2F0ZWQYAyABKAgqiwEKB0RpYWxlY3QSFwoTRElBTEVDVF9VTlNQRUNJRklFRBAAEhQKEERJQUxFQ1RfUE9TVEdSRVMQARIRCg1ESUFMRUNUX01ZU1FMEAISEQoNRElBTEVDVF9NU1NRTBADEhUKEURJQUxFQ1RfU05PV0ZMQUtFEAQSFAoQRElBTEVDVF9TVVBBQkFTRRAFQlpaWGdpdGh1Yi5jb20vSGFpa2VpTGFicy9rZWktY29ubmVjdG9yLWNvbnRyYWN0cy9nZW4vZ28va2VpL2Nvbm5lY3RvcnMvZGF0YWJhc2UvdjE7ZGF0YWJhc2ViBnByb3RvMw", [file_google_protobuf_struct, file_kei_contracts_v1_options]);
|
|
21
|
+
/**
|
|
22
|
+
* Describes the message kei.connectors.database.v1.RunQueryRequest.
|
|
23
|
+
* Use `create(RunQueryRequestSchema)` to create a new message.
|
|
24
|
+
*/
|
|
25
|
+
export const RunQueryRequestSchema = /*@__PURE__*/ messageDesc(file_kei_connectors_database_v1_query, 0);
|
|
26
|
+
/**
|
|
27
|
+
* Describes the message kei.connectors.database.v1.Column.
|
|
28
|
+
* Use `create(ColumnSchema)` to create a new message.
|
|
29
|
+
*/
|
|
30
|
+
export const ColumnSchema = /*@__PURE__*/ messageDesc(file_kei_connectors_database_v1_query, 1);
|
|
31
|
+
/**
|
|
32
|
+
* Describes the message kei.connectors.database.v1.RunQueryResponse.
|
|
33
|
+
* Use `create(RunQueryResponseSchema)` to create a new message.
|
|
34
|
+
*/
|
|
35
|
+
export const RunQueryResponseSchema = /*@__PURE__*/ messageDesc(file_kei_connectors_database_v1_query, 2);
|
|
36
|
+
/**
|
|
37
|
+
* Dialect is the SQL engine a query.run statement targets. Buf's STANDARD
|
|
38
|
+
* lint requires the DIALECT_ prefix and a _UNSPECIFIED zero value.
|
|
39
|
+
*
|
|
40
|
+
* @generated from enum kei.connectors.database.v1.Dialect
|
|
41
|
+
*/
|
|
42
|
+
export var Dialect;
|
|
43
|
+
(function (Dialect) {
|
|
44
|
+
/**
|
|
45
|
+
* @generated from enum value: DIALECT_UNSPECIFIED = 0;
|
|
46
|
+
*/
|
|
47
|
+
Dialect[Dialect["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
48
|
+
/**
|
|
49
|
+
* @generated from enum value: DIALECT_POSTGRES = 1;
|
|
50
|
+
*/
|
|
51
|
+
Dialect[Dialect["POSTGRES"] = 1] = "POSTGRES";
|
|
52
|
+
/**
|
|
53
|
+
* @generated from enum value: DIALECT_MYSQL = 2;
|
|
54
|
+
*/
|
|
55
|
+
Dialect[Dialect["MYSQL"] = 2] = "MYSQL";
|
|
56
|
+
/**
|
|
57
|
+
* @generated from enum value: DIALECT_MSSQL = 3;
|
|
58
|
+
*/
|
|
59
|
+
Dialect[Dialect["MSSQL"] = 3] = "MSSQL";
|
|
60
|
+
/**
|
|
61
|
+
* @generated from enum value: DIALECT_SNOWFLAKE = 4;
|
|
62
|
+
*/
|
|
63
|
+
Dialect[Dialect["SNOWFLAKE"] = 4] = "SNOWFLAKE";
|
|
64
|
+
/**
|
|
65
|
+
* @generated from enum value: DIALECT_SUPABASE = 5;
|
|
66
|
+
*/
|
|
67
|
+
Dialect[Dialect["SUPABASE"] = 5] = "SUPABASE";
|
|
68
|
+
})(Dialect || (Dialect = {}));
|
|
69
|
+
/**
|
|
70
|
+
* Describes the enum kei.connectors.database.v1.Dialect.
|
|
71
|
+
*/
|
|
72
|
+
export const DialectSchema = /*@__PURE__*/ enumDesc(file_kei_connectors_database_v1_query, 0);
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
|
|
2
|
+
import type { Message } from "@bufbuild/protobuf";
|
|
3
|
+
/**
|
|
4
|
+
* Describes the file kei/connectors/github/v1/contents.proto.
|
|
5
|
+
*/
|
|
6
|
+
export declare const file_kei_connectors_github_v1_contents: GenFile;
|
|
7
|
+
/**
|
|
8
|
+
* PutContentsRequest creates or updates one file in a GitHub repository via
|
|
9
|
+
* the Contents API. content carries the base64-encoded file bytes; sha is set
|
|
10
|
+
* only when replacing an existing file.
|
|
11
|
+
*
|
|
12
|
+
* @generated from message kei.connectors.github.v1.PutContentsRequest
|
|
13
|
+
*/
|
|
14
|
+
export type PutContentsRequest = Message<"kei.connectors.github.v1.PutContentsRequest"> & {
|
|
15
|
+
/**
|
|
16
|
+
* @generated from field: string owner = 1;
|
|
17
|
+
*/
|
|
18
|
+
owner: string;
|
|
19
|
+
/**
|
|
20
|
+
* @generated from field: string repository = 2;
|
|
21
|
+
*/
|
|
22
|
+
repository: string;
|
|
23
|
+
/**
|
|
24
|
+
* @generated from field: string path = 3;
|
|
25
|
+
*/
|
|
26
|
+
path: string;
|
|
27
|
+
/**
|
|
28
|
+
* @generated from field: string message = 4;
|
|
29
|
+
*/
|
|
30
|
+
message: string;
|
|
31
|
+
/**
|
|
32
|
+
* @generated from field: string content = 5;
|
|
33
|
+
*/
|
|
34
|
+
content: string;
|
|
35
|
+
/**
|
|
36
|
+
* @generated from field: optional string branch = 6;
|
|
37
|
+
*/
|
|
38
|
+
branch?: string | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* @generated from field: optional string sha = 7;
|
|
41
|
+
*/
|
|
42
|
+
sha?: string | undefined;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Describes the message kei.connectors.github.v1.PutContentsRequest.
|
|
46
|
+
* Use `create(PutContentsRequestSchema)` to create a new message.
|
|
47
|
+
*/
|
|
48
|
+
export declare const PutContentsRequestSchema: GenMessage<PutContentsRequest>;
|
|
49
|
+
/**
|
|
50
|
+
* ContentFile models the file entry GitHub echoes back after a put.
|
|
51
|
+
*
|
|
52
|
+
* @generated from message kei.connectors.github.v1.ContentFile
|
|
53
|
+
*/
|
|
54
|
+
export type ContentFile = Message<"kei.connectors.github.v1.ContentFile"> & {
|
|
55
|
+
/**
|
|
56
|
+
* @generated from field: string name = 1;
|
|
57
|
+
*/
|
|
58
|
+
name: string;
|
|
59
|
+
/**
|
|
60
|
+
* @generated from field: string path = 2;
|
|
61
|
+
*/
|
|
62
|
+
path: string;
|
|
63
|
+
/**
|
|
64
|
+
* @generated from field: string sha = 3;
|
|
65
|
+
*/
|
|
66
|
+
sha: string;
|
|
67
|
+
/**
|
|
68
|
+
* @generated from field: string html_url = 4;
|
|
69
|
+
*/
|
|
70
|
+
htmlUrl: string;
|
|
71
|
+
/**
|
|
72
|
+
* @generated from field: optional string download_url = 5;
|
|
73
|
+
*/
|
|
74
|
+
downloadUrl?: string | undefined;
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Describes the message kei.connectors.github.v1.ContentFile.
|
|
78
|
+
* Use `create(ContentFileSchema)` to create a new message.
|
|
79
|
+
*/
|
|
80
|
+
export declare const ContentFileSchema: GenMessage<ContentFile>;
|
|
81
|
+
/**
|
|
82
|
+
* CommitSummary models the commit a put created.
|
|
83
|
+
*
|
|
84
|
+
* @generated from message kei.connectors.github.v1.CommitSummary
|
|
85
|
+
*/
|
|
86
|
+
export type CommitSummary = Message<"kei.connectors.github.v1.CommitSummary"> & {
|
|
87
|
+
/**
|
|
88
|
+
* @generated from field: string sha = 1;
|
|
89
|
+
*/
|
|
90
|
+
sha: string;
|
|
91
|
+
/**
|
|
92
|
+
* @generated from field: string html_url = 2;
|
|
93
|
+
*/
|
|
94
|
+
htmlUrl: string;
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* Describes the message kei.connectors.github.v1.CommitSummary.
|
|
98
|
+
* Use `create(CommitSummarySchema)` to create a new message.
|
|
99
|
+
*/
|
|
100
|
+
export declare const CommitSummarySchema: GenMessage<CommitSummary>;
|
|
101
|
+
/**
|
|
102
|
+
* PutContentsResponse models the subset of the Contents API put response the
|
|
103
|
+
* contract needs. It is filled by JSON unmarshal of the provider response.
|
|
104
|
+
*
|
|
105
|
+
* @generated from message kei.connectors.github.v1.PutContentsResponse
|
|
106
|
+
*/
|
|
107
|
+
export type PutContentsResponse = Message<"kei.connectors.github.v1.PutContentsResponse"> & {
|
|
108
|
+
/**
|
|
109
|
+
* @generated from field: kei.connectors.github.v1.ContentFile content = 1;
|
|
110
|
+
*/
|
|
111
|
+
content?: ContentFile | undefined;
|
|
112
|
+
/**
|
|
113
|
+
* @generated from field: kei.connectors.github.v1.CommitSummary commit = 2;
|
|
114
|
+
*/
|
|
115
|
+
commit?: CommitSummary | undefined;
|
|
116
|
+
};
|
|
117
|
+
/**
|
|
118
|
+
* Describes the message kei.connectors.github.v1.PutContentsResponse.
|
|
119
|
+
* Use `create(PutContentsResponseSchema)` to create a new message.
|
|
120
|
+
*/
|
|
121
|
+
export declare const PutContentsResponseSchema: GenMessage<PutContentsResponse>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// Copyright 2026 Haikei Labs
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
|
|
15
|
+
import { file_kei_contracts_v1_options } from "../../../contracts/v1/options_pb.js";
|
|
16
|
+
/**
|
|
17
|
+
* Describes the file kei/connectors/github/v1/contents.proto.
|
|
18
|
+
*/
|
|
19
|
+
export const file_kei_connectors_github_v1_contents = /*@__PURE__*/ fileDesc("CidrZWkvY29ubmVjdG9ycy9naXRodWIvdjEvY29udGVudHMucHJvdG8SGGtlaS5jb25uZWN0b3JzLmdpdGh1Yi52MSKKAgoSUHV0Q29udGVudHNSZXF1ZXN0Eg0KBW93bmVyGAEgASgJEhIKCnJlcG9zaXRvcnkYAiABKAkSDAoEcGF0aBgDIAEoCRIPCgdtZXNzYWdlGAQgASgJEg8KB2NvbnRlbnQYBSABKAkSEwoGYnJhbmNoGAYgASgJSACIAQESEAoDc2hhGAcgASgJSAGIAQE6Z5KCGWMKE2dpdGh1Yi5jb250ZW50cy5wdXQSBmdpdGh1YhgCKgNQVVQyKy9yZXBvcy97b3duZXJ9L3tyZXBvc2l0b3J5fS9jb250ZW50cy97cGF0aH06DmNvbnRlbnRzOndyaXRlQAFCCQoHX2JyYW5jaEIGCgRfc2hhInQKC0NvbnRlbnRGaWxlEgwKBG5hbWUYASABKAkSDAoEcGF0aBgCIAEoCRILCgNzaGEYAyABKAkSEAoIaHRtbF91cmwYBCABKAkSGQoMZG93bmxvYWRfdXJsGAUgASgJSACIAQFCDwoNX2Rvd25sb2FkX3VybCIuCg1Db21taXRTdW1tYXJ5EgsKA3NoYRgBIAEoCRIQCghodG1sX3VybBgCIAEoCSKGAQoTUHV0Q29udGVudHNSZXNwb25zZRI2Cgdjb250ZW50GAEgASgLMiUua2VpLmNvbm5lY3RvcnMuZ2l0aHViLnYxLkNvbnRlbnRGaWxlEjcKBmNvbW1pdBgCIAEoCzInLmtlaS5jb25uZWN0b3JzLmdpdGh1Yi52MS5Db21taXRTdW1tYXJ5QlZaVGdpdGh1Yi5jb20vSGFpa2VpTGFicy9rZWktY29ubmVjdG9yLWNvbnRyYWN0cy9nZW4vZ28va2VpL2Nvbm5lY3RvcnMvZ2l0aHViL3YxO2dpdGh1YmIGcHJvdG8z", [file_kei_contracts_v1_options]);
|
|
20
|
+
/**
|
|
21
|
+
* Describes the message kei.connectors.github.v1.PutContentsRequest.
|
|
22
|
+
* Use `create(PutContentsRequestSchema)` to create a new message.
|
|
23
|
+
*/
|
|
24
|
+
export const PutContentsRequestSchema = /*@__PURE__*/ messageDesc(file_kei_connectors_github_v1_contents, 0);
|
|
25
|
+
/**
|
|
26
|
+
* Describes the message kei.connectors.github.v1.ContentFile.
|
|
27
|
+
* Use `create(ContentFileSchema)` to create a new message.
|
|
28
|
+
*/
|
|
29
|
+
export const ContentFileSchema = /*@__PURE__*/ messageDesc(file_kei_connectors_github_v1_contents, 1);
|
|
30
|
+
/**
|
|
31
|
+
* Describes the message kei.connectors.github.v1.CommitSummary.
|
|
32
|
+
* Use `create(CommitSummarySchema)` to create a new message.
|
|
33
|
+
*/
|
|
34
|
+
export const CommitSummarySchema = /*@__PURE__*/ messageDesc(file_kei_connectors_github_v1_contents, 2);
|
|
35
|
+
/**
|
|
36
|
+
* Describes the message kei.connectors.github.v1.PutContentsResponse.
|
|
37
|
+
* Use `create(PutContentsResponseSchema)` to create a new message.
|
|
38
|
+
*/
|
|
39
|
+
export const PutContentsResponseSchema = /*@__PURE__*/ messageDesc(file_kei_connectors_github_v1_contents, 3);
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
|
|
2
|
+
import type { Message } from "@bufbuild/protobuf";
|
|
3
|
+
/**
|
|
4
|
+
* Describes the file kei/connectors/github/v1/issues.proto.
|
|
5
|
+
*/
|
|
6
|
+
export declare const file_kei_connectors_github_v1_issues: GenFile;
|
|
7
|
+
/**
|
|
8
|
+
* GetIssueRequest reads a single issue from a GitHub repository.
|
|
9
|
+
*
|
|
10
|
+
* @generated from message kei.connectors.github.v1.GetIssueRequest
|
|
11
|
+
*/
|
|
12
|
+
export type GetIssueRequest = Message<"kei.connectors.github.v1.GetIssueRequest"> & {
|
|
13
|
+
/**
|
|
14
|
+
* @generated from field: string owner = 1;
|
|
15
|
+
*/
|
|
16
|
+
owner: string;
|
|
17
|
+
/**
|
|
18
|
+
* @generated from field: string repository = 2;
|
|
19
|
+
*/
|
|
20
|
+
repository: string;
|
|
21
|
+
/**
|
|
22
|
+
* @generated from field: int64 issue_number = 3;
|
|
23
|
+
*/
|
|
24
|
+
issueNumber: bigint;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Describes the message kei.connectors.github.v1.GetIssueRequest.
|
|
28
|
+
* Use `create(GetIssueRequestSchema)` to create a new message.
|
|
29
|
+
*/
|
|
30
|
+
export declare const GetIssueRequestSchema: GenMessage<GetIssueRequest>;
|
|
31
|
+
/**
|
|
32
|
+
* GetIssueResponse models the subset of the GitHub issue payload the
|
|
33
|
+
* contract needs. It is filled by JSON unmarshal of the provider response.
|
|
34
|
+
*
|
|
35
|
+
* @generated from message kei.connectors.github.v1.GetIssueResponse
|
|
36
|
+
*/
|
|
37
|
+
export type GetIssueResponse = Message<"kei.connectors.github.v1.GetIssueResponse"> & {
|
|
38
|
+
/**
|
|
39
|
+
* @generated from field: int64 id = 1;
|
|
40
|
+
*/
|
|
41
|
+
id: bigint;
|
|
42
|
+
/**
|
|
43
|
+
* @generated from field: int64 number = 2;
|
|
44
|
+
*/
|
|
45
|
+
number: bigint;
|
|
46
|
+
/**
|
|
47
|
+
* @generated from field: string title = 3;
|
|
48
|
+
*/
|
|
49
|
+
title: string;
|
|
50
|
+
/**
|
|
51
|
+
* @generated from field: string state = 4;
|
|
52
|
+
*/
|
|
53
|
+
state: string;
|
|
54
|
+
/**
|
|
55
|
+
* @generated from field: optional string body = 5;
|
|
56
|
+
*/
|
|
57
|
+
body?: string | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* @generated from field: string html_url = 6;
|
|
60
|
+
*/
|
|
61
|
+
htmlUrl: string;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Describes the message kei.connectors.github.v1.GetIssueResponse.
|
|
65
|
+
* Use `create(GetIssueResponseSchema)` to create a new message.
|
|
66
|
+
*/
|
|
67
|
+
export declare const GetIssueResponseSchema: GenMessage<GetIssueResponse>;
|
|
68
|
+
/**
|
|
69
|
+
* ListIssuesRequest lists the issues of a GitHub repository. The contract
|
|
70
|
+
* models only the state filter and the page size of the query parameters.
|
|
71
|
+
*
|
|
72
|
+
* @generated from message kei.connectors.github.v1.ListIssuesRequest
|
|
73
|
+
*/
|
|
74
|
+
export type ListIssuesRequest = Message<"kei.connectors.github.v1.ListIssuesRequest"> & {
|
|
75
|
+
/**
|
|
76
|
+
* @generated from field: string owner = 1;
|
|
77
|
+
*/
|
|
78
|
+
owner: string;
|
|
79
|
+
/**
|
|
80
|
+
* @generated from field: string repository = 2;
|
|
81
|
+
*/
|
|
82
|
+
repository: string;
|
|
83
|
+
/**
|
|
84
|
+
* @generated from field: optional string state = 3;
|
|
85
|
+
*/
|
|
86
|
+
state?: string | undefined;
|
|
87
|
+
/**
|
|
88
|
+
* @generated from field: optional int32 per_page = 4;
|
|
89
|
+
*/
|
|
90
|
+
perPage?: number | undefined;
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* Describes the message kei.connectors.github.v1.ListIssuesRequest.
|
|
94
|
+
* Use `create(ListIssuesRequestSchema)` to create a new message.
|
|
95
|
+
*/
|
|
96
|
+
export declare const ListIssuesRequestSchema: GenMessage<ListIssuesRequest>;
|
|
97
|
+
/**
|
|
98
|
+
* IssueSummary models the subset of each issue entry a list response carries.
|
|
99
|
+
*
|
|
100
|
+
* @generated from message kei.connectors.github.v1.IssueSummary
|
|
101
|
+
*/
|
|
102
|
+
export type IssueSummary = Message<"kei.connectors.github.v1.IssueSummary"> & {
|
|
103
|
+
/**
|
|
104
|
+
* @generated from field: int64 id = 1;
|
|
105
|
+
*/
|
|
106
|
+
id: bigint;
|
|
107
|
+
/**
|
|
108
|
+
* @generated from field: int64 number = 2;
|
|
109
|
+
*/
|
|
110
|
+
number: bigint;
|
|
111
|
+
/**
|
|
112
|
+
* @generated from field: string title = 3;
|
|
113
|
+
*/
|
|
114
|
+
title: string;
|
|
115
|
+
/**
|
|
116
|
+
* @generated from field: string state = 4;
|
|
117
|
+
*/
|
|
118
|
+
state: string;
|
|
119
|
+
/**
|
|
120
|
+
* @generated from field: optional string body = 5;
|
|
121
|
+
*/
|
|
122
|
+
body?: string | undefined;
|
|
123
|
+
/**
|
|
124
|
+
* @generated from field: string html_url = 6;
|
|
125
|
+
*/
|
|
126
|
+
htmlUrl: string;
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* Describes the message kei.connectors.github.v1.IssueSummary.
|
|
130
|
+
* Use `create(IssueSummarySchema)` to create a new message.
|
|
131
|
+
*/
|
|
132
|
+
export declare const IssueSummarySchema: GenMessage<IssueSummary>;
|
|
133
|
+
/**
|
|
134
|
+
* ListIssuesResponse wraps the issue entries of a list response. GitHub
|
|
135
|
+
* returns a bare JSON array here; the contract envelopes it under issues so
|
|
136
|
+
* the response stays a protojson object and envelope keys stay
|
|
137
|
+
* drift-checkable. It is filled by JSON unmarshal of the provider response.
|
|
138
|
+
*
|
|
139
|
+
* @generated from message kei.connectors.github.v1.ListIssuesResponse
|
|
140
|
+
*/
|
|
141
|
+
export type ListIssuesResponse = Message<"kei.connectors.github.v1.ListIssuesResponse"> & {
|
|
142
|
+
/**
|
|
143
|
+
* @generated from field: repeated kei.connectors.github.v1.IssueSummary issues = 1;
|
|
144
|
+
*/
|
|
145
|
+
issues: IssueSummary[];
|
|
146
|
+
};
|
|
147
|
+
/**
|
|
148
|
+
* Describes the message kei.connectors.github.v1.ListIssuesResponse.
|
|
149
|
+
* Use `create(ListIssuesResponseSchema)` to create a new message.
|
|
150
|
+
*/
|
|
151
|
+
export declare const ListIssuesResponseSchema: GenMessage<ListIssuesResponse>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// Copyright 2026 Haikei Labs
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv2";
|
|
15
|
+
import { file_kei_contracts_v1_options } from "../../../contracts/v1/options_pb.js";
|
|
16
|
+
/**
|
|
17
|
+
* Describes the file kei/connectors/github/v1/issues.proto.
|
|
18
|
+
*/
|
|
19
|
+
export const file_kei_connectors_github_v1_issues = /*@__PURE__*/ fileDesc("CiVrZWkvY29ubmVjdG9ycy9naXRodWIvdjEvaXNzdWVzLnByb3RvEhhrZWkuY29ubmVjdG9ycy5naXRodWIudjEitAEKD0dldElzc3VlUmVxdWVzdBINCgVvd25lchgBIAEoCRISCgpyZXBvc2l0b3J5GAIgASgJEhQKDGlzc3VlX251bWJlchgDIAEoAzpokoIZZAoRZ2l0aHViLmlzc3Vlcy5nZXQSBmdpdGh1YhgBKgNHRVQyMS9yZXBvcy97b3duZXJ9L3tyZXBvc2l0b3J5fS9pc3N1ZXMve2lzc3VlX251bWJlcn06C2lzc3VlczpyZWFkQAEiegoQR2V0SXNzdWVSZXNwb25zZRIKCgJpZBgBIAEoAxIOCgZudW1iZXIYAiABKAMSDQoFdGl0bGUYAyABKAkSDQoFc3RhdGUYBCABKAkSEQoEYm9keRgFIAEoCUgAiAEBEhAKCGh0bWxfdXJsGAYgASgJQgcKBV9ib2R5ItQBChFMaXN0SXNzdWVzUmVxdWVzdBINCgVvd25lchgBIAEoCRISCgpyZXBvc2l0b3J5GAIgASgJEhIKBXN0YXRlGAMgASgJSACIAQESFQoIcGVyX3BhZ2UYBCABKAVIAYgBATpakoIZVgoSZ2l0aHViLmlzc3Vlcy5saXN0EgZnaXRodWIYASoDR0VUMiIvcmVwb3Mve293bmVyfS97cmVwb3NpdG9yeX0vaXNzdWVzOgtpc3N1ZXM6cmVhZEABQggKBl9zdGF0ZUILCglfcGVyX3BhZ2UidgoMSXNzdWVTdW1tYXJ5EgoKAmlkGAEgASgDEg4KBm51bWJlchgCIAEoAxINCgV0aXRsZRgDIAEoCRINCgVzdGF0ZRgEIAEoCRIRCgRib2R5GAUgASgJSACIAQESEAoIaHRtbF91cmwYBiABKAlCBwoFX2JvZHkiTAoSTGlzdElzc3Vlc1Jlc3BvbnNlEjYKBmlzc3VlcxgBIAMoCzImLmtlaS5jb25uZWN0b3JzLmdpdGh1Yi52MS5Jc3N1ZVN1bW1hcnlCVlpUZ2l0aHViLmNvbS9IYWlrZWlMYWJzL2tlaS1jb25uZWN0b3ItY29udHJhY3RzL2dlbi9nby9rZWkvY29ubmVjdG9ycy9naXRodWIvdjE7Z2l0aHViYgZwcm90bzM", [file_kei_contracts_v1_options]);
|
|
20
|
+
/**
|
|
21
|
+
* Describes the message kei.connectors.github.v1.GetIssueRequest.
|
|
22
|
+
* Use `create(GetIssueRequestSchema)` to create a new message.
|
|
23
|
+
*/
|
|
24
|
+
export const GetIssueRequestSchema = /*@__PURE__*/ messageDesc(file_kei_connectors_github_v1_issues, 0);
|
|
25
|
+
/**
|
|
26
|
+
* Describes the message kei.connectors.github.v1.GetIssueResponse.
|
|
27
|
+
* Use `create(GetIssueResponseSchema)` to create a new message.
|
|
28
|
+
*/
|
|
29
|
+
export const GetIssueResponseSchema = /*@__PURE__*/ messageDesc(file_kei_connectors_github_v1_issues, 1);
|
|
30
|
+
/**
|
|
31
|
+
* Describes the message kei.connectors.github.v1.ListIssuesRequest.
|
|
32
|
+
* Use `create(ListIssuesRequestSchema)` to create a new message.
|
|
33
|
+
*/
|
|
34
|
+
export const ListIssuesRequestSchema = /*@__PURE__*/ messageDesc(file_kei_connectors_github_v1_issues, 2);
|
|
35
|
+
/**
|
|
36
|
+
* Describes the message kei.connectors.github.v1.IssueSummary.
|
|
37
|
+
* Use `create(IssueSummarySchema)` to create a new message.
|
|
38
|
+
*/
|
|
39
|
+
export const IssueSummarySchema = /*@__PURE__*/ messageDesc(file_kei_connectors_github_v1_issues, 3);
|
|
40
|
+
/**
|
|
41
|
+
* Describes the message kei.connectors.github.v1.ListIssuesResponse.
|
|
42
|
+
* Use `create(ListIssuesResponseSchema)` to create a new message.
|
|
43
|
+
*/
|
|
44
|
+
export const ListIssuesResponseSchema = /*@__PURE__*/ messageDesc(file_kei_connectors_github_v1_issues, 4);
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv2";
|
|
2
|
+
import type { Message } from "@bufbuild/protobuf";
|
|
3
|
+
/**
|
|
4
|
+
* Describes the file kei/connectors/github/v1/pulls.proto.
|
|
5
|
+
*/
|
|
6
|
+
export declare const file_kei_connectors_github_v1_pulls: GenFile;
|
|
7
|
+
/**
|
|
8
|
+
* GetPullRequestRequest reads a single pull request from a GitHub repository.
|
|
9
|
+
*
|
|
10
|
+
* @generated from message kei.connectors.github.v1.GetPullRequestRequest
|
|
11
|
+
*/
|
|
12
|
+
export type GetPullRequestRequest = Message<"kei.connectors.github.v1.GetPullRequestRequest"> & {
|
|
13
|
+
/**
|
|
14
|
+
* @generated from field: string owner = 1;
|
|
15
|
+
*/
|
|
16
|
+
owner: string;
|
|
17
|
+
/**
|
|
18
|
+
* @generated from field: string repository = 2;
|
|
19
|
+
*/
|
|
20
|
+
repository: string;
|
|
21
|
+
/**
|
|
22
|
+
* @generated from field: int64 pull_number = 3;
|
|
23
|
+
*/
|
|
24
|
+
pullNumber: bigint;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Describes the message kei.connectors.github.v1.GetPullRequestRequest.
|
|
28
|
+
* Use `create(GetPullRequestRequestSchema)` to create a new message.
|
|
29
|
+
*/
|
|
30
|
+
export declare const GetPullRequestRequestSchema: GenMessage<GetPullRequestRequest>;
|
|
31
|
+
/**
|
|
32
|
+
* GetPullRequestResponse models the subset of the GitHub pull request payload
|
|
33
|
+
* the contract needs. It is filled by JSON unmarshal of the provider response.
|
|
34
|
+
*
|
|
35
|
+
* @generated from message kei.connectors.github.v1.GetPullRequestResponse
|
|
36
|
+
*/
|
|
37
|
+
export type GetPullRequestResponse = Message<"kei.connectors.github.v1.GetPullRequestResponse"> & {
|
|
38
|
+
/**
|
|
39
|
+
* @generated from field: int64 id = 1;
|
|
40
|
+
*/
|
|
41
|
+
id: bigint;
|
|
42
|
+
/**
|
|
43
|
+
* @generated from field: int64 number = 2;
|
|
44
|
+
*/
|
|
45
|
+
number: bigint;
|
|
46
|
+
/**
|
|
47
|
+
* @generated from field: string title = 3;
|
|
48
|
+
*/
|
|
49
|
+
title: string;
|
|
50
|
+
/**
|
|
51
|
+
* @generated from field: string state = 4;
|
|
52
|
+
*/
|
|
53
|
+
state: string;
|
|
54
|
+
/**
|
|
55
|
+
* @generated from field: optional string body = 5;
|
|
56
|
+
*/
|
|
57
|
+
body?: string | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* @generated from field: string html_url = 6;
|
|
60
|
+
*/
|
|
61
|
+
htmlUrl: string;
|
|
62
|
+
/**
|
|
63
|
+
* @generated from field: bool draft = 7;
|
|
64
|
+
*/
|
|
65
|
+
draft: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* @generated from field: optional string merged_at = 8;
|
|
68
|
+
*/
|
|
69
|
+
mergedAt?: string | undefined;
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* Describes the message kei.connectors.github.v1.GetPullRequestResponse.
|
|
73
|
+
* Use `create(GetPullRequestResponseSchema)` to create a new message.
|
|
74
|
+
*/
|
|
75
|
+
export declare const GetPullRequestResponseSchema: GenMessage<GetPullRequestResponse>;
|