@superdurable/connector-buffer 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +24 -2
- package/dex-connector.json +814 -0
- package/dist/chunk-Q62AX6CW.js +603 -0
- package/dist/connection-BmjeWE6m.d.ts +422 -0
- package/dist/index.d.ts +677 -0
- package/dist/index.js +1114 -0
- package/dist/mock.d.ts +243 -0
- package/dist/mock.js +590 -0
- package/package.json +59 -4
package/dist/mock.js
ADDED
|
@@ -0,0 +1,590 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ChannelProfileSchema,
|
|
3
|
+
ChannelsListSchema,
|
|
4
|
+
CreateIdeaDefinition,
|
|
5
|
+
CreateIdeaInputSchema,
|
|
6
|
+
CreatePostDefinition,
|
|
7
|
+
CreatePostInputSchema,
|
|
8
|
+
CreateScheduledPostDefinition,
|
|
9
|
+
CreateScheduledPostInputSchema,
|
|
10
|
+
DeletePostDefinition,
|
|
11
|
+
DeletePostInputSchema,
|
|
12
|
+
EditPostDefinition,
|
|
13
|
+
EditPostInputSchema,
|
|
14
|
+
GetChannelDefinition,
|
|
15
|
+
GetChannelInputSchema,
|
|
16
|
+
GetPostDefinition,
|
|
17
|
+
GetPostInputSchema,
|
|
18
|
+
IdeaProfileSchema,
|
|
19
|
+
IdeasPageSchema,
|
|
20
|
+
ListChannelsDefinition,
|
|
21
|
+
ListChannelsInputSchema,
|
|
22
|
+
ListIdeasDefinition,
|
|
23
|
+
ListIdeasInputSchema,
|
|
24
|
+
ListOrganizationsDefinition,
|
|
25
|
+
ListOrganizationsInputSchema,
|
|
26
|
+
ListPostsDefinition,
|
|
27
|
+
ListPostsInputSchema,
|
|
28
|
+
OrganizationIdentitySchema,
|
|
29
|
+
OrganizationsListSchema,
|
|
30
|
+
PostAssetSchema,
|
|
31
|
+
PostDeleteResultSchema,
|
|
32
|
+
PostProfileSchema,
|
|
33
|
+
PostsListSchema,
|
|
34
|
+
ProviderID,
|
|
35
|
+
PublishPostNowDefinition,
|
|
36
|
+
PublishPostNowInputSchema,
|
|
37
|
+
newConnectionWithOperations,
|
|
38
|
+
parseExactIntegerJSON
|
|
39
|
+
} from "./chunk-Q62AX6CW.js";
|
|
40
|
+
|
|
41
|
+
// src/generated/mock.ts
|
|
42
|
+
import { branchCase, retryCase, uncertainCase, newMutation, newQuery } from "@superdurable/connectors-sdk/connectormock";
|
|
43
|
+
var emptyCreateIdeaInput = CreateIdeaInputSchema.parse({
|
|
44
|
+
"organizationId": "",
|
|
45
|
+
"title": "",
|
|
46
|
+
"text": ""
|
|
47
|
+
});
|
|
48
|
+
var emptyIdeaProfile = IdeaProfileSchema.parse({
|
|
49
|
+
"id": "",
|
|
50
|
+
"title": "",
|
|
51
|
+
"text": ""
|
|
52
|
+
});
|
|
53
|
+
var emptyListIdeasInput = ListIdeasInputSchema.parse({
|
|
54
|
+
"organizationId": "",
|
|
55
|
+
"first": 0
|
|
56
|
+
});
|
|
57
|
+
var emptyIdeasPage = IdeasPageSchema.parse({
|
|
58
|
+
"ideas": [],
|
|
59
|
+
"hasNextPage": false
|
|
60
|
+
});
|
|
61
|
+
var emptyListOrganizationsInput = ListOrganizationsInputSchema.parse({});
|
|
62
|
+
var emptyOrganizationIdentity = OrganizationIdentitySchema.parse({
|
|
63
|
+
"id": "",
|
|
64
|
+
"name": ""
|
|
65
|
+
});
|
|
66
|
+
var emptyOrganizationsList = OrganizationsListSchema.parse({
|
|
67
|
+
"organizations": []
|
|
68
|
+
});
|
|
69
|
+
var emptyListChannelsInput = ListChannelsInputSchema.parse({
|
|
70
|
+
"organizationId": ""
|
|
71
|
+
});
|
|
72
|
+
var emptyChannelProfile = ChannelProfileSchema.parse({
|
|
73
|
+
"id": "",
|
|
74
|
+
"name": "",
|
|
75
|
+
"service": ""
|
|
76
|
+
});
|
|
77
|
+
var emptyChannelsList = ChannelsListSchema.parse({
|
|
78
|
+
"channels": []
|
|
79
|
+
});
|
|
80
|
+
var emptyGetPostInput = GetPostInputSchema.parse({
|
|
81
|
+
"postId": ""
|
|
82
|
+
});
|
|
83
|
+
var emptyPostProfile = PostProfileSchema.parse({
|
|
84
|
+
"id": "",
|
|
85
|
+
"text": "",
|
|
86
|
+
"channelId": ""
|
|
87
|
+
});
|
|
88
|
+
var emptyListPostsInput = ListPostsInputSchema.parse({
|
|
89
|
+
"organizationId": "",
|
|
90
|
+
"first": 0
|
|
91
|
+
});
|
|
92
|
+
var emptyPostsList = PostsListSchema.parse({
|
|
93
|
+
"posts": [],
|
|
94
|
+
"hasNextPage": false
|
|
95
|
+
});
|
|
96
|
+
var emptyPostAsset = PostAssetSchema.parse({
|
|
97
|
+
"type": "",
|
|
98
|
+
"url": ""
|
|
99
|
+
});
|
|
100
|
+
var emptyCreatePostInput = CreatePostInputSchema.parse({
|
|
101
|
+
"channelId": "",
|
|
102
|
+
"text": ""
|
|
103
|
+
});
|
|
104
|
+
var emptyCreateScheduledPostInput = CreateScheduledPostInputSchema.parse({
|
|
105
|
+
"channelId": "",
|
|
106
|
+
"text": "",
|
|
107
|
+
"dueAt": ""
|
|
108
|
+
});
|
|
109
|
+
var emptyPublishPostNowInput = PublishPostNowInputSchema.parse({
|
|
110
|
+
"channelId": "",
|
|
111
|
+
"text": ""
|
|
112
|
+
});
|
|
113
|
+
var emptyEditPostInput = EditPostInputSchema.parse({
|
|
114
|
+
"postId": "",
|
|
115
|
+
"text": ""
|
|
116
|
+
});
|
|
117
|
+
var emptyDeletePostInput = DeletePostInputSchema.parse({
|
|
118
|
+
"postId": ""
|
|
119
|
+
});
|
|
120
|
+
var emptyPostDeleteResult = PostDeleteResultSchema.parse({
|
|
121
|
+
"id": ""
|
|
122
|
+
});
|
|
123
|
+
var emptyGetChannelInput = GetChannelInputSchema.parse({
|
|
124
|
+
"channelId": ""
|
|
125
|
+
});
|
|
126
|
+
function createIdeaCreated(value, failure) {
|
|
127
|
+
return branchCase("created", value, failure);
|
|
128
|
+
}
|
|
129
|
+
function createIdeaProviderRejected(value, failure) {
|
|
130
|
+
return branchCase("providerRejected", value, failure);
|
|
131
|
+
}
|
|
132
|
+
function createIdeaDefect(value, failure) {
|
|
133
|
+
return branchCase("defect", value, failure);
|
|
134
|
+
}
|
|
135
|
+
function createIdeaRetry(failure, retryAfterMs = 0) {
|
|
136
|
+
return retryCase(failure, retryAfterMs);
|
|
137
|
+
}
|
|
138
|
+
function createIdeaUncertain(value, failure) {
|
|
139
|
+
return uncertainCase(value, failure);
|
|
140
|
+
}
|
|
141
|
+
function createIdeaCreatedDefault() {
|
|
142
|
+
const value = IdeaProfileSchema.parse(parseExactIntegerJSON('{"id":"idea-1","text":"Sample text","title":"Sample idea"}'));
|
|
143
|
+
return branchCase("created", value);
|
|
144
|
+
}
|
|
145
|
+
function createIdeaDefault() {
|
|
146
|
+
return createIdeaCreatedDefault();
|
|
147
|
+
}
|
|
148
|
+
function listIdeasListed(value, failure) {
|
|
149
|
+
return branchCase("listed", value, failure);
|
|
150
|
+
}
|
|
151
|
+
function listIdeasProviderRejected(value, failure) {
|
|
152
|
+
return branchCase("providerRejected", value, failure);
|
|
153
|
+
}
|
|
154
|
+
function listIdeasInvalidResponse(value, failure) {
|
|
155
|
+
return branchCase("invalidResponse", value, failure);
|
|
156
|
+
}
|
|
157
|
+
function listIdeasDefect(value, failure) {
|
|
158
|
+
return branchCase("defect", value, failure);
|
|
159
|
+
}
|
|
160
|
+
function listIdeasRetry(failure, retryAfterMs = 0) {
|
|
161
|
+
return retryCase(failure, retryAfterMs);
|
|
162
|
+
}
|
|
163
|
+
function listIdeasListedDefault() {
|
|
164
|
+
const value = IdeasPageSchema.parse(parseExactIntegerJSON('{"endCursor":"cursor-1","hasNextPage":false,"ideas":[{"id":"idea-1","text":"Sample text","title":"Sample idea"}]}'));
|
|
165
|
+
return branchCase("listed", value);
|
|
166
|
+
}
|
|
167
|
+
function listIdeasDefault() {
|
|
168
|
+
return listIdeasListedDefault();
|
|
169
|
+
}
|
|
170
|
+
function listOrganizationsListed(value, failure) {
|
|
171
|
+
return branchCase("listed", value, failure);
|
|
172
|
+
}
|
|
173
|
+
function listOrganizationsProviderRejected(value, failure) {
|
|
174
|
+
return branchCase("providerRejected", value, failure);
|
|
175
|
+
}
|
|
176
|
+
function listOrganizationsInvalidResponse(value, failure) {
|
|
177
|
+
return branchCase("invalidResponse", value, failure);
|
|
178
|
+
}
|
|
179
|
+
function listOrganizationsDefect(value, failure) {
|
|
180
|
+
return branchCase("defect", value, failure);
|
|
181
|
+
}
|
|
182
|
+
function listOrganizationsRetry(failure, retryAfterMs = 0) {
|
|
183
|
+
return retryCase(failure, retryAfterMs);
|
|
184
|
+
}
|
|
185
|
+
function listOrganizationsListedDefault() {
|
|
186
|
+
const value = OrganizationsListSchema.parse(parseExactIntegerJSON('{"organizations":[{"id":"org-1","name":"Example Organization"}]}'));
|
|
187
|
+
return branchCase("listed", value);
|
|
188
|
+
}
|
|
189
|
+
function listOrganizationsDefault() {
|
|
190
|
+
return listOrganizationsListedDefault();
|
|
191
|
+
}
|
|
192
|
+
function listChannelsListed(value, failure) {
|
|
193
|
+
return branchCase("listed", value, failure);
|
|
194
|
+
}
|
|
195
|
+
function listChannelsProviderRejected(value, failure) {
|
|
196
|
+
return branchCase("providerRejected", value, failure);
|
|
197
|
+
}
|
|
198
|
+
function listChannelsInvalidResponse(value, failure) {
|
|
199
|
+
return branchCase("invalidResponse", value, failure);
|
|
200
|
+
}
|
|
201
|
+
function listChannelsDefect(value, failure) {
|
|
202
|
+
return branchCase("defect", value, failure);
|
|
203
|
+
}
|
|
204
|
+
function listChannelsRetry(failure, retryAfterMs = 0) {
|
|
205
|
+
return retryCase(failure, retryAfterMs);
|
|
206
|
+
}
|
|
207
|
+
function listChannelsListedDefault() {
|
|
208
|
+
const value = ChannelsListSchema.parse(parseExactIntegerJSON('{"channels":[{"id":"channel-1","name":"Example Channel","service":"instagram"}]}'));
|
|
209
|
+
return branchCase("listed", value);
|
|
210
|
+
}
|
|
211
|
+
function listChannelsDefault() {
|
|
212
|
+
return listChannelsListedDefault();
|
|
213
|
+
}
|
|
214
|
+
function getPostFound(value, failure) {
|
|
215
|
+
return branchCase("found", value, failure);
|
|
216
|
+
}
|
|
217
|
+
function getPostNotFound(value, failure) {
|
|
218
|
+
return branchCase("notFound", value, failure);
|
|
219
|
+
}
|
|
220
|
+
function getPostProviderRejected(value, failure) {
|
|
221
|
+
return branchCase("providerRejected", value, failure);
|
|
222
|
+
}
|
|
223
|
+
function getPostInvalidResponse(value, failure) {
|
|
224
|
+
return branchCase("invalidResponse", value, failure);
|
|
225
|
+
}
|
|
226
|
+
function getPostDefect(value, failure) {
|
|
227
|
+
return branchCase("defect", value, failure);
|
|
228
|
+
}
|
|
229
|
+
function getPostRetry(failure, retryAfterMs = 0) {
|
|
230
|
+
return retryCase(failure, retryAfterMs);
|
|
231
|
+
}
|
|
232
|
+
function getPostFoundDefault() {
|
|
233
|
+
const value = PostProfileSchema.parse(parseExactIntegerJSON('{"channelId":"channel-1","id":"post-1","text":"Sample post"}'));
|
|
234
|
+
return branchCase("found", value);
|
|
235
|
+
}
|
|
236
|
+
function getPostDefault() {
|
|
237
|
+
return getPostFoundDefault();
|
|
238
|
+
}
|
|
239
|
+
function listPostsListed(value, failure) {
|
|
240
|
+
return branchCase("listed", value, failure);
|
|
241
|
+
}
|
|
242
|
+
function listPostsProviderRejected(value, failure) {
|
|
243
|
+
return branchCase("providerRejected", value, failure);
|
|
244
|
+
}
|
|
245
|
+
function listPostsInvalidResponse(value, failure) {
|
|
246
|
+
return branchCase("invalidResponse", value, failure);
|
|
247
|
+
}
|
|
248
|
+
function listPostsDefect(value, failure) {
|
|
249
|
+
return branchCase("defect", value, failure);
|
|
250
|
+
}
|
|
251
|
+
function listPostsRetry(failure, retryAfterMs = 0) {
|
|
252
|
+
return retryCase(failure, retryAfterMs);
|
|
253
|
+
}
|
|
254
|
+
function listPostsListedDefault() {
|
|
255
|
+
const value = PostsListSchema.parse(parseExactIntegerJSON('{"endCursor":"cursor-1","hasNextPage":false,"posts":[{"channelId":"channel-1","id":"post-1","text":"Sample post"}]}'));
|
|
256
|
+
return branchCase("listed", value);
|
|
257
|
+
}
|
|
258
|
+
function listPostsDefault() {
|
|
259
|
+
return listPostsListedDefault();
|
|
260
|
+
}
|
|
261
|
+
function createPostCreated(value, failure) {
|
|
262
|
+
return branchCase("created", value, failure);
|
|
263
|
+
}
|
|
264
|
+
function createPostProviderRejected(value, failure) {
|
|
265
|
+
return branchCase("providerRejected", value, failure);
|
|
266
|
+
}
|
|
267
|
+
function createPostDefect(value, failure) {
|
|
268
|
+
return branchCase("defect", value, failure);
|
|
269
|
+
}
|
|
270
|
+
function createPostRetry(failure, retryAfterMs = 0) {
|
|
271
|
+
return retryCase(failure, retryAfterMs);
|
|
272
|
+
}
|
|
273
|
+
function createPostUncertain(value, failure) {
|
|
274
|
+
return uncertainCase(value, failure);
|
|
275
|
+
}
|
|
276
|
+
function createPostCreatedDefault() {
|
|
277
|
+
const value = PostProfileSchema.parse(parseExactIntegerJSON('{"channelId":"channel-1","id":"post-1","text":"Sample post"}'));
|
|
278
|
+
return branchCase("created", value);
|
|
279
|
+
}
|
|
280
|
+
function createPostDefault() {
|
|
281
|
+
return createPostCreatedDefault();
|
|
282
|
+
}
|
|
283
|
+
function createScheduledPostCreated(value, failure) {
|
|
284
|
+
return branchCase("created", value, failure);
|
|
285
|
+
}
|
|
286
|
+
function createScheduledPostProviderRejected(value, failure) {
|
|
287
|
+
return branchCase("providerRejected", value, failure);
|
|
288
|
+
}
|
|
289
|
+
function createScheduledPostDefect(value, failure) {
|
|
290
|
+
return branchCase("defect", value, failure);
|
|
291
|
+
}
|
|
292
|
+
function createScheduledPostRetry(failure, retryAfterMs = 0) {
|
|
293
|
+
return retryCase(failure, retryAfterMs);
|
|
294
|
+
}
|
|
295
|
+
function createScheduledPostUncertain(value, failure) {
|
|
296
|
+
return uncertainCase(value, failure);
|
|
297
|
+
}
|
|
298
|
+
function createScheduledPostCreatedDefault() {
|
|
299
|
+
const value = PostProfileSchema.parse(parseExactIntegerJSON('{"channelId":"channel-1","id":"post-2","text":"Scheduled post"}'));
|
|
300
|
+
return branchCase("created", value);
|
|
301
|
+
}
|
|
302
|
+
function createScheduledPostDefault() {
|
|
303
|
+
return createScheduledPostCreatedDefault();
|
|
304
|
+
}
|
|
305
|
+
function publishPostNowCreated(value, failure) {
|
|
306
|
+
return branchCase("created", value, failure);
|
|
307
|
+
}
|
|
308
|
+
function publishPostNowProviderRejected(value, failure) {
|
|
309
|
+
return branchCase("providerRejected", value, failure);
|
|
310
|
+
}
|
|
311
|
+
function publishPostNowDefect(value, failure) {
|
|
312
|
+
return branchCase("defect", value, failure);
|
|
313
|
+
}
|
|
314
|
+
function publishPostNowRetry(failure, retryAfterMs = 0) {
|
|
315
|
+
return retryCase(failure, retryAfterMs);
|
|
316
|
+
}
|
|
317
|
+
function publishPostNowUncertain(value, failure) {
|
|
318
|
+
return uncertainCase(value, failure);
|
|
319
|
+
}
|
|
320
|
+
function publishPostNowCreatedDefault() {
|
|
321
|
+
const value = PostProfileSchema.parse(parseExactIntegerJSON('{"channelId":"channel-1","id":"post-3","text":"Published post"}'));
|
|
322
|
+
return branchCase("created", value);
|
|
323
|
+
}
|
|
324
|
+
function publishPostNowDefault() {
|
|
325
|
+
return publishPostNowCreatedDefault();
|
|
326
|
+
}
|
|
327
|
+
function editPostUpdated(value, failure) {
|
|
328
|
+
return branchCase("updated", value, failure);
|
|
329
|
+
}
|
|
330
|
+
function editPostProviderRejected(value, failure) {
|
|
331
|
+
return branchCase("providerRejected", value, failure);
|
|
332
|
+
}
|
|
333
|
+
function editPostInvalidResponse(value, failure) {
|
|
334
|
+
return branchCase("invalidResponse", value, failure);
|
|
335
|
+
}
|
|
336
|
+
function editPostDefect(value, failure) {
|
|
337
|
+
return branchCase("defect", value, failure);
|
|
338
|
+
}
|
|
339
|
+
function editPostRetry(failure, retryAfterMs = 0) {
|
|
340
|
+
return retryCase(failure, retryAfterMs);
|
|
341
|
+
}
|
|
342
|
+
function editPostUpdatedDefault() {
|
|
343
|
+
const value = PostProfileSchema.parse(parseExactIntegerJSON('{"channelId":"channel-1","id":"post-1","text":"Updated post"}'));
|
|
344
|
+
return branchCase("updated", value);
|
|
345
|
+
}
|
|
346
|
+
function editPostDefault() {
|
|
347
|
+
return editPostUpdatedDefault();
|
|
348
|
+
}
|
|
349
|
+
function deletePostDeleted(value, failure) {
|
|
350
|
+
return branchCase("deleted", value, failure);
|
|
351
|
+
}
|
|
352
|
+
function deletePostProviderRejected(value, failure) {
|
|
353
|
+
return branchCase("providerRejected", value, failure);
|
|
354
|
+
}
|
|
355
|
+
function deletePostInvalidResponse(value, failure) {
|
|
356
|
+
return branchCase("invalidResponse", value, failure);
|
|
357
|
+
}
|
|
358
|
+
function deletePostDefect(value, failure) {
|
|
359
|
+
return branchCase("defect", value, failure);
|
|
360
|
+
}
|
|
361
|
+
function deletePostRetry(failure, retryAfterMs = 0) {
|
|
362
|
+
return retryCase(failure, retryAfterMs);
|
|
363
|
+
}
|
|
364
|
+
function deletePostDeletedDefault() {
|
|
365
|
+
const value = PostDeleteResultSchema.parse(parseExactIntegerJSON('{"id":"post-1"}'));
|
|
366
|
+
return branchCase("deleted", value);
|
|
367
|
+
}
|
|
368
|
+
function deletePostDefault() {
|
|
369
|
+
return deletePostDeletedDefault();
|
|
370
|
+
}
|
|
371
|
+
function getChannelFound(value, failure) {
|
|
372
|
+
return branchCase("found", value, failure);
|
|
373
|
+
}
|
|
374
|
+
function getChannelNotFound(value, failure) {
|
|
375
|
+
return branchCase("notFound", value, failure);
|
|
376
|
+
}
|
|
377
|
+
function getChannelProviderRejected(value, failure) {
|
|
378
|
+
return branchCase("providerRejected", value, failure);
|
|
379
|
+
}
|
|
380
|
+
function getChannelInvalidResponse(value, failure) {
|
|
381
|
+
return branchCase("invalidResponse", value, failure);
|
|
382
|
+
}
|
|
383
|
+
function getChannelDefect(value, failure) {
|
|
384
|
+
return branchCase("defect", value, failure);
|
|
385
|
+
}
|
|
386
|
+
function getChannelRetry(failure, retryAfterMs = 0) {
|
|
387
|
+
return retryCase(failure, retryAfterMs);
|
|
388
|
+
}
|
|
389
|
+
function getChannelFoundDefault() {
|
|
390
|
+
const value = ChannelProfileSchema.parse(parseExactIntegerJSON('{"id":"channel-1","name":"Example Channel","service":"instagram"}'));
|
|
391
|
+
return branchCase("found", value);
|
|
392
|
+
}
|
|
393
|
+
function getChannelDefault() {
|
|
394
|
+
return getChannelFoundDefault();
|
|
395
|
+
}
|
|
396
|
+
var GeneratedMock = class {
|
|
397
|
+
#createIdea;
|
|
398
|
+
#listIdeas;
|
|
399
|
+
#listOrganizations;
|
|
400
|
+
#listChannels;
|
|
401
|
+
#getPost;
|
|
402
|
+
#listPosts;
|
|
403
|
+
#createPost;
|
|
404
|
+
#createScheduledPost;
|
|
405
|
+
#publishPostNow;
|
|
406
|
+
#editPost;
|
|
407
|
+
#deletePost;
|
|
408
|
+
#getChannel;
|
|
409
|
+
#connection;
|
|
410
|
+
constructor(connectionName) {
|
|
411
|
+
this.#createIdea = newMutation(CreateIdeaDefinition).default(createIdeaDefault());
|
|
412
|
+
this.#listIdeas = newQuery(ListIdeasDefinition).default(listIdeasDefault());
|
|
413
|
+
this.#listOrganizations = newQuery(ListOrganizationsDefinition).default(listOrganizationsDefault());
|
|
414
|
+
this.#listChannels = newQuery(ListChannelsDefinition).default(listChannelsDefault());
|
|
415
|
+
this.#getPost = newQuery(GetPostDefinition).default(getPostDefault());
|
|
416
|
+
this.#listPosts = newQuery(ListPostsDefinition).default(listPostsDefault());
|
|
417
|
+
this.#createPost = newMutation(CreatePostDefinition).default(createPostDefault());
|
|
418
|
+
this.#createScheduledPost = newMutation(CreateScheduledPostDefinition).default(createScheduledPostDefault());
|
|
419
|
+
this.#publishPostNow = newMutation(PublishPostNowDefinition).default(publishPostNowDefault());
|
|
420
|
+
this.#editPost = newMutation(EditPostDefinition).default(editPostDefault());
|
|
421
|
+
this.#deletePost = newMutation(DeletePostDefinition).default(deletePostDefault());
|
|
422
|
+
this.#getChannel = newQuery(GetChannelDefinition).default(getChannelDefault());
|
|
423
|
+
this.#connection = newConnectionWithOperations(this, { provider: ProviderID, name: connectionName });
|
|
424
|
+
}
|
|
425
|
+
connection() {
|
|
426
|
+
return this.#connection;
|
|
427
|
+
}
|
|
428
|
+
createIdea() {
|
|
429
|
+
return this.#createIdea;
|
|
430
|
+
}
|
|
431
|
+
listIdeas() {
|
|
432
|
+
return this.#listIdeas;
|
|
433
|
+
}
|
|
434
|
+
listOrganizations() {
|
|
435
|
+
return this.#listOrganizations;
|
|
436
|
+
}
|
|
437
|
+
listChannels() {
|
|
438
|
+
return this.#listChannels;
|
|
439
|
+
}
|
|
440
|
+
getPost() {
|
|
441
|
+
return this.#getPost;
|
|
442
|
+
}
|
|
443
|
+
listPosts() {
|
|
444
|
+
return this.#listPosts;
|
|
445
|
+
}
|
|
446
|
+
createPost() {
|
|
447
|
+
return this.#createPost;
|
|
448
|
+
}
|
|
449
|
+
createScheduledPost() {
|
|
450
|
+
return this.#createScheduledPost;
|
|
451
|
+
}
|
|
452
|
+
publishPostNow() {
|
|
453
|
+
return this.#publishPostNow;
|
|
454
|
+
}
|
|
455
|
+
editPost() {
|
|
456
|
+
return this.#editPost;
|
|
457
|
+
}
|
|
458
|
+
deletePost() {
|
|
459
|
+
return this.#deletePost;
|
|
460
|
+
}
|
|
461
|
+
getChannel() {
|
|
462
|
+
return this.#getChannel;
|
|
463
|
+
}
|
|
464
|
+
assertNoFailures() {
|
|
465
|
+
this.#createIdea.assertNoFailures();
|
|
466
|
+
this.#listIdeas.assertNoFailures();
|
|
467
|
+
this.#listOrganizations.assertNoFailures();
|
|
468
|
+
this.#listChannels.assertNoFailures();
|
|
469
|
+
this.#getPost.assertNoFailures();
|
|
470
|
+
this.#listPosts.assertNoFailures();
|
|
471
|
+
this.#createPost.assertNoFailures();
|
|
472
|
+
this.#createScheduledPost.assertNoFailures();
|
|
473
|
+
this.#publishPostNow.assertNoFailures();
|
|
474
|
+
this.#editPost.assertNoFailures();
|
|
475
|
+
this.#deletePost.assertNoFailures();
|
|
476
|
+
this.#getChannel.assertNoFailures();
|
|
477
|
+
}
|
|
478
|
+
};
|
|
479
|
+
export {
|
|
480
|
+
GeneratedMock,
|
|
481
|
+
GeneratedMock as Mock,
|
|
482
|
+
createIdeaCreated,
|
|
483
|
+
createIdeaCreatedDefault,
|
|
484
|
+
createIdeaDefault,
|
|
485
|
+
createIdeaDefect,
|
|
486
|
+
createIdeaProviderRejected,
|
|
487
|
+
createIdeaRetry,
|
|
488
|
+
createIdeaUncertain,
|
|
489
|
+
createPostCreated,
|
|
490
|
+
createPostCreatedDefault,
|
|
491
|
+
createPostDefault,
|
|
492
|
+
createPostDefect,
|
|
493
|
+
createPostProviderRejected,
|
|
494
|
+
createPostRetry,
|
|
495
|
+
createPostUncertain,
|
|
496
|
+
createScheduledPostCreated,
|
|
497
|
+
createScheduledPostCreatedDefault,
|
|
498
|
+
createScheduledPostDefault,
|
|
499
|
+
createScheduledPostDefect,
|
|
500
|
+
createScheduledPostProviderRejected,
|
|
501
|
+
createScheduledPostRetry,
|
|
502
|
+
createScheduledPostUncertain,
|
|
503
|
+
deletePostDefault,
|
|
504
|
+
deletePostDefect,
|
|
505
|
+
deletePostDeleted,
|
|
506
|
+
deletePostDeletedDefault,
|
|
507
|
+
deletePostInvalidResponse,
|
|
508
|
+
deletePostProviderRejected,
|
|
509
|
+
deletePostRetry,
|
|
510
|
+
editPostDefault,
|
|
511
|
+
editPostDefect,
|
|
512
|
+
editPostInvalidResponse,
|
|
513
|
+
editPostProviderRejected,
|
|
514
|
+
editPostRetry,
|
|
515
|
+
editPostUpdated,
|
|
516
|
+
editPostUpdatedDefault,
|
|
517
|
+
emptyChannelProfile,
|
|
518
|
+
emptyChannelsList,
|
|
519
|
+
emptyCreateIdeaInput,
|
|
520
|
+
emptyCreatePostInput,
|
|
521
|
+
emptyCreateScheduledPostInput,
|
|
522
|
+
emptyDeletePostInput,
|
|
523
|
+
emptyEditPostInput,
|
|
524
|
+
emptyGetChannelInput,
|
|
525
|
+
emptyGetPostInput,
|
|
526
|
+
emptyIdeaProfile,
|
|
527
|
+
emptyIdeasPage,
|
|
528
|
+
emptyListChannelsInput,
|
|
529
|
+
emptyListIdeasInput,
|
|
530
|
+
emptyListOrganizationsInput,
|
|
531
|
+
emptyListPostsInput,
|
|
532
|
+
emptyOrganizationIdentity,
|
|
533
|
+
emptyOrganizationsList,
|
|
534
|
+
emptyPostAsset,
|
|
535
|
+
emptyPostDeleteResult,
|
|
536
|
+
emptyPostProfile,
|
|
537
|
+
emptyPostsList,
|
|
538
|
+
emptyPublishPostNowInput,
|
|
539
|
+
getChannelDefault,
|
|
540
|
+
getChannelDefect,
|
|
541
|
+
getChannelFound,
|
|
542
|
+
getChannelFoundDefault,
|
|
543
|
+
getChannelInvalidResponse,
|
|
544
|
+
getChannelNotFound,
|
|
545
|
+
getChannelProviderRejected,
|
|
546
|
+
getChannelRetry,
|
|
547
|
+
getPostDefault,
|
|
548
|
+
getPostDefect,
|
|
549
|
+
getPostFound,
|
|
550
|
+
getPostFoundDefault,
|
|
551
|
+
getPostInvalidResponse,
|
|
552
|
+
getPostNotFound,
|
|
553
|
+
getPostProviderRejected,
|
|
554
|
+
getPostRetry,
|
|
555
|
+
listChannelsDefault,
|
|
556
|
+
listChannelsDefect,
|
|
557
|
+
listChannelsInvalidResponse,
|
|
558
|
+
listChannelsListed,
|
|
559
|
+
listChannelsListedDefault,
|
|
560
|
+
listChannelsProviderRejected,
|
|
561
|
+
listChannelsRetry,
|
|
562
|
+
listIdeasDefault,
|
|
563
|
+
listIdeasDefect,
|
|
564
|
+
listIdeasInvalidResponse,
|
|
565
|
+
listIdeasListed,
|
|
566
|
+
listIdeasListedDefault,
|
|
567
|
+
listIdeasProviderRejected,
|
|
568
|
+
listIdeasRetry,
|
|
569
|
+
listOrganizationsDefault,
|
|
570
|
+
listOrganizationsDefect,
|
|
571
|
+
listOrganizationsInvalidResponse,
|
|
572
|
+
listOrganizationsListed,
|
|
573
|
+
listOrganizationsListedDefault,
|
|
574
|
+
listOrganizationsProviderRejected,
|
|
575
|
+
listOrganizationsRetry,
|
|
576
|
+
listPostsDefault,
|
|
577
|
+
listPostsDefect,
|
|
578
|
+
listPostsInvalidResponse,
|
|
579
|
+
listPostsListed,
|
|
580
|
+
listPostsListedDefault,
|
|
581
|
+
listPostsProviderRejected,
|
|
582
|
+
listPostsRetry,
|
|
583
|
+
publishPostNowCreated,
|
|
584
|
+
publishPostNowCreatedDefault,
|
|
585
|
+
publishPostNowDefault,
|
|
586
|
+
publishPostNowDefect,
|
|
587
|
+
publishPostNowProviderRejected,
|
|
588
|
+
publishPostNowRetry,
|
|
589
|
+
publishPostNowUncertain
|
|
590
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,61 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superdurable/connector-buffer",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"description": "
|
|
6
|
-
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"description": "Buffer connector for Dex TypeScript applications",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/superdurable/dex-connectors-library.git",
|
|
9
|
+
"directory": "connectors/buffer/typescript"
|
|
10
|
+
},
|
|
11
|
+
"type": "module",
|
|
12
|
+
"engines": {
|
|
13
|
+
"node": "^22.0.0 || ^24.0.0"
|
|
14
|
+
},
|
|
15
|
+
"module": "./dist/index.js",
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"import": "./dist/index.js"
|
|
21
|
+
},
|
|
22
|
+
"./mock": {
|
|
23
|
+
"types": "./dist/mock.d.ts",
|
|
24
|
+
"import": "./dist/mock.js"
|
|
25
|
+
},
|
|
26
|
+
"./dex-connector.json": "./dex-connector.json"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"dist",
|
|
30
|
+
"README.md",
|
|
31
|
+
"LICENSE",
|
|
32
|
+
"dex-connector.json"
|
|
33
|
+
],
|
|
34
|
+
"scripts": {
|
|
35
|
+
"prepack": "npm run build",
|
|
36
|
+
"build": "tsup src/index.ts src/mock.ts --format esm --dts --clean",
|
|
37
|
+
"typecheck": "tsc --noEmit",
|
|
38
|
+
"lint": "eslint src test examples",
|
|
39
|
+
"test": "vitest run --exclude 'test/integration/**'",
|
|
40
|
+
"test:integration": "vitest run test/integration/*.integration.test.ts",
|
|
41
|
+
"example:worker": "tsx examples/channel-read/worker.ts",
|
|
42
|
+
"example:start": "tsx examples/channel-read/start.ts",
|
|
43
|
+
"check": "npm run typecheck && npm run lint && npm test && npm run build"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@superdurable/connectors-sdk": "0.12.0",
|
|
47
|
+
"@superdurable/dex": ">=1.28.0",
|
|
48
|
+
"zod": "^4.1.0"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@eslint/js": "^9.0.0",
|
|
52
|
+
"@types/node": "^22.0.0",
|
|
53
|
+
"eslint": "^9.0.0",
|
|
54
|
+
"tsup": "^8.0.0",
|
|
55
|
+
"tsx": "^4.23.15",
|
|
56
|
+
"typescript": "^5.9.0",
|
|
57
|
+
"typescript-eslint": "^8.0.0",
|
|
58
|
+
"vitest": "^3.0.0",
|
|
59
|
+
"yaml": "^2.9.1"
|
|
60
|
+
}
|
|
61
|
+
}
|