@superdurable/connector-atlassian-bitbucket 0.0.0-stage → 0.2.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/LICENSE +21 -0
- package/README.md +8 -2
- package/dex-connector.json +1450 -0
- package/dist/chunk-4VFVRU2P.js +1020 -0
- package/dist/connection-DtDaG9sh.d.ts +641 -0
- package/dist/index.d.ts +1496 -0
- package/dist/index.js +2113 -0
- package/dist/mock.d.ts +441 -0
- package/dist/mock.js +1098 -0
- package/package.json +63 -4
|
@@ -0,0 +1,641 @@
|
|
|
1
|
+
import { SecretString, CredentialProvider, Query, Mutation, ConnectionRef } from '@superdurable/connectors-sdk';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { Codec } from '@superdurable/dex';
|
|
4
|
+
|
|
5
|
+
/** A signed 64-bit JSON integer. Values outside the safe number range retain their decimal token. */
|
|
6
|
+
type SignedInteger = number | Readonly<{
|
|
7
|
+
rawJSON: string;
|
|
8
|
+
}>;
|
|
9
|
+
/** Decode one signed Go integer from a safe number or a native raw JSON number token. */
|
|
10
|
+
declare function decodeSignedInteger(value: unknown): SignedInteger;
|
|
11
|
+
/** Read provider JSON with the original syntax of every numeric token for typed field validation. */
|
|
12
|
+
declare function parseJSONNumberTokens(text: string): unknown;
|
|
13
|
+
/** Decode JSON while retaining exact decimal tokens for integers outside JavaScript's safe range. */
|
|
14
|
+
declare function parseExactIntegerJSON(text: string): unknown;
|
|
15
|
+
/** JSON-wire codec for records with signed integer fields. An optional decoder validates the application type. */
|
|
16
|
+
declare function exactIntegerJSONCodec<T>(decode?: (value: unknown) => T): Codec<T>;
|
|
17
|
+
/** Connector configuration; omitted fields use manifest defaults. */
|
|
18
|
+
interface Config {
|
|
19
|
+
/** Fixed provider API URL; blank uses the displayed default. Override only for a compatible gateway or loopback test server. */
|
|
20
|
+
baseUrl?: string;
|
|
21
|
+
/** Maximum duration of one provider HTTP request. Enter a positive Go duration using ms, s, or m. Blank uses the displayed default. Increase it only for slow network paths. Runtime value in milliseconds. */
|
|
22
|
+
timeoutMs?: number;
|
|
23
|
+
/** Maximum provider JSON response size in bytes as a positive integer. Blank uses the displayed default; raise only for larger result pages. */
|
|
24
|
+
maxResponseBytes?: number;
|
|
25
|
+
}
|
|
26
|
+
/** Runtime schema for manifest configuration. */
|
|
27
|
+
declare const ConfigSchema: z.ZodObject<{
|
|
28
|
+
baseUrl: z.ZodOptional<z.ZodString>;
|
|
29
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
30
|
+
maxResponseBytes: z.ZodOptional<z.ZodNumber>;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
/** Private connector credentials resolved by the host. */
|
|
33
|
+
interface Credentials {
|
|
34
|
+
/** Secret Bitbucket workspace access token from https://bitbucket.org > workspace Settings > Access tokens > Create access token. Grant Repositories Read/Write/Admin/Delete for repository actions and Pull requests Read/Write for PR actions; copy the opaque token once into this secret field. Blank prevents calls. */
|
|
35
|
+
accessToken: SecretString;
|
|
36
|
+
}
|
|
37
|
+
/** Stored credential material that fails the connector credential checks, so no retry can succeed. */
|
|
38
|
+
declare class CredentialMaterialError extends TypeError {
|
|
39
|
+
constructor(message: string);
|
|
40
|
+
}
|
|
41
|
+
/** Report malformed stored credential material, also behind the SDK provider's decoding TypeError. */
|
|
42
|
+
declare function isCredentialMaterialError(error: unknown): boolean;
|
|
43
|
+
/** Decode private credential fields for the connector. */
|
|
44
|
+
declare function decodeCredentials(value: unknown): Credentials;
|
|
45
|
+
/** Host-owned source of private connector credentials. */
|
|
46
|
+
type CredentialSource = CredentialProvider<Credentials>;
|
|
47
|
+
/** ListBranchesInput identifies a Bitbucket repository. */
|
|
48
|
+
interface ListBranchesInput {
|
|
49
|
+
/** Workspace is the Bitbucket workspace slug. */
|
|
50
|
+
"workspace": string;
|
|
51
|
+
/** Repository is the repository slug. */
|
|
52
|
+
"repository": string;
|
|
53
|
+
}
|
|
54
|
+
/** BranchTarget identifies the commit at a Bitbucket branch tip. */
|
|
55
|
+
interface BranchTarget {
|
|
56
|
+
/** Hash is the full target commit hash. */
|
|
57
|
+
"hash": string;
|
|
58
|
+
}
|
|
59
|
+
/** Branch is a Bitbucket repository branch. */
|
|
60
|
+
interface Branch {
|
|
61
|
+
/** Name is the branch name without refs/heads/. */
|
|
62
|
+
"name": string;
|
|
63
|
+
/** Target identifies the branch tip. */
|
|
64
|
+
"target": BranchTarget;
|
|
65
|
+
}
|
|
66
|
+
/** BranchPage is one provider page of branches. */
|
|
67
|
+
interface BranchPage {
|
|
68
|
+
/** Values contains the returned branches. */
|
|
69
|
+
"values": Array<Branch> | null;
|
|
70
|
+
/** Next is an untrusted provider pagination URL. */
|
|
71
|
+
"next": string;
|
|
72
|
+
/** Page is the one-based page number. */
|
|
73
|
+
"page": SignedInteger;
|
|
74
|
+
/** PageLength is the provider page length. */
|
|
75
|
+
"pagelen": SignedInteger;
|
|
76
|
+
}
|
|
77
|
+
/** BranchRefInput identifies one branch in a repository. */
|
|
78
|
+
interface BranchRefInput {
|
|
79
|
+
/** Workspace is the Bitbucket workspace slug. */
|
|
80
|
+
"workspace": string;
|
|
81
|
+
/** Repository is the repository slug. */
|
|
82
|
+
"repository": string;
|
|
83
|
+
/** Name is the branch name without refs/heads/. */
|
|
84
|
+
"name": string;
|
|
85
|
+
}
|
|
86
|
+
/** CreateBranchInput selects a name and exact target commit. */
|
|
87
|
+
interface CreateBranchInput {
|
|
88
|
+
/** Workspace is the Bitbucket workspace slug. */
|
|
89
|
+
"workspace": string;
|
|
90
|
+
/** Repository is the repository slug. */
|
|
91
|
+
"repository": string;
|
|
92
|
+
/** Name is the new branch name without refs/heads/. */
|
|
93
|
+
"name": string;
|
|
94
|
+
/** TargetHash is the full 40-character target commit hash. */
|
|
95
|
+
"targetHash": string;
|
|
96
|
+
}
|
|
97
|
+
/** DeletedBranch identifies a deleted branch. */
|
|
98
|
+
interface DeletedBranch {
|
|
99
|
+
/** Workspace is the Bitbucket workspace slug. */
|
|
100
|
+
"workspace": string;
|
|
101
|
+
/** Repository is the repository slug. */
|
|
102
|
+
"repository": string;
|
|
103
|
+
/** Name is the deleted branch name. */
|
|
104
|
+
"name": string;
|
|
105
|
+
}
|
|
106
|
+
/** PullRequestActionInput identifies an existing pull request. */
|
|
107
|
+
interface PullRequestActionInput {
|
|
108
|
+
/** Workspace is the Bitbucket workspace slug. */
|
|
109
|
+
"workspace": string;
|
|
110
|
+
/** Repository is the repository slug. */
|
|
111
|
+
"repository": string;
|
|
112
|
+
/** PullRequestID is the positive repository-local ID. */
|
|
113
|
+
"pullRequestId": SignedInteger;
|
|
114
|
+
}
|
|
115
|
+
/** PullRequestCommentContent is the Markdown source of a Bitbucket comment. */
|
|
116
|
+
interface PullRequestCommentContent {
|
|
117
|
+
/** Raw is the Markdown text. */
|
|
118
|
+
"raw": string;
|
|
119
|
+
}
|
|
120
|
+
/** PullRequestCommentResolution identifies a resolved comment state. */
|
|
121
|
+
interface PullRequestCommentResolution {
|
|
122
|
+
/** CreatedOn is the provider timestamp when the resolution was created. */
|
|
123
|
+
"created_on": string;
|
|
124
|
+
}
|
|
125
|
+
/** PullRequestComment is one repository-local pull request comment. */
|
|
126
|
+
interface PullRequestComment {
|
|
127
|
+
/** ID is the positive comment ID. */
|
|
128
|
+
"id": SignedInteger;
|
|
129
|
+
/** Content contains the provider's Markdown source. */
|
|
130
|
+
"content": PullRequestCommentContent;
|
|
131
|
+
/** Deleted reports whether Bitbucket has deleted the comment. */
|
|
132
|
+
"deleted": boolean;
|
|
133
|
+
/** Resolution is present when the comment thread is resolved. */
|
|
134
|
+
"resolution"?: PullRequestCommentResolution | undefined;
|
|
135
|
+
}
|
|
136
|
+
/** PullRequestCommentPage is one provider page of comments. */
|
|
137
|
+
interface PullRequestCommentPage {
|
|
138
|
+
/** Values contains the returned comments. */
|
|
139
|
+
"values": Array<PullRequestComment> | null;
|
|
140
|
+
/** Next is an untrusted provider pagination URL. */
|
|
141
|
+
"next": string;
|
|
142
|
+
/** Page is the one-based page number. */
|
|
143
|
+
"page": SignedInteger;
|
|
144
|
+
/** PageLength is the provider page length. */
|
|
145
|
+
"pagelen": SignedInteger;
|
|
146
|
+
}
|
|
147
|
+
/** PullRequestCommentIDInput identifies a comment in one pull request. */
|
|
148
|
+
interface PullRequestCommentIDInput {
|
|
149
|
+
/** Workspace is the Bitbucket workspace slug. */
|
|
150
|
+
"workspace": string;
|
|
151
|
+
/** Repository is the repository slug. */
|
|
152
|
+
"repository": string;
|
|
153
|
+
/** PullRequestID is the repository-local pull request ID. */
|
|
154
|
+
"pullRequestId": SignedInteger;
|
|
155
|
+
/** CommentID is the positive comment ID. */
|
|
156
|
+
"commentId": SignedInteger;
|
|
157
|
+
}
|
|
158
|
+
/** CreatePullRequestCommentInput supplies Markdown text for a new PR comment. */
|
|
159
|
+
interface CreatePullRequestCommentInput {
|
|
160
|
+
/** Workspace is the Bitbucket workspace slug. */
|
|
161
|
+
"workspace": string;
|
|
162
|
+
/** Repository is the repository slug. */
|
|
163
|
+
"repository": string;
|
|
164
|
+
/** PullRequestID is the repository-local pull request ID. */
|
|
165
|
+
"pullRequestId": SignedInteger;
|
|
166
|
+
/** Raw is the new comment's Markdown text. */
|
|
167
|
+
"raw": string;
|
|
168
|
+
}
|
|
169
|
+
/** UpdatePullRequestCommentInput replaces the Markdown text of one comment. */
|
|
170
|
+
interface UpdatePullRequestCommentInput {
|
|
171
|
+
/** Workspace is the Bitbucket workspace slug. */
|
|
172
|
+
"workspace": string;
|
|
173
|
+
/** Repository is the repository slug. */
|
|
174
|
+
"repository": string;
|
|
175
|
+
/** PullRequestID is the repository-local pull request ID. */
|
|
176
|
+
"pullRequestId": SignedInteger;
|
|
177
|
+
/** CommentID is the positive comment ID. */
|
|
178
|
+
"commentId": SignedInteger;
|
|
179
|
+
/** Raw is the complete replacement Markdown text. */
|
|
180
|
+
"raw": string;
|
|
181
|
+
}
|
|
182
|
+
/** DeletedPullRequestComment identifies a successfully deleted comment. */
|
|
183
|
+
interface DeletedPullRequestComment {
|
|
184
|
+
/** Workspace is the Bitbucket workspace slug. */
|
|
185
|
+
"workspace": string;
|
|
186
|
+
/** Repository is the repository slug. */
|
|
187
|
+
"repository": string;
|
|
188
|
+
/** PullRequestID is the repository-local pull request ID. */
|
|
189
|
+
"pullRequestId": SignedInteger;
|
|
190
|
+
/** CommentID is the deleted comment ID. */
|
|
191
|
+
"commentId": SignedInteger;
|
|
192
|
+
}
|
|
193
|
+
/** CreatePullRequestInput selects two branches of one repository. */
|
|
194
|
+
interface CreatePullRequestInput {
|
|
195
|
+
/** Workspace is the Bitbucket workspace slug. */
|
|
196
|
+
"workspace": string;
|
|
197
|
+
/** Repository is the repository slug. */
|
|
198
|
+
"repository": string;
|
|
199
|
+
/** Title is the new pull request title. */
|
|
200
|
+
"title": string;
|
|
201
|
+
/** SourceBranch is the source branch name. */
|
|
202
|
+
"sourceBranch": string;
|
|
203
|
+
/** DestinationBranch is the destination branch name. */
|
|
204
|
+
"destinationBranch": string;
|
|
205
|
+
}
|
|
206
|
+
/** PullRequest is a minimal Bitbucket pull request summary. */
|
|
207
|
+
interface PullRequest {
|
|
208
|
+
/** ID is the repository-local numeric pull request ID. */
|
|
209
|
+
"id": SignedInteger;
|
|
210
|
+
/** Title is the pull request title. */
|
|
211
|
+
"title": string;
|
|
212
|
+
/** State is the provider state such as OPEN. */
|
|
213
|
+
"state": string;
|
|
214
|
+
}
|
|
215
|
+
/** CreateRepositoryInput selects a stable slug, name, and visibility. */
|
|
216
|
+
interface CreateRepositoryInput {
|
|
217
|
+
/** Workspace is the owning Bitbucket workspace slug. */
|
|
218
|
+
"workspace": string;
|
|
219
|
+
/** Repository is the new repository slug. */
|
|
220
|
+
"repository": string;
|
|
221
|
+
/** Name is the display name, up to 255 bytes. */
|
|
222
|
+
"name": string;
|
|
223
|
+
/** IsPrivate selects private or public visibility; it must be supplied. */
|
|
224
|
+
"is_private": boolean | null;
|
|
225
|
+
}
|
|
226
|
+
/** Repository is a minimal Bitbucket repository summary. */
|
|
227
|
+
interface Repository {
|
|
228
|
+
/** UUID is the provider repository ID. */
|
|
229
|
+
"uuid": string;
|
|
230
|
+
/** Name is its display name. */
|
|
231
|
+
"name": string;
|
|
232
|
+
/** FullName combines workspace and repository slug. */
|
|
233
|
+
"full_name": string;
|
|
234
|
+
/** IsPrivate reports repository visibility. */
|
|
235
|
+
"is_private": boolean;
|
|
236
|
+
}
|
|
237
|
+
/** UpdateRepositoryInput replaces a repository name and visibility. */
|
|
238
|
+
interface UpdateRepositoryInput {
|
|
239
|
+
/** Workspace is the owning Bitbucket workspace slug. */
|
|
240
|
+
"workspace": string;
|
|
241
|
+
/** Repository is the repository slug. */
|
|
242
|
+
"repository": string;
|
|
243
|
+
/** Name is the complete replacement display name, up to 255 bytes. */
|
|
244
|
+
"name": string;
|
|
245
|
+
/** IsPrivate selects private or public visibility; it must be supplied. */
|
|
246
|
+
"is_private": boolean | null;
|
|
247
|
+
}
|
|
248
|
+
/** DeleteRepositoryInput identifies a repository to delete. */
|
|
249
|
+
interface DeleteRepositoryInput {
|
|
250
|
+
/** Workspace is the owning Bitbucket workspace slug. */
|
|
251
|
+
"workspace": string;
|
|
252
|
+
/** Repository is the repository slug. */
|
|
253
|
+
"repository": string;
|
|
254
|
+
}
|
|
255
|
+
/** DeletedRepository records the workspace and slug whose deletion succeeded. */
|
|
256
|
+
interface DeletedRepository {
|
|
257
|
+
/** Workspace is the owning Bitbucket workspace slug. */
|
|
258
|
+
"workspace": string;
|
|
259
|
+
/** Repository is the deleted repository slug. */
|
|
260
|
+
"repository": string;
|
|
261
|
+
}
|
|
262
|
+
/** GetRepositoryInput identifies one repository within a workspace. */
|
|
263
|
+
interface GetRepositoryInput {
|
|
264
|
+
/** Workspace is the Bitbucket workspace slug. */
|
|
265
|
+
"workspace": string;
|
|
266
|
+
/** Repository is the repository slug in that workspace. */
|
|
267
|
+
"repository": string;
|
|
268
|
+
}
|
|
269
|
+
/** GetPullRequestInput identifies one repository-local pull request. */
|
|
270
|
+
interface GetPullRequestInput {
|
|
271
|
+
/** Workspace is the Bitbucket workspace slug. */
|
|
272
|
+
"workspace": string;
|
|
273
|
+
/** Repository is the repository slug in that workspace. */
|
|
274
|
+
"repository": string;
|
|
275
|
+
/** PullRequestID is the positive numeric ID in that repository. */
|
|
276
|
+
"pullRequestId": SignedInteger;
|
|
277
|
+
}
|
|
278
|
+
/** UpdatePullRequestTitleInput selects a pull request and supplies its complete new title. */
|
|
279
|
+
interface UpdatePullRequestTitleInput {
|
|
280
|
+
/** Workspace is the Bitbucket workspace slug. */
|
|
281
|
+
"workspace": string;
|
|
282
|
+
/** Repository is the repository slug in that workspace. */
|
|
283
|
+
"repository": string;
|
|
284
|
+
/** PullRequestID is the positive numeric ID in that repository. */
|
|
285
|
+
"pullRequestId": SignedInteger;
|
|
286
|
+
/** Title is the full replacement title; blank is invalid. */
|
|
287
|
+
"title": string;
|
|
288
|
+
}
|
|
289
|
+
/** ListRepositoriesInput identifies the workspace whose repositories are read. */
|
|
290
|
+
interface ListRepositoriesInput {
|
|
291
|
+
/** Workspace is the Bitbucket workspace slug. */
|
|
292
|
+
"workspace": string;
|
|
293
|
+
}
|
|
294
|
+
/** RepositoryPage is one Bitbucket repository page. */
|
|
295
|
+
interface RepositoryPage {
|
|
296
|
+
/** Values contains repositories, possibly none. */
|
|
297
|
+
"values": Array<Repository> | null;
|
|
298
|
+
/** Next is the provider's next page URL, if any; applications must treat it as untrusted. */
|
|
299
|
+
"next": string;
|
|
300
|
+
/** Page is the one-based page number. */
|
|
301
|
+
"page": SignedInteger;
|
|
302
|
+
/** PageLength is the provider page length. */
|
|
303
|
+
"pagelen": SignedInteger;
|
|
304
|
+
}
|
|
305
|
+
/** ListPullRequestsInput identifies a repository within a workspace. */
|
|
306
|
+
interface ListPullRequestsInput {
|
|
307
|
+
/** Workspace is the Bitbucket workspace slug. */
|
|
308
|
+
"workspace": string;
|
|
309
|
+
/** Repository is the repository slug within the workspace. */
|
|
310
|
+
"repository": string;
|
|
311
|
+
}
|
|
312
|
+
/** PullRequestPage is one Bitbucket pull request page. */
|
|
313
|
+
interface PullRequestPage {
|
|
314
|
+
/** Values contains pull requests, possibly none. */
|
|
315
|
+
"values": Array<PullRequest> | null;
|
|
316
|
+
/** Next is the provider's next page URL, if any; applications must treat it as untrusted. */
|
|
317
|
+
"next": string;
|
|
318
|
+
/** Page is the one-based page number. */
|
|
319
|
+
"page": SignedInteger;
|
|
320
|
+
/** PageLength is the provider page length. */
|
|
321
|
+
"pagelen": SignedInteger;
|
|
322
|
+
}
|
|
323
|
+
/** Runtime validator for ListBranchesInput. */
|
|
324
|
+
declare const ListBranchesInputSchema: z.ZodObject<{
|
|
325
|
+
workspace: z.ZodString;
|
|
326
|
+
repository: z.ZodString;
|
|
327
|
+
}, z.core.$strict>;
|
|
328
|
+
/** Runtime validator for BranchTarget. */
|
|
329
|
+
declare const BranchTargetSchema: z.ZodObject<{
|
|
330
|
+
hash: z.ZodString;
|
|
331
|
+
}, z.core.$strict>;
|
|
332
|
+
/** Runtime validator for Branch. */
|
|
333
|
+
declare const BranchSchema: z.ZodObject<{
|
|
334
|
+
name: z.ZodString;
|
|
335
|
+
target: z.ZodObject<{
|
|
336
|
+
hash: z.ZodString;
|
|
337
|
+
}, z.core.$strict>;
|
|
338
|
+
}, z.core.$strict>;
|
|
339
|
+
/** Runtime validator for BranchPage. */
|
|
340
|
+
declare const BranchPageSchema: z.ZodObject<{
|
|
341
|
+
values: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
342
|
+
name: z.ZodString;
|
|
343
|
+
target: z.ZodObject<{
|
|
344
|
+
hash: z.ZodString;
|
|
345
|
+
}, z.core.$strict>;
|
|
346
|
+
}, z.core.$strict>>>;
|
|
347
|
+
next: z.ZodString;
|
|
348
|
+
page: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
|
|
349
|
+
rawJSON: string;
|
|
350
|
+
}>, unknown>>;
|
|
351
|
+
pagelen: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
|
|
352
|
+
rawJSON: string;
|
|
353
|
+
}>, unknown>>;
|
|
354
|
+
}, z.core.$strict>;
|
|
355
|
+
/** Runtime validator for BranchRefInput. */
|
|
356
|
+
declare const BranchRefInputSchema: z.ZodObject<{
|
|
357
|
+
workspace: z.ZodString;
|
|
358
|
+
repository: z.ZodString;
|
|
359
|
+
name: z.ZodString;
|
|
360
|
+
}, z.core.$strict>;
|
|
361
|
+
/** Runtime validator for CreateBranchInput. */
|
|
362
|
+
declare const CreateBranchInputSchema: z.ZodObject<{
|
|
363
|
+
workspace: z.ZodString;
|
|
364
|
+
repository: z.ZodString;
|
|
365
|
+
name: z.ZodString;
|
|
366
|
+
targetHash: z.ZodString;
|
|
367
|
+
}, z.core.$strict>;
|
|
368
|
+
/** Runtime validator for DeletedBranch. */
|
|
369
|
+
declare const DeletedBranchSchema: z.ZodObject<{
|
|
370
|
+
workspace: z.ZodString;
|
|
371
|
+
repository: z.ZodString;
|
|
372
|
+
name: z.ZodString;
|
|
373
|
+
}, z.core.$strict>;
|
|
374
|
+
/** Runtime validator for PullRequestActionInput. */
|
|
375
|
+
declare const PullRequestActionInputSchema: z.ZodObject<{
|
|
376
|
+
workspace: z.ZodString;
|
|
377
|
+
repository: z.ZodString;
|
|
378
|
+
pullRequestId: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
|
|
379
|
+
rawJSON: string;
|
|
380
|
+
}>, unknown>>;
|
|
381
|
+
}, z.core.$strict>;
|
|
382
|
+
/** Runtime validator for PullRequestCommentContent. */
|
|
383
|
+
declare const PullRequestCommentContentSchema: z.ZodObject<{
|
|
384
|
+
raw: z.ZodString;
|
|
385
|
+
}, z.core.$strict>;
|
|
386
|
+
/** Runtime validator for PullRequestCommentResolution. */
|
|
387
|
+
declare const PullRequestCommentResolutionSchema: z.ZodObject<{
|
|
388
|
+
created_on: z.ZodString;
|
|
389
|
+
}, z.core.$strict>;
|
|
390
|
+
/** Runtime validator for PullRequestComment. */
|
|
391
|
+
declare const PullRequestCommentSchema: z.ZodObject<{
|
|
392
|
+
id: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
|
|
393
|
+
rawJSON: string;
|
|
394
|
+
}>, unknown>>;
|
|
395
|
+
content: z.ZodObject<{
|
|
396
|
+
raw: z.ZodString;
|
|
397
|
+
}, z.core.$strict>;
|
|
398
|
+
deleted: z.ZodBoolean;
|
|
399
|
+
resolution: z.ZodOptional<z.ZodObject<{
|
|
400
|
+
created_on: z.ZodString;
|
|
401
|
+
}, z.core.$strict>>;
|
|
402
|
+
}, z.core.$strict>;
|
|
403
|
+
/** Runtime validator for PullRequestCommentPage. */
|
|
404
|
+
declare const PullRequestCommentPageSchema: z.ZodObject<{
|
|
405
|
+
values: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
406
|
+
id: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
|
|
407
|
+
rawJSON: string;
|
|
408
|
+
}>, unknown>>;
|
|
409
|
+
content: z.ZodObject<{
|
|
410
|
+
raw: z.ZodString;
|
|
411
|
+
}, z.core.$strict>;
|
|
412
|
+
deleted: z.ZodBoolean;
|
|
413
|
+
resolution: z.ZodOptional<z.ZodObject<{
|
|
414
|
+
created_on: z.ZodString;
|
|
415
|
+
}, z.core.$strict>>;
|
|
416
|
+
}, z.core.$strict>>>;
|
|
417
|
+
next: z.ZodString;
|
|
418
|
+
page: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
|
|
419
|
+
rawJSON: string;
|
|
420
|
+
}>, unknown>>;
|
|
421
|
+
pagelen: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
|
|
422
|
+
rawJSON: string;
|
|
423
|
+
}>, unknown>>;
|
|
424
|
+
}, z.core.$strict>;
|
|
425
|
+
/** Runtime validator for PullRequestCommentIDInput. */
|
|
426
|
+
declare const PullRequestCommentIDInputSchema: z.ZodObject<{
|
|
427
|
+
workspace: z.ZodString;
|
|
428
|
+
repository: z.ZodString;
|
|
429
|
+
pullRequestId: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
|
|
430
|
+
rawJSON: string;
|
|
431
|
+
}>, unknown>>;
|
|
432
|
+
commentId: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
|
|
433
|
+
rawJSON: string;
|
|
434
|
+
}>, unknown>>;
|
|
435
|
+
}, z.core.$strict>;
|
|
436
|
+
/** Runtime validator for CreatePullRequestCommentInput. */
|
|
437
|
+
declare const CreatePullRequestCommentInputSchema: z.ZodObject<{
|
|
438
|
+
workspace: z.ZodString;
|
|
439
|
+
repository: z.ZodString;
|
|
440
|
+
pullRequestId: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
|
|
441
|
+
rawJSON: string;
|
|
442
|
+
}>, unknown>>;
|
|
443
|
+
raw: z.ZodString;
|
|
444
|
+
}, z.core.$strict>;
|
|
445
|
+
/** Runtime validator for UpdatePullRequestCommentInput. */
|
|
446
|
+
declare const UpdatePullRequestCommentInputSchema: z.ZodObject<{
|
|
447
|
+
workspace: z.ZodString;
|
|
448
|
+
repository: z.ZodString;
|
|
449
|
+
pullRequestId: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
|
|
450
|
+
rawJSON: string;
|
|
451
|
+
}>, unknown>>;
|
|
452
|
+
commentId: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
|
|
453
|
+
rawJSON: string;
|
|
454
|
+
}>, unknown>>;
|
|
455
|
+
raw: z.ZodString;
|
|
456
|
+
}, z.core.$strict>;
|
|
457
|
+
/** Runtime validator for DeletedPullRequestComment. */
|
|
458
|
+
declare const DeletedPullRequestCommentSchema: z.ZodObject<{
|
|
459
|
+
workspace: z.ZodString;
|
|
460
|
+
repository: z.ZodString;
|
|
461
|
+
pullRequestId: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
|
|
462
|
+
rawJSON: string;
|
|
463
|
+
}>, unknown>>;
|
|
464
|
+
commentId: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
|
|
465
|
+
rawJSON: string;
|
|
466
|
+
}>, unknown>>;
|
|
467
|
+
}, z.core.$strict>;
|
|
468
|
+
/** Runtime validator for CreatePullRequestInput. */
|
|
469
|
+
declare const CreatePullRequestInputSchema: z.ZodObject<{
|
|
470
|
+
workspace: z.ZodString;
|
|
471
|
+
repository: z.ZodString;
|
|
472
|
+
title: z.ZodString;
|
|
473
|
+
sourceBranch: z.ZodString;
|
|
474
|
+
destinationBranch: z.ZodString;
|
|
475
|
+
}, z.core.$strict>;
|
|
476
|
+
/** Runtime validator for PullRequest. */
|
|
477
|
+
declare const PullRequestSchema: z.ZodObject<{
|
|
478
|
+
id: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
|
|
479
|
+
rawJSON: string;
|
|
480
|
+
}>, unknown>>;
|
|
481
|
+
title: z.ZodString;
|
|
482
|
+
state: z.ZodString;
|
|
483
|
+
}, z.core.$strict>;
|
|
484
|
+
/** Runtime validator for CreateRepositoryInput. */
|
|
485
|
+
declare const CreateRepositoryInputSchema: z.ZodObject<{
|
|
486
|
+
workspace: z.ZodString;
|
|
487
|
+
repository: z.ZodString;
|
|
488
|
+
name: z.ZodString;
|
|
489
|
+
is_private: z.ZodNullable<z.ZodBoolean>;
|
|
490
|
+
}, z.core.$strict>;
|
|
491
|
+
/** Runtime validator for Repository. */
|
|
492
|
+
declare const RepositorySchema: z.ZodObject<{
|
|
493
|
+
uuid: z.ZodString;
|
|
494
|
+
name: z.ZodString;
|
|
495
|
+
full_name: z.ZodString;
|
|
496
|
+
is_private: z.ZodBoolean;
|
|
497
|
+
}, z.core.$strict>;
|
|
498
|
+
/** Runtime validator for UpdateRepositoryInput. */
|
|
499
|
+
declare const UpdateRepositoryInputSchema: z.ZodObject<{
|
|
500
|
+
workspace: z.ZodString;
|
|
501
|
+
repository: z.ZodString;
|
|
502
|
+
name: z.ZodString;
|
|
503
|
+
is_private: z.ZodNullable<z.ZodBoolean>;
|
|
504
|
+
}, z.core.$strict>;
|
|
505
|
+
/** Runtime validator for DeleteRepositoryInput. */
|
|
506
|
+
declare const DeleteRepositoryInputSchema: z.ZodObject<{
|
|
507
|
+
workspace: z.ZodString;
|
|
508
|
+
repository: z.ZodString;
|
|
509
|
+
}, z.core.$strict>;
|
|
510
|
+
/** Runtime validator for DeletedRepository. */
|
|
511
|
+
declare const DeletedRepositorySchema: z.ZodObject<{
|
|
512
|
+
workspace: z.ZodString;
|
|
513
|
+
repository: z.ZodString;
|
|
514
|
+
}, z.core.$strict>;
|
|
515
|
+
/** Runtime validator for GetRepositoryInput. */
|
|
516
|
+
declare const GetRepositoryInputSchema: z.ZodObject<{
|
|
517
|
+
workspace: z.ZodString;
|
|
518
|
+
repository: z.ZodString;
|
|
519
|
+
}, z.core.$strict>;
|
|
520
|
+
/** Runtime validator for GetPullRequestInput. */
|
|
521
|
+
declare const GetPullRequestInputSchema: z.ZodObject<{
|
|
522
|
+
workspace: z.ZodString;
|
|
523
|
+
repository: z.ZodString;
|
|
524
|
+
pullRequestId: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
|
|
525
|
+
rawJSON: string;
|
|
526
|
+
}>, unknown>>;
|
|
527
|
+
}, z.core.$strict>;
|
|
528
|
+
/** Runtime validator for UpdatePullRequestTitleInput. */
|
|
529
|
+
declare const UpdatePullRequestTitleInputSchema: z.ZodObject<{
|
|
530
|
+
workspace: z.ZodString;
|
|
531
|
+
repository: z.ZodString;
|
|
532
|
+
pullRequestId: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
|
|
533
|
+
rawJSON: string;
|
|
534
|
+
}>, unknown>>;
|
|
535
|
+
title: z.ZodString;
|
|
536
|
+
}, z.core.$strict>;
|
|
537
|
+
/** Runtime validator for ListRepositoriesInput. */
|
|
538
|
+
declare const ListRepositoriesInputSchema: z.ZodObject<{
|
|
539
|
+
workspace: z.ZodString;
|
|
540
|
+
}, z.core.$strict>;
|
|
541
|
+
/** Runtime validator for RepositoryPage. */
|
|
542
|
+
declare const RepositoryPageSchema: z.ZodObject<{
|
|
543
|
+
values: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
544
|
+
uuid: z.ZodString;
|
|
545
|
+
name: z.ZodString;
|
|
546
|
+
full_name: z.ZodString;
|
|
547
|
+
is_private: z.ZodBoolean;
|
|
548
|
+
}, z.core.$strict>>>;
|
|
549
|
+
next: z.ZodString;
|
|
550
|
+
page: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
|
|
551
|
+
rawJSON: string;
|
|
552
|
+
}>, unknown>>;
|
|
553
|
+
pagelen: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
|
|
554
|
+
rawJSON: string;
|
|
555
|
+
}>, unknown>>;
|
|
556
|
+
}, z.core.$strict>;
|
|
557
|
+
/** Runtime validator for ListPullRequestsInput. */
|
|
558
|
+
declare const ListPullRequestsInputSchema: z.ZodObject<{
|
|
559
|
+
workspace: z.ZodString;
|
|
560
|
+
repository: z.ZodString;
|
|
561
|
+
}, z.core.$strict>;
|
|
562
|
+
/** Runtime validator for PullRequestPage. */
|
|
563
|
+
declare const PullRequestPageSchema: z.ZodObject<{
|
|
564
|
+
values: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
565
|
+
id: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
|
|
566
|
+
rawJSON: string;
|
|
567
|
+
}>, unknown>>;
|
|
568
|
+
title: z.ZodString;
|
|
569
|
+
state: z.ZodString;
|
|
570
|
+
}, z.core.$strict>>>;
|
|
571
|
+
next: z.ZodString;
|
|
572
|
+
page: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
|
|
573
|
+
rawJSON: string;
|
|
574
|
+
}>, unknown>>;
|
|
575
|
+
pagelen: z.ZodPipe<z.ZodUnknown, z.ZodTransform<number | Readonly<{
|
|
576
|
+
rawJSON: string;
|
|
577
|
+
}>, unknown>>;
|
|
578
|
+
}, z.core.$strict>;
|
|
579
|
+
|
|
580
|
+
/** Typed operations supplied by a client or mock. */
|
|
581
|
+
interface Operations {
|
|
582
|
+
/** Invoke listBranches through this connection. */
|
|
583
|
+
listBranches(): Query<ListBranchesInput, BranchPage>;
|
|
584
|
+
/** Invoke getBranch through this connection. */
|
|
585
|
+
getBranch(): Query<BranchRefInput, Branch>;
|
|
586
|
+
/** Invoke createBranch through this connection. */
|
|
587
|
+
createBranch(): Mutation<CreateBranchInput, Branch>;
|
|
588
|
+
/** Invoke deleteBranch through this connection. */
|
|
589
|
+
deleteBranch(): Mutation<BranchRefInput, DeletedBranch>;
|
|
590
|
+
/** Invoke listPullRequestComments through this connection. */
|
|
591
|
+
listPullRequestComments(): Query<PullRequestActionInput, PullRequestCommentPage>;
|
|
592
|
+
/** Invoke getPullRequestComment through this connection. */
|
|
593
|
+
getPullRequestComment(): Query<PullRequestCommentIDInput, PullRequestComment>;
|
|
594
|
+
/** Invoke createPullRequestComment through this connection. */
|
|
595
|
+
createPullRequestComment(): Mutation<CreatePullRequestCommentInput, PullRequestComment>;
|
|
596
|
+
/** Invoke updatePullRequestComment through this connection. */
|
|
597
|
+
updatePullRequestComment(): Mutation<UpdatePullRequestCommentInput, PullRequestComment>;
|
|
598
|
+
/** Invoke deletePullRequestComment through this connection. */
|
|
599
|
+
deletePullRequestComment(): Mutation<PullRequestCommentIDInput, DeletedPullRequestComment>;
|
|
600
|
+
/** Invoke resolvePullRequestComment through this connection. */
|
|
601
|
+
resolvePullRequestComment(): Mutation<PullRequestCommentIDInput, PullRequestComment>;
|
|
602
|
+
/** Invoke unresolvePullRequestComment through this connection. */
|
|
603
|
+
unresolvePullRequestComment(): Mutation<PullRequestCommentIDInput, PullRequestComment>;
|
|
604
|
+
/** Invoke createPullRequest through this connection. */
|
|
605
|
+
createPullRequest(): Mutation<CreatePullRequestInput, PullRequest>;
|
|
606
|
+
/** Invoke mergePullRequest through this connection. */
|
|
607
|
+
mergePullRequest(): Mutation<PullRequestActionInput, PullRequest>;
|
|
608
|
+
/** Invoke declinePullRequest through this connection. */
|
|
609
|
+
declinePullRequest(): Mutation<PullRequestActionInput, PullRequest>;
|
|
610
|
+
/** Invoke createRepository through this connection. */
|
|
611
|
+
createRepository(): Mutation<CreateRepositoryInput, Repository>;
|
|
612
|
+
/** Invoke updateRepository through this connection. */
|
|
613
|
+
updateRepository(): Mutation<UpdateRepositoryInput, Repository>;
|
|
614
|
+
/** Invoke deleteRepository through this connection. */
|
|
615
|
+
deleteRepository(): Mutation<DeleteRepositoryInput, DeletedRepository>;
|
|
616
|
+
/** Invoke getRepository through this connection. */
|
|
617
|
+
getRepository(): Query<GetRepositoryInput, Repository>;
|
|
618
|
+
/** Invoke getPullRequest through this connection. */
|
|
619
|
+
getPullRequest(): Query<GetPullRequestInput, PullRequest>;
|
|
620
|
+
/** Invoke updatePullRequestTitle through this connection. */
|
|
621
|
+
updatePullRequestTitle(): Mutation<UpdatePullRequestTitleInput, PullRequest>;
|
|
622
|
+
/** Invoke listRepositories through this connection. */
|
|
623
|
+
listRepositories(): Query<ListRepositoriesInput, RepositoryPage>;
|
|
624
|
+
/** Invoke listPullRequests through this connection. */
|
|
625
|
+
listPullRequests(): Query<ListPullRequestsInput, PullRequestPage>;
|
|
626
|
+
}
|
|
627
|
+
/** Named connector connection kept outside Flow state. */
|
|
628
|
+
declare class Connection<BoundOperations = Operations> {
|
|
629
|
+
/** Stable provider and connection name. */
|
|
630
|
+
readonly reference: ConnectionRef;
|
|
631
|
+
/** Bound provider operations. */
|
|
632
|
+
readonly operations: BoundOperations;
|
|
633
|
+
/** Validate a reference and bind operations. */
|
|
634
|
+
constructor(reference: ConnectionRef, operations: BoundOperations);
|
|
635
|
+
}
|
|
636
|
+
/** Bind a client to a named connection. */
|
|
637
|
+
declare function newConnection(client: Operations, reference: ConnectionRef): Connection;
|
|
638
|
+
/** Bind scripted operations to a named connection. */
|
|
639
|
+
declare function newConnectionWithOperations(operations: Operations, reference: ConnectionRef): Connection;
|
|
640
|
+
|
|
641
|
+
export { type PullRequestCommentContent as $, BranchTargetSchema as A, type Branch as B, type CreateBranchInput as C, type DeletedBranch as D, ConfigSchema as E, CreateBranchInputSchema as F, type GetPullRequestInput as G, CreatePullRequestCommentInputSchema as H, CreatePullRequestInputSchema as I, CreateRepositoryInputSchema as J, CredentialMaterialError as K, type ListBranchesInput as L, type CredentialSource as M, DeleteRepositoryInputSchema as N, type Operations as O, type PullRequestComment as P, DeletedBranchSchema as Q, type Repository as R, DeletedPullRequestCommentSchema as S, DeletedRepositorySchema as T, type UpdatePullRequestCommentInput as U, GetPullRequestInputSchema as V, GetRepositoryInputSchema as W, ListBranchesInputSchema as X, ListPullRequestsInputSchema as Y, ListRepositoriesInputSchema as Z, PullRequestActionInputSchema as _, Connection as a, PullRequestCommentContentSchema as a0, PullRequestCommentIDInputSchema as a1, PullRequestCommentPageSchema as a2, type PullRequestCommentResolution as a3, PullRequestCommentResolutionSchema as a4, PullRequestCommentSchema as a5, PullRequestPageSchema as a6, PullRequestSchema as a7, RepositoryPageSchema as a8, RepositorySchema as a9, type SignedInteger as aa, UpdatePullRequestCommentInputSchema as ab, UpdatePullRequestTitleInputSchema as ac, UpdateRepositoryInputSchema as ad, decodeCredentials as ae, decodeSignedInteger as af, exactIntegerJSONCodec as ag, isCredentialMaterialError as ah, newConnection as ai, newConnectionWithOperations as aj, parseExactIntegerJSON as ak, parseJSONNumberTokens as al, type CreatePullRequestCommentInput as b, type CreatePullRequestInput as c, type PullRequest as d, type CreateRepositoryInput as e, type PullRequestActionInput as f, type BranchRefInput as g, type PullRequestCommentIDInput as h, type DeletedPullRequestComment as i, type DeleteRepositoryInput as j, type DeletedRepository as k, type GetRepositoryInput as l, type BranchPage as m, type PullRequestCommentPage as n, type ListPullRequestsInput as o, type PullRequestPage as p, type ListRepositoriesInput as q, type RepositoryPage as r, type UpdatePullRequestTitleInput as s, type UpdateRepositoryInput as t, type Credentials as u, type Config as v, BranchPageSchema as w, BranchRefInputSchema as x, BranchSchema as y, type BranchTarget as z };
|