@superdurable/connector-atlassian-confluence 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +21 -2
- package/dex-connector.json +196 -0
- package/dist/chunk-OAQFTUZS.js +387 -0
- package/dist/connection-Pzxytl_b.d.ts +397 -0
- package/dist/index.d.ts +371 -0
- package/dist/index.js +2100 -0
- package/dist/mock.d.ts +145 -0
- package/dist/mock.js +354 -0
- package/package.json +62 -4
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
import { A as AddCommentInput, a as AddCommentOutput, C as Connection, b as CreatePageInput, c as CreatePageOutput, G as GetPageInput, P as Page, S as SearchPagesInput, d as SearchPagesOutput, U as UpdatePageInput, e as UpdatePageOutput, f as CredentialSource, g as Config, O as Operations } from './connection-Pzxytl_b.js';
|
|
2
|
+
export { h as AddCommentInputSchema, i as AddCommentOutputSchema, j as ConfigSchema, k as CreatePageInputSchema, l as CreatePageOutputSchema, m as Credentials, n as GetPageInputSchema, o as PageSchema, p as PageSearchFilter, q as PageSearchFilterSchema, r as PageSummary, s as PageSummarySchema, t as PageVersion, u as PageVersionSchema, v as SearchPagesInputSchema, w as SearchPagesOutputSchema, x as UpdatePageInputSchema, y as UpdatePageOutputSchema, z as decodeCredentials, B as decodeSharedCredentials, D as newConnection, E as newConnectionWithOperations } from './connection-Pzxytl_b.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 = "confluence";
|
|
12
|
+
/** Provider identity for named connections. */
|
|
13
|
+
declare const ProviderID = "atlassian";
|
|
14
|
+
/** Branch IDs for searchPages. */
|
|
15
|
+
declare const SearchPagesBranch: {
|
|
16
|
+
readonly Searched: "searched";
|
|
17
|
+
readonly ProviderRejected: "providerRejected";
|
|
18
|
+
readonly InvalidResponse: "invalidResponse";
|
|
19
|
+
readonly Defect: "defect";
|
|
20
|
+
};
|
|
21
|
+
/** One page of matching pages was read; Confluence search is eventually consistent, so a page created or changed seconds ago can be missing. */
|
|
22
|
+
declare const SearchPagesBranchSearched: "searched";
|
|
23
|
+
/** Confluence conclusively rejected the search, such as unparsable CQL, an expired cursor, or missing permission. */
|
|
24
|
+
declare const SearchPagesBranchProviderRejected: "providerRejected";
|
|
25
|
+
/** Confluence returned an invalid or oversized search page. */
|
|
26
|
+
declare const SearchPagesBranchInvalidResponse: "invalidResponse";
|
|
27
|
+
/** Local input, connection configuration, or connector definition is invalid. */
|
|
28
|
+
declare const SearchPagesBranchDefect: "defect";
|
|
29
|
+
/** Manifest definition for searchPages. */
|
|
30
|
+
declare const SearchPagesDefinition: QueryDefinition;
|
|
31
|
+
/** Manifest metadata for searchPages. */
|
|
32
|
+
declare const SearchPagesMetadata: {
|
|
33
|
+
readonly kind: "query";
|
|
34
|
+
readonly idempotency: "none";
|
|
35
|
+
readonly authorization: "required";
|
|
36
|
+
};
|
|
37
|
+
/** Branch IDs for getPage. */
|
|
38
|
+
declare const GetPageBranch: {
|
|
39
|
+
readonly Found: "found";
|
|
40
|
+
readonly NotFound: "notFound";
|
|
41
|
+
readonly ProviderRejected: "providerRejected";
|
|
42
|
+
readonly InvalidResponse: "invalidResponse";
|
|
43
|
+
readonly Defect: "defect";
|
|
44
|
+
};
|
|
45
|
+
/** The page was read. */
|
|
46
|
+
declare const GetPageBranchFound: "found";
|
|
47
|
+
/** The page does not exist or the connection cannot view it. */
|
|
48
|
+
declare const GetPageBranchNotFound: "notFound";
|
|
49
|
+
/** Confluence conclusively rejected the page read. */
|
|
50
|
+
declare const GetPageBranchProviderRejected: "providerRejected";
|
|
51
|
+
/** Confluence returned an invalid or oversized page. */
|
|
52
|
+
declare const GetPageBranchInvalidResponse: "invalidResponse";
|
|
53
|
+
/** Local input, connection configuration, or connector definition is invalid. */
|
|
54
|
+
declare const GetPageBranchDefect: "defect";
|
|
55
|
+
/** Manifest definition for getPage. */
|
|
56
|
+
declare const GetPageDefinition: QueryDefinition;
|
|
57
|
+
/** Manifest metadata for getPage. */
|
|
58
|
+
declare const GetPageMetadata: {
|
|
59
|
+
readonly kind: "query";
|
|
60
|
+
readonly idempotency: "none";
|
|
61
|
+
readonly authorization: "required";
|
|
62
|
+
};
|
|
63
|
+
/** Branch IDs for createPage. */
|
|
64
|
+
declare const CreatePageBranch: {
|
|
65
|
+
readonly Created: "created";
|
|
66
|
+
readonly TitleConflict: "titleConflict";
|
|
67
|
+
readonly NotFound: "notFound";
|
|
68
|
+
readonly ProviderRejected: "providerRejected";
|
|
69
|
+
readonly Defect: "defect";
|
|
70
|
+
};
|
|
71
|
+
/** The page exists with the requested title, created by this Step execution, including a create an earlier attempt sent. */
|
|
72
|
+
declare const CreatePageBranchCreated: "created";
|
|
73
|
+
/** Another page in the space already has this title, so nothing was created; the Value names that page and its current version. */
|
|
74
|
+
declare const CreatePageBranchTitleConflict: "titleConflict";
|
|
75
|
+
/** The space or parent page does not exist or the connection cannot view it; nothing was created. */
|
|
76
|
+
declare const CreatePageBranchNotFound: "notFound";
|
|
77
|
+
/** Confluence conclusively rejected the page, such as an invalid body or missing Add page permission; nothing was created. */
|
|
78
|
+
declare const CreatePageBranchProviderRejected: "providerRejected";
|
|
79
|
+
/** Local input, connection configuration, or connector definition is invalid. */
|
|
80
|
+
declare const CreatePageBranchDefect: "defect";
|
|
81
|
+
/** Manifest definition for createPage. */
|
|
82
|
+
declare const CreatePageDefinition: MutationDefinition;
|
|
83
|
+
/** Manifest metadata for createPage. */
|
|
84
|
+
declare const CreatePageMetadata: {
|
|
85
|
+
readonly kind: "mutation";
|
|
86
|
+
readonly idempotency: "required";
|
|
87
|
+
readonly authorization: "required";
|
|
88
|
+
};
|
|
89
|
+
/** Branch IDs for updatePage. */
|
|
90
|
+
declare const UpdatePageBranch: {
|
|
91
|
+
readonly Updated: "updated";
|
|
92
|
+
readonly VersionConflict: "versionConflict";
|
|
93
|
+
readonly NotFound: "notFound";
|
|
94
|
+
readonly ProviderRejected: "providerRejected";
|
|
95
|
+
readonly Defect: "defect";
|
|
96
|
+
};
|
|
97
|
+
/** The page is at the requested version with this Step execution's change, including one an earlier attempt sent. */
|
|
98
|
+
declare const UpdatePageBranchUpdated: "updated";
|
|
99
|
+
/** The page is no longer at the version before the requested one, because another edit was saved first; nothing was changed and the Value names the current version. */
|
|
100
|
+
declare const UpdatePageBranchVersionConflict: "versionConflict";
|
|
101
|
+
/** The page does not exist or the connection cannot view it; nothing was changed. */
|
|
102
|
+
declare const UpdatePageBranchNotFound: "notFound";
|
|
103
|
+
/** Confluence conclusively rejected the update, such as an invalid body, missing Edit permission, or a space that requires approval before publishing; nothing was changed. */
|
|
104
|
+
declare const UpdatePageBranchProviderRejected: "providerRejected";
|
|
105
|
+
/** Local input, connection configuration, or connector definition is invalid. */
|
|
106
|
+
declare const UpdatePageBranchDefect: "defect";
|
|
107
|
+
/** Manifest definition for updatePage. */
|
|
108
|
+
declare const UpdatePageDefinition: MutationDefinition;
|
|
109
|
+
/** Manifest metadata for updatePage. */
|
|
110
|
+
declare const UpdatePageMetadata: {
|
|
111
|
+
readonly kind: "mutation";
|
|
112
|
+
readonly idempotency: "required";
|
|
113
|
+
readonly authorization: "required";
|
|
114
|
+
};
|
|
115
|
+
/** Branch IDs for addComment. */
|
|
116
|
+
declare const AddCommentBranch: {
|
|
117
|
+
readonly Added: "added";
|
|
118
|
+
readonly NotFound: "notFound";
|
|
119
|
+
readonly ProviderRejected: "providerRejected";
|
|
120
|
+
readonly Uncertain: "uncertain";
|
|
121
|
+
readonly Defect: "defect";
|
|
122
|
+
};
|
|
123
|
+
/** The comment is on the page, including one an earlier attempt of this Step execution sent. */
|
|
124
|
+
declare const AddCommentBranchAdded: "added";
|
|
125
|
+
/** The page does not exist or the connection cannot view it; nothing was added. */
|
|
126
|
+
declare const AddCommentBranchNotFound: "notFound";
|
|
127
|
+
/** Confluence conclusively rejected the comment, such as an invalid body or missing Add comments permission; nothing was added. */
|
|
128
|
+
declare const AddCommentBranchProviderRejected: "providerRejected";
|
|
129
|
+
/** An earlier attempt sent the comment and the page's comments do not confirm it; Confluence has no idempotency key, so it is never sent again automatically. */
|
|
130
|
+
declare const AddCommentBranchUncertain: "uncertain";
|
|
131
|
+
/** Local input, connection configuration, or connector definition is invalid. */
|
|
132
|
+
declare const AddCommentBranchDefect: "defect";
|
|
133
|
+
/** Manifest definition for addComment. */
|
|
134
|
+
declare const AddCommentDefinition: MutationDefinition;
|
|
135
|
+
/** Manifest metadata for addComment. */
|
|
136
|
+
declare const AddCommentMetadata: {
|
|
137
|
+
readonly kind: "mutation";
|
|
138
|
+
readonly idempotency: "required";
|
|
139
|
+
readonly authorization: "required";
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
/** Configuration for the searchPages connector Step. */
|
|
143
|
+
interface SearchPagesStepConfig<StepInput, OperationInput = SearchPagesInput, OperationOutput = SearchPagesOutput> extends Omit<QueryStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
|
|
144
|
+
/** Named connection supplying this operation. */
|
|
145
|
+
connection: Connection<{
|
|
146
|
+
searchPages(): Query<OperationInput, OperationOutput>;
|
|
147
|
+
}>;
|
|
148
|
+
/** Name matching the bound connection. */
|
|
149
|
+
connectionName: string;
|
|
150
|
+
/** One page of matching pages was read; Confluence search is eventually consistent, so a page created or changed seconds ago can be missing. */
|
|
151
|
+
searched: StepTarget<QueryResult<OperationOutput>>;
|
|
152
|
+
/** Confluence conclusively rejected the search, such as unparsable CQL, an expired cursor, or missing permission. */
|
|
153
|
+
providerRejected?: StepTarget<QueryResult<OperationOutput>>;
|
|
154
|
+
/** Confluence returned an invalid or oversized search page. */
|
|
155
|
+
invalidResponse?: StepTarget<QueryResult<OperationOutput>>;
|
|
156
|
+
/** Local input, connection configuration, or connector definition is invalid. */
|
|
157
|
+
defect?: StepTarget<QueryResult<OperationOutput>>;
|
|
158
|
+
}
|
|
159
|
+
/** Build the searchPages Step from a named connection. */
|
|
160
|
+
declare function newSearchPagesStep<StepInput, OperationInput = SearchPagesInput, OperationOutput = SearchPagesOutput>(configuration: SearchPagesStepConfig<StepInput, OperationInput, OperationOutput>): QueryStep<StepInput, OperationInput, OperationOutput>;
|
|
161
|
+
/** Configuration for the getPage connector Step. */
|
|
162
|
+
interface GetPageStepConfig<StepInput, OperationInput = GetPageInput, OperationOutput = Page> extends Omit<QueryStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
|
|
163
|
+
/** Named connection supplying this operation. */
|
|
164
|
+
connection: Connection<{
|
|
165
|
+
getPage(): Query<OperationInput, OperationOutput>;
|
|
166
|
+
}>;
|
|
167
|
+
/** Name matching the bound connection. */
|
|
168
|
+
connectionName: string;
|
|
169
|
+
/** The page was read. */
|
|
170
|
+
found: StepTarget<QueryResult<OperationOutput>>;
|
|
171
|
+
/** The page does not exist or the connection cannot view it. */
|
|
172
|
+
notFound?: StepTarget<QueryResult<OperationOutput>>;
|
|
173
|
+
/** Confluence conclusively rejected the page read. */
|
|
174
|
+
providerRejected?: StepTarget<QueryResult<OperationOutput>>;
|
|
175
|
+
/** Confluence returned an invalid or oversized page. */
|
|
176
|
+
invalidResponse?: StepTarget<QueryResult<OperationOutput>>;
|
|
177
|
+
/** Local input, connection configuration, or connector definition is invalid. */
|
|
178
|
+
defect?: StepTarget<QueryResult<OperationOutput>>;
|
|
179
|
+
}
|
|
180
|
+
/** Build the getPage Step from a named connection. */
|
|
181
|
+
declare function newGetPageStep<StepInput, OperationInput = GetPageInput, OperationOutput = Page>(configuration: GetPageStepConfig<StepInput, OperationInput, OperationOutput>): QueryStep<StepInput, OperationInput, OperationOutput>;
|
|
182
|
+
/** Configuration for the createPage connector Step. */
|
|
183
|
+
interface CreatePageStepConfig<StepInput, OperationInput = CreatePageInput, OperationOutput = CreatePageOutput> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
|
|
184
|
+
/** Named connection supplying this operation. */
|
|
185
|
+
connection: Connection<{
|
|
186
|
+
createPage(): Mutation<OperationInput, OperationOutput>;
|
|
187
|
+
}>;
|
|
188
|
+
/** Name matching the bound connection. */
|
|
189
|
+
connectionName: string;
|
|
190
|
+
/** The page exists with the requested title, created by this Step execution, including a create an earlier attempt sent. */
|
|
191
|
+
created: StepTarget<MutationResult<OperationOutput>>;
|
|
192
|
+
/** Another page in the space already has this title, so nothing was created; the Value names that page and its current version. */
|
|
193
|
+
titleConflict?: StepTarget<MutationResult<OperationOutput>>;
|
|
194
|
+
/** The space or parent page does not exist or the connection cannot view it; nothing was created. */
|
|
195
|
+
notFound?: StepTarget<MutationResult<OperationOutput>>;
|
|
196
|
+
/** Confluence conclusively rejected the page, such as an invalid body or missing Add page permission; nothing was created. */
|
|
197
|
+
providerRejected?: StepTarget<MutationResult<OperationOutput>>;
|
|
198
|
+
/** Local input, connection configuration, or connector definition is invalid. */
|
|
199
|
+
defect?: StepTarget<MutationResult<OperationOutput>>;
|
|
200
|
+
}
|
|
201
|
+
/** Build the createPage Step from a named connection. */
|
|
202
|
+
declare function newCreatePageStep<StepInput, OperationInput = CreatePageInput, OperationOutput = CreatePageOutput>(configuration: CreatePageStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
|
|
203
|
+
/** Configuration for the updatePage connector Step. */
|
|
204
|
+
interface UpdatePageStepConfig<StepInput, OperationInput = UpdatePageInput, OperationOutput = UpdatePageOutput> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
|
|
205
|
+
/** Named connection supplying this operation. */
|
|
206
|
+
connection: Connection<{
|
|
207
|
+
updatePage(): Mutation<OperationInput, OperationOutput>;
|
|
208
|
+
}>;
|
|
209
|
+
/** Name matching the bound connection. */
|
|
210
|
+
connectionName: string;
|
|
211
|
+
/** The page is at the requested version with this Step execution's change, including one an earlier attempt sent. */
|
|
212
|
+
updated: StepTarget<MutationResult<OperationOutput>>;
|
|
213
|
+
/** The page is no longer at the version before the requested one, because another edit was saved first; nothing was changed and the Value names the current version. */
|
|
214
|
+
versionConflict?: StepTarget<MutationResult<OperationOutput>>;
|
|
215
|
+
/** The page does not exist or the connection cannot view it; nothing was changed. */
|
|
216
|
+
notFound?: StepTarget<MutationResult<OperationOutput>>;
|
|
217
|
+
/** Confluence conclusively rejected the update, such as an invalid body, missing Edit permission, or a space that requires approval before publishing; nothing was changed. */
|
|
218
|
+
providerRejected?: StepTarget<MutationResult<OperationOutput>>;
|
|
219
|
+
/** Local input, connection configuration, or connector definition is invalid. */
|
|
220
|
+
defect?: StepTarget<MutationResult<OperationOutput>>;
|
|
221
|
+
}
|
|
222
|
+
/** Build the updatePage Step from a named connection. */
|
|
223
|
+
declare function newUpdatePageStep<StepInput, OperationInput = UpdatePageInput, OperationOutput = UpdatePageOutput>(configuration: UpdatePageStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
|
|
224
|
+
/** Configuration for the addComment connector Step. */
|
|
225
|
+
interface AddCommentStepConfig<StepInput, OperationInput = AddCommentInput, OperationOutput = AddCommentOutput> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
|
|
226
|
+
/** Named connection supplying this operation. */
|
|
227
|
+
connection: Connection<{
|
|
228
|
+
addComment(): Mutation<OperationInput, OperationOutput>;
|
|
229
|
+
}>;
|
|
230
|
+
/** Name matching the bound connection. */
|
|
231
|
+
connectionName: string;
|
|
232
|
+
/** The comment is on the page, including one an earlier attempt of this Step execution sent. */
|
|
233
|
+
added: StepTarget<MutationResult<OperationOutput>>;
|
|
234
|
+
/** The page does not exist or the connection cannot view it; nothing was added. */
|
|
235
|
+
notFound?: StepTarget<MutationResult<OperationOutput>>;
|
|
236
|
+
/** Confluence conclusively rejected the comment, such as an invalid body or missing Add comments permission; nothing was added. */
|
|
237
|
+
providerRejected?: StepTarget<MutationResult<OperationOutput>>;
|
|
238
|
+
/** An earlier attempt sent the comment and the page's comments do not confirm it; Confluence has no idempotency key, so it is never sent again automatically. */
|
|
239
|
+
uncertain?: StepTarget<MutationResult<OperationOutput>>;
|
|
240
|
+
/** Local input, connection configuration, or connector definition is invalid. */
|
|
241
|
+
defect?: StepTarget<MutationResult<OperationOutput>>;
|
|
242
|
+
}
|
|
243
|
+
/** Build the addComment Step from a named connection. */
|
|
244
|
+
declare function newAddCommentStep<StepInput, OperationInput = AddCommentInput, OperationOutput = AddCommentOutput>(configuration: AddCommentStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
|
|
245
|
+
|
|
246
|
+
/** Search a bounded CQL result page. */
|
|
247
|
+
declare class SearchPagesOperation implements Query<SearchPagesInput, SearchPagesOutput> {
|
|
248
|
+
private readonly client;
|
|
249
|
+
/** Bind the client. */ constructor(client: ConfluenceClient);
|
|
250
|
+
/** Return the stable definition. */ definition(): _superdurable_connectors_sdk.QueryDefinition;
|
|
251
|
+
/** Execute one authenticated search. */
|
|
252
|
+
invoke(call: Call, input: SearchPagesInput): Promise<QueryAttempt<SearchPagesOutput>>;
|
|
253
|
+
}
|
|
254
|
+
/** Read a page body and its current version. */
|
|
255
|
+
declare class GetPageOperation implements Query<GetPageInput, Page> {
|
|
256
|
+
private readonly client;
|
|
257
|
+
/** Bind the client. */ constructor(client: ConfluenceClient);
|
|
258
|
+
/** Return the stable definition. */ definition(): _superdurable_connectors_sdk.QueryDefinition;
|
|
259
|
+
/** Execute one page read. */
|
|
260
|
+
invoke(call: Call, input: GetPageInput): Promise<QueryAttempt<Page>>;
|
|
261
|
+
}
|
|
262
|
+
/** Create one page, reconciling a previous send by title. */
|
|
263
|
+
declare class CreatePageOperation implements Mutation<CreatePageInput, CreatePageOutput> {
|
|
264
|
+
private readonly client;
|
|
265
|
+
/** Bind the client. */ constructor(client: ConfluenceClient);
|
|
266
|
+
/** Return the stable definition. */ definition(): _superdurable_connectors_sdk.QueryDefinition;
|
|
267
|
+
/** Derive the stable Dex idempotency key. */ idempotencyKey(callId: string): string;
|
|
268
|
+
/** Execute one create with read-back reconciliation. */
|
|
269
|
+
invoke(call: Call, input: CreatePageInput): Promise<MutationAttempt<CreatePageOutput>>;
|
|
270
|
+
private reconcileByTitle;
|
|
271
|
+
}
|
|
272
|
+
/** Replace one page at a named version, reconciling its marker on read-back. */
|
|
273
|
+
declare class UpdatePageOperation implements Mutation<UpdatePageInput, UpdatePageOutput> {
|
|
274
|
+
private readonly client;
|
|
275
|
+
/** Bind the client. */ constructor(client: ConfluenceClient);
|
|
276
|
+
/** Return the stable definition. */ definition(): _superdurable_connectors_sdk.QueryDefinition;
|
|
277
|
+
/** Derive the stable Dex idempotency key. */ idempotencyKey(callId: string): string;
|
|
278
|
+
/** Execute one update with version reconciliation. */
|
|
279
|
+
invoke(call: Call, input: UpdatePageInput): Promise<MutationAttempt<UpdatePageOutput>>;
|
|
280
|
+
private reportReadBack;
|
|
281
|
+
}
|
|
282
|
+
/** Add one footer comment at most once per Step execution. */
|
|
283
|
+
declare class AddCommentOperation implements Mutation<AddCommentInput, AddCommentOutput> {
|
|
284
|
+
private readonly client;
|
|
285
|
+
/** Bind the client. */ constructor(client: ConfluenceClient);
|
|
286
|
+
/** Return the stable definition. */ definition(): _superdurable_connectors_sdk.QueryDefinition;
|
|
287
|
+
/** Derive the stable Dex idempotency key. */ idempotencyKey(callId: string): string;
|
|
288
|
+
/** Execute one comment send or read-back. */
|
|
289
|
+
invoke(call: Call, input: AddCommentInput): Promise<MutationAttempt<AddCommentOutput>>;
|
|
290
|
+
private reconcileEarlierDispatch;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/** Injectable provider transport and clock for deterministic connector tests. */
|
|
294
|
+
interface ConfluenceClientOptions {
|
|
295
|
+
send?: (request: ProviderRequest) => Promise<ProviderResponse>;
|
|
296
|
+
now?: () => Date;
|
|
297
|
+
}
|
|
298
|
+
/** One Confluence or gateway exchange with secret-safe transport evidence. */
|
|
299
|
+
interface ConfluenceExchange {
|
|
300
|
+
status: number;
|
|
301
|
+
headers: ProviderResponse['headers'];
|
|
302
|
+
body: Uint8Array;
|
|
303
|
+
isTooLarge: boolean;
|
|
304
|
+
reflectsSecret?: boolean;
|
|
305
|
+
isDispatched: boolean;
|
|
306
|
+
error?: 'transport' | 'request';
|
|
307
|
+
}
|
|
308
|
+
/** One authenticated invocation's site and access token. */
|
|
309
|
+
interface ConfluenceSession {
|
|
310
|
+
call: Call;
|
|
311
|
+
cloudId: string;
|
|
312
|
+
token: string;
|
|
313
|
+
}
|
|
314
|
+
/** Secret-safe session failure. */
|
|
315
|
+
interface ConfluenceSessionFailure {
|
|
316
|
+
failure: Failure;
|
|
317
|
+
isRetryable: boolean;
|
|
318
|
+
retryAfterMs: number;
|
|
319
|
+
}
|
|
320
|
+
/** Result of resolving the OAuth credential and Confluence site. */
|
|
321
|
+
type ConfluenceSessionResult = {
|
|
322
|
+
session: ConfluenceSession;
|
|
323
|
+
} | {
|
|
324
|
+
error: ConfluenceSessionFailure;
|
|
325
|
+
};
|
|
326
|
+
/** Transport and status classification shared by the five operations. */
|
|
327
|
+
interface ConfluenceClassification {
|
|
328
|
+
outcome: 'accepted' | 'notApplied' | 'notFound' | 'rejected' | 'ambiguous' | 'invalid' | 'defect' | 'retry';
|
|
329
|
+
failure?: Failure;
|
|
330
|
+
retryAfterMs: number;
|
|
331
|
+
}
|
|
332
|
+
/** Atlassian Cloud REST client with host-managed rotating OAuth credentials. */
|
|
333
|
+
declare class ConfluenceClient {
|
|
334
|
+
readonly credentials: CredentialSource;
|
|
335
|
+
readonly endpoint: string;
|
|
336
|
+
readonly configuredCloudId: string;
|
|
337
|
+
readonly maxResponseBytes: number;
|
|
338
|
+
readonly now: () => Date;
|
|
339
|
+
private readonly send;
|
|
340
|
+
private readonly refreshDriver;
|
|
341
|
+
private resolvedCloudId;
|
|
342
|
+
/** Validate connection settings and bind the host credential source. */
|
|
343
|
+
constructor(config: Config, credentials: CredentialSource, options?: ConfluenceClientOptions);
|
|
344
|
+
/** Bind the page search Query. */
|
|
345
|
+
searchPages(): SearchPagesOperation;
|
|
346
|
+
/** Bind the page read Query. */
|
|
347
|
+
getPage(): GetPageOperation;
|
|
348
|
+
/** Bind the page create Mutation. */
|
|
349
|
+
createPage(): CreatePageOperation;
|
|
350
|
+
/** Bind the page update Mutation. */
|
|
351
|
+
updatePage(): UpdatePageOperation;
|
|
352
|
+
/** Bind the footer comment Mutation. */
|
|
353
|
+
addComment(): AddCommentOperation;
|
|
354
|
+
/** Resolve the OAuth token and the single selected Confluence Cloud site. */
|
|
355
|
+
startSession(call: Call, operation: string): Promise<ConfluenceSessionResult>;
|
|
356
|
+
/** Exchange one request and refresh a rejected credential once. */
|
|
357
|
+
exchange(session: ConfluenceSession, method: string, api: 'content' | 'search' | 'gateway', path: string, query?: Record<string, string>, payload?: unknown): Promise<ConfluenceExchange>;
|
|
358
|
+
/** Classify a read without inspecting an error response body. */
|
|
359
|
+
classifyRead(operation: string, subject: string, response: ConfluenceExchange): ConfluenceClassification;
|
|
360
|
+
/** Classify a write before any read-back or business reconciliation. */
|
|
361
|
+
classifyWrite(operation: string, subject: string, response: ConfluenceExchange): ConfluenceClassification;
|
|
362
|
+
/** Produce a safe request receipt with the exact provider object identifier. */
|
|
363
|
+
receipt(session: ConfluenceSession, response: ConfluenceExchange, objectId?: string): ReceiptDraft;
|
|
364
|
+
/** Parse Retry-After against the injected clock. */
|
|
365
|
+
retryAfter(response: ConfluenceExchange): number;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/** Open a named Confluence connection with generated private and shared OAuth credential decoding. */
|
|
369
|
+
declare function newProjectConnection(project: LoadedProject, connectionName: string, options?: ConfluenceClientOptions): Connection<Operations>;
|
|
370
|
+
|
|
371
|
+
export { AddCommentBranch, AddCommentBranchAdded, AddCommentBranchDefect, AddCommentBranchNotFound, AddCommentBranchProviderRejected, AddCommentBranchUncertain, AddCommentDefinition, AddCommentInput, AddCommentMetadata, AddCommentOperation, AddCommentOutput, type AddCommentStepConfig, Config, ConfluenceClient, type ConfluenceClientOptions, Connection, ConnectorID, CreatePageBranch, CreatePageBranchCreated, CreatePageBranchDefect, CreatePageBranchNotFound, CreatePageBranchProviderRejected, CreatePageBranchTitleConflict, CreatePageDefinition, CreatePageInput, CreatePageMetadata, CreatePageOperation, CreatePageOutput, type CreatePageStepConfig, CredentialSource, GetPageBranch, GetPageBranchDefect, GetPageBranchFound, GetPageBranchInvalidResponse, GetPageBranchNotFound, GetPageBranchProviderRejected, GetPageDefinition, GetPageInput, GetPageMetadata, GetPageOperation, type GetPageStepConfig, Page, ProviderID, SearchPagesBranch, SearchPagesBranchDefect, SearchPagesBranchInvalidResponse, SearchPagesBranchProviderRejected, SearchPagesBranchSearched, SearchPagesDefinition, SearchPagesInput, SearchPagesMetadata, SearchPagesOperation, SearchPagesOutput, type SearchPagesStepConfig, UpdatePageBranch, UpdatePageBranchDefect, UpdatePageBranchNotFound, UpdatePageBranchProviderRejected, UpdatePageBranchUpdated, UpdatePageBranchVersionConflict, UpdatePageDefinition, UpdatePageInput, UpdatePageMetadata, UpdatePageOperation, UpdatePageOutput, type UpdatePageStepConfig, newAddCommentStep, newCreatePageStep, newGetPageStep, newProjectConnection, newSearchPagesStep, newUpdatePageStep };
|