@miradorlabs/web-grpc 3.27.0 → 3.29.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/google/api/field_behavior.ts +1 -1
- package/google/protobuf/descriptor.ts +24 -14
- package/google/protobuf/duration.ts +1 -1
- package/google/protobuf/timestamp.ts +1 -1
- package/package.json +1 -1
- package/proto/gateway/common/v1/attribute_value.ts +6 -2
- package/proto/gateway/common/v1/status.ts +1 -1
- package/proto/gateway/common/v1/types.ts +1 -1
- package/proto/gateway/web/v1/account_gateway.ts +6 -2
- package/proto/gateway/web/v1/admin_gateway.ts +1 -1
- package/proto/gateway/web/v1/ai_gateway.ts +44 -40
- package/proto/gateway/web/v1/attribute_value.ts +6 -2
- package/proto/gateway/web/v1/beta_gateway.ts +1 -1
- package/proto/gateway/web/v1/chain_gateway.ts +6 -2
- package/proto/gateway/web/v1/common.ts +1 -1
- package/proto/gateway/web/v1/derived_metric_gateway.ts +6 -2
- package/proto/gateway/web/v1/github_connector.ts +70 -990
- package/proto/gateway/web/v1/github_connector_grpc_pb.js +0 -91
- package/proto/gateway/web/v1/github_connector_pb.js +55 -1751
- package/proto/gateway/web/v1/integration_gateway.ts +1 -1
- package/proto/gateway/web/v1/log_gateway.ts +1 -1
- package/proto/gateway/web/v1/market_gateway.ts +6 -2
- package/proto/gateway/web/v1/metric_gateway.ts +6 -2
- package/proto/gateway/web/v1/oauth_gateway.ts +1 -1
- package/proto/gateway/web/v1/plan_gateway.ts +1 -1
- package/proto/gateway/web/v1/policy_gateway.ts +1 -1
- package/proto/gateway/web/v1/reference_gateway.ts +1 -1
- package/proto/gateway/web/v1/rule_gateway.ts +7 -3
- package/proto/gateway/web/v1/slo_gateway.ts +12 -8
- package/proto/gateway/web/v1/trace_gateway.ts +21 -15
- package/proto/gateway/web/v1/trace_measure_gateway.ts +6 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
2
|
// versions:
|
|
3
|
-
// protoc-gen-ts_proto v2.
|
|
3
|
+
// protoc-gen-ts_proto v2.15.0
|
|
4
4
|
// protoc v3.21.12
|
|
5
5
|
// source: proto/gateway/web/v1/github_connector.proto
|
|
6
6
|
|
|
@@ -117,13 +117,6 @@ export interface GitHubIssuesResponse {
|
|
|
117
117
|
issues: GitHubIssue[];
|
|
118
118
|
}
|
|
119
119
|
|
|
120
|
-
export interface GitHubWebhookRequest {
|
|
121
|
-
body: Uint8Array;
|
|
122
|
-
signature: string;
|
|
123
|
-
deliveryId: string;
|
|
124
|
-
event: string;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
120
|
export interface GitHubEmptyResponse {
|
|
128
121
|
status: ResponseStatus | undefined;
|
|
129
122
|
}
|
|
@@ -211,52 +204,6 @@ export interface GitHubFilesResponse {
|
|
|
211
204
|
files: GitHubFileResult[];
|
|
212
205
|
}
|
|
213
206
|
|
|
214
|
-
export interface CreateInstallTermaPullRequestsRequest {
|
|
215
|
-
organizationId: string;
|
|
216
|
-
projectId: string;
|
|
217
|
-
/** GitHub owner/name, each reachable by the org's installation. */
|
|
218
|
-
repositories: string[];
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
export interface InstallTermaPullRequestResult {
|
|
222
|
-
repository: string;
|
|
223
|
-
/** Set on success, including an already-open setup pull request. */
|
|
224
|
-
number: number;
|
|
225
|
-
url: string;
|
|
226
|
-
/** Set on failure; this repository's failure never aborts the others. */
|
|
227
|
-
errorMessage: string;
|
|
228
|
-
/** The repository already has what `terma install` writes: no commit and no pull request. */
|
|
229
|
-
alreadyInstalled: boolean;
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
export interface CreateInstallTermaPullRequestsResponse {
|
|
233
|
-
status:
|
|
234
|
-
| ResponseStatus
|
|
235
|
-
| undefined;
|
|
236
|
-
/** One result per requested repository, in request order. */
|
|
237
|
-
results: InstallTermaPullRequestResult[];
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
export interface ListInstallTermaPullRequestsRequest {
|
|
241
|
-
organizationId: string;
|
|
242
|
-
projectId: string;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
export interface InstallTermaPullRequest {
|
|
246
|
-
/** GitHub owner/name. */
|
|
247
|
-
repository: string;
|
|
248
|
-
number: number;
|
|
249
|
-
url: string;
|
|
250
|
-
/** open, merged or closed. */
|
|
251
|
-
state: string;
|
|
252
|
-
updatedAt: string;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
export interface ListInstallTermaPullRequestsResponse {
|
|
256
|
-
status: ResponseStatus | undefined;
|
|
257
|
-
pullRequests: InstallTermaPullRequest[];
|
|
258
|
-
}
|
|
259
|
-
|
|
260
207
|
function createBaseGitHubScopeRequest(): GitHubScopeRequest {
|
|
261
208
|
return { organizationId: "" };
|
|
262
209
|
}
|
|
@@ -2114,127 +2061,6 @@ export const GitHubIssuesResponse: MessageFns<GitHubIssuesResponse> = {
|
|
|
2114
2061
|
},
|
|
2115
2062
|
};
|
|
2116
2063
|
|
|
2117
|
-
function createBaseGitHubWebhookRequest(): GitHubWebhookRequest {
|
|
2118
|
-
return { body: new Uint8Array(0), signature: "", deliveryId: "", event: "" };
|
|
2119
|
-
}
|
|
2120
|
-
|
|
2121
|
-
export const GitHubWebhookRequest: MessageFns<GitHubWebhookRequest> = {
|
|
2122
|
-
encode(message: GitHubWebhookRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2123
|
-
if (message.body.length !== 0) {
|
|
2124
|
-
writer.uint32(10).bytes(message.body);
|
|
2125
|
-
}
|
|
2126
|
-
if (message.signature !== "") {
|
|
2127
|
-
writer.uint32(18).string(message.signature);
|
|
2128
|
-
}
|
|
2129
|
-
if (message.deliveryId !== "") {
|
|
2130
|
-
writer.uint32(26).string(message.deliveryId);
|
|
2131
|
-
}
|
|
2132
|
-
if (message.event !== "") {
|
|
2133
|
-
writer.uint32(34).string(message.event);
|
|
2134
|
-
}
|
|
2135
|
-
return writer;
|
|
2136
|
-
},
|
|
2137
|
-
|
|
2138
|
-
decode(input: BinaryReader | Uint8Array, length?: number): GitHubWebhookRequest {
|
|
2139
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2140
|
-
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
2141
|
-
if (previousRecursionDepth >= 100) {
|
|
2142
|
-
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
2143
|
-
}
|
|
2144
|
-
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
2145
|
-
try {
|
|
2146
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2147
|
-
const message = createBaseGitHubWebhookRequest();
|
|
2148
|
-
while (reader.pos < end) {
|
|
2149
|
-
const tag = reader.uint32();
|
|
2150
|
-
switch (tag >>> 3) {
|
|
2151
|
-
case 1: {
|
|
2152
|
-
if (tag !== 10) {
|
|
2153
|
-
break;
|
|
2154
|
-
}
|
|
2155
|
-
|
|
2156
|
-
message.body = reader.bytes();
|
|
2157
|
-
continue;
|
|
2158
|
-
}
|
|
2159
|
-
case 2: {
|
|
2160
|
-
if (tag !== 18) {
|
|
2161
|
-
break;
|
|
2162
|
-
}
|
|
2163
|
-
|
|
2164
|
-
message.signature = reader.string();
|
|
2165
|
-
continue;
|
|
2166
|
-
}
|
|
2167
|
-
case 3: {
|
|
2168
|
-
if (tag !== 26) {
|
|
2169
|
-
break;
|
|
2170
|
-
}
|
|
2171
|
-
|
|
2172
|
-
message.deliveryId = reader.string();
|
|
2173
|
-
continue;
|
|
2174
|
-
}
|
|
2175
|
-
case 4: {
|
|
2176
|
-
if (tag !== 34) {
|
|
2177
|
-
break;
|
|
2178
|
-
}
|
|
2179
|
-
|
|
2180
|
-
message.event = reader.string();
|
|
2181
|
-
continue;
|
|
2182
|
-
}
|
|
2183
|
-
}
|
|
2184
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2185
|
-
break;
|
|
2186
|
-
}
|
|
2187
|
-
reader.skip(tag & 7);
|
|
2188
|
-
}
|
|
2189
|
-
return message;
|
|
2190
|
-
} finally {
|
|
2191
|
-
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
2192
|
-
}
|
|
2193
|
-
},
|
|
2194
|
-
|
|
2195
|
-
fromJSON(object: any): GitHubWebhookRequest {
|
|
2196
|
-
return {
|
|
2197
|
-
body: isSet(object.body) ? bytesFromBase64(object.body) : new Uint8Array(0),
|
|
2198
|
-
signature: isSet(object.signature) ? globalThis.String(object.signature) : "",
|
|
2199
|
-
deliveryId: isSet(object.deliveryId)
|
|
2200
|
-
? globalThis.String(object.deliveryId)
|
|
2201
|
-
: isSet(object.delivery_id)
|
|
2202
|
-
? globalThis.String(object.delivery_id)
|
|
2203
|
-
: "",
|
|
2204
|
-
event: isSet(object.event) ? globalThis.String(object.event) : "",
|
|
2205
|
-
};
|
|
2206
|
-
},
|
|
2207
|
-
|
|
2208
|
-
toJSON(message: GitHubWebhookRequest): unknown {
|
|
2209
|
-
const obj: any = {};
|
|
2210
|
-
if (message.body.length !== 0) {
|
|
2211
|
-
obj.body = base64FromBytes(message.body);
|
|
2212
|
-
}
|
|
2213
|
-
if (message.signature !== "") {
|
|
2214
|
-
obj.signature = message.signature;
|
|
2215
|
-
}
|
|
2216
|
-
if (message.deliveryId !== "") {
|
|
2217
|
-
obj.deliveryId = message.deliveryId;
|
|
2218
|
-
}
|
|
2219
|
-
if (message.event !== "") {
|
|
2220
|
-
obj.event = message.event;
|
|
2221
|
-
}
|
|
2222
|
-
return obj;
|
|
2223
|
-
},
|
|
2224
|
-
|
|
2225
|
-
create<I extends Exact<DeepPartial<GitHubWebhookRequest>, I>>(base?: I): GitHubWebhookRequest {
|
|
2226
|
-
return GitHubWebhookRequest.fromPartial(base ?? ({} as any));
|
|
2227
|
-
},
|
|
2228
|
-
fromPartial<I extends Exact<DeepPartial<GitHubWebhookRequest>, I>>(object: I): GitHubWebhookRequest {
|
|
2229
|
-
const message = createBaseGitHubWebhookRequest();
|
|
2230
|
-
message.body = object.body ?? new Uint8Array(0);
|
|
2231
|
-
message.signature = object.signature ?? "";
|
|
2232
|
-
message.deliveryId = object.deliveryId ?? "";
|
|
2233
|
-
message.event = object.event ?? "";
|
|
2234
|
-
return message;
|
|
2235
|
-
},
|
|
2236
|
-
};
|
|
2237
|
-
|
|
2238
2064
|
function createBaseGitHubEmptyResponse(): GitHubEmptyResponse {
|
|
2239
2065
|
return { status: undefined };
|
|
2240
2066
|
}
|
|
@@ -2701,836 +2527,90 @@ export const GitHubFilesResponse: MessageFns<GitHubFilesResponse> = {
|
|
|
2701
2527
|
},
|
|
2702
2528
|
};
|
|
2703
2529
|
|
|
2704
|
-
|
|
2705
|
-
|
|
2530
|
+
/**
|
|
2531
|
+
* One GitHub App connection per organization. Credentials never leave the
|
|
2532
|
+
* account service; installation tokens are minted on demand and never stored.
|
|
2533
|
+
*/
|
|
2534
|
+
export interface GitHubGatewayService {
|
|
2535
|
+
GetGitHubConnector(request: GitHubScopeRequest, metadata?: Metadata): Promise<GitHubStatusResponse>;
|
|
2536
|
+
BeginGitHubConnection(request: GitHubScopeRequest, metadata?: Metadata): Promise<GitHubBeginResponse>;
|
|
2537
|
+
CompleteGitHubConnection(request: GitHubCompleteRequest, metadata?: Metadata): Promise<GitHubStatusResponse>;
|
|
2538
|
+
DisconnectGitHubConnection(request: GitHubDisconnectRequest, metadata?: Metadata): Promise<GitHubEmptyResponse>;
|
|
2539
|
+
ListGitHubRepositories(request: GitHubScopeRequest, metadata?: Metadata): Promise<GitHubRepositoriesResponse>;
|
|
2540
|
+
ListGitHubPullRequests(request: GitHubPullRequestsRequest, metadata?: Metadata): Promise<GitHubPullRequestsResponse>;
|
|
2541
|
+
ListGitHubIssues(request: GitHubIssuesRequest, metadata?: Metadata): Promise<GitHubIssuesResponse>;
|
|
2542
|
+
ListGitHubFiles(request: GitHubFilesRequest, metadata?: Metadata): Promise<GitHubFilesResponse>;
|
|
2706
2543
|
}
|
|
2707
2544
|
|
|
2708
|
-
export const
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
try {
|
|
2730
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2731
|
-
const message = createBaseCreateInstallTermaPullRequestsRequest();
|
|
2732
|
-
while (reader.pos < end) {
|
|
2733
|
-
const tag = reader.uint32();
|
|
2734
|
-
switch (tag >>> 3) {
|
|
2735
|
-
case 1: {
|
|
2736
|
-
if (tag !== 10) {
|
|
2737
|
-
break;
|
|
2738
|
-
}
|
|
2545
|
+
export const GitHubGatewayServiceServiceName = "gateway.web.v1.GitHubGatewayService";
|
|
2546
|
+
export class GitHubGatewayServiceClientImpl implements GitHubGatewayService {
|
|
2547
|
+
private readonly rpc: Rpc;
|
|
2548
|
+
private readonly service: string;
|
|
2549
|
+
constructor(rpc: Rpc, opts?: { service?: string }) {
|
|
2550
|
+
this.service = opts?.service || GitHubGatewayServiceServiceName;
|
|
2551
|
+
this.rpc = rpc;
|
|
2552
|
+
this.GetGitHubConnector = this.GetGitHubConnector.bind(this);
|
|
2553
|
+
this.BeginGitHubConnection = this.BeginGitHubConnection.bind(this);
|
|
2554
|
+
this.CompleteGitHubConnection = this.CompleteGitHubConnection.bind(this);
|
|
2555
|
+
this.DisconnectGitHubConnection = this.DisconnectGitHubConnection.bind(this);
|
|
2556
|
+
this.ListGitHubRepositories = this.ListGitHubRepositories.bind(this);
|
|
2557
|
+
this.ListGitHubPullRequests = this.ListGitHubPullRequests.bind(this);
|
|
2558
|
+
this.ListGitHubIssues = this.ListGitHubIssues.bind(this);
|
|
2559
|
+
this.ListGitHubFiles = this.ListGitHubFiles.bind(this);
|
|
2560
|
+
}
|
|
2561
|
+
GetGitHubConnector(request: GitHubScopeRequest, metadata?: Metadata): Promise<GitHubStatusResponse> {
|
|
2562
|
+
const data = GitHubScopeRequest.encode(request).finish();
|
|
2563
|
+
const promise = this.rpc.request(this.service, "GetGitHubConnector", data, metadata);
|
|
2564
|
+
return promise.then((data) => GitHubStatusResponse.decode(new BinaryReader(data)));
|
|
2565
|
+
}
|
|
2739
2566
|
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
break;
|
|
2746
|
-
}
|
|
2567
|
+
BeginGitHubConnection(request: GitHubScopeRequest, metadata?: Metadata): Promise<GitHubBeginResponse> {
|
|
2568
|
+
const data = GitHubScopeRequest.encode(request).finish();
|
|
2569
|
+
const promise = this.rpc.request(this.service, "BeginGitHubConnection", data, metadata);
|
|
2570
|
+
return promise.then((data) => GitHubBeginResponse.decode(new BinaryReader(data)));
|
|
2571
|
+
}
|
|
2747
2572
|
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
break;
|
|
2754
|
-
}
|
|
2573
|
+
CompleteGitHubConnection(request: GitHubCompleteRequest, metadata?: Metadata): Promise<GitHubStatusResponse> {
|
|
2574
|
+
const data = GitHubCompleteRequest.encode(request).finish();
|
|
2575
|
+
const promise = this.rpc.request(this.service, "CompleteGitHubConnection", data, metadata);
|
|
2576
|
+
return promise.then((data) => GitHubStatusResponse.decode(new BinaryReader(data)));
|
|
2577
|
+
}
|
|
2755
2578
|
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
break;
|
|
2762
|
-
}
|
|
2763
|
-
reader.skip(tag & 7);
|
|
2764
|
-
}
|
|
2765
|
-
return message;
|
|
2766
|
-
} finally {
|
|
2767
|
-
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
2768
|
-
}
|
|
2769
|
-
},
|
|
2579
|
+
DisconnectGitHubConnection(request: GitHubDisconnectRequest, metadata?: Metadata): Promise<GitHubEmptyResponse> {
|
|
2580
|
+
const data = GitHubDisconnectRequest.encode(request).finish();
|
|
2581
|
+
const promise = this.rpc.request(this.service, "DisconnectGitHubConnection", data, metadata);
|
|
2582
|
+
return promise.then((data) => GitHubEmptyResponse.decode(new BinaryReader(data)));
|
|
2583
|
+
}
|
|
2770
2584
|
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
? globalThis.String(object.organization_id)
|
|
2777
|
-
: "",
|
|
2778
|
-
projectId: isSet(object.projectId)
|
|
2779
|
-
? globalThis.String(object.projectId)
|
|
2780
|
-
: isSet(object.project_id)
|
|
2781
|
-
? globalThis.String(object.project_id)
|
|
2782
|
-
: "",
|
|
2783
|
-
repositories: globalThis.Array.isArray(object?.repositories)
|
|
2784
|
-
? object.repositories.map((e: any) => globalThis.String(e))
|
|
2785
|
-
: [],
|
|
2786
|
-
};
|
|
2787
|
-
},
|
|
2585
|
+
ListGitHubRepositories(request: GitHubScopeRequest, metadata?: Metadata): Promise<GitHubRepositoriesResponse> {
|
|
2586
|
+
const data = GitHubScopeRequest.encode(request).finish();
|
|
2587
|
+
const promise = this.rpc.request(this.service, "ListGitHubRepositories", data, metadata);
|
|
2588
|
+
return promise.then((data) => GitHubRepositoriesResponse.decode(new BinaryReader(data)));
|
|
2589
|
+
}
|
|
2788
2590
|
|
|
2789
|
-
|
|
2790
|
-
const
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
if (message.projectId !== "") {
|
|
2795
|
-
obj.projectId = message.projectId;
|
|
2796
|
-
}
|
|
2797
|
-
if (message.repositories?.length) {
|
|
2798
|
-
obj.repositories = message.repositories;
|
|
2799
|
-
}
|
|
2800
|
-
return obj;
|
|
2801
|
-
},
|
|
2591
|
+
ListGitHubPullRequests(request: GitHubPullRequestsRequest, metadata?: Metadata): Promise<GitHubPullRequestsResponse> {
|
|
2592
|
+
const data = GitHubPullRequestsRequest.encode(request).finish();
|
|
2593
|
+
const promise = this.rpc.request(this.service, "ListGitHubPullRequests", data, metadata);
|
|
2594
|
+
return promise.then((data) => GitHubPullRequestsResponse.decode(new BinaryReader(data)));
|
|
2595
|
+
}
|
|
2802
2596
|
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
return
|
|
2807
|
-
}
|
|
2808
|
-
fromPartial<I extends Exact<DeepPartial<CreateInstallTermaPullRequestsRequest>, I>>(
|
|
2809
|
-
object: I,
|
|
2810
|
-
): CreateInstallTermaPullRequestsRequest {
|
|
2811
|
-
const message = createBaseCreateInstallTermaPullRequestsRequest();
|
|
2812
|
-
message.organizationId = object.organizationId ?? "";
|
|
2813
|
-
message.projectId = object.projectId ?? "";
|
|
2814
|
-
message.repositories = object.repositories?.map((e) => e) || [];
|
|
2815
|
-
return message;
|
|
2816
|
-
},
|
|
2817
|
-
};
|
|
2597
|
+
ListGitHubIssues(request: GitHubIssuesRequest, metadata?: Metadata): Promise<GitHubIssuesResponse> {
|
|
2598
|
+
const data = GitHubIssuesRequest.encode(request).finish();
|
|
2599
|
+
const promise = this.rpc.request(this.service, "ListGitHubIssues", data, metadata);
|
|
2600
|
+
return promise.then((data) => GitHubIssuesResponse.decode(new BinaryReader(data)));
|
|
2601
|
+
}
|
|
2818
2602
|
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
encode(message: InstallTermaPullRequestResult, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2825
|
-
if (message.repository !== "") {
|
|
2826
|
-
writer.uint32(10).string(message.repository);
|
|
2827
|
-
}
|
|
2828
|
-
if (message.number !== 0) {
|
|
2829
|
-
writer.uint32(16).int64(message.number);
|
|
2830
|
-
}
|
|
2831
|
-
if (message.url !== "") {
|
|
2832
|
-
writer.uint32(26).string(message.url);
|
|
2833
|
-
}
|
|
2834
|
-
if (message.errorMessage !== "") {
|
|
2835
|
-
writer.uint32(34).string(message.errorMessage);
|
|
2836
|
-
}
|
|
2837
|
-
if (message.alreadyInstalled !== false) {
|
|
2838
|
-
writer.uint32(40).bool(message.alreadyInstalled);
|
|
2839
|
-
}
|
|
2840
|
-
return writer;
|
|
2841
|
-
},
|
|
2842
|
-
|
|
2843
|
-
decode(input: BinaryReader | Uint8Array, length?: number): InstallTermaPullRequestResult {
|
|
2844
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2845
|
-
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
2846
|
-
if (previousRecursionDepth >= 100) {
|
|
2847
|
-
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
2848
|
-
}
|
|
2849
|
-
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
2850
|
-
try {
|
|
2851
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2852
|
-
const message = createBaseInstallTermaPullRequestResult();
|
|
2853
|
-
while (reader.pos < end) {
|
|
2854
|
-
const tag = reader.uint32();
|
|
2855
|
-
switch (tag >>> 3) {
|
|
2856
|
-
case 1: {
|
|
2857
|
-
if (tag !== 10) {
|
|
2858
|
-
break;
|
|
2859
|
-
}
|
|
2860
|
-
|
|
2861
|
-
message.repository = reader.string();
|
|
2862
|
-
continue;
|
|
2863
|
-
}
|
|
2864
|
-
case 2: {
|
|
2865
|
-
if (tag !== 16) {
|
|
2866
|
-
break;
|
|
2867
|
-
}
|
|
2868
|
-
|
|
2869
|
-
message.number = longToNumber(reader.int64());
|
|
2870
|
-
continue;
|
|
2871
|
-
}
|
|
2872
|
-
case 3: {
|
|
2873
|
-
if (tag !== 26) {
|
|
2874
|
-
break;
|
|
2875
|
-
}
|
|
2876
|
-
|
|
2877
|
-
message.url = reader.string();
|
|
2878
|
-
continue;
|
|
2879
|
-
}
|
|
2880
|
-
case 4: {
|
|
2881
|
-
if (tag !== 34) {
|
|
2882
|
-
break;
|
|
2883
|
-
}
|
|
2884
|
-
|
|
2885
|
-
message.errorMessage = reader.string();
|
|
2886
|
-
continue;
|
|
2887
|
-
}
|
|
2888
|
-
case 5: {
|
|
2889
|
-
if (tag !== 40) {
|
|
2890
|
-
break;
|
|
2891
|
-
}
|
|
2892
|
-
|
|
2893
|
-
message.alreadyInstalled = reader.bool();
|
|
2894
|
-
continue;
|
|
2895
|
-
}
|
|
2896
|
-
}
|
|
2897
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2898
|
-
break;
|
|
2899
|
-
}
|
|
2900
|
-
reader.skip(tag & 7);
|
|
2901
|
-
}
|
|
2902
|
-
return message;
|
|
2903
|
-
} finally {
|
|
2904
|
-
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
2905
|
-
}
|
|
2906
|
-
},
|
|
2907
|
-
|
|
2908
|
-
fromJSON(object: any): InstallTermaPullRequestResult {
|
|
2909
|
-
return {
|
|
2910
|
-
repository: isSet(object.repository) ? globalThis.String(object.repository) : "",
|
|
2911
|
-
number: isSet(object.number) ? globalThis.Number(object.number) : 0,
|
|
2912
|
-
url: isSet(object.url) ? globalThis.String(object.url) : "",
|
|
2913
|
-
errorMessage: isSet(object.errorMessage)
|
|
2914
|
-
? globalThis.String(object.errorMessage)
|
|
2915
|
-
: isSet(object.error_message)
|
|
2916
|
-
? globalThis.String(object.error_message)
|
|
2917
|
-
: "",
|
|
2918
|
-
alreadyInstalled: isSet(object.alreadyInstalled)
|
|
2919
|
-
? globalThis.Boolean(object.alreadyInstalled)
|
|
2920
|
-
: isSet(object.already_installed)
|
|
2921
|
-
? globalThis.Boolean(object.already_installed)
|
|
2922
|
-
: false,
|
|
2923
|
-
};
|
|
2924
|
-
},
|
|
2925
|
-
|
|
2926
|
-
toJSON(message: InstallTermaPullRequestResult): unknown {
|
|
2927
|
-
const obj: any = {};
|
|
2928
|
-
if (message.repository !== "") {
|
|
2929
|
-
obj.repository = message.repository;
|
|
2930
|
-
}
|
|
2931
|
-
if (message.number !== 0) {
|
|
2932
|
-
obj.number = Math.round(message.number);
|
|
2933
|
-
}
|
|
2934
|
-
if (message.url !== "") {
|
|
2935
|
-
obj.url = message.url;
|
|
2936
|
-
}
|
|
2937
|
-
if (message.errorMessage !== "") {
|
|
2938
|
-
obj.errorMessage = message.errorMessage;
|
|
2939
|
-
}
|
|
2940
|
-
if (message.alreadyInstalled !== false) {
|
|
2941
|
-
obj.alreadyInstalled = message.alreadyInstalled;
|
|
2942
|
-
}
|
|
2943
|
-
return obj;
|
|
2944
|
-
},
|
|
2945
|
-
|
|
2946
|
-
create<I extends Exact<DeepPartial<InstallTermaPullRequestResult>, I>>(base?: I): InstallTermaPullRequestResult {
|
|
2947
|
-
return InstallTermaPullRequestResult.fromPartial(base ?? ({} as any));
|
|
2948
|
-
},
|
|
2949
|
-
fromPartial<I extends Exact<DeepPartial<InstallTermaPullRequestResult>, I>>(
|
|
2950
|
-
object: I,
|
|
2951
|
-
): InstallTermaPullRequestResult {
|
|
2952
|
-
const message = createBaseInstallTermaPullRequestResult();
|
|
2953
|
-
message.repository = object.repository ?? "";
|
|
2954
|
-
message.number = object.number ?? 0;
|
|
2955
|
-
message.url = object.url ?? "";
|
|
2956
|
-
message.errorMessage = object.errorMessage ?? "";
|
|
2957
|
-
message.alreadyInstalled = object.alreadyInstalled ?? false;
|
|
2958
|
-
return message;
|
|
2959
|
-
},
|
|
2960
|
-
};
|
|
2961
|
-
|
|
2962
|
-
function createBaseCreateInstallTermaPullRequestsResponse(): CreateInstallTermaPullRequestsResponse {
|
|
2963
|
-
return { status: undefined, results: [] };
|
|
2964
|
-
}
|
|
2965
|
-
|
|
2966
|
-
export const CreateInstallTermaPullRequestsResponse: MessageFns<CreateInstallTermaPullRequestsResponse> = {
|
|
2967
|
-
encode(message: CreateInstallTermaPullRequestsResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2968
|
-
if (message.status !== undefined) {
|
|
2969
|
-
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
2970
|
-
}
|
|
2971
|
-
for (const v of message.results) {
|
|
2972
|
-
InstallTermaPullRequestResult.encode(v!, writer.uint32(18).fork()).join();
|
|
2973
|
-
}
|
|
2974
|
-
return writer;
|
|
2975
|
-
},
|
|
2976
|
-
|
|
2977
|
-
decode(input: BinaryReader | Uint8Array, length?: number): CreateInstallTermaPullRequestsResponse {
|
|
2978
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2979
|
-
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
2980
|
-
if (previousRecursionDepth >= 100) {
|
|
2981
|
-
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
2982
|
-
}
|
|
2983
|
-
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
2984
|
-
try {
|
|
2985
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2986
|
-
const message = createBaseCreateInstallTermaPullRequestsResponse();
|
|
2987
|
-
while (reader.pos < end) {
|
|
2988
|
-
const tag = reader.uint32();
|
|
2989
|
-
switch (tag >>> 3) {
|
|
2990
|
-
case 1: {
|
|
2991
|
-
if (tag !== 10) {
|
|
2992
|
-
break;
|
|
2993
|
-
}
|
|
2994
|
-
|
|
2995
|
-
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
2996
|
-
continue;
|
|
2997
|
-
}
|
|
2998
|
-
case 2: {
|
|
2999
|
-
if (tag !== 18) {
|
|
3000
|
-
break;
|
|
3001
|
-
}
|
|
3002
|
-
|
|
3003
|
-
message.results.push(InstallTermaPullRequestResult.decode(reader, reader.uint32()));
|
|
3004
|
-
continue;
|
|
3005
|
-
}
|
|
3006
|
-
}
|
|
3007
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
3008
|
-
break;
|
|
3009
|
-
}
|
|
3010
|
-
reader.skip(tag & 7);
|
|
3011
|
-
}
|
|
3012
|
-
return message;
|
|
3013
|
-
} finally {
|
|
3014
|
-
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
3015
|
-
}
|
|
3016
|
-
},
|
|
3017
|
-
|
|
3018
|
-
fromJSON(object: any): CreateInstallTermaPullRequestsResponse {
|
|
3019
|
-
return {
|
|
3020
|
-
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
3021
|
-
results: globalThis.Array.isArray(object?.results)
|
|
3022
|
-
? object.results.map((e: any) => InstallTermaPullRequestResult.fromJSON(e))
|
|
3023
|
-
: [],
|
|
3024
|
-
};
|
|
3025
|
-
},
|
|
3026
|
-
|
|
3027
|
-
toJSON(message: CreateInstallTermaPullRequestsResponse): unknown {
|
|
3028
|
-
const obj: any = {};
|
|
3029
|
-
if (message.status !== undefined) {
|
|
3030
|
-
obj.status = ResponseStatus.toJSON(message.status);
|
|
3031
|
-
}
|
|
3032
|
-
if (message.results?.length) {
|
|
3033
|
-
obj.results = message.results.map((e) => InstallTermaPullRequestResult.toJSON(e));
|
|
3034
|
-
}
|
|
3035
|
-
return obj;
|
|
3036
|
-
},
|
|
3037
|
-
|
|
3038
|
-
create<I extends Exact<DeepPartial<CreateInstallTermaPullRequestsResponse>, I>>(
|
|
3039
|
-
base?: I,
|
|
3040
|
-
): CreateInstallTermaPullRequestsResponse {
|
|
3041
|
-
return CreateInstallTermaPullRequestsResponse.fromPartial(base ?? ({} as any));
|
|
3042
|
-
},
|
|
3043
|
-
fromPartial<I extends Exact<DeepPartial<CreateInstallTermaPullRequestsResponse>, I>>(
|
|
3044
|
-
object: I,
|
|
3045
|
-
): CreateInstallTermaPullRequestsResponse {
|
|
3046
|
-
const message = createBaseCreateInstallTermaPullRequestsResponse();
|
|
3047
|
-
message.status = (object.status !== undefined && object.status !== null)
|
|
3048
|
-
? ResponseStatus.fromPartial(object.status)
|
|
3049
|
-
: undefined;
|
|
3050
|
-
message.results = object.results?.map((e) => InstallTermaPullRequestResult.fromPartial(e)) || [];
|
|
3051
|
-
return message;
|
|
3052
|
-
},
|
|
3053
|
-
};
|
|
3054
|
-
|
|
3055
|
-
function createBaseListInstallTermaPullRequestsRequest(): ListInstallTermaPullRequestsRequest {
|
|
3056
|
-
return { organizationId: "", projectId: "" };
|
|
3057
|
-
}
|
|
3058
|
-
|
|
3059
|
-
export const ListInstallTermaPullRequestsRequest: MessageFns<ListInstallTermaPullRequestsRequest> = {
|
|
3060
|
-
encode(message: ListInstallTermaPullRequestsRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
3061
|
-
if (message.organizationId !== "") {
|
|
3062
|
-
writer.uint32(10).string(message.organizationId);
|
|
3063
|
-
}
|
|
3064
|
-
if (message.projectId !== "") {
|
|
3065
|
-
writer.uint32(18).string(message.projectId);
|
|
3066
|
-
}
|
|
3067
|
-
return writer;
|
|
3068
|
-
},
|
|
3069
|
-
|
|
3070
|
-
decode(input: BinaryReader | Uint8Array, length?: number): ListInstallTermaPullRequestsRequest {
|
|
3071
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3072
|
-
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
3073
|
-
if (previousRecursionDepth >= 100) {
|
|
3074
|
-
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
3075
|
-
}
|
|
3076
|
-
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
3077
|
-
try {
|
|
3078
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3079
|
-
const message = createBaseListInstallTermaPullRequestsRequest();
|
|
3080
|
-
while (reader.pos < end) {
|
|
3081
|
-
const tag = reader.uint32();
|
|
3082
|
-
switch (tag >>> 3) {
|
|
3083
|
-
case 1: {
|
|
3084
|
-
if (tag !== 10) {
|
|
3085
|
-
break;
|
|
3086
|
-
}
|
|
3087
|
-
|
|
3088
|
-
message.organizationId = reader.string();
|
|
3089
|
-
continue;
|
|
3090
|
-
}
|
|
3091
|
-
case 2: {
|
|
3092
|
-
if (tag !== 18) {
|
|
3093
|
-
break;
|
|
3094
|
-
}
|
|
3095
|
-
|
|
3096
|
-
message.projectId = reader.string();
|
|
3097
|
-
continue;
|
|
3098
|
-
}
|
|
3099
|
-
}
|
|
3100
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
3101
|
-
break;
|
|
3102
|
-
}
|
|
3103
|
-
reader.skip(tag & 7);
|
|
3104
|
-
}
|
|
3105
|
-
return message;
|
|
3106
|
-
} finally {
|
|
3107
|
-
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
3108
|
-
}
|
|
3109
|
-
},
|
|
3110
|
-
|
|
3111
|
-
fromJSON(object: any): ListInstallTermaPullRequestsRequest {
|
|
3112
|
-
return {
|
|
3113
|
-
organizationId: isSet(object.organizationId)
|
|
3114
|
-
? globalThis.String(object.organizationId)
|
|
3115
|
-
: isSet(object.organization_id)
|
|
3116
|
-
? globalThis.String(object.organization_id)
|
|
3117
|
-
: "",
|
|
3118
|
-
projectId: isSet(object.projectId)
|
|
3119
|
-
? globalThis.String(object.projectId)
|
|
3120
|
-
: isSet(object.project_id)
|
|
3121
|
-
? globalThis.String(object.project_id)
|
|
3122
|
-
: "",
|
|
3123
|
-
};
|
|
3124
|
-
},
|
|
3125
|
-
|
|
3126
|
-
toJSON(message: ListInstallTermaPullRequestsRequest): unknown {
|
|
3127
|
-
const obj: any = {};
|
|
3128
|
-
if (message.organizationId !== "") {
|
|
3129
|
-
obj.organizationId = message.organizationId;
|
|
3130
|
-
}
|
|
3131
|
-
if (message.projectId !== "") {
|
|
3132
|
-
obj.projectId = message.projectId;
|
|
3133
|
-
}
|
|
3134
|
-
return obj;
|
|
3135
|
-
},
|
|
3136
|
-
|
|
3137
|
-
create<I extends Exact<DeepPartial<ListInstallTermaPullRequestsRequest>, I>>(
|
|
3138
|
-
base?: I,
|
|
3139
|
-
): ListInstallTermaPullRequestsRequest {
|
|
3140
|
-
return ListInstallTermaPullRequestsRequest.fromPartial(base ?? ({} as any));
|
|
3141
|
-
},
|
|
3142
|
-
fromPartial<I extends Exact<DeepPartial<ListInstallTermaPullRequestsRequest>, I>>(
|
|
3143
|
-
object: I,
|
|
3144
|
-
): ListInstallTermaPullRequestsRequest {
|
|
3145
|
-
const message = createBaseListInstallTermaPullRequestsRequest();
|
|
3146
|
-
message.organizationId = object.organizationId ?? "";
|
|
3147
|
-
message.projectId = object.projectId ?? "";
|
|
3148
|
-
return message;
|
|
3149
|
-
},
|
|
3150
|
-
};
|
|
3151
|
-
|
|
3152
|
-
function createBaseInstallTermaPullRequest(): InstallTermaPullRequest {
|
|
3153
|
-
return { repository: "", number: 0, url: "", state: "", updatedAt: "" };
|
|
3154
|
-
}
|
|
3155
|
-
|
|
3156
|
-
export const InstallTermaPullRequest: MessageFns<InstallTermaPullRequest> = {
|
|
3157
|
-
encode(message: InstallTermaPullRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
3158
|
-
if (message.repository !== "") {
|
|
3159
|
-
writer.uint32(10).string(message.repository);
|
|
3160
|
-
}
|
|
3161
|
-
if (message.number !== 0) {
|
|
3162
|
-
writer.uint32(16).int64(message.number);
|
|
3163
|
-
}
|
|
3164
|
-
if (message.url !== "") {
|
|
3165
|
-
writer.uint32(26).string(message.url);
|
|
3166
|
-
}
|
|
3167
|
-
if (message.state !== "") {
|
|
3168
|
-
writer.uint32(34).string(message.state);
|
|
3169
|
-
}
|
|
3170
|
-
if (message.updatedAt !== "") {
|
|
3171
|
-
writer.uint32(42).string(message.updatedAt);
|
|
3172
|
-
}
|
|
3173
|
-
return writer;
|
|
3174
|
-
},
|
|
3175
|
-
|
|
3176
|
-
decode(input: BinaryReader | Uint8Array, length?: number): InstallTermaPullRequest {
|
|
3177
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3178
|
-
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
3179
|
-
if (previousRecursionDepth >= 100) {
|
|
3180
|
-
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
3181
|
-
}
|
|
3182
|
-
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
3183
|
-
try {
|
|
3184
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3185
|
-
const message = createBaseInstallTermaPullRequest();
|
|
3186
|
-
while (reader.pos < end) {
|
|
3187
|
-
const tag = reader.uint32();
|
|
3188
|
-
switch (tag >>> 3) {
|
|
3189
|
-
case 1: {
|
|
3190
|
-
if (tag !== 10) {
|
|
3191
|
-
break;
|
|
3192
|
-
}
|
|
3193
|
-
|
|
3194
|
-
message.repository = reader.string();
|
|
3195
|
-
continue;
|
|
3196
|
-
}
|
|
3197
|
-
case 2: {
|
|
3198
|
-
if (tag !== 16) {
|
|
3199
|
-
break;
|
|
3200
|
-
}
|
|
3201
|
-
|
|
3202
|
-
message.number = longToNumber(reader.int64());
|
|
3203
|
-
continue;
|
|
3204
|
-
}
|
|
3205
|
-
case 3: {
|
|
3206
|
-
if (tag !== 26) {
|
|
3207
|
-
break;
|
|
3208
|
-
}
|
|
3209
|
-
|
|
3210
|
-
message.url = reader.string();
|
|
3211
|
-
continue;
|
|
3212
|
-
}
|
|
3213
|
-
case 4: {
|
|
3214
|
-
if (tag !== 34) {
|
|
3215
|
-
break;
|
|
3216
|
-
}
|
|
3217
|
-
|
|
3218
|
-
message.state = reader.string();
|
|
3219
|
-
continue;
|
|
3220
|
-
}
|
|
3221
|
-
case 5: {
|
|
3222
|
-
if (tag !== 42) {
|
|
3223
|
-
break;
|
|
3224
|
-
}
|
|
3225
|
-
|
|
3226
|
-
message.updatedAt = reader.string();
|
|
3227
|
-
continue;
|
|
3228
|
-
}
|
|
3229
|
-
}
|
|
3230
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
3231
|
-
break;
|
|
3232
|
-
}
|
|
3233
|
-
reader.skip(tag & 7);
|
|
3234
|
-
}
|
|
3235
|
-
return message;
|
|
3236
|
-
} finally {
|
|
3237
|
-
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
3238
|
-
}
|
|
3239
|
-
},
|
|
3240
|
-
|
|
3241
|
-
fromJSON(object: any): InstallTermaPullRequest {
|
|
3242
|
-
return {
|
|
3243
|
-
repository: isSet(object.repository) ? globalThis.String(object.repository) : "",
|
|
3244
|
-
number: isSet(object.number) ? globalThis.Number(object.number) : 0,
|
|
3245
|
-
url: isSet(object.url) ? globalThis.String(object.url) : "",
|
|
3246
|
-
state: isSet(object.state) ? globalThis.String(object.state) : "",
|
|
3247
|
-
updatedAt: isSet(object.updatedAt)
|
|
3248
|
-
? globalThis.String(object.updatedAt)
|
|
3249
|
-
: isSet(object.updated_at)
|
|
3250
|
-
? globalThis.String(object.updated_at)
|
|
3251
|
-
: "",
|
|
3252
|
-
};
|
|
3253
|
-
},
|
|
3254
|
-
|
|
3255
|
-
toJSON(message: InstallTermaPullRequest): unknown {
|
|
3256
|
-
const obj: any = {};
|
|
3257
|
-
if (message.repository !== "") {
|
|
3258
|
-
obj.repository = message.repository;
|
|
3259
|
-
}
|
|
3260
|
-
if (message.number !== 0) {
|
|
3261
|
-
obj.number = Math.round(message.number);
|
|
3262
|
-
}
|
|
3263
|
-
if (message.url !== "") {
|
|
3264
|
-
obj.url = message.url;
|
|
3265
|
-
}
|
|
3266
|
-
if (message.state !== "") {
|
|
3267
|
-
obj.state = message.state;
|
|
3268
|
-
}
|
|
3269
|
-
if (message.updatedAt !== "") {
|
|
3270
|
-
obj.updatedAt = message.updatedAt;
|
|
3271
|
-
}
|
|
3272
|
-
return obj;
|
|
3273
|
-
},
|
|
3274
|
-
|
|
3275
|
-
create<I extends Exact<DeepPartial<InstallTermaPullRequest>, I>>(base?: I): InstallTermaPullRequest {
|
|
3276
|
-
return InstallTermaPullRequest.fromPartial(base ?? ({} as any));
|
|
3277
|
-
},
|
|
3278
|
-
fromPartial<I extends Exact<DeepPartial<InstallTermaPullRequest>, I>>(object: I): InstallTermaPullRequest {
|
|
3279
|
-
const message = createBaseInstallTermaPullRequest();
|
|
3280
|
-
message.repository = object.repository ?? "";
|
|
3281
|
-
message.number = object.number ?? 0;
|
|
3282
|
-
message.url = object.url ?? "";
|
|
3283
|
-
message.state = object.state ?? "";
|
|
3284
|
-
message.updatedAt = object.updatedAt ?? "";
|
|
3285
|
-
return message;
|
|
3286
|
-
},
|
|
3287
|
-
};
|
|
3288
|
-
|
|
3289
|
-
function createBaseListInstallTermaPullRequestsResponse(): ListInstallTermaPullRequestsResponse {
|
|
3290
|
-
return { status: undefined, pullRequests: [] };
|
|
3291
|
-
}
|
|
3292
|
-
|
|
3293
|
-
export const ListInstallTermaPullRequestsResponse: MessageFns<ListInstallTermaPullRequestsResponse> = {
|
|
3294
|
-
encode(message: ListInstallTermaPullRequestsResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
3295
|
-
if (message.status !== undefined) {
|
|
3296
|
-
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
3297
|
-
}
|
|
3298
|
-
for (const v of message.pullRequests) {
|
|
3299
|
-
InstallTermaPullRequest.encode(v!, writer.uint32(18).fork()).join();
|
|
3300
|
-
}
|
|
3301
|
-
return writer;
|
|
3302
|
-
},
|
|
3303
|
-
|
|
3304
|
-
decode(input: BinaryReader | Uint8Array, length?: number): ListInstallTermaPullRequestsResponse {
|
|
3305
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3306
|
-
const previousRecursionDepth = (reader as any).__tsProtoDecodeDepth ?? 0;
|
|
3307
|
-
if (previousRecursionDepth >= 100) {
|
|
3308
|
-
throw new globalThis.Error("protobuf decode recursion limit exceeded");
|
|
3309
|
-
}
|
|
3310
|
-
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth + 1;
|
|
3311
|
-
try {
|
|
3312
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3313
|
-
const message = createBaseListInstallTermaPullRequestsResponse();
|
|
3314
|
-
while (reader.pos < end) {
|
|
3315
|
-
const tag = reader.uint32();
|
|
3316
|
-
switch (tag >>> 3) {
|
|
3317
|
-
case 1: {
|
|
3318
|
-
if (tag !== 10) {
|
|
3319
|
-
break;
|
|
3320
|
-
}
|
|
3321
|
-
|
|
3322
|
-
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
3323
|
-
continue;
|
|
3324
|
-
}
|
|
3325
|
-
case 2: {
|
|
3326
|
-
if (tag !== 18) {
|
|
3327
|
-
break;
|
|
3328
|
-
}
|
|
3329
|
-
|
|
3330
|
-
message.pullRequests.push(InstallTermaPullRequest.decode(reader, reader.uint32()));
|
|
3331
|
-
continue;
|
|
3332
|
-
}
|
|
3333
|
-
}
|
|
3334
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
3335
|
-
break;
|
|
3336
|
-
}
|
|
3337
|
-
reader.skip(tag & 7);
|
|
3338
|
-
}
|
|
3339
|
-
return message;
|
|
3340
|
-
} finally {
|
|
3341
|
-
(reader as any).__tsProtoDecodeDepth = previousRecursionDepth;
|
|
3342
|
-
}
|
|
3343
|
-
},
|
|
3344
|
-
|
|
3345
|
-
fromJSON(object: any): ListInstallTermaPullRequestsResponse {
|
|
3346
|
-
return {
|
|
3347
|
-
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
3348
|
-
pullRequests: globalThis.Array.isArray(object?.pullRequests)
|
|
3349
|
-
? object.pullRequests.map((e: any) => InstallTermaPullRequest.fromJSON(e))
|
|
3350
|
-
: globalThis.Array.isArray(object?.pull_requests)
|
|
3351
|
-
? object.pull_requests.map((e: any) => InstallTermaPullRequest.fromJSON(e))
|
|
3352
|
-
: [],
|
|
3353
|
-
};
|
|
3354
|
-
},
|
|
3355
|
-
|
|
3356
|
-
toJSON(message: ListInstallTermaPullRequestsResponse): unknown {
|
|
3357
|
-
const obj: any = {};
|
|
3358
|
-
if (message.status !== undefined) {
|
|
3359
|
-
obj.status = ResponseStatus.toJSON(message.status);
|
|
3360
|
-
}
|
|
3361
|
-
if (message.pullRequests?.length) {
|
|
3362
|
-
obj.pullRequests = message.pullRequests.map((e) => InstallTermaPullRequest.toJSON(e));
|
|
3363
|
-
}
|
|
3364
|
-
return obj;
|
|
3365
|
-
},
|
|
3366
|
-
|
|
3367
|
-
create<I extends Exact<DeepPartial<ListInstallTermaPullRequestsResponse>, I>>(
|
|
3368
|
-
base?: I,
|
|
3369
|
-
): ListInstallTermaPullRequestsResponse {
|
|
3370
|
-
return ListInstallTermaPullRequestsResponse.fromPartial(base ?? ({} as any));
|
|
3371
|
-
},
|
|
3372
|
-
fromPartial<I extends Exact<DeepPartial<ListInstallTermaPullRequestsResponse>, I>>(
|
|
3373
|
-
object: I,
|
|
3374
|
-
): ListInstallTermaPullRequestsResponse {
|
|
3375
|
-
const message = createBaseListInstallTermaPullRequestsResponse();
|
|
3376
|
-
message.status = (object.status !== undefined && object.status !== null)
|
|
3377
|
-
? ResponseStatus.fromPartial(object.status)
|
|
3378
|
-
: undefined;
|
|
3379
|
-
message.pullRequests = object.pullRequests?.map((e) => InstallTermaPullRequest.fromPartial(e)) || [];
|
|
3380
|
-
return message;
|
|
3381
|
-
},
|
|
3382
|
-
};
|
|
3383
|
-
|
|
3384
|
-
/**
|
|
3385
|
-
* One GitHub App connection per organization. Credentials never leave the
|
|
3386
|
-
* account service; installation tokens are minted on demand and never stored.
|
|
3387
|
-
*/
|
|
3388
|
-
export interface GitHubGatewayService {
|
|
3389
|
-
GetGitHubConnector(request: GitHubScopeRequest, metadata?: Metadata): Promise<GitHubStatusResponse>;
|
|
3390
|
-
BeginGitHubConnection(request: GitHubScopeRequest, metadata?: Metadata): Promise<GitHubBeginResponse>;
|
|
3391
|
-
CompleteGitHubConnection(request: GitHubCompleteRequest, metadata?: Metadata): Promise<GitHubStatusResponse>;
|
|
3392
|
-
DisconnectGitHubConnection(request: GitHubDisconnectRequest, metadata?: Metadata): Promise<GitHubEmptyResponse>;
|
|
3393
|
-
ListGitHubRepositories(request: GitHubScopeRequest, metadata?: Metadata): Promise<GitHubRepositoriesResponse>;
|
|
3394
|
-
ListGitHubPullRequests(request: GitHubPullRequestsRequest, metadata?: Metadata): Promise<GitHubPullRequestsResponse>;
|
|
3395
|
-
ListGitHubIssues(request: GitHubIssuesRequest, metadata?: Metadata): Promise<GitHubIssuesResponse>;
|
|
3396
|
-
ListGitHubFiles(request: GitHubFilesRequest, metadata?: Metadata): Promise<GitHubFilesResponse>;
|
|
3397
|
-
/** Org admins only. Opens one pull request per repository that sets Terma up for the team. */
|
|
3398
|
-
CreateInstallTermaPullRequests(
|
|
3399
|
-
request: CreateInstallTermaPullRequestsRequest,
|
|
3400
|
-
metadata?: Metadata,
|
|
3401
|
-
): Promise<CreateInstallTermaPullRequestsResponse>;
|
|
3402
|
-
/**
|
|
3403
|
-
* Org members. Every setup pull request Terma opened for the team on GitHub, open, merged or closed (a repository can
|
|
3404
|
-
* have several over time), most recently updated first.
|
|
3405
|
-
*/
|
|
3406
|
-
ListInstallTermaPullRequests(
|
|
3407
|
-
request: ListInstallTermaPullRequestsRequest,
|
|
3408
|
-
metadata?: Metadata,
|
|
3409
|
-
): Promise<ListInstallTermaPullRequestsResponse>;
|
|
3410
|
-
ReceiveGitHubWebhook(request: GitHubWebhookRequest, metadata?: Metadata): Promise<GitHubEmptyResponse>;
|
|
3411
|
-
}
|
|
3412
|
-
|
|
3413
|
-
export const GitHubGatewayServiceServiceName = "gateway.web.v1.GitHubGatewayService";
|
|
3414
|
-
export class GitHubGatewayServiceClientImpl implements GitHubGatewayService {
|
|
3415
|
-
private readonly rpc: Rpc;
|
|
3416
|
-
private readonly service: string;
|
|
3417
|
-
constructor(rpc: Rpc, opts?: { service?: string }) {
|
|
3418
|
-
this.service = opts?.service || GitHubGatewayServiceServiceName;
|
|
3419
|
-
this.rpc = rpc;
|
|
3420
|
-
this.GetGitHubConnector = this.GetGitHubConnector.bind(this);
|
|
3421
|
-
this.BeginGitHubConnection = this.BeginGitHubConnection.bind(this);
|
|
3422
|
-
this.CompleteGitHubConnection = this.CompleteGitHubConnection.bind(this);
|
|
3423
|
-
this.DisconnectGitHubConnection = this.DisconnectGitHubConnection.bind(this);
|
|
3424
|
-
this.ListGitHubRepositories = this.ListGitHubRepositories.bind(this);
|
|
3425
|
-
this.ListGitHubPullRequests = this.ListGitHubPullRequests.bind(this);
|
|
3426
|
-
this.ListGitHubIssues = this.ListGitHubIssues.bind(this);
|
|
3427
|
-
this.ListGitHubFiles = this.ListGitHubFiles.bind(this);
|
|
3428
|
-
this.CreateInstallTermaPullRequests = this.CreateInstallTermaPullRequests.bind(this);
|
|
3429
|
-
this.ListInstallTermaPullRequests = this.ListInstallTermaPullRequests.bind(this);
|
|
3430
|
-
this.ReceiveGitHubWebhook = this.ReceiveGitHubWebhook.bind(this);
|
|
3431
|
-
}
|
|
3432
|
-
GetGitHubConnector(request: GitHubScopeRequest, metadata?: Metadata): Promise<GitHubStatusResponse> {
|
|
3433
|
-
const data = GitHubScopeRequest.encode(request).finish();
|
|
3434
|
-
const promise = this.rpc.request(this.service, "GetGitHubConnector", data, metadata);
|
|
3435
|
-
return promise.then((data) => GitHubStatusResponse.decode(new BinaryReader(data)));
|
|
3436
|
-
}
|
|
3437
|
-
|
|
3438
|
-
BeginGitHubConnection(request: GitHubScopeRequest, metadata?: Metadata): Promise<GitHubBeginResponse> {
|
|
3439
|
-
const data = GitHubScopeRequest.encode(request).finish();
|
|
3440
|
-
const promise = this.rpc.request(this.service, "BeginGitHubConnection", data, metadata);
|
|
3441
|
-
return promise.then((data) => GitHubBeginResponse.decode(new BinaryReader(data)));
|
|
3442
|
-
}
|
|
3443
|
-
|
|
3444
|
-
CompleteGitHubConnection(request: GitHubCompleteRequest, metadata?: Metadata): Promise<GitHubStatusResponse> {
|
|
3445
|
-
const data = GitHubCompleteRequest.encode(request).finish();
|
|
3446
|
-
const promise = this.rpc.request(this.service, "CompleteGitHubConnection", data, metadata);
|
|
3447
|
-
return promise.then((data) => GitHubStatusResponse.decode(new BinaryReader(data)));
|
|
3448
|
-
}
|
|
3449
|
-
|
|
3450
|
-
DisconnectGitHubConnection(request: GitHubDisconnectRequest, metadata?: Metadata): Promise<GitHubEmptyResponse> {
|
|
3451
|
-
const data = GitHubDisconnectRequest.encode(request).finish();
|
|
3452
|
-
const promise = this.rpc.request(this.service, "DisconnectGitHubConnection", data, metadata);
|
|
3453
|
-
return promise.then((data) => GitHubEmptyResponse.decode(new BinaryReader(data)));
|
|
3454
|
-
}
|
|
3455
|
-
|
|
3456
|
-
ListGitHubRepositories(request: GitHubScopeRequest, metadata?: Metadata): Promise<GitHubRepositoriesResponse> {
|
|
3457
|
-
const data = GitHubScopeRequest.encode(request).finish();
|
|
3458
|
-
const promise = this.rpc.request(this.service, "ListGitHubRepositories", data, metadata);
|
|
3459
|
-
return promise.then((data) => GitHubRepositoriesResponse.decode(new BinaryReader(data)));
|
|
3460
|
-
}
|
|
3461
|
-
|
|
3462
|
-
ListGitHubPullRequests(request: GitHubPullRequestsRequest, metadata?: Metadata): Promise<GitHubPullRequestsResponse> {
|
|
3463
|
-
const data = GitHubPullRequestsRequest.encode(request).finish();
|
|
3464
|
-
const promise = this.rpc.request(this.service, "ListGitHubPullRequests", data, metadata);
|
|
3465
|
-
return promise.then((data) => GitHubPullRequestsResponse.decode(new BinaryReader(data)));
|
|
3466
|
-
}
|
|
3467
|
-
|
|
3468
|
-
ListGitHubIssues(request: GitHubIssuesRequest, metadata?: Metadata): Promise<GitHubIssuesResponse> {
|
|
3469
|
-
const data = GitHubIssuesRequest.encode(request).finish();
|
|
3470
|
-
const promise = this.rpc.request(this.service, "ListGitHubIssues", data, metadata);
|
|
3471
|
-
return promise.then((data) => GitHubIssuesResponse.decode(new BinaryReader(data)));
|
|
3472
|
-
}
|
|
3473
|
-
|
|
3474
|
-
ListGitHubFiles(request: GitHubFilesRequest, metadata?: Metadata): Promise<GitHubFilesResponse> {
|
|
3475
|
-
const data = GitHubFilesRequest.encode(request).finish();
|
|
3476
|
-
const promise = this.rpc.request(this.service, "ListGitHubFiles", data, metadata);
|
|
3477
|
-
return promise.then((data) => GitHubFilesResponse.decode(new BinaryReader(data)));
|
|
3478
|
-
}
|
|
3479
|
-
|
|
3480
|
-
CreateInstallTermaPullRequests(
|
|
3481
|
-
request: CreateInstallTermaPullRequestsRequest,
|
|
3482
|
-
metadata?: Metadata,
|
|
3483
|
-
): Promise<CreateInstallTermaPullRequestsResponse> {
|
|
3484
|
-
const data = CreateInstallTermaPullRequestsRequest.encode(request).finish();
|
|
3485
|
-
const promise = this.rpc.request(this.service, "CreateInstallTermaPullRequests", data, metadata);
|
|
3486
|
-
return promise.then((data) => CreateInstallTermaPullRequestsResponse.decode(new BinaryReader(data)));
|
|
3487
|
-
}
|
|
3488
|
-
|
|
3489
|
-
ListInstallTermaPullRequests(
|
|
3490
|
-
request: ListInstallTermaPullRequestsRequest,
|
|
3491
|
-
metadata?: Metadata,
|
|
3492
|
-
): Promise<ListInstallTermaPullRequestsResponse> {
|
|
3493
|
-
const data = ListInstallTermaPullRequestsRequest.encode(request).finish();
|
|
3494
|
-
const promise = this.rpc.request(this.service, "ListInstallTermaPullRequests", data, metadata);
|
|
3495
|
-
return promise.then((data) => ListInstallTermaPullRequestsResponse.decode(new BinaryReader(data)));
|
|
3496
|
-
}
|
|
3497
|
-
|
|
3498
|
-
ReceiveGitHubWebhook(request: GitHubWebhookRequest, metadata?: Metadata): Promise<GitHubEmptyResponse> {
|
|
3499
|
-
const data = GitHubWebhookRequest.encode(request).finish();
|
|
3500
|
-
const promise = this.rpc.request(this.service, "ReceiveGitHubWebhook", data, metadata);
|
|
3501
|
-
return promise.then((data) => GitHubEmptyResponse.decode(new BinaryReader(data)));
|
|
3502
|
-
}
|
|
2603
|
+
ListGitHubFiles(request: GitHubFilesRequest, metadata?: Metadata): Promise<GitHubFilesResponse> {
|
|
2604
|
+
const data = GitHubFilesRequest.encode(request).finish();
|
|
2605
|
+
const promise = this.rpc.request(this.service, "ListGitHubFiles", data, metadata);
|
|
2606
|
+
return promise.then((data) => GitHubFilesResponse.decode(new BinaryReader(data)));
|
|
2607
|
+
}
|
|
3503
2608
|
}
|
|
3504
2609
|
|
|
3505
2610
|
interface Rpc {
|
|
3506
2611
|
request(service: string, method: string, data: Uint8Array, metadata?: Metadata): Promise<Uint8Array>;
|
|
3507
2612
|
}
|
|
3508
2613
|
|
|
3509
|
-
function bytesFromBase64(b64: string): Uint8Array {
|
|
3510
|
-
if ((globalThis as any).Buffer) {
|
|
3511
|
-
return Uint8Array.from((globalThis as any).Buffer.from(b64, "base64"));
|
|
3512
|
-
} else {
|
|
3513
|
-
const bin = globalThis.atob(b64);
|
|
3514
|
-
const arr = new Uint8Array(bin.length);
|
|
3515
|
-
for (let i = 0; i < bin.length; ++i) {
|
|
3516
|
-
arr[i] = bin.charCodeAt(i);
|
|
3517
|
-
}
|
|
3518
|
-
return arr;
|
|
3519
|
-
}
|
|
3520
|
-
}
|
|
3521
|
-
|
|
3522
|
-
function base64FromBytes(arr: Uint8Array): string {
|
|
3523
|
-
if ((globalThis as any).Buffer) {
|
|
3524
|
-
return (globalThis as any).Buffer.from(arr).toString("base64");
|
|
3525
|
-
} else {
|
|
3526
|
-
const bin: string[] = [];
|
|
3527
|
-
arr.forEach((byte) => {
|
|
3528
|
-
bin.push(globalThis.String.fromCharCode(byte));
|
|
3529
|
-
});
|
|
3530
|
-
return globalThis.btoa(bin.join(""));
|
|
3531
|
-
}
|
|
3532
|
-
}
|
|
3533
|
-
|
|
3534
2614
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
3535
2615
|
|
|
3536
2616
|
export type DeepPartial<T> = T extends Builtin ? T
|