@superdurable/connector-buffer 0.1.0 → 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/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { G as GetChannelInput, C as ChannelProfile, a as Connection, O as Operations, b as Config, c as Credentials } from './connection-BRLi-NI_.js';
2
- export { d as ChannelProfileSchema, e as ConfigSchema, f as CredentialSource, g as GetChannelInputSchema, h as decodeCredentials, n as newConnection, i as newConnectionWithOperations } from './connection-BRLi-NI_.js';
3
- import { QueryDefinition, QueryStepConfig, Query, QueryResult, QueryStep, CredentialProvider, Call, QueryAttempt } from '@superdurable/connectors-sdk';
1
+ import { C as CreateIdeaInput, I as IdeaProfile, a as Connection, b as CreatePostInput, P as PostProfile, c as CreateScheduledPostInput, D as DeletePostInput, d as PostDeleteResult, E as EditPostInput, G as GetChannelInput, e as ChannelProfile, f as GetPostInput, L as ListChannelsInput, g as ChannelsList, h as ListIdeasInput, i as IdeasPage, j as ListOrganizationsInput, O as OrganizationsList, k as ListPostsInput, l as PostsList, m as PublishPostNowInput, n as Operations, o as Config, p as Credentials } from './connection-BmjeWE6m.js';
2
+ export { q as ChannelProfileSchema, r as ChannelsListSchema, s as ConfigSchema, t as CreateIdeaInputSchema, u as CreatePostInputSchema, v as CreateScheduledPostInputSchema, w as CredentialMaterialError, x as CredentialSource, y as DeletePostInputSchema, z as EditPostInputSchema, A as GetChannelInputSchema, B as GetPostInputSchema, F as IdeaProfileSchema, H as IdeasPageSchema, J as ListChannelsInputSchema, K as ListIdeasInputSchema, M as ListOrganizationsInputSchema, N as ListPostsInputSchema, Q as OrganizationIdentity, R as OrganizationIdentitySchema, S as OrganizationsListSchema, T as PostAsset, U as PostAssetSchema, V as PostDeleteResultSchema, W as PostProfileSchema, X as PostsListSchema, Y as PublishPostNowInputSchema, Z as SignedInteger, _ as decodeCredentials, $ as decodeSignedInteger, a0 as exactIntegerJSONCodec, a1 as isCredentialMaterialError, a2 as newConnection, a3 as newConnectionWithOperations, a4 as parseExactIntegerJSON, a5 as parseJSONNumberTokens } from './connection-BmjeWE6m.js';
3
+ import { MutationDefinition, QueryDefinition, MutationStepConfig, Mutation, MutationResult, QueryStepConfig, Query, QueryResult, MutationStep, QueryStep, CallID, Call, MutationAttempt, QueryAttempt, CredentialProvider } from '@superdurable/connectors-sdk';
4
4
  import { StepTarget } from '@superdurable/dex';
5
5
  import { LoadedProject } from '@superdurable/connectors-sdk/projectconfig';
6
6
  import { ProviderRequest, ProviderResponse } from '@superdurable/connectors-sdk/providerhttp';
@@ -10,6 +10,262 @@ import 'zod';
10
10
  declare const ConnectorID = "buffer";
11
11
  /** Provider identity for named connections. */
12
12
  declare const ProviderID = "buffer";
13
+ /** Branch IDs for createIdea. */
14
+ declare const CreateIdeaBranch: {
15
+ readonly Created: "created";
16
+ readonly ProviderRejected: "providerRejected";
17
+ readonly Uncertain: "uncertain";
18
+ readonly Defect: "defect";
19
+ };
20
+ /** Buffer created the idea. */
21
+ declare const CreateIdeaBranchCreated: "created";
22
+ /** Buffer conclusively rejected the idea. */
23
+ declare const CreateIdeaBranchProviderRejected: "providerRejected";
24
+ /** An idea may have been created but cannot be confirmed. */
25
+ declare const CreateIdeaBranchUncertain: "uncertain";
26
+ /** Local input or credentials are invalid. */
27
+ declare const CreateIdeaBranchDefect: "defect";
28
+ /** Manifest definition for createIdea. */
29
+ declare const CreateIdeaDefinition: MutationDefinition;
30
+ /** Manifest metadata for createIdea. */
31
+ declare const CreateIdeaMetadata: {
32
+ readonly kind: "mutation";
33
+ readonly idempotency: "required";
34
+ readonly authorization: "required";
35
+ };
36
+ /** Branch IDs for listIdeas. */
37
+ declare const ListIdeasBranch: {
38
+ readonly Listed: "listed";
39
+ readonly ProviderRejected: "providerRejected";
40
+ readonly InvalidResponse: "invalidResponse";
41
+ readonly Defect: "defect";
42
+ };
43
+ /** Buffer returned one idea page. */
44
+ declare const ListIdeasBranchListed: "listed";
45
+ /** Buffer rejected idea listing. */
46
+ declare const ListIdeasBranchProviderRejected: "providerRejected";
47
+ /** Buffer returned an invalid idea page. */
48
+ declare const ListIdeasBranchInvalidResponse: "invalidResponse";
49
+ /** Local input or credentials are invalid. */
50
+ declare const ListIdeasBranchDefect: "defect";
51
+ /** Manifest definition for listIdeas. */
52
+ declare const ListIdeasDefinition: QueryDefinition;
53
+ /** Manifest metadata for listIdeas. */
54
+ declare const ListIdeasMetadata: {
55
+ readonly kind: "query";
56
+ readonly idempotency: "none";
57
+ readonly authorization: "required";
58
+ };
59
+ /** Branch IDs for listOrganizations. */
60
+ declare const ListOrganizationsBranch: {
61
+ readonly Listed: "listed";
62
+ readonly ProviderRejected: "providerRejected";
63
+ readonly InvalidResponse: "invalidResponse";
64
+ readonly Defect: "defect";
65
+ };
66
+ /** Buffer completed the operation. */
67
+ declare const ListOrganizationsBranchListed: "listed";
68
+ /** Buffer conclusively rejected the request. */
69
+ declare const ListOrganizationsBranchProviderRejected: "providerRejected";
70
+ /** Buffer returned malformed or oversized JSON. */
71
+ declare const ListOrganizationsBranchInvalidResponse: "invalidResponse";
72
+ /** Local input or credentials are invalid. */
73
+ declare const ListOrganizationsBranchDefect: "defect";
74
+ /** Manifest definition for listOrganizations. */
75
+ declare const ListOrganizationsDefinition: QueryDefinition;
76
+ /** Manifest metadata for listOrganizations. */
77
+ declare const ListOrganizationsMetadata: {
78
+ readonly kind: "query";
79
+ readonly idempotency: "none";
80
+ readonly authorization: "required";
81
+ };
82
+ /** Branch IDs for listChannels. */
83
+ declare const ListChannelsBranch: {
84
+ readonly Listed: "listed";
85
+ readonly ProviderRejected: "providerRejected";
86
+ readonly InvalidResponse: "invalidResponse";
87
+ readonly Defect: "defect";
88
+ };
89
+ /** Buffer completed the operation. */
90
+ declare const ListChannelsBranchListed: "listed";
91
+ /** Buffer conclusively rejected the request. */
92
+ declare const ListChannelsBranchProviderRejected: "providerRejected";
93
+ /** Buffer returned malformed or oversized JSON. */
94
+ declare const ListChannelsBranchInvalidResponse: "invalidResponse";
95
+ /** Local input or credentials are invalid. */
96
+ declare const ListChannelsBranchDefect: "defect";
97
+ /** Manifest definition for listChannels. */
98
+ declare const ListChannelsDefinition: QueryDefinition;
99
+ /** Manifest metadata for listChannels. */
100
+ declare const ListChannelsMetadata: {
101
+ readonly kind: "query";
102
+ readonly idempotency: "none";
103
+ readonly authorization: "required";
104
+ };
105
+ /** Branch IDs for getPost. */
106
+ declare const GetPostBranch: {
107
+ readonly Found: "found";
108
+ readonly NotFound: "notFound";
109
+ readonly ProviderRejected: "providerRejected";
110
+ readonly InvalidResponse: "invalidResponse";
111
+ readonly Defect: "defect";
112
+ };
113
+ /** Buffer completed the operation. */
114
+ declare const GetPostBranchFound: "found";
115
+ /** Buffer did not find the post. */
116
+ declare const GetPostBranchNotFound: "notFound";
117
+ /** Buffer conclusively rejected the request. */
118
+ declare const GetPostBranchProviderRejected: "providerRejected";
119
+ /** Buffer returned malformed or oversized JSON. */
120
+ declare const GetPostBranchInvalidResponse: "invalidResponse";
121
+ /** Local input or credentials are invalid. */
122
+ declare const GetPostBranchDefect: "defect";
123
+ /** Manifest definition for getPost. */
124
+ declare const GetPostDefinition: QueryDefinition;
125
+ /** Manifest metadata for getPost. */
126
+ declare const GetPostMetadata: {
127
+ readonly kind: "query";
128
+ readonly idempotency: "none";
129
+ readonly authorization: "required";
130
+ };
131
+ /** Branch IDs for listPosts. */
132
+ declare const ListPostsBranch: {
133
+ readonly Listed: "listed";
134
+ readonly ProviderRejected: "providerRejected";
135
+ readonly InvalidResponse: "invalidResponse";
136
+ readonly Defect: "defect";
137
+ };
138
+ /** Buffer completed the operation. */
139
+ declare const ListPostsBranchListed: "listed";
140
+ /** Buffer conclusively rejected the request. */
141
+ declare const ListPostsBranchProviderRejected: "providerRejected";
142
+ /** Buffer returned malformed or oversized JSON. */
143
+ declare const ListPostsBranchInvalidResponse: "invalidResponse";
144
+ /** Local input or credentials are invalid. */
145
+ declare const ListPostsBranchDefect: "defect";
146
+ /** Manifest definition for listPosts. */
147
+ declare const ListPostsDefinition: QueryDefinition;
148
+ /** Manifest metadata for listPosts. */
149
+ declare const ListPostsMetadata: {
150
+ readonly kind: "query";
151
+ readonly idempotency: "none";
152
+ readonly authorization: "required";
153
+ };
154
+ /** Branch IDs for createPost. */
155
+ declare const CreatePostBranch: {
156
+ readonly Created: "created";
157
+ readonly ProviderRejected: "providerRejected";
158
+ readonly Uncertain: "uncertain";
159
+ readonly Defect: "defect";
160
+ };
161
+ /** Buffer completed the operation. */
162
+ declare const CreatePostBranchCreated: "created";
163
+ /** Buffer conclusively rejected the request. */
164
+ declare const CreatePostBranchProviderRejected: "providerRejected";
165
+ /** A post may have been created but cannot be confirmed. */
166
+ declare const CreatePostBranchUncertain: "uncertain";
167
+ /** Local input or credentials are invalid. */
168
+ declare const CreatePostBranchDefect: "defect";
169
+ /** Manifest definition for createPost. */
170
+ declare const CreatePostDefinition: MutationDefinition;
171
+ /** Manifest metadata for createPost. */
172
+ declare const CreatePostMetadata: {
173
+ readonly kind: "mutation";
174
+ readonly idempotency: "required";
175
+ readonly authorization: "required";
176
+ };
177
+ /** Branch IDs for createScheduledPost. */
178
+ declare const CreateScheduledPostBranch: {
179
+ readonly Created: "created";
180
+ readonly ProviderRejected: "providerRejected";
181
+ readonly Uncertain: "uncertain";
182
+ readonly Defect: "defect";
183
+ };
184
+ /** Buffer scheduled the post. */
185
+ declare const CreateScheduledPostBranchCreated: "created";
186
+ /** Buffer conclusively rejected the post. */
187
+ declare const CreateScheduledPostBranchProviderRejected: "providerRejected";
188
+ /** A scheduled post may have been created but cannot be confirmed. */
189
+ declare const CreateScheduledPostBranchUncertain: "uncertain";
190
+ /** Local input or credentials are invalid. */
191
+ declare const CreateScheduledPostBranchDefect: "defect";
192
+ /** Manifest definition for createScheduledPost. */
193
+ declare const CreateScheduledPostDefinition: MutationDefinition;
194
+ /** Manifest metadata for createScheduledPost. */
195
+ declare const CreateScheduledPostMetadata: {
196
+ readonly kind: "mutation";
197
+ readonly idempotency: "required";
198
+ readonly authorization: "required";
199
+ };
200
+ /** Branch IDs for publishPostNow. */
201
+ declare const PublishPostNowBranch: {
202
+ readonly Created: "created";
203
+ readonly ProviderRejected: "providerRejected";
204
+ readonly Uncertain: "uncertain";
205
+ readonly Defect: "defect";
206
+ };
207
+ /** Buffer accepted the post for immediate publishing. */
208
+ declare const PublishPostNowBranchCreated: "created";
209
+ /** Buffer conclusively rejected the post. */
210
+ declare const PublishPostNowBranchProviderRejected: "providerRejected";
211
+ /** A post may have been published but cannot be confirmed. */
212
+ declare const PublishPostNowBranchUncertain: "uncertain";
213
+ /** Local input or credentials are invalid. */
214
+ declare const PublishPostNowBranchDefect: "defect";
215
+ /** Manifest definition for publishPostNow. */
216
+ declare const PublishPostNowDefinition: MutationDefinition;
217
+ /** Manifest metadata for publishPostNow. */
218
+ declare const PublishPostNowMetadata: {
219
+ readonly kind: "mutation";
220
+ readonly idempotency: "required";
221
+ readonly authorization: "required";
222
+ };
223
+ /** Branch IDs for editPost. */
224
+ declare const EditPostBranch: {
225
+ readonly Updated: "updated";
226
+ readonly ProviderRejected: "providerRejected";
227
+ readonly InvalidResponse: "invalidResponse";
228
+ readonly Defect: "defect";
229
+ };
230
+ /** Buffer completed the operation. */
231
+ declare const EditPostBranchUpdated: "updated";
232
+ /** Buffer conclusively rejected the request. */
233
+ declare const EditPostBranchProviderRejected: "providerRejected";
234
+ /** Buffer returned malformed or oversized JSON. */
235
+ declare const EditPostBranchInvalidResponse: "invalidResponse";
236
+ /** Local input or credentials are invalid. */
237
+ declare const EditPostBranchDefect: "defect";
238
+ /** Manifest definition for editPost. */
239
+ declare const EditPostDefinition: MutationDefinition;
240
+ /** Manifest metadata for editPost. */
241
+ declare const EditPostMetadata: {
242
+ readonly kind: "mutation";
243
+ readonly idempotency: "required";
244
+ readonly authorization: "required";
245
+ };
246
+ /** Branch IDs for deletePost. */
247
+ declare const DeletePostBranch: {
248
+ readonly Deleted: "deleted";
249
+ readonly ProviderRejected: "providerRejected";
250
+ readonly InvalidResponse: "invalidResponse";
251
+ readonly Defect: "defect";
252
+ };
253
+ /** Buffer completed the operation. */
254
+ declare const DeletePostBranchDeleted: "deleted";
255
+ /** Buffer conclusively rejected the request. */
256
+ declare const DeletePostBranchProviderRejected: "providerRejected";
257
+ /** Buffer returned malformed or oversized JSON. */
258
+ declare const DeletePostBranchInvalidResponse: "invalidResponse";
259
+ /** Local input or credentials are invalid. */
260
+ declare const DeletePostBranchDefect: "defect";
261
+ /** Manifest definition for deletePost. */
262
+ declare const DeletePostDefinition: MutationDefinition;
263
+ /** Manifest metadata for deletePost. */
264
+ declare const DeletePostMetadata: {
265
+ readonly kind: "mutation";
266
+ readonly idempotency: "required";
267
+ readonly authorization: "required";
268
+ };
13
269
  /** Branch IDs for getChannel. */
14
270
  declare const GetChannelBranch: {
15
271
  readonly Found: "found";
@@ -37,6 +293,221 @@ declare const GetChannelMetadata: {
37
293
  readonly authorization: "required";
38
294
  };
39
295
 
296
+ /** Configuration for the createIdea connector Step. */
297
+ interface CreateIdeaStepConfig<StepInput, OperationInput = CreateIdeaInput, OperationOutput = IdeaProfile> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
298
+ /** Named connection supplying this operation. */
299
+ connection: Connection<{
300
+ createIdea(): Mutation<OperationInput, OperationOutput>;
301
+ }>;
302
+ /** Name matching the bound connection. */
303
+ connectionName: string;
304
+ /** Buffer created the idea. */
305
+ created: StepTarget<MutationResult<OperationOutput>>;
306
+ /** Buffer conclusively rejected the idea. */
307
+ providerRejected?: StepTarget<MutationResult<OperationOutput>>;
308
+ /** An idea may have been created but cannot be confirmed. */
309
+ uncertain?: StepTarget<MutationResult<OperationOutput>>;
310
+ /** Local input or credentials are invalid. */
311
+ defect?: StepTarget<MutationResult<OperationOutput>>;
312
+ }
313
+ /** Build the createIdea Step from a named connection. */
314
+ declare function newCreateIdeaStep<StepInput, OperationInput = CreateIdeaInput, OperationOutput = IdeaProfile>(configuration: CreateIdeaStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
315
+ /** Configuration for the listIdeas connector Step. */
316
+ interface ListIdeasStepConfig<StepInput, OperationInput = ListIdeasInput, OperationOutput = IdeasPage> extends Omit<QueryStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
317
+ /** Named connection supplying this operation. */
318
+ connection: Connection<{
319
+ listIdeas(): Query<OperationInput, OperationOutput>;
320
+ }>;
321
+ /** Name matching the bound connection. */
322
+ connectionName: string;
323
+ /** Buffer returned one idea page. */
324
+ listed: StepTarget<QueryResult<OperationOutput>>;
325
+ /** Buffer rejected idea listing. */
326
+ providerRejected?: StepTarget<QueryResult<OperationOutput>>;
327
+ /** Buffer returned an invalid idea page. */
328
+ invalidResponse?: StepTarget<QueryResult<OperationOutput>>;
329
+ /** Local input or credentials are invalid. */
330
+ defect?: StepTarget<QueryResult<OperationOutput>>;
331
+ }
332
+ /** Build the listIdeas Step from a named connection. */
333
+ declare function newListIdeasStep<StepInput, OperationInput = ListIdeasInput, OperationOutput = IdeasPage>(configuration: ListIdeasStepConfig<StepInput, OperationInput, OperationOutput>): QueryStep<StepInput, OperationInput, OperationOutput>;
334
+ /** Configuration for the listOrganizations connector Step. */
335
+ interface ListOrganizationsStepConfig<StepInput, OperationInput = ListOrganizationsInput, OperationOutput = OrganizationsList> extends Omit<QueryStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
336
+ /** Named connection supplying this operation. */
337
+ connection: Connection<{
338
+ listOrganizations(): Query<OperationInput, OperationOutput>;
339
+ }>;
340
+ /** Name matching the bound connection. */
341
+ connectionName: string;
342
+ /** Buffer completed the operation. */
343
+ listed: StepTarget<QueryResult<OperationOutput>>;
344
+ /** Buffer conclusively rejected the request. */
345
+ providerRejected?: StepTarget<QueryResult<OperationOutput>>;
346
+ /** Buffer returned malformed or oversized JSON. */
347
+ invalidResponse?: StepTarget<QueryResult<OperationOutput>>;
348
+ /** Local input or credentials are invalid. */
349
+ defect?: StepTarget<QueryResult<OperationOutput>>;
350
+ }
351
+ /** Build the listOrganizations Step from a named connection. */
352
+ declare function newListOrganizationsStep<StepInput, OperationInput = ListOrganizationsInput, OperationOutput = OrganizationsList>(configuration: ListOrganizationsStepConfig<StepInput, OperationInput, OperationOutput>): QueryStep<StepInput, OperationInput, OperationOutput>;
353
+ /** Configuration for the listChannels connector Step. */
354
+ interface ListChannelsStepConfig<StepInput, OperationInput = ListChannelsInput, OperationOutput = ChannelsList> extends Omit<QueryStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
355
+ /** Named connection supplying this operation. */
356
+ connection: Connection<{
357
+ listChannels(): Query<OperationInput, OperationOutput>;
358
+ }>;
359
+ /** Name matching the bound connection. */
360
+ connectionName: string;
361
+ /** Buffer completed the operation. */
362
+ listed: StepTarget<QueryResult<OperationOutput>>;
363
+ /** Buffer conclusively rejected the request. */
364
+ providerRejected?: StepTarget<QueryResult<OperationOutput>>;
365
+ /** Buffer returned malformed or oversized JSON. */
366
+ invalidResponse?: StepTarget<QueryResult<OperationOutput>>;
367
+ /** Local input or credentials are invalid. */
368
+ defect?: StepTarget<QueryResult<OperationOutput>>;
369
+ }
370
+ /** Build the listChannels Step from a named connection. */
371
+ declare function newListChannelsStep<StepInput, OperationInput = ListChannelsInput, OperationOutput = ChannelsList>(configuration: ListChannelsStepConfig<StepInput, OperationInput, OperationOutput>): QueryStep<StepInput, OperationInput, OperationOutput>;
372
+ /** Configuration for the getPost connector Step. */
373
+ interface GetPostStepConfig<StepInput, OperationInput = GetPostInput, OperationOutput = PostProfile> extends Omit<QueryStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
374
+ /** Named connection supplying this operation. */
375
+ connection: Connection<{
376
+ getPost(): Query<OperationInput, OperationOutput>;
377
+ }>;
378
+ /** Name matching the bound connection. */
379
+ connectionName: string;
380
+ /** Buffer completed the operation. */
381
+ found: StepTarget<QueryResult<OperationOutput>>;
382
+ /** Buffer did not find the post. */
383
+ notFound?: StepTarget<QueryResult<OperationOutput>>;
384
+ /** Buffer conclusively rejected the request. */
385
+ providerRejected?: StepTarget<QueryResult<OperationOutput>>;
386
+ /** Buffer returned malformed or oversized JSON. */
387
+ invalidResponse?: StepTarget<QueryResult<OperationOutput>>;
388
+ /** Local input or credentials are invalid. */
389
+ defect?: StepTarget<QueryResult<OperationOutput>>;
390
+ }
391
+ /** Build the getPost Step from a named connection. */
392
+ declare function newGetPostStep<StepInput, OperationInput = GetPostInput, OperationOutput = PostProfile>(configuration: GetPostStepConfig<StepInput, OperationInput, OperationOutput>): QueryStep<StepInput, OperationInput, OperationOutput>;
393
+ /** Configuration for the listPosts connector Step. */
394
+ interface ListPostsStepConfig<StepInput, OperationInput = ListPostsInput, OperationOutput = PostsList> extends Omit<QueryStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
395
+ /** Named connection supplying this operation. */
396
+ connection: Connection<{
397
+ listPosts(): Query<OperationInput, OperationOutput>;
398
+ }>;
399
+ /** Name matching the bound connection. */
400
+ connectionName: string;
401
+ /** Buffer completed the operation. */
402
+ listed: StepTarget<QueryResult<OperationOutput>>;
403
+ /** Buffer conclusively rejected the request. */
404
+ providerRejected?: StepTarget<QueryResult<OperationOutput>>;
405
+ /** Buffer returned malformed or oversized JSON. */
406
+ invalidResponse?: StepTarget<QueryResult<OperationOutput>>;
407
+ /** Local input or credentials are invalid. */
408
+ defect?: StepTarget<QueryResult<OperationOutput>>;
409
+ }
410
+ /** Build the listPosts Step from a named connection. */
411
+ declare function newListPostsStep<StepInput, OperationInput = ListPostsInput, OperationOutput = PostsList>(configuration: ListPostsStepConfig<StepInput, OperationInput, OperationOutput>): QueryStep<StepInput, OperationInput, OperationOutput>;
412
+ /** Configuration for the createPost connector Step. */
413
+ interface CreatePostStepConfig<StepInput, OperationInput = CreatePostInput, OperationOutput = PostProfile> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
414
+ /** Named connection supplying this operation. */
415
+ connection: Connection<{
416
+ createPost(): Mutation<OperationInput, OperationOutput>;
417
+ }>;
418
+ /** Name matching the bound connection. */
419
+ connectionName: string;
420
+ /** Buffer completed the operation. */
421
+ created: StepTarget<MutationResult<OperationOutput>>;
422
+ /** Buffer conclusively rejected the request. */
423
+ providerRejected?: StepTarget<MutationResult<OperationOutput>>;
424
+ /** A post may have been created but cannot be confirmed. */
425
+ uncertain?: StepTarget<MutationResult<OperationOutput>>;
426
+ /** Local input or credentials are invalid. */
427
+ defect?: StepTarget<MutationResult<OperationOutput>>;
428
+ }
429
+ /** Build the createPost Step from a named connection. */
430
+ declare function newCreatePostStep<StepInput, OperationInput = CreatePostInput, OperationOutput = PostProfile>(configuration: CreatePostStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
431
+ /** Configuration for the createScheduledPost connector Step. */
432
+ interface CreateScheduledPostStepConfig<StepInput, OperationInput = CreateScheduledPostInput, OperationOutput = PostProfile> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
433
+ /** Named connection supplying this operation. */
434
+ connection: Connection<{
435
+ createScheduledPost(): Mutation<OperationInput, OperationOutput>;
436
+ }>;
437
+ /** Name matching the bound connection. */
438
+ connectionName: string;
439
+ /** Buffer scheduled the post. */
440
+ created: StepTarget<MutationResult<OperationOutput>>;
441
+ /** Buffer conclusively rejected the post. */
442
+ providerRejected?: StepTarget<MutationResult<OperationOutput>>;
443
+ /** A scheduled post may have been created but cannot be confirmed. */
444
+ uncertain?: StepTarget<MutationResult<OperationOutput>>;
445
+ /** Local input or credentials are invalid. */
446
+ defect?: StepTarget<MutationResult<OperationOutput>>;
447
+ }
448
+ /** Build the createScheduledPost Step from a named connection. */
449
+ declare function newCreateScheduledPostStep<StepInput, OperationInput = CreateScheduledPostInput, OperationOutput = PostProfile>(configuration: CreateScheduledPostStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
450
+ /** Configuration for the publishPostNow connector Step. */
451
+ interface PublishPostNowStepConfig<StepInput, OperationInput = PublishPostNowInput, OperationOutput = PostProfile> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
452
+ /** Named connection supplying this operation. */
453
+ connection: Connection<{
454
+ publishPostNow(): Mutation<OperationInput, OperationOutput>;
455
+ }>;
456
+ /** Name matching the bound connection. */
457
+ connectionName: string;
458
+ /** Buffer accepted the post for immediate publishing. */
459
+ created: StepTarget<MutationResult<OperationOutput>>;
460
+ /** Buffer conclusively rejected the post. */
461
+ providerRejected?: StepTarget<MutationResult<OperationOutput>>;
462
+ /** A post may have been published but cannot be confirmed. */
463
+ uncertain?: StepTarget<MutationResult<OperationOutput>>;
464
+ /** Local input or credentials are invalid. */
465
+ defect?: StepTarget<MutationResult<OperationOutput>>;
466
+ }
467
+ /** Build the publishPostNow Step from a named connection. */
468
+ declare function newPublishPostNowStep<StepInput, OperationInput = PublishPostNowInput, OperationOutput = PostProfile>(configuration: PublishPostNowStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
469
+ /** Configuration for the editPost connector Step. */
470
+ interface EditPostStepConfig<StepInput, OperationInput = EditPostInput, OperationOutput = PostProfile> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
471
+ /** Named connection supplying this operation. */
472
+ connection: Connection<{
473
+ editPost(): Mutation<OperationInput, OperationOutput>;
474
+ }>;
475
+ /** Name matching the bound connection. */
476
+ connectionName: string;
477
+ /** Buffer completed the operation. */
478
+ updated: StepTarget<MutationResult<OperationOutput>>;
479
+ /** Buffer conclusively rejected the request. */
480
+ providerRejected?: StepTarget<MutationResult<OperationOutput>>;
481
+ /** Buffer returned malformed or oversized JSON. */
482
+ invalidResponse?: StepTarget<MutationResult<OperationOutput>>;
483
+ /** Local input or credentials are invalid. */
484
+ defect?: StepTarget<MutationResult<OperationOutput>>;
485
+ /** Accepted for compatibility; ignored because the operation is safe to repeat. */
486
+ maxSends?: number;
487
+ }
488
+ /** Build the editPost Step from a named connection. */
489
+ declare function newEditPostStep<StepInput, OperationInput = EditPostInput, OperationOutput = PostProfile>(configuration: EditPostStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
490
+ /** Configuration for the deletePost connector Step. */
491
+ interface DeletePostStepConfig<StepInput, OperationInput = DeletePostInput, OperationOutput = PostDeleteResult> extends Omit<MutationStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
492
+ /** Named connection supplying this operation. */
493
+ connection: Connection<{
494
+ deletePost(): Mutation<OperationInput, OperationOutput>;
495
+ }>;
496
+ /** Name matching the bound connection. */
497
+ connectionName: string;
498
+ /** Buffer completed the operation. */
499
+ deleted: StepTarget<MutationResult<OperationOutput>>;
500
+ /** Buffer conclusively rejected the request. */
501
+ providerRejected?: StepTarget<MutationResult<OperationOutput>>;
502
+ /** Buffer returned malformed or oversized JSON. */
503
+ invalidResponse?: StepTarget<MutationResult<OperationOutput>>;
504
+ /** Local input or credentials are invalid. */
505
+ defect?: StepTarget<MutationResult<OperationOutput>>;
506
+ /** Accepted for compatibility; ignored because the operation is safe to repeat. */
507
+ maxSends?: number;
508
+ }
509
+ /** Build the deletePost Step from a named connection. */
510
+ declare function newDeletePostStep<StepInput, OperationInput = DeletePostInput, OperationOutput = PostDeleteResult>(configuration: DeletePostStepConfig<StepInput, OperationInput, OperationOutput>): MutationStep<StepInput, OperationInput, OperationOutput>;
40
511
  /** Configuration for the getChannel connector Step. */
41
512
  interface GetChannelStepConfig<StepInput, OperationInput = GetChannelInput, OperationOutput = ChannelProfile> extends Omit<QueryStepConfig<StepInput, OperationInput, OperationOutput>, 'operation' | 'connection' | 'branches'> {
42
513
  /** Named connection supplying this operation. */
@@ -62,6 +533,91 @@ declare function newGetChannelStep<StepInput, OperationInput = GetChannelInput,
62
533
  /** Open one named Buffer connection from Dex project configuration. */
63
534
  declare function newProjectConnection(project: LoadedProject, connectionName: string): Connection<Operations>;
64
535
 
536
+ declare abstract class BufferQuery {
537
+ protected readonly client: BufferClient;
538
+ protected abstract readonly contract: QueryDefinition;
539
+ /** Bind the authenticated Buffer client. */
540
+ constructor(client: BufferClient);
541
+ /** Return the manifest operation contract. */
542
+ definition(): QueryDefinition;
543
+ }
544
+ declare abstract class BufferMutation {
545
+ protected readonly client: BufferClient;
546
+ protected abstract readonly contract: MutationDefinition;
547
+ /** Bind the authenticated Buffer client. */
548
+ constructor(client: BufferClient);
549
+ /** Return the manifest operation contract. */
550
+ definition(): MutationDefinition;
551
+ /** Use the stable Dex call ID across attempts. */
552
+ idempotencyKey(callID: CallID): string;
553
+ }
554
+ /** List organizations accessible to this key. */
555
+ declare class ListOrganizationsOperation extends BufferQuery implements Query<ListOrganizationsInput, OrganizationsList> {
556
+ protected readonly contract: QueryDefinition;
557
+ /** Read organization IDs and names. */
558
+ invoke(call: Call, input: ListOrganizationsInput): Promise<QueryAttempt<OrganizationsList>>;
559
+ }
560
+ /** List the channels in an organization. */
561
+ declare class ListChannelsOperation extends BufferQuery implements Query<ListChannelsInput, ChannelsList> {
562
+ protected readonly contract: QueryDefinition;
563
+ /** Read channel IDs, names, and services. */
564
+ invoke(call: Call, input: ListChannelsInput): Promise<QueryAttempt<ChannelsList>>;
565
+ }
566
+ /** Read one Buffer post by ID. */
567
+ declare class GetPostOperation extends BufferQuery implements Query<GetPostInput, PostProfile> {
568
+ protected readonly contract: QueryDefinition;
569
+ /** Read the post and validate its identity. */
570
+ invoke(call: Call, input: GetPostInput): Promise<QueryAttempt<PostProfile>>;
571
+ }
572
+ /** Read a page of an organization's posts. */
573
+ declare class ListPostsOperation extends BufferQuery implements Query<ListPostsInput, PostsList> {
574
+ protected readonly contract: QueryDefinition;
575
+ /** Read post summaries and their cursor. */
576
+ invoke(call: Call, input: ListPostsInput): Promise<QueryAttempt<PostsList>>;
577
+ }
578
+ /** Read a page of an organization's ideas. */
579
+ declare class ListIdeasOperation extends BufferQuery implements Query<ListIdeasInput, IdeasPage> {
580
+ protected readonly contract: QueryDefinition;
581
+ /** Read idea summaries and their cursor. */
582
+ invoke(call: Call, input: ListIdeasInput): Promise<QueryAttempt<IdeasPage>>;
583
+ }
584
+ /** Create a text idea with bounded sends after ambiguous outcomes. */
585
+ declare class CreateIdeaOperation extends BufferMutation implements Mutation<CreateIdeaInput, IdeaProfile> {
586
+ protected readonly contract: MutationDefinition;
587
+ /** Create an idea with the requested title and text. */
588
+ invoke(call: Call, input: CreateIdeaInput): Promise<MutationAttempt<IdeaProfile>>;
589
+ }
590
+ /** Add one post to a channel's queue. */
591
+ declare class CreatePostOperation extends BufferMutation implements Mutation<CreatePostInput, PostProfile> {
592
+ protected readonly contract: MutationDefinition;
593
+ /** Queue the post with automatic scheduling. */
594
+ invoke(call: Call, input: CreatePostInput): Promise<MutationAttempt<PostProfile>>;
595
+ }
596
+ /** Create one post for a particular scheduled time. */
597
+ declare class CreateScheduledPostOperation extends BufferMutation implements Mutation<CreateScheduledPostInput, PostProfile> {
598
+ protected readonly contract: MutationDefinition;
599
+ /** Queue one post at the supplied RFC 3339 timestamp. */
600
+ invoke(call: Call, input: CreateScheduledPostInput): Promise<MutationAttempt<PostProfile>>;
601
+ }
602
+ /** Create one post for immediate publishing. */
603
+ declare class PublishPostNowOperation extends BufferMutation implements Mutation<PublishPostNowInput, PostProfile> {
604
+ protected readonly contract: MutationDefinition;
605
+ /** Submit the post for immediate publishing. */
606
+ invoke(call: Call, input: PublishPostNowInput): Promise<MutationAttempt<PostProfile>>;
607
+ }
608
+ /** Replace the text and supplied media of one Buffer post. */
609
+ declare class EditPostOperation extends BufferMutation implements Mutation<EditPostInput, PostProfile> {
610
+ protected readonly contract: MutationDefinition;
611
+ /** Replace the selected post's content. */
612
+ invoke(call: Call, input: EditPostInput): Promise<MutationAttempt<PostProfile>>;
613
+ }
614
+ /** Remove one post from Buffer. */
615
+ declare class DeletePostOperation extends BufferMutation implements Mutation<DeletePostInput, PostDeleteResult> {
616
+ protected readonly contract: MutationDefinition;
617
+ /** Remove the post and report the confirmed ID. */
618
+ invoke(call: Call, input: DeletePostInput): Promise<MutationAttempt<PostDeleteResult>>;
619
+ }
620
+
65
621
  /** Injectable provider sender for tests and local applications. */
66
622
  interface BufferClientOptions {
67
623
  /** Provider sender; omitted uses the SDK transport. */ send?: (request: ProviderRequest) => Promise<ProviderResponse>;
@@ -70,7 +626,7 @@ interface Exchange {
70
626
  status: number;
71
627
  body: Uint8Array;
72
628
  retryAfterMs: number;
73
- error?: 'credential' | 'request' | 'tooLarge';
629
+ error?: 'credential' | 'request' | 'tooLarge' | 'interrupted';
74
630
  }
75
631
  /** Authenticated Buffer GraphQL client for channel lookups. */
76
632
  declare class BufferClient {
@@ -82,8 +638,32 @@ declare class BufferClient {
82
638
  /** Validate provider configuration without contacting Buffer. */
83
639
  constructor(config: Config, credentials: CredentialProvider<Credentials>, options?: BufferClientOptions);
84
640
  /** Bind the getChannel Query. */ getChannel(): GetChannelOperation;
641
+ /** Bind the create idea operation. */
642
+ createIdea(): CreateIdeaOperation;
643
+ /** Bind the list ideas operation. */
644
+ listIdeas(): ListIdeasOperation;
645
+ /** Bind the list organizations operation. */
646
+ listOrganizations(): ListOrganizationsOperation;
647
+ /** Bind the list channels operation. */
648
+ listChannels(): ListChannelsOperation;
649
+ /** Bind the get post operation. */
650
+ getPost(): GetPostOperation;
651
+ /** Bind the list posts operation. */
652
+ listPosts(): ListPostsOperation;
653
+ /** Bind the create post operation. */
654
+ createPost(): CreatePostOperation;
655
+ /** Bind the create scheduled post operation. */
656
+ createScheduledPost(): CreateScheduledPostOperation;
657
+ /** Bind the publish post now operation. */
658
+ publishPostNow(): PublishPostNowOperation;
659
+ /** Bind the edit post operation. */
660
+ editPost(): EditPostOperation;
661
+ /** Bind the delete post operation. */
662
+ deletePost(): DeletePostOperation;
85
663
  /** Resolve credentials and send one bounded channel lookup. */
86
664
  get(call: Call, input: GetChannelInput): Promise<Exchange>;
665
+ /** Send one authenticated GraphQL request with a bounded response and optional write deadline. */
666
+ executeGraphQL(call: Call, query: string, variables: Record<string, unknown>, signal?: AbortSignal): Promise<Exchange>;
87
667
  }
88
668
  /** Read one channel by its Buffer GraphQL ID. */
89
669
  declare class GetChannelOperation implements Query<GetChannelInput, ChannelProfile> {
@@ -94,4 +674,4 @@ declare class GetChannelOperation implements Query<GetChannelInput, ChannelProfi
94
674
  invoke(call: Call, input: GetChannelInput): Promise<QueryAttempt<ChannelProfile>>;
95
675
  }
96
676
 
97
- export { BufferClient, type BufferClientOptions, ChannelProfile, Config, Connection, ConnectorID, Credentials, GetChannelBranch, GetChannelBranchDefect, GetChannelBranchFound, GetChannelBranchInvalidResponse, GetChannelBranchNotFound, GetChannelBranchProviderRejected, GetChannelDefinition, GetChannelInput, GetChannelMetadata, GetChannelOperation, type GetChannelStepConfig, ProviderID, newGetChannelStep, newProjectConnection };
677
+ export { BufferClient, type BufferClientOptions, ChannelProfile, ChannelsList, Config, Connection, ConnectorID, CreateIdeaBranch, CreateIdeaBranchCreated, CreateIdeaBranchDefect, CreateIdeaBranchProviderRejected, CreateIdeaBranchUncertain, CreateIdeaDefinition, CreateIdeaInput, CreateIdeaMetadata, CreateIdeaOperation, type CreateIdeaStepConfig, CreatePostBranch, CreatePostBranchCreated, CreatePostBranchDefect, CreatePostBranchProviderRejected, CreatePostBranchUncertain, CreatePostDefinition, CreatePostInput, CreatePostMetadata, CreatePostOperation, type CreatePostStepConfig, CreateScheduledPostBranch, CreateScheduledPostBranchCreated, CreateScheduledPostBranchDefect, CreateScheduledPostBranchProviderRejected, CreateScheduledPostBranchUncertain, CreateScheduledPostDefinition, CreateScheduledPostInput, CreateScheduledPostMetadata, CreateScheduledPostOperation, type CreateScheduledPostStepConfig, Credentials, DeletePostBranch, DeletePostBranchDefect, DeletePostBranchDeleted, DeletePostBranchInvalidResponse, DeletePostBranchProviderRejected, DeletePostDefinition, DeletePostInput, DeletePostMetadata, DeletePostOperation, type DeletePostStepConfig, EditPostBranch, EditPostBranchDefect, EditPostBranchInvalidResponse, EditPostBranchProviderRejected, EditPostBranchUpdated, EditPostDefinition, EditPostInput, EditPostMetadata, EditPostOperation, type EditPostStepConfig, GetChannelBranch, GetChannelBranchDefect, GetChannelBranchFound, GetChannelBranchInvalidResponse, GetChannelBranchNotFound, GetChannelBranchProviderRejected, GetChannelDefinition, GetChannelInput, GetChannelMetadata, GetChannelOperation, type GetChannelStepConfig, GetPostBranch, GetPostBranchDefect, GetPostBranchFound, GetPostBranchInvalidResponse, GetPostBranchNotFound, GetPostBranchProviderRejected, GetPostDefinition, GetPostInput, GetPostMetadata, GetPostOperation, type GetPostStepConfig, IdeaProfile, IdeasPage, ListChannelsBranch, ListChannelsBranchDefect, ListChannelsBranchInvalidResponse, ListChannelsBranchListed, ListChannelsBranchProviderRejected, ListChannelsDefinition, ListChannelsInput, ListChannelsMetadata, ListChannelsOperation, type ListChannelsStepConfig, ListIdeasBranch, ListIdeasBranchDefect, ListIdeasBranchInvalidResponse, ListIdeasBranchListed, ListIdeasBranchProviderRejected, ListIdeasDefinition, ListIdeasInput, ListIdeasMetadata, ListIdeasOperation, type ListIdeasStepConfig, ListOrganizationsBranch, ListOrganizationsBranchDefect, ListOrganizationsBranchInvalidResponse, ListOrganizationsBranchListed, ListOrganizationsBranchProviderRejected, ListOrganizationsDefinition, ListOrganizationsInput, ListOrganizationsMetadata, ListOrganizationsOperation, type ListOrganizationsStepConfig, ListPostsBranch, ListPostsBranchDefect, ListPostsBranchInvalidResponse, ListPostsBranchListed, ListPostsBranchProviderRejected, ListPostsDefinition, ListPostsInput, ListPostsMetadata, ListPostsOperation, type ListPostsStepConfig, OrganizationsList, PostDeleteResult, PostProfile, PostsList, ProviderID, PublishPostNowBranch, PublishPostNowBranchCreated, PublishPostNowBranchDefect, PublishPostNowBranchProviderRejected, PublishPostNowBranchUncertain, PublishPostNowDefinition, PublishPostNowInput, PublishPostNowMetadata, PublishPostNowOperation, type PublishPostNowStepConfig, newCreateIdeaStep, newCreatePostStep, newCreateScheduledPostStep, newDeletePostStep, newEditPostStep, newGetChannelStep, newGetPostStep, newListChannelsStep, newListIdeasStep, newListOrganizationsStep, newListPostsStep, newProjectConnection, newPublishPostNowStep };