@superdurable/connector-linear 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.
@@ -0,0 +1,437 @@
1
+ import { A as AddCommentInput, a as AddCommentOutput, C as Connection, b as CreateIssueInput, c as CreateIssueOutput, F as FindUserByEmailInput, U as User, G as GetIssueInput, I as Issue, L as ListWorkflowStatesInput, d as ListWorkflowStatesOutput, S as SearchIssuesInput, e as SearchIssuesOutput, f as UpdateIssueInput, g as UpdateIssueOutput, h as CredentialSource, i as Config, j as Credentials, O as Operations } from './connection-CCTEpuH6.js';
2
+ export { k as AddCommentInputSchema, l as AddCommentOutputSchema, m as ConfigSchema, n as CreateIssueInputSchema, o as CreateIssueOutputSchema, p as CycleReference, q as CycleReferenceSchema, r as FindUserByEmailInputSchema, s as GetIssueInputSchema, t as IssueLabel, u as IssueLabelSchema, v as IssueReference, w as IssueReferenceSchema, x as IssueSchema, y as IssueSearchFilter, z as IssueSearchFilterSchema, B as IssueSummary, D as IssueSummarySchema, E as ListWorkflowStatesInputSchema, H as ListWorkflowStatesOutputSchema, P as ProjectReference, J as ProjectReferenceSchema, K as SearchIssuesInputSchema, M as SearchIssuesOutputSchema, T as TeamReference, N as TeamReferenceSchema, Q as UpdateIssueInputSchema, R as UpdateIssueOutputSchema, V as UserReference, W as UserReferenceSchema, X as UserSchema, Y as WorkflowState, Z as WorkflowStateReference, _ as WorkflowStateReferenceSchema, $ as WorkflowStateSchema, a0 as decodeCredentials, a1 as decodeSharedCredentials, a2 as newConnection, a3 as newConnectionWithOperations } from './connection-CCTEpuH6.js';
3
+ import * as _superdurable_connectors_sdk from '@superdurable/connectors-sdk';
4
+ import { MutationDefinition, QueryDefinition, MutationStepConfig, Mutation, MutationResult, QueryStepConfig, Query, QueryResult, MutationStep, QueryStep, Call, QueryAttempt, MutationAttempt, Failure, ReceiptDraft } from '@superdurable/connectors-sdk';
5
+ import { StepTarget } from '@superdurable/dex';
6
+ import { LoadedProject } from '@superdurable/connectors-sdk/projectconfig';
7
+ import { ProviderRequest, ProviderResponse } from '@superdurable/connectors-sdk/providerhttp';
8
+ import 'zod';
9
+
10
+ /** Stable connector identity. */
11
+ declare const ConnectorID = "linear";
12
+ /** Provider identity for named connections. */
13
+ declare const ProviderID = "linear";
14
+ /** Branch IDs for searchIssues. */
15
+ declare const SearchIssuesBranch: {
16
+ readonly Searched: "searched";
17
+ readonly ProviderRejected: "providerRejected";
18
+ readonly InvalidResponse: "invalidResponse";
19
+ readonly Defect: "defect";
20
+ };
21
+ /** One page of matching issue summaries was read; it can be empty. */
22
+ declare const SearchIssuesBranchSearched: "searched";
23
+ /** Linear conclusively rejected the search, such as an invalid cursor, missing team access, or a rejected credential. */
24
+ declare const SearchIssuesBranchProviderRejected: "providerRejected";
25
+ /** Linear returned an invalid or oversized page of issues. */
26
+ declare const SearchIssuesBranchInvalidResponse: "invalidResponse";
27
+ /** Local input, connection configuration, or connector definition is invalid. */
28
+ declare const SearchIssuesBranchDefect: "defect";
29
+ /** Manifest definition for searchIssues. */
30
+ declare const SearchIssuesDefinition: QueryDefinition;
31
+ /** Manifest metadata for searchIssues. */
32
+ declare const SearchIssuesMetadata: {
33
+ readonly kind: "query";
34
+ readonly idempotency: "none";
35
+ readonly authorization: "required";
36
+ };
37
+ /** Branch IDs for getIssue. */
38
+ declare const GetIssueBranch: {
39
+ readonly Found: "found";
40
+ readonly NotFound: "notFound";
41
+ readonly ProviderRejected: "providerRejected";
42
+ readonly InvalidResponse: "invalidResponse";
43
+ readonly Defect: "defect";
44
+ };
45
+ /** The issue was read. */
46
+ declare const GetIssueBranchFound: "found";
47
+ /** The issue does not exist, was deleted, or the connection cannot see its team. */
48
+ declare const GetIssueBranchNotFound: "notFound";
49
+ /** Linear conclusively rejected the issue read. */
50
+ declare const GetIssueBranchProviderRejected: "providerRejected";
51
+ /** Linear returned an invalid or oversized issue. */
52
+ declare const GetIssueBranchInvalidResponse: "invalidResponse";
53
+ /** Local input, connection configuration, or connector definition is invalid. */
54
+ declare const GetIssueBranchDefect: "defect";
55
+ /** Manifest definition for getIssue. */
56
+ declare const GetIssueDefinition: QueryDefinition;
57
+ /** Manifest metadata for getIssue. */
58
+ declare const GetIssueMetadata: {
59
+ readonly kind: "query";
60
+ readonly idempotency: "none";
61
+ readonly authorization: "required";
62
+ };
63
+ /** Branch IDs for createIssue. */
64
+ declare const CreateIssueBranch: {
65
+ readonly Created: "created";
66
+ readonly ProviderRejected: "providerRejected";
67
+ readonly Defect: "defect";
68
+ };
69
+ /** Linear created the issue, or an earlier attempt of this Step already had, and the issue was read. */
70
+ declare const CreateIssueBranchCreated: "created";
71
+ /** Linear conclusively rejected the issue, such as an unknown team, a workflow state or label of another team, or missing permission; unless Linear rejected the credential or permission, a read-back by the Step's UUID found no issue. */
72
+ declare const CreateIssueBranchProviderRejected: "providerRejected";
73
+ /** Local input, connection configuration, or connector definition is invalid. */
74
+ declare const CreateIssueBranchDefect: "defect";
75
+ /** Manifest definition for createIssue. */
76
+ declare const CreateIssueDefinition: MutationDefinition;
77
+ /** Manifest metadata for createIssue. */
78
+ declare const CreateIssueMetadata: {
79
+ readonly kind: "mutation";
80
+ readonly idempotency: "required";
81
+ readonly authorization: "required";
82
+ };
83
+ /** Branch IDs for updateIssue. */
84
+ declare const UpdateIssueBranch: {
85
+ readonly Updated: "updated";
86
+ readonly NotFound: "notFound";
87
+ readonly ProviderRejected: "providerRejected";
88
+ readonly InvalidResponse: "invalidResponse";
89
+ readonly Defect: "defect";
90
+ };
91
+ /** Linear applied the change and returned the issue. */
92
+ declare const UpdateIssueBranchUpdated: "updated";
93
+ /** The issue does not exist, was deleted, or the connection cannot see its team; nothing was changed. */
94
+ declare const UpdateIssueBranchNotFound: "notFound";
95
+ /** Linear conclusively rejected the change, such as a workflow state or label of another team, an unknown assignee, or missing permission. */
96
+ declare const UpdateIssueBranchProviderRejected: "providerRejected";
97
+ /** Linear returned an invalid or oversized issue, so the change may have been applied; repeating the Step is safe. */
98
+ declare const UpdateIssueBranchInvalidResponse: "invalidResponse";
99
+ /** Local input, connection configuration, or connector definition is invalid. */
100
+ declare const UpdateIssueBranchDefect: "defect";
101
+ /** Manifest definition for updateIssue. */
102
+ declare const UpdateIssueDefinition: MutationDefinition;
103
+ /** Manifest metadata for updateIssue. */
104
+ declare const UpdateIssueMetadata: {
105
+ readonly kind: "mutation";
106
+ readonly idempotency: "required";
107
+ readonly authorization: "required";
108
+ };
109
+ /** Branch IDs for addComment. */
110
+ declare const AddCommentBranch: {
111
+ readonly Added: "added";
112
+ readonly NotFound: "notFound";
113
+ readonly ProviderRejected: "providerRejected";
114
+ readonly Defect: "defect";
115
+ };
116
+ /** Linear added the comment, or an earlier attempt of this Step already had, and the comment was read. */
117
+ declare const AddCommentBranchAdded: "added";
118
+ /** The issue does not exist, was deleted, or the connection cannot see its team; nothing was added. */
119
+ declare const AddCommentBranchNotFound: "notFound";
120
+ /** Linear conclusively rejected the comment, such as missing permission; unless Linear rejected the credential or permission, a read-back by the Step's UUID found no comment. */
121
+ declare const AddCommentBranchProviderRejected: "providerRejected";
122
+ /** Local input, connection configuration, or connector definition is invalid. */
123
+ declare const AddCommentBranchDefect: "defect";
124
+ /** Manifest definition for addComment. */
125
+ declare const AddCommentDefinition: MutationDefinition;
126
+ /** Manifest metadata for addComment. */
127
+ declare const AddCommentMetadata: {
128
+ readonly kind: "mutation";
129
+ readonly idempotency: "required";
130
+ readonly authorization: "required";
131
+ };
132
+ /** Branch IDs for findUserByEmail. */
133
+ declare const FindUserByEmailBranch: {
134
+ readonly Found: "found";
135
+ readonly NotFound: "notFound";
136
+ readonly ProviderRejected: "providerRejected";
137
+ readonly InvalidResponse: "invalidResponse";
138
+ readonly Defect: "defect";
139
+ };
140
+ /** The user was found. */
141
+ declare const FindUserByEmailBranchFound: "found";
142
+ /** No user of the workspace has the email, or the user is disabled and disabled users were not requested. */
143
+ declare const FindUserByEmailBranchNotFound: "notFound";
144
+ /** Linear conclusively rejected the user lookup. */
145
+ declare const FindUserByEmailBranchProviderRejected: "providerRejected";
146
+ /** Linear returned an invalid or oversized user list. */
147
+ declare const FindUserByEmailBranchInvalidResponse: "invalidResponse";
148
+ /** Local input, connection configuration, or connector definition is invalid. */
149
+ declare const FindUserByEmailBranchDefect: "defect";
150
+ /** Manifest definition for findUserByEmail. */
151
+ declare const FindUserByEmailDefinition: QueryDefinition;
152
+ /** Manifest metadata for findUserByEmail. */
153
+ declare const FindUserByEmailMetadata: {
154
+ readonly kind: "query";
155
+ readonly idempotency: "none";
156
+ readonly authorization: "required";
157
+ };
158
+ /** Branch IDs for listWorkflowStates. */
159
+ declare const ListWorkflowStatesBranch: {
160
+ readonly Listed: "listed";
161
+ readonly NotFound: "notFound";
162
+ readonly ProviderRejected: "providerRejected";
163
+ readonly InvalidResponse: "invalidResponse";
164
+ readonly Defect: "defect";
165
+ };
166
+ /** The team's workflow states were read. */
167
+ declare const ListWorkflowStatesBranchListed: "listed";
168
+ /** The team does not exist or the connection cannot see it. */
169
+ declare const ListWorkflowStatesBranchNotFound: "notFound";
170
+ /** Linear conclusively rejected the read. */
171
+ declare const ListWorkflowStatesBranchProviderRejected: "providerRejected";
172
+ /** Linear returned an invalid or oversized list of workflow states. */
173
+ declare const ListWorkflowStatesBranchInvalidResponse: "invalidResponse";
174
+ /** Local input, connection configuration, or connector definition is invalid. */
175
+ declare const ListWorkflowStatesBranchDefect: "defect";
176
+ /** Manifest definition for listWorkflowStates. */
177
+ declare const ListWorkflowStatesDefinition: QueryDefinition;
178
+ /** Manifest metadata for listWorkflowStates. */
179
+ declare const ListWorkflowStatesMetadata: {
180
+ readonly kind: "query";
181
+ readonly idempotency: "none";
182
+ readonly authorization: "required";
183
+ };
184
+
185
+ /** Configuration for the searchIssues connector Step. */
186
+ interface SearchIssuesStepConfig<StepInput, OperationInput = SearchIssuesInput, OperationOutput = SearchIssuesOutput> extends Omit<QueryStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
187
+ /** Named connection supplying this operation. */
188
+ connection: Connection<{
189
+ searchIssues(): Query<OperationInput, OperationOutput>;
190
+ }>;
191
+ /** Name matching the bound connection. */
192
+ connectionName: string;
193
+ /** One page of matching issue summaries was read; it can be empty. */
194
+ searched: StepTarget<QueryResult<OperationOutput>>;
195
+ /** Linear conclusively rejected the search, such as an invalid cursor, missing team access, or a rejected credential. */
196
+ providerRejected?: StepTarget<QueryResult<OperationOutput>>;
197
+ /** Linear returned an invalid or oversized page of issues. */
198
+ invalidResponse?: StepTarget<QueryResult<OperationOutput>>;
199
+ /** Local input, connection configuration, or connector definition is invalid. */
200
+ defect?: StepTarget<QueryResult<OperationOutput>>;
201
+ }
202
+ /** Build the searchIssues Step from a named connection. */
203
+ declare function newSearchIssuesStep<StepInput, OperationInput = SearchIssuesInput, OperationOutput = SearchIssuesOutput>(configuration: SearchIssuesStepConfig<StepInput, OperationInput, OperationOutput>): QueryStep<StepInput, OperationInput, OperationOutput>;
204
+ /** Configuration for the getIssue connector Step. */
205
+ interface GetIssueStepConfig<StepInput, OperationInput = GetIssueInput, OperationOutput = Issue> extends Omit<QueryStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
206
+ /** Named connection supplying this operation. */
207
+ connection: Connection<{
208
+ getIssue(): Query<OperationInput, OperationOutput>;
209
+ }>;
210
+ /** Name matching the bound connection. */
211
+ connectionName: string;
212
+ /** The issue was read. */
213
+ found: StepTarget<QueryResult<OperationOutput>>;
214
+ /** The issue does not exist, was deleted, or the connection cannot see its team. */
215
+ notFound?: StepTarget<QueryResult<OperationOutput>>;
216
+ /** Linear conclusively rejected the issue read. */
217
+ providerRejected?: StepTarget<QueryResult<OperationOutput>>;
218
+ /** Linear returned an invalid or oversized issue. */
219
+ invalidResponse?: StepTarget<QueryResult<OperationOutput>>;
220
+ /** Local input, connection configuration, or connector definition is invalid. */
221
+ defect?: StepTarget<QueryResult<OperationOutput>>;
222
+ }
223
+ /** Build the getIssue Step from a named connection. */
224
+ declare function newGetIssueStep<StepInput, OperationInput = GetIssueInput, OperationOutput = Issue>(configuration: GetIssueStepConfig<StepInput, OperationInput, OperationOutput>): QueryStep<StepInput, OperationInput, OperationOutput>;
225
+ /** Configuration for the createIssue connector Step. */
226
+ interface CreateIssueStepConfig<StepInput, OperationInput = CreateIssueInput, OperationOutput = CreateIssueOutput> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
227
+ /** Named connection supplying this operation. */
228
+ connection: Connection<{
229
+ createIssue(): Mutation<OperationInput, OperationOutput>;
230
+ }>;
231
+ /** Name matching the bound connection. */
232
+ connectionName: string;
233
+ /** Linear created the issue, or an earlier attempt of this Step already had, and the issue was read. */
234
+ created: StepTarget<MutationResult<OperationOutput>>;
235
+ /** Linear conclusively rejected the issue, such as an unknown team, a workflow state or label of another team, or missing permission; unless Linear rejected the credential or permission, a read-back by the Step's UUID found no issue. */
236
+ providerRejected?: StepTarget<MutationResult<OperationOutput>>;
237
+ /** Local input, connection configuration, or connector definition is invalid. */
238
+ defect?: StepTarget<MutationResult<OperationOutput>>;
239
+ }
240
+ /** Build the createIssue Step from a named connection. */
241
+ declare function newCreateIssueStep<StepInput, OperationInput = CreateIssueInput, OperationOutput = CreateIssueOutput>(configuration: CreateIssueStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
242
+ /** Configuration for the updateIssue connector Step. */
243
+ interface UpdateIssueStepConfig<StepInput, OperationInput = UpdateIssueInput, OperationOutput = UpdateIssueOutput> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
244
+ /** Named connection supplying this operation. */
245
+ connection: Connection<{
246
+ updateIssue(): Mutation<OperationInput, OperationOutput>;
247
+ }>;
248
+ /** Name matching the bound connection. */
249
+ connectionName: string;
250
+ /** Linear applied the change and returned the issue. */
251
+ updated: StepTarget<MutationResult<OperationOutput>>;
252
+ /** The issue does not exist, was deleted, or the connection cannot see its team; nothing was changed. */
253
+ notFound?: StepTarget<MutationResult<OperationOutput>>;
254
+ /** Linear conclusively rejected the change, such as a workflow state or label of another team, an unknown assignee, or missing permission. */
255
+ providerRejected?: StepTarget<MutationResult<OperationOutput>>;
256
+ /** Linear returned an invalid or oversized issue, so the change may have been applied; repeating the Step is safe. */
257
+ invalidResponse?: StepTarget<MutationResult<OperationOutput>>;
258
+ /** Local input, connection configuration, or connector definition is invalid. */
259
+ defect?: StepTarget<MutationResult<OperationOutput>>;
260
+ }
261
+ /** Build the updateIssue Step from a named connection. */
262
+ declare function newUpdateIssueStep<StepInput, OperationInput = UpdateIssueInput, OperationOutput = UpdateIssueOutput>(configuration: UpdateIssueStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
263
+ /** Configuration for the addComment connector Step. */
264
+ interface AddCommentStepConfig<StepInput, OperationInput = AddCommentInput, OperationOutput = AddCommentOutput> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
265
+ /** Named connection supplying this operation. */
266
+ connection: Connection<{
267
+ addComment(): Mutation<OperationInput, OperationOutput>;
268
+ }>;
269
+ /** Name matching the bound connection. */
270
+ connectionName: string;
271
+ /** Linear added the comment, or an earlier attempt of this Step already had, and the comment was read. */
272
+ added: StepTarget<MutationResult<OperationOutput>>;
273
+ /** The issue does not exist, was deleted, or the connection cannot see its team; nothing was added. */
274
+ notFound?: StepTarget<MutationResult<OperationOutput>>;
275
+ /** Linear conclusively rejected the comment, such as missing permission; unless Linear rejected the credential or permission, a read-back by the Step's UUID found no comment. */
276
+ providerRejected?: StepTarget<MutationResult<OperationOutput>>;
277
+ /** Local input, connection configuration, or connector definition is invalid. */
278
+ defect?: StepTarget<MutationResult<OperationOutput>>;
279
+ }
280
+ /** Build the addComment Step from a named connection. */
281
+ declare function newAddCommentStep<StepInput, OperationInput = AddCommentInput, OperationOutput = AddCommentOutput>(configuration: AddCommentStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
282
+ /** Configuration for the findUserByEmail connector Step. */
283
+ interface FindUserByEmailStepConfig<StepInput, OperationInput = FindUserByEmailInput, OperationOutput = User> extends Omit<QueryStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
284
+ /** Named connection supplying this operation. */
285
+ connection: Connection<{
286
+ findUserByEmail(): Query<OperationInput, OperationOutput>;
287
+ }>;
288
+ /** Name matching the bound connection. */
289
+ connectionName: string;
290
+ /** The user was found. */
291
+ found: StepTarget<QueryResult<OperationOutput>>;
292
+ /** No user of the workspace has the email, or the user is disabled and disabled users were not requested. */
293
+ notFound?: StepTarget<QueryResult<OperationOutput>>;
294
+ /** Linear conclusively rejected the user lookup. */
295
+ providerRejected?: StepTarget<QueryResult<OperationOutput>>;
296
+ /** Linear returned an invalid or oversized user list. */
297
+ invalidResponse?: StepTarget<QueryResult<OperationOutput>>;
298
+ /** Local input, connection configuration, or connector definition is invalid. */
299
+ defect?: StepTarget<QueryResult<OperationOutput>>;
300
+ }
301
+ /** Build the findUserByEmail Step from a named connection. */
302
+ declare function newFindUserByEmailStep<StepInput, OperationInput = FindUserByEmailInput, OperationOutput = User>(configuration: FindUserByEmailStepConfig<StepInput, OperationInput, OperationOutput>): QueryStep<StepInput, OperationInput, OperationOutput>;
303
+ /** Configuration for the listWorkflowStates connector Step. */
304
+ interface ListWorkflowStatesStepConfig<StepInput, OperationInput = ListWorkflowStatesInput, OperationOutput = ListWorkflowStatesOutput> extends Omit<QueryStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
305
+ /** Named connection supplying this operation. */
306
+ connection: Connection<{
307
+ listWorkflowStates(): Query<OperationInput, OperationOutput>;
308
+ }>;
309
+ /** Name matching the bound connection. */
310
+ connectionName: string;
311
+ /** The team's workflow states were read. */
312
+ listed: StepTarget<QueryResult<OperationOutput>>;
313
+ /** The team does not exist or the connection cannot see it. */
314
+ notFound?: StepTarget<QueryResult<OperationOutput>>;
315
+ /** Linear conclusively rejected the read. */
316
+ providerRejected?: StepTarget<QueryResult<OperationOutput>>;
317
+ /** Linear returned an invalid or oversized list of workflow states. */
318
+ invalidResponse?: StepTarget<QueryResult<OperationOutput>>;
319
+ /** Local input, connection configuration, or connector definition is invalid. */
320
+ defect?: StepTarget<QueryResult<OperationOutput>>;
321
+ }
322
+ /** Build the listWorkflowStates Step from a named connection. */
323
+ declare function newListWorkflowStatesStep<StepInput, OperationInput = ListWorkflowStatesInput, OperationOutput = ListWorkflowStatesOutput>(configuration: ListWorkflowStatesStepConfig<StepInput, OperationInput, OperationOutput>): QueryStep<StepInput, OperationInput, OperationOutput>;
324
+
325
+ /** Search one bounded Linear issue page. */
326
+ declare class SearchIssuesOperation implements Query<SearchIssuesInput, SearchIssuesOutput> {
327
+ private readonly client;
328
+ /** Bind the Linear client. */ constructor(client: LinearClient);
329
+ /** Return the manifest definition. */ definition(): _superdurable_connectors_sdk.QueryDefinition;
330
+ /** Validate and execute one page request. */
331
+ invoke(call: Call, input: SearchIssuesInput): Promise<QueryAttempt<SearchIssuesOutput>>;
332
+ }
333
+ /** Read one Linear issue. */
334
+ declare class GetIssueOperation implements Query<GetIssueInput, Issue> {
335
+ private readonly client;
336
+ /** Bind the Linear client. */ constructor(client: LinearClient);
337
+ /** Return the manifest definition. */ definition(): _superdurable_connectors_sdk.QueryDefinition;
338
+ /** Validate and execute one issue request. */
339
+ invoke(call: Call, input: GetIssueInput): Promise<QueryAttempt<Issue>>;
340
+ }
341
+ /** Find one Linear user by email. */
342
+ declare class FindUserByEmailOperation implements Query<FindUserByEmailInput, User> {
343
+ private readonly client;
344
+ /** Bind the Linear client. */ constructor(client: LinearClient);
345
+ /** Return the manifest definition. */ definition(): _superdurable_connectors_sdk.QueryDefinition;
346
+ /** Validate and execute the user lookup. */
347
+ invoke(call: Call, input: FindUserByEmailInput): Promise<QueryAttempt<User>>;
348
+ }
349
+ /** List one team's workflow states. */
350
+ declare class ListWorkflowStatesOperation implements Query<ListWorkflowStatesInput, ListWorkflowStatesOutput> {
351
+ private readonly client;
352
+ /** Bind the Linear client. */ constructor(client: LinearClient);
353
+ /** Return the manifest definition. */ definition(): _superdurable_connectors_sdk.QueryDefinition;
354
+ /** Validate and execute one team state request. */
355
+ invoke(call: Call, input: ListWorkflowStatesInput): Promise<QueryAttempt<ListWorkflowStatesOutput>>;
356
+ }
357
+ /** Create a Linear issue under a stable client supplied UUID. */
358
+ declare class CreateIssueOperation implements Mutation<CreateIssueInput, CreateIssueOutput> {
359
+ private readonly client;
360
+ /** Bind the Linear client. */ constructor(client: LinearClient);
361
+ /** Return the manifest definition. */ definition(): _superdurable_connectors_sdk.QueryDefinition;
362
+ /** Reuse the Dex Call ID for every attempt. */ idempotencyKey(callId: string): string;
363
+ /** Send and read back one idempotent create. */
364
+ invoke(call: Call, input: CreateIssueInput): Promise<MutationAttempt<CreateIssueOutput>>;
365
+ }
366
+ /** Update absolute issue fields and label sets. */
367
+ declare class UpdateIssueOperation implements Mutation<UpdateIssueInput, UpdateIssueOutput> {
368
+ private readonly client;
369
+ /** Bind the Linear client. */ constructor(client: LinearClient);
370
+ /** Return the manifest definition. */ definition(): _superdurable_connectors_sdk.QueryDefinition;
371
+ /** Reuse the Dex Call ID for every attempt. */ idempotencyKey(callId: string): string;
372
+ /** Send one repeat safe update. */
373
+ invoke(call: Call, input: UpdateIssueInput): Promise<MutationAttempt<UpdateIssueOutput>>;
374
+ }
375
+ /** Add a comment under a stable client supplied UUID. */
376
+ declare class AddCommentOperation implements Mutation<AddCommentInput, AddCommentOutput> {
377
+ private readonly client;
378
+ /** Bind the Linear client. */ constructor(client: LinearClient);
379
+ /** Return the manifest definition. */ definition(): _superdurable_connectors_sdk.QueryDefinition;
380
+ /** Reuse the Dex Call ID for every attempt. */ idempotencyKey(callId: string): string;
381
+ /** Send and read back one idempotent comment. */
382
+ invoke(call: Call, input: AddCommentInput): Promise<MutationAttempt<AddCommentOutput>>;
383
+ }
384
+
385
+ /** Replace the transport and clock for deterministic provider tests. */
386
+ interface LinearClientOptions {
387
+ /** Alternate GraphQL endpoint for a provider stand-in. */
388
+ endpoint?: string;
389
+ /** Sender; production uses the SDK's bounded provider transport. */
390
+ send?: (request: ProviderRequest) => Promise<ProviderResponse>;
391
+ /** Clock for receipts and Retry-After. */
392
+ now?: () => Date;
393
+ }
394
+ /** One classified GraphQL exchange. */
395
+ interface LinearExchange {
396
+ disposition: 'succeeded' | 'retry' | 'rejected' | 'invalid' | 'defect';
397
+ data?: Record<string, unknown>;
398
+ status: number;
399
+ requestId: string;
400
+ failure?: Failure;
401
+ retryAfterMs: number;
402
+ }
403
+ /** Authenticated Linear GraphQL client with generated OAuth refresh rules. */
404
+ declare class LinearClient {
405
+ readonly credentials: CredentialSource;
406
+ private readonly endpoint;
407
+ private readonly maxResponseBytes;
408
+ private readonly send;
409
+ private readonly now;
410
+ private readonly refreshDriver;
411
+ /** Validate configuration and bind a renewable credential source. */
412
+ constructor(config: Config, credentials: CredentialSource, options?: LinearClientOptions);
413
+ /** Bind the search query. */ searchIssues(): SearchIssuesOperation;
414
+ /** Bind the issue query. */ getIssue(): GetIssueOperation;
415
+ /** Bind the create mutation. */ createIssue(): CreateIssueOperation;
416
+ /** Bind the update mutation. */ updateIssue(): UpdateIssueOperation;
417
+ /** Bind the comment mutation. */ addComment(): AddCommentOperation;
418
+ /** Bind the user query. */ findUserByEmail(): FindUserByEmailOperation;
419
+ /** Bind the workflow state query. */ listWorkflowStates(): ListWorkflowStatesOperation;
420
+ /** Return a secret-free correlation receipt. */
421
+ receipt(call: Call, exchange: LinearExchange, objectId?: string): ReceiptDraft;
422
+ /** Resolve credentials once for an operation and classify host failures. */
423
+ open(call: Call, operation: string): Promise<{
424
+ credentials: Credentials;
425
+ } | {
426
+ failed: LinearExchange;
427
+ }>;
428
+ /** Send one named GraphQL request, then refresh and resend a rejected OAuth token once. */
429
+ exchange(call: Call, operation: string, credentials: Credentials, operationName: string, query: string, variables: Record<string, unknown>): Promise<LinearExchange>;
430
+ private sendOnce;
431
+ private failed;
432
+ }
433
+
434
+ /** Open a named Linear connection with generated private and shared credential decoders. */
435
+ declare function newProjectConnection(project: LoadedProject, connectionName: string, options?: LinearClientOptions): Connection<Operations>;
436
+
437
+ export { AddCommentBranch, AddCommentBranchAdded, AddCommentBranchDefect, AddCommentBranchNotFound, AddCommentBranchProviderRejected, AddCommentDefinition, AddCommentInput, AddCommentMetadata, AddCommentOperation, AddCommentOutput, type AddCommentStepConfig, Config, Connection, ConnectorID, CreateIssueBranch, CreateIssueBranchCreated, CreateIssueBranchDefect, CreateIssueBranchProviderRejected, CreateIssueDefinition, CreateIssueInput, CreateIssueMetadata, CreateIssueOperation, CreateIssueOutput, type CreateIssueStepConfig, CredentialSource, Credentials, FindUserByEmailBranch, FindUserByEmailBranchDefect, FindUserByEmailBranchFound, FindUserByEmailBranchInvalidResponse, FindUserByEmailBranchNotFound, FindUserByEmailBranchProviderRejected, FindUserByEmailDefinition, FindUserByEmailInput, FindUserByEmailMetadata, FindUserByEmailOperation, type FindUserByEmailStepConfig, GetIssueBranch, GetIssueBranchDefect, GetIssueBranchFound, GetIssueBranchInvalidResponse, GetIssueBranchNotFound, GetIssueBranchProviderRejected, GetIssueDefinition, GetIssueInput, GetIssueMetadata, GetIssueOperation, type GetIssueStepConfig, Issue, LinearClient, type LinearClientOptions, ListWorkflowStatesBranch, ListWorkflowStatesBranchDefect, ListWorkflowStatesBranchInvalidResponse, ListWorkflowStatesBranchListed, ListWorkflowStatesBranchNotFound, ListWorkflowStatesBranchProviderRejected, ListWorkflowStatesDefinition, ListWorkflowStatesInput, ListWorkflowStatesMetadata, ListWorkflowStatesOperation, ListWorkflowStatesOutput, type ListWorkflowStatesStepConfig, ProviderID, SearchIssuesBranch, SearchIssuesBranchDefect, SearchIssuesBranchInvalidResponse, SearchIssuesBranchProviderRejected, SearchIssuesBranchSearched, SearchIssuesDefinition, SearchIssuesInput, SearchIssuesMetadata, SearchIssuesOperation, SearchIssuesOutput, type SearchIssuesStepConfig, UpdateIssueBranch, UpdateIssueBranchDefect, UpdateIssueBranchInvalidResponse, UpdateIssueBranchNotFound, UpdateIssueBranchProviderRejected, UpdateIssueBranchUpdated, UpdateIssueDefinition, UpdateIssueInput, UpdateIssueMetadata, UpdateIssueOperation, UpdateIssueOutput, type UpdateIssueStepConfig, User, newAddCommentStep, newCreateIssueStep, newFindUserByEmailStep, newGetIssueStep, newListWorkflowStatesStep, newProjectConnection, newSearchIssuesStep, newUpdateIssueStep };