@hackersheet/core 0.1.0-alpha.1

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.
Files changed (104) hide show
  1. package/README.md +3 -0
  2. package/dist/chunk-3GXIDS5H.mjs +23 -0
  3. package/dist/chunk-5X53IRLN.mjs +2417 -0
  4. package/dist/chunk-7R3CATQT.mjs +143 -0
  5. package/dist/chunk-C3G2CMRR.mjs +13 -0
  6. package/dist/chunk-EXRG4APR.mjs +34 -0
  7. package/dist/chunk-FIFBNWMD.mjs +21 -0
  8. package/dist/chunk-FRXB4F4I.mjs +0 -0
  9. package/dist/chunk-JGQBUURE.mjs +60 -0
  10. package/dist/chunk-PA32N4A6.mjs +6 -0
  11. package/dist/chunk-PUTNZ4GU.mjs +12 -0
  12. package/dist/chunk-RRJUH3D4.mjs +0 -0
  13. package/dist/chunk-SYHSU6VH.mjs +38 -0
  14. package/dist/chunk-TXCPBPKN.mjs +12 -0
  15. package/dist/chunk-VKWT2GNZ.mjs +0 -0
  16. package/dist/chunk-WIUPPYM5.mjs +60 -0
  17. package/dist/chunk-YAN7TO2B.mjs +0 -0
  18. package/dist/chunk-ZZFAG7Y6.mjs +705 -0
  19. package/dist/client/client.d.mts +51 -0
  20. package/dist/client/client.d.ts +51 -0
  21. package/dist/client/client.js +3424 -0
  22. package/dist/client/client.mjs +20 -0
  23. package/dist/client/create-client.d.mts +11 -0
  24. package/dist/client/create-client.d.ts +11 -0
  25. package/dist/client/create-client.js +3429 -0
  26. package/dist/client/create-client.mjs +21 -0
  27. package/dist/client/operations/get-document.d.mts +15 -0
  28. package/dist/client/operations/get-document.d.ts +15 -0
  29. package/dist/client/operations/get-document.js +881 -0
  30. package/dist/client/operations/get-document.mjs +14 -0
  31. package/dist/client/operations/get-documents.d.mts +14 -0
  32. package/dist/client/operations/get-documents.d.ts +14 -0
  33. package/dist/client/operations/get-documents.js +798 -0
  34. package/dist/client/operations/get-documents.mjs +14 -0
  35. package/dist/client/operations/get-tag.d.mts +12 -0
  36. package/dist/client/operations/get-tag.d.ts +12 -0
  37. package/dist/client/operations/get-tag.js +776 -0
  38. package/dist/client/operations/get-tag.mjs +14 -0
  39. package/dist/client/operations/get-tags.d.mts +14 -0
  40. package/dist/client/operations/get-tags.d.ts +14 -0
  41. package/dist/client/operations/get-tags.js +772 -0
  42. package/dist/client/operations/get-tags.mjs +14 -0
  43. package/dist/client/operations/get-websites.d.mts +14 -0
  44. package/dist/client/operations/get-websites.d.ts +14 -0
  45. package/dist/client/operations/get-websites.js +798 -0
  46. package/dist/client/operations/get-websites.mjs +14 -0
  47. package/dist/client/operations/index.d.mts +11 -0
  48. package/dist/client/operations/index.d.ts +11 -0
  49. package/dist/client/operations/index.js +1041 -0
  50. package/dist/client/operations/index.mjs +31 -0
  51. package/dist/gql/fragment-masking.d.mts +22 -0
  52. package/dist/gql/fragment-masking.d.ts +22 -0
  53. package/dist/gql/fragment-masking.js +47 -0
  54. package/dist/gql/fragment-masking.mjs +10 -0
  55. package/dist/gql/gql.d.mts +70 -0
  56. package/dist/gql/gql.d.ts +70 -0
  57. package/dist/gql/gql.js +739 -0
  58. package/dist/gql/gql.mjs +7 -0
  59. package/dist/gql/graphql.d.mts +722 -0
  60. package/dist/gql/graphql.d.ts +722 -0
  61. package/dist/gql/graphql.js +733 -0
  62. package/dist/gql/graphql.mjs +14 -0
  63. package/dist/gql/index.d.mts +4 -0
  64. package/dist/gql/index.d.ts +4 -0
  65. package/dist/gql/index.js +761 -0
  66. package/dist/gql/index.mjs +16 -0
  67. package/dist/index.d.mts +8 -0
  68. package/dist/index.d.ts +8 -0
  69. package/dist/index.js +3429 -0
  70. package/dist/index.mjs +22 -0
  71. package/dist/types/document.d.mts +71 -0
  72. package/dist/types/document.d.ts +71 -0
  73. package/dist/types/document.js +18 -0
  74. package/dist/types/document.mjs +0 -0
  75. package/dist/types/index.d.mts +3 -0
  76. package/dist/types/index.d.ts +3 -0
  77. package/dist/types/index.js +18 -0
  78. package/dist/types/index.mjs +1 -0
  79. package/dist/types/tag.d.mts +23 -0
  80. package/dist/types/tag.d.ts +23 -0
  81. package/dist/types/tag.js +18 -0
  82. package/dist/types/tag.mjs +0 -0
  83. package/dist/types/website.d.mts +29 -0
  84. package/dist/types/website.d.ts +29 -0
  85. package/dist/types/website.js +18 -0
  86. package/dist/types/website.mjs +0 -0
  87. package/dist/utils/index.d.mts +2 -0
  88. package/dist/utils/index.d.ts +2 -0
  89. package/dist/utils/index.js +49 -0
  90. package/dist/utils/index.mjs +12 -0
  91. package/dist/utils/make-after-cursor-from-page.d.mts +3 -0
  92. package/dist/utils/make-after-cursor-from-page.d.ts +3 -0
  93. package/dist/utils/make-after-cursor-from-page.js +32 -0
  94. package/dist/utils/make-after-cursor-from-page.mjs +6 -0
  95. package/dist/utils/non-nullable-filter.d.mts +3 -0
  96. package/dist/utils/non-nullable-filter.d.ts +3 -0
  97. package/dist/utils/non-nullable-filter.js +30 -0
  98. package/dist/utils/non-nullable-filter.mjs +6 -0
  99. package/dist/utils/to-array-from-edges.d.mts +6 -0
  100. package/dist/utils/to-array-from-edges.d.ts +6 -0
  101. package/dist/utils/to-array-from-edges.js +34 -0
  102. package/dist/utils/to-array-from-edges.mjs +7 -0
  103. package/license.md +21 -0
  104. package/package.json +36 -0
@@ -0,0 +1,1041 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/client/operations/index.ts
21
+ var operations_exports = {};
22
+ __export(operations_exports, {
23
+ makeGetDocumentResponse: () => makeGetDocumentResponse,
24
+ makeGetDocumentsResponse: () => makeGetDocumentsResponse,
25
+ makeGetTagResponse: () => makeGetTagResponse,
26
+ makeGetTagsResponse: () => makeGetTagsResponse,
27
+ makeGetWebsitesResponse: () => makeGetWebsitesResponse
28
+ });
29
+ module.exports = __toCommonJS(operations_exports);
30
+
31
+ // src/gql/graphql.ts
32
+ var DocumentDocument = {
33
+ kind: "Document",
34
+ definitions: [
35
+ {
36
+ kind: "OperationDefinition",
37
+ operation: "query",
38
+ name: { kind: "Name", value: "document" },
39
+ variableDefinitions: [
40
+ {
41
+ kind: "VariableDefinition",
42
+ variable: { kind: "Variable", name: { kind: "Name", value: "slug" } },
43
+ type: { kind: "NamedType", name: { kind: "Name", value: "String" } }
44
+ }
45
+ ],
46
+ selectionSet: {
47
+ kind: "SelectionSet",
48
+ selections: [
49
+ {
50
+ kind: "Field",
51
+ name: { kind: "Name", value: "document" },
52
+ arguments: [
53
+ {
54
+ kind: "Argument",
55
+ name: { kind: "Name", value: "slug" },
56
+ value: { kind: "Variable", name: { kind: "Name", value: "slug" } }
57
+ }
58
+ ],
59
+ selectionSet: {
60
+ kind: "SelectionSet",
61
+ selections: [
62
+ { kind: "Field", name: { kind: "Name", value: "id" } },
63
+ { kind: "Field", name: { kind: "Name", value: "slug" } },
64
+ { kind: "Field", name: { kind: "Name", value: "emoji" } },
65
+ { kind: "Field", name: { kind: "Name", value: "title" } },
66
+ { kind: "Field", name: { kind: "Name", value: "draft" } },
67
+ { kind: "Field", name: { kind: "Name", value: "content" } },
68
+ { kind: "Field", name: { kind: "Name", value: "path" } },
69
+ {
70
+ kind: "Field",
71
+ name: { kind: "Name", value: "tags" },
72
+ selectionSet: {
73
+ kind: "SelectionSet",
74
+ selections: [
75
+ {
76
+ kind: "Field",
77
+ name: { kind: "Name", value: "edges" },
78
+ selectionSet: {
79
+ kind: "SelectionSet",
80
+ selections: [
81
+ {
82
+ kind: "Field",
83
+ name: { kind: "Name", value: "node" },
84
+ selectionSet: {
85
+ kind: "SelectionSet",
86
+ selections: [
87
+ { kind: "Field", name: { kind: "Name", value: "id" } },
88
+ { kind: "Field", name: { kind: "Name", value: "name" } }
89
+ ]
90
+ }
91
+ }
92
+ ]
93
+ }
94
+ }
95
+ ]
96
+ }
97
+ },
98
+ {
99
+ kind: "Field",
100
+ name: { kind: "Name", value: "preview" },
101
+ selectionSet: {
102
+ kind: "SelectionSet",
103
+ selections: [
104
+ { kind: "Field", name: { kind: "Name", value: "id" } },
105
+ { kind: "Field", name: { kind: "Name", value: "width" } },
106
+ { kind: "Field", name: { kind: "Name", value: "height" } },
107
+ { kind: "Field", name: { kind: "Name", value: "path" } },
108
+ { kind: "Field", name: { kind: "Name", value: "fileUrl" } }
109
+ ]
110
+ }
111
+ },
112
+ { kind: "Field", name: { kind: "Name", value: "publishedAt" } },
113
+ { kind: "Field", name: { kind: "Name", value: "modifiedAt" } },
114
+ {
115
+ kind: "Field",
116
+ name: { kind: "Name", value: "assets" },
117
+ selectionSet: {
118
+ kind: "SelectionSet",
119
+ selections: [
120
+ {
121
+ kind: "Field",
122
+ name: { kind: "Name", value: "edges" },
123
+ selectionSet: {
124
+ kind: "SelectionSet",
125
+ selections: [
126
+ {
127
+ kind: "Field",
128
+ name: { kind: "Name", value: "node" },
129
+ selectionSet: {
130
+ kind: "SelectionSet",
131
+ selections: [
132
+ { kind: "Field", name: { kind: "Name", value: "id" } },
133
+ { kind: "Field", name: { kind: "Name", value: "path" } },
134
+ { kind: "Field", name: { kind: "Name", value: "name" } },
135
+ { kind: "Field", name: { kind: "Name", value: "fileUrl" } },
136
+ { kind: "Field", name: { kind: "Name", value: "height" } },
137
+ { kind: "Field", name: { kind: "Name", value: "width" } }
138
+ ]
139
+ }
140
+ }
141
+ ]
142
+ }
143
+ }
144
+ ]
145
+ }
146
+ },
147
+ {
148
+ kind: "Field",
149
+ name: { kind: "Name", value: "outboundLinkDocuments" },
150
+ selectionSet: {
151
+ kind: "SelectionSet",
152
+ selections: [
153
+ {
154
+ kind: "Field",
155
+ name: { kind: "Name", value: "edges" },
156
+ selectionSet: {
157
+ kind: "SelectionSet",
158
+ selections: [
159
+ {
160
+ kind: "Field",
161
+ name: { kind: "Name", value: "node" },
162
+ selectionSet: {
163
+ kind: "SelectionSet",
164
+ selections: [
165
+ { kind: "Field", name: { kind: "Name", value: "id" } },
166
+ { kind: "Field", name: { kind: "Name", value: "slug" } },
167
+ { kind: "Field", name: { kind: "Name", value: "emoji" } },
168
+ { kind: "Field", name: { kind: "Name", value: "title" } },
169
+ { kind: "Field", name: { kind: "Name", value: "draft" } },
170
+ { kind: "Field", name: { kind: "Name", value: "path" } },
171
+ {
172
+ kind: "Field",
173
+ name: { kind: "Name", value: "tags" },
174
+ selectionSet: {
175
+ kind: "SelectionSet",
176
+ selections: [
177
+ {
178
+ kind: "Field",
179
+ name: { kind: "Name", value: "edges" },
180
+ selectionSet: {
181
+ kind: "SelectionSet",
182
+ selections: [
183
+ {
184
+ kind: "Field",
185
+ name: { kind: "Name", value: "node" },
186
+ selectionSet: {
187
+ kind: "SelectionSet",
188
+ selections: [
189
+ { kind: "Field", name: { kind: "Name", value: "id" } },
190
+ { kind: "Field", name: { kind: "Name", value: "name" } }
191
+ ]
192
+ }
193
+ }
194
+ ]
195
+ }
196
+ }
197
+ ]
198
+ }
199
+ },
200
+ { kind: "Field", name: { kind: "Name", value: "publishedAt" } },
201
+ { kind: "Field", name: { kind: "Name", value: "modifiedAt" } }
202
+ ]
203
+ }
204
+ }
205
+ ]
206
+ }
207
+ }
208
+ ]
209
+ }
210
+ },
211
+ {
212
+ kind: "Field",
213
+ name: { kind: "Name", value: "inboundLinkDocuments" },
214
+ selectionSet: {
215
+ kind: "SelectionSet",
216
+ selections: [
217
+ {
218
+ kind: "Field",
219
+ name: { kind: "Name", value: "edges" },
220
+ selectionSet: {
221
+ kind: "SelectionSet",
222
+ selections: [
223
+ {
224
+ kind: "Field",
225
+ name: { kind: "Name", value: "node" },
226
+ selectionSet: {
227
+ kind: "SelectionSet",
228
+ selections: [
229
+ { kind: "Field", name: { kind: "Name", value: "id" } },
230
+ { kind: "Field", name: { kind: "Name", value: "slug" } },
231
+ { kind: "Field", name: { kind: "Name", value: "emoji" } },
232
+ { kind: "Field", name: { kind: "Name", value: "title" } },
233
+ { kind: "Field", name: { kind: "Name", value: "draft" } },
234
+ { kind: "Field", name: { kind: "Name", value: "path" } },
235
+ {
236
+ kind: "Field",
237
+ name: { kind: "Name", value: "tags" },
238
+ selectionSet: {
239
+ kind: "SelectionSet",
240
+ selections: [
241
+ {
242
+ kind: "Field",
243
+ name: { kind: "Name", value: "edges" },
244
+ selectionSet: {
245
+ kind: "SelectionSet",
246
+ selections: [
247
+ {
248
+ kind: "Field",
249
+ name: { kind: "Name", value: "node" },
250
+ selectionSet: {
251
+ kind: "SelectionSet",
252
+ selections: [
253
+ { kind: "Field", name: { kind: "Name", value: "id" } },
254
+ { kind: "Field", name: { kind: "Name", value: "name" } }
255
+ ]
256
+ }
257
+ }
258
+ ]
259
+ }
260
+ }
261
+ ]
262
+ }
263
+ },
264
+ { kind: "Field", name: { kind: "Name", value: "publishedAt" } },
265
+ { kind: "Field", name: { kind: "Name", value: "modifiedAt" } }
266
+ ]
267
+ }
268
+ }
269
+ ]
270
+ }
271
+ }
272
+ ]
273
+ }
274
+ },
275
+ {
276
+ kind: "Field",
277
+ name: { kind: "Name", value: "websites" },
278
+ selectionSet: {
279
+ kind: "SelectionSet",
280
+ selections: [
281
+ {
282
+ kind: "Field",
283
+ name: { kind: "Name", value: "edges" },
284
+ selectionSet: {
285
+ kind: "SelectionSet",
286
+ selections: [
287
+ {
288
+ kind: "Field",
289
+ name: { kind: "Name", value: "node" },
290
+ selectionSet: {
291
+ kind: "SelectionSet",
292
+ selections: [
293
+ { kind: "Field", name: { kind: "Name", value: "id" } },
294
+ { kind: "Field", name: { kind: "Name", value: "url" } },
295
+ { kind: "Field", name: { kind: "Name", value: "domain" } },
296
+ { kind: "Field", name: { kind: "Name", value: "title" } },
297
+ { kind: "Field", name: { kind: "Name", value: "description" } },
298
+ { kind: "Field", name: { kind: "Name", value: "ogSiteName" } },
299
+ { kind: "Field", name: { kind: "Name", value: "ogTitle" } },
300
+ { kind: "Field", name: { kind: "Name", value: "ogType" } },
301
+ { kind: "Field", name: { kind: "Name", value: "ogUrl" } },
302
+ { kind: "Field", name: { kind: "Name", value: "ogDescription" } },
303
+ { kind: "Field", name: { kind: "Name", value: "ogLocale" } },
304
+ {
305
+ kind: "Field",
306
+ name: { kind: "Name", value: "ogImage" },
307
+ selectionSet: {
308
+ kind: "SelectionSet",
309
+ selections: [
310
+ { kind: "Field", name: { kind: "Name", value: "id" } },
311
+ { kind: "Field", name: { kind: "Name", value: "fileUrl" } },
312
+ { kind: "Field", name: { kind: "Name", value: "width" } },
313
+ { kind: "Field", name: { kind: "Name", value: "height" } }
314
+ ]
315
+ }
316
+ }
317
+ ]
318
+ }
319
+ }
320
+ ]
321
+ }
322
+ }
323
+ ]
324
+ }
325
+ }
326
+ ]
327
+ }
328
+ }
329
+ ]
330
+ }
331
+ }
332
+ ]
333
+ };
334
+ var DocumentsDocument = {
335
+ kind: "Document",
336
+ definitions: [
337
+ {
338
+ kind: "OperationDefinition",
339
+ operation: "query",
340
+ name: { kind: "Name", value: "documents" },
341
+ variableDefinitions: [
342
+ {
343
+ kind: "VariableDefinition",
344
+ variable: { kind: "Variable", name: { kind: "Name", value: "after" } },
345
+ type: { kind: "NamedType", name: { kind: "Name", value: "String" } }
346
+ },
347
+ {
348
+ kind: "VariableDefinition",
349
+ variable: { kind: "Variable", name: { kind: "Name", value: "first" } },
350
+ type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }
351
+ },
352
+ {
353
+ kind: "VariableDefinition",
354
+ variable: { kind: "Variable", name: { kind: "Name", value: "filter" } },
355
+ type: { kind: "NamedType", name: { kind: "Name", value: "DocumentConnectionFilter" } }
356
+ },
357
+ {
358
+ kind: "VariableDefinition",
359
+ variable: { kind: "Variable", name: { kind: "Name", value: "sort" } },
360
+ type: { kind: "NamedType", name: { kind: "Name", value: "ConnectionSort" } }
361
+ }
362
+ ],
363
+ selectionSet: {
364
+ kind: "SelectionSet",
365
+ selections: [
366
+ {
367
+ kind: "Field",
368
+ name: { kind: "Name", value: "documents" },
369
+ arguments: [
370
+ {
371
+ kind: "Argument",
372
+ name: { kind: "Name", value: "after" },
373
+ value: { kind: "Variable", name: { kind: "Name", value: "after" } }
374
+ },
375
+ {
376
+ kind: "Argument",
377
+ name: { kind: "Name", value: "first" },
378
+ value: { kind: "Variable", name: { kind: "Name", value: "first" } }
379
+ },
380
+ {
381
+ kind: "Argument",
382
+ name: { kind: "Name", value: "filter" },
383
+ value: { kind: "Variable", name: { kind: "Name", value: "filter" } }
384
+ },
385
+ {
386
+ kind: "Argument",
387
+ name: { kind: "Name", value: "sort" },
388
+ value: { kind: "Variable", name: { kind: "Name", value: "sort" } }
389
+ }
390
+ ],
391
+ selectionSet: {
392
+ kind: "SelectionSet",
393
+ selections: [
394
+ { kind: "Field", name: { kind: "Name", value: "totalCount" } },
395
+ {
396
+ kind: "Field",
397
+ name: { kind: "Name", value: "edges" },
398
+ selectionSet: {
399
+ kind: "SelectionSet",
400
+ selections: [
401
+ {
402
+ kind: "Field",
403
+ name: { kind: "Name", value: "node" },
404
+ selectionSet: {
405
+ kind: "SelectionSet",
406
+ selections: [
407
+ { kind: "Field", name: { kind: "Name", value: "id" } },
408
+ { kind: "Field", name: { kind: "Name", value: "slug" } },
409
+ { kind: "Field", name: { kind: "Name", value: "emoji" } },
410
+ { kind: "Field", name: { kind: "Name", value: "title" } },
411
+ { kind: "Field", name: { kind: "Name", value: "draft" } },
412
+ { kind: "Field", name: { kind: "Name", value: "path" } },
413
+ {
414
+ kind: "Field",
415
+ name: { kind: "Name", value: "tags" },
416
+ selectionSet: {
417
+ kind: "SelectionSet",
418
+ selections: [
419
+ {
420
+ kind: "Field",
421
+ name: { kind: "Name", value: "edges" },
422
+ selectionSet: {
423
+ kind: "SelectionSet",
424
+ selections: [
425
+ {
426
+ kind: "Field",
427
+ name: { kind: "Name", value: "node" },
428
+ selectionSet: {
429
+ kind: "SelectionSet",
430
+ selections: [
431
+ { kind: "Field", name: { kind: "Name", value: "id" } },
432
+ { kind: "Field", name: { kind: "Name", value: "name" } }
433
+ ]
434
+ }
435
+ }
436
+ ]
437
+ }
438
+ }
439
+ ]
440
+ }
441
+ },
442
+ {
443
+ kind: "Field",
444
+ name: { kind: "Name", value: "preview" },
445
+ selectionSet: {
446
+ kind: "SelectionSet",
447
+ selections: [
448
+ { kind: "Field", name: { kind: "Name", value: "id" } },
449
+ { kind: "Field", name: { kind: "Name", value: "width" } },
450
+ { kind: "Field", name: { kind: "Name", value: "height" } },
451
+ { kind: "Field", name: { kind: "Name", value: "path" } },
452
+ { kind: "Field", name: { kind: "Name", value: "fileUrl" } }
453
+ ]
454
+ }
455
+ },
456
+ { kind: "Field", name: { kind: "Name", value: "publishedAt" } },
457
+ { kind: "Field", name: { kind: "Name", value: "modifiedAt" } }
458
+ ]
459
+ }
460
+ }
461
+ ]
462
+ }
463
+ }
464
+ ]
465
+ }
466
+ }
467
+ ]
468
+ }
469
+ }
470
+ ]
471
+ };
472
+ var TagDocument = {
473
+ kind: "Document",
474
+ definitions: [
475
+ {
476
+ kind: "OperationDefinition",
477
+ operation: "query",
478
+ name: { kind: "Name", value: "tag" },
479
+ variableDefinitions: [
480
+ {
481
+ kind: "VariableDefinition",
482
+ variable: { kind: "Variable", name: { kind: "Name", value: "name" } },
483
+ type: { kind: "NamedType", name: { kind: "Name", value: "String" } }
484
+ }
485
+ ],
486
+ selectionSet: {
487
+ kind: "SelectionSet",
488
+ selections: [
489
+ {
490
+ kind: "Field",
491
+ name: { kind: "Name", value: "tag" },
492
+ arguments: [
493
+ {
494
+ kind: "Argument",
495
+ name: { kind: "Name", value: "name" },
496
+ value: { kind: "Variable", name: { kind: "Name", value: "name" } }
497
+ }
498
+ ],
499
+ selectionSet: {
500
+ kind: "SelectionSet",
501
+ selections: [
502
+ { kind: "Field", name: { kind: "Name", value: "id" } },
503
+ { kind: "Field", name: { kind: "Name", value: "name" } },
504
+ { kind: "Field", name: { kind: "Name", value: "documentCount" } },
505
+ { kind: "Field", name: { kind: "Name", value: "documentCountInPublished" } },
506
+ {
507
+ kind: "Field",
508
+ name: { kind: "Name", value: "relatedTags" },
509
+ selectionSet: {
510
+ kind: "SelectionSet",
511
+ selections: [
512
+ {
513
+ kind: "Field",
514
+ name: { kind: "Name", value: "edges" },
515
+ selectionSet: {
516
+ kind: "SelectionSet",
517
+ selections: [
518
+ {
519
+ kind: "Field",
520
+ name: { kind: "Name", value: "node" },
521
+ selectionSet: {
522
+ kind: "SelectionSet",
523
+ selections: [
524
+ { kind: "Field", name: { kind: "Name", value: "id" } },
525
+ { kind: "Field", name: { kind: "Name", value: "name" } },
526
+ { kind: "Field", name: { kind: "Name", value: "documentCount" } },
527
+ { kind: "Field", name: { kind: "Name", value: "documentCountInPublished" } }
528
+ ]
529
+ }
530
+ }
531
+ ]
532
+ }
533
+ }
534
+ ]
535
+ }
536
+ }
537
+ ]
538
+ }
539
+ }
540
+ ]
541
+ }
542
+ }
543
+ ]
544
+ };
545
+ var TagsDocument = {
546
+ kind: "Document",
547
+ definitions: [
548
+ {
549
+ kind: "OperationDefinition",
550
+ operation: "query",
551
+ name: { kind: "Name", value: "tags" },
552
+ variableDefinitions: [
553
+ {
554
+ kind: "VariableDefinition",
555
+ variable: { kind: "Variable", name: { kind: "Name", value: "sort" } },
556
+ type: { kind: "NamedType", name: { kind: "Name", value: "ConnectionSort" } }
557
+ }
558
+ ],
559
+ selectionSet: {
560
+ kind: "SelectionSet",
561
+ selections: [
562
+ {
563
+ kind: "Field",
564
+ name: { kind: "Name", value: "tags" },
565
+ arguments: [
566
+ {
567
+ kind: "Argument",
568
+ name: { kind: "Name", value: "sort" },
569
+ value: { kind: "Variable", name: { kind: "Name", value: "sort" } }
570
+ }
571
+ ],
572
+ selectionSet: {
573
+ kind: "SelectionSet",
574
+ selections: [
575
+ { kind: "Field", name: { kind: "Name", value: "totalCount" } },
576
+ {
577
+ kind: "Field",
578
+ name: { kind: "Name", value: "edges" },
579
+ selectionSet: {
580
+ kind: "SelectionSet",
581
+ selections: [
582
+ {
583
+ kind: "Field",
584
+ name: { kind: "Name", value: "node" },
585
+ selectionSet: {
586
+ kind: "SelectionSet",
587
+ selections: [
588
+ { kind: "Field", name: { kind: "Name", value: "id" } },
589
+ { kind: "Field", name: { kind: "Name", value: "name" } },
590
+ { kind: "Field", name: { kind: "Name", value: "documentCount" } },
591
+ { kind: "Field", name: { kind: "Name", value: "documentCountInPublished" } }
592
+ ]
593
+ }
594
+ }
595
+ ]
596
+ }
597
+ }
598
+ ]
599
+ }
600
+ }
601
+ ]
602
+ }
603
+ }
604
+ ]
605
+ };
606
+ var WebsitesDocument = {
607
+ kind: "Document",
608
+ definitions: [
609
+ {
610
+ kind: "OperationDefinition",
611
+ operation: "query",
612
+ name: { kind: "Name", value: "websites" },
613
+ variableDefinitions: [
614
+ {
615
+ kind: "VariableDefinition",
616
+ variable: { kind: "Variable", name: { kind: "Name", value: "after" } },
617
+ type: { kind: "NamedType", name: { kind: "Name", value: "String" } }
618
+ },
619
+ {
620
+ kind: "VariableDefinition",
621
+ variable: { kind: "Variable", name: { kind: "Name", value: "first" } },
622
+ type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }
623
+ }
624
+ ],
625
+ selectionSet: {
626
+ kind: "SelectionSet",
627
+ selections: [
628
+ {
629
+ kind: "Field",
630
+ name: { kind: "Name", value: "websites" },
631
+ arguments: [
632
+ {
633
+ kind: "Argument",
634
+ name: { kind: "Name", value: "after" },
635
+ value: { kind: "Variable", name: { kind: "Name", value: "after" } }
636
+ },
637
+ {
638
+ kind: "Argument",
639
+ name: { kind: "Name", value: "first" },
640
+ value: { kind: "Variable", name: { kind: "Name", value: "first" } }
641
+ }
642
+ ],
643
+ selectionSet: {
644
+ kind: "SelectionSet",
645
+ selections: [
646
+ { kind: "Field", name: { kind: "Name", value: "totalCount" } },
647
+ {
648
+ kind: "Field",
649
+ name: { kind: "Name", value: "edges" },
650
+ selectionSet: {
651
+ kind: "SelectionSet",
652
+ selections: [
653
+ {
654
+ kind: "Field",
655
+ name: { kind: "Name", value: "node" },
656
+ selectionSet: {
657
+ kind: "SelectionSet",
658
+ selections: [
659
+ { kind: "Field", name: { kind: "Name", value: "id" } },
660
+ { kind: "Field", name: { kind: "Name", value: "url" } },
661
+ { kind: "Field", name: { kind: "Name", value: "domain" } },
662
+ { kind: "Field", name: { kind: "Name", value: "title" } },
663
+ { kind: "Field", name: { kind: "Name", value: "description" } },
664
+ { kind: "Field", name: { kind: "Name", value: "ogSiteName" } },
665
+ { kind: "Field", name: { kind: "Name", value: "ogTitle" } },
666
+ { kind: "Field", name: { kind: "Name", value: "ogType" } },
667
+ { kind: "Field", name: { kind: "Name", value: "ogUrl" } },
668
+ { kind: "Field", name: { kind: "Name", value: "ogDescription" } },
669
+ { kind: "Field", name: { kind: "Name", value: "ogLocale" } },
670
+ {
671
+ kind: "Field",
672
+ name: { kind: "Name", value: "ogImage" },
673
+ selectionSet: {
674
+ kind: "SelectionSet",
675
+ selections: [
676
+ { kind: "Field", name: { kind: "Name", value: "id" } },
677
+ { kind: "Field", name: { kind: "Name", value: "fileUrl" } },
678
+ { kind: "Field", name: { kind: "Name", value: "width" } },
679
+ { kind: "Field", name: { kind: "Name", value: "height" } }
680
+ ]
681
+ }
682
+ },
683
+ {
684
+ kind: "Field",
685
+ name: { kind: "Name", value: "documents" },
686
+ selectionSet: {
687
+ kind: "SelectionSet",
688
+ selections: [
689
+ {
690
+ kind: "Field",
691
+ name: { kind: "Name", value: "edges" },
692
+ selectionSet: {
693
+ kind: "SelectionSet",
694
+ selections: [
695
+ {
696
+ kind: "Field",
697
+ name: { kind: "Name", value: "node" },
698
+ selectionSet: {
699
+ kind: "SelectionSet",
700
+ selections: [
701
+ { kind: "Field", name: { kind: "Name", value: "id" } },
702
+ { kind: "Field", name: { kind: "Name", value: "draft" } },
703
+ { kind: "Field", name: { kind: "Name", value: "title" } },
704
+ { kind: "Field", name: { kind: "Name", value: "slug" } }
705
+ ]
706
+ }
707
+ }
708
+ ]
709
+ }
710
+ }
711
+ ]
712
+ }
713
+ }
714
+ ]
715
+ }
716
+ }
717
+ ]
718
+ }
719
+ }
720
+ ]
721
+ }
722
+ }
723
+ ]
724
+ }
725
+ }
726
+ ]
727
+ };
728
+
729
+ // src/gql/gql.ts
730
+ var documents = {
731
+ "\n query document($slug: String) {\n document(slug: $slug) {\n id\n slug\n emoji\n title\n draft\n content\n path\n tags {\n edges {\n node {\n id\n name\n }\n }\n }\n preview {\n id\n width\n height\n path\n fileUrl\n }\n publishedAt\n modifiedAt\n assets {\n edges {\n node {\n id\n path\n name\n fileUrl\n height\n width\n }\n }\n }\n outboundLinkDocuments {\n edges {\n node {\n id\n slug\n emoji\n title\n draft\n path\n tags {\n edges {\n node {\n id\n name\n }\n }\n }\n publishedAt\n modifiedAt\n }\n }\n }\n inboundLinkDocuments {\n edges {\n node {\n id\n slug\n emoji\n title\n draft\n path\n tags {\n edges {\n node {\n id\n name\n }\n }\n }\n publishedAt\n modifiedAt\n }\n }\n }\n websites {\n edges {\n node {\n id\n url\n domain\n title\n description\n ogSiteName\n ogTitle\n ogType\n ogUrl\n ogDescription\n ogLocale\n ogImage {\n id\n fileUrl\n width\n height\n }\n }\n }\n }\n }\n }\n": DocumentDocument,
732
+ "\n query documents($after: String, $first: Int, $filter: DocumentConnectionFilter, $sort: ConnectionSort) {\n documents(after: $after, first: $first, filter: $filter, sort: $sort) {\n totalCount\n edges {\n node {\n id\n slug\n emoji\n title\n draft\n path\n tags {\n edges {\n node {\n id\n name\n }\n }\n }\n preview {\n id\n width\n height\n path\n fileUrl\n }\n publishedAt\n modifiedAt\n }\n }\n }\n }\n": DocumentsDocument,
733
+ "\n query tag($name: String) {\n tag(name: $name) {\n id\n name\n documentCount\n documentCountInPublished\n relatedTags {\n edges {\n node {\n id\n name\n documentCount\n documentCountInPublished\n }\n }\n }\n }\n }\n": TagDocument,
734
+ "\n query tags($sort: ConnectionSort) {\n tags(sort: $sort) {\n totalCount\n edges {\n node {\n id\n name\n documentCount\n documentCountInPublished\n }\n }\n }\n }\n": TagsDocument,
735
+ "\n query websites($after: String, $first: Int) {\n websites(after: $after, first: $first) {\n totalCount\n edges {\n node {\n id\n url\n domain\n title\n description\n ogSiteName\n ogTitle\n ogType\n ogUrl\n ogDescription\n ogLocale\n ogImage {\n id\n fileUrl\n width\n height\n }\n documents {\n edges {\n node {\n id\n draft\n title\n slug\n }\n }\n }\n }\n }\n }\n }\n": WebsitesDocument
736
+ };
737
+ function graphql(source) {
738
+ return documents[source] ?? {};
739
+ }
740
+
741
+ // src/utils/non-nullable-filter.ts
742
+ var nonNullableFilter = (value) => value != null;
743
+
744
+ // src/utils/to-array-from-edges.ts
745
+ function toArrayFromEdges(edges) {
746
+ if (!edges) return [];
747
+ return edges.map((edge) => edge?.node).filter(nonNullableFilter) ?? [];
748
+ }
749
+
750
+ // src/client/operations/get-document.ts
751
+ graphql(`
752
+ query document($slug: String) {
753
+ document(slug: $slug) {
754
+ id
755
+ slug
756
+ emoji
757
+ title
758
+ draft
759
+ content
760
+ path
761
+ tags {
762
+ edges {
763
+ node {
764
+ id
765
+ name
766
+ }
767
+ }
768
+ }
769
+ preview {
770
+ id
771
+ width
772
+ height
773
+ path
774
+ fileUrl
775
+ }
776
+ publishedAt
777
+ modifiedAt
778
+ assets {
779
+ edges {
780
+ node {
781
+ id
782
+ path
783
+ name
784
+ fileUrl
785
+ height
786
+ width
787
+ }
788
+ }
789
+ }
790
+ outboundLinkDocuments {
791
+ edges {
792
+ node {
793
+ id
794
+ slug
795
+ emoji
796
+ title
797
+ draft
798
+ path
799
+ tags {
800
+ edges {
801
+ node {
802
+ id
803
+ name
804
+ }
805
+ }
806
+ }
807
+ publishedAt
808
+ modifiedAt
809
+ }
810
+ }
811
+ }
812
+ inboundLinkDocuments {
813
+ edges {
814
+ node {
815
+ id
816
+ slug
817
+ emoji
818
+ title
819
+ draft
820
+ path
821
+ tags {
822
+ edges {
823
+ node {
824
+ id
825
+ name
826
+ }
827
+ }
828
+ }
829
+ publishedAt
830
+ modifiedAt
831
+ }
832
+ }
833
+ }
834
+ websites {
835
+ edges {
836
+ node {
837
+ id
838
+ url
839
+ domain
840
+ title
841
+ description
842
+ ogSiteName
843
+ ogTitle
844
+ ogType
845
+ ogUrl
846
+ ogDescription
847
+ ogLocale
848
+ ogImage {
849
+ id
850
+ fileUrl
851
+ width
852
+ height
853
+ }
854
+ }
855
+ }
856
+ }
857
+ }
858
+ }
859
+ `);
860
+ function makeGetDocumentResponse(result) {
861
+ if (!result.data?.document) {
862
+ return { document: null, error: result.error };
863
+ }
864
+ const tmpDoc = result.data?.document;
865
+ const document = {
866
+ ...tmpDoc,
867
+ tags: toArrayFromEdges(tmpDoc.tags?.edges),
868
+ assets: toArrayFromEdges(tmpDoc.assets?.edges),
869
+ outboundLinkDocuments: toArrayFromEdges(tmpDoc.outboundLinkDocuments?.edges).map((doc) => ({
870
+ ...doc,
871
+ tags: toArrayFromEdges(doc.tags?.edges)
872
+ })),
873
+ inboundLinkDocuments: toArrayFromEdges(tmpDoc.inboundLinkDocuments?.edges).map((doc) => ({
874
+ ...doc,
875
+ tags: toArrayFromEdges(doc.tags?.edges)
876
+ })),
877
+ websites: toArrayFromEdges(tmpDoc.websites?.edges)
878
+ };
879
+ const error = result.error;
880
+ return { document, error };
881
+ }
882
+
883
+ // src/client/operations/get-documents.ts
884
+ graphql(`
885
+ query documents($after: String, $first: Int, $filter: DocumentConnectionFilter, $sort: ConnectionSort) {
886
+ documents(after: $after, first: $first, filter: $filter, sort: $sort) {
887
+ totalCount
888
+ edges {
889
+ node {
890
+ id
891
+ slug
892
+ emoji
893
+ title
894
+ draft
895
+ path
896
+ tags {
897
+ edges {
898
+ node {
899
+ id
900
+ name
901
+ }
902
+ }
903
+ }
904
+ preview {
905
+ id
906
+ width
907
+ height
908
+ path
909
+ fileUrl
910
+ }
911
+ publishedAt
912
+ modifiedAt
913
+ }
914
+ }
915
+ }
916
+ }
917
+ `);
918
+ function makeGetDocumentsResponse(result) {
919
+ if (!result.data || !result.data.documents) {
920
+ return { documents: [], totalCount: 0, isEmpty: true, error: result.error };
921
+ }
922
+ const tmpDocs = result.data.documents;
923
+ const documents2 = toArrayFromEdges(tmpDocs?.edges).map((document) => ({
924
+ ...document,
925
+ tags: toArrayFromEdges(document.tags?.edges)
926
+ }));
927
+ const totalCount = result.data?.documents?.totalCount || 0;
928
+ const isEmpty = totalCount === 0;
929
+ const error = result.error;
930
+ return { documents: documents2, totalCount, isEmpty, error };
931
+ }
932
+
933
+ // src/client/operations/get-tag.ts
934
+ graphql(`
935
+ query tag($name: String) {
936
+ tag(name: $name) {
937
+ id
938
+ name
939
+ documentCount
940
+ documentCountInPublished
941
+ relatedTags {
942
+ edges {
943
+ node {
944
+ id
945
+ name
946
+ documentCount
947
+ documentCountInPublished
948
+ }
949
+ }
950
+ }
951
+ }
952
+ }
953
+ `);
954
+ function makeGetTagResponse(result) {
955
+ const tmpTag = result.data?.tag;
956
+ const tag = tmpTag ? { ...tmpTag, relatedTags: toArrayFromEdges(tmpTag.relatedTags?.edges) } : null;
957
+ const error = result.error;
958
+ return { tag, error };
959
+ }
960
+
961
+ // src/client/operations/get-tags.ts
962
+ graphql(`
963
+ query tags($sort: ConnectionSort) {
964
+ tags(sort: $sort) {
965
+ totalCount
966
+ edges {
967
+ node {
968
+ id
969
+ name
970
+ documentCount
971
+ documentCountInPublished
972
+ }
973
+ }
974
+ }
975
+ }
976
+ `);
977
+ function makeGetTagsResponse(result) {
978
+ const tags = toArrayFromEdges(result.data?.tags?.edges);
979
+ const totalCount = result.data?.tags?.totalCount || 0;
980
+ const isEmpty = totalCount === 0;
981
+ const error = result.error;
982
+ return { tags, totalCount, isEmpty, error };
983
+ }
984
+
985
+ // src/client/operations/get-websites.ts
986
+ graphql(`
987
+ query websites($after: String, $first: Int) {
988
+ websites(after: $after, first: $first) {
989
+ totalCount
990
+ edges {
991
+ node {
992
+ id
993
+ url
994
+ domain
995
+ title
996
+ description
997
+ ogSiteName
998
+ ogTitle
999
+ ogType
1000
+ ogUrl
1001
+ ogDescription
1002
+ ogLocale
1003
+ ogImage {
1004
+ id
1005
+ fileUrl
1006
+ width
1007
+ height
1008
+ }
1009
+ documents {
1010
+ edges {
1011
+ node {
1012
+ id
1013
+ draft
1014
+ title
1015
+ slug
1016
+ }
1017
+ }
1018
+ }
1019
+ }
1020
+ }
1021
+ }
1022
+ }
1023
+ `);
1024
+ function makeGetWebsitesResponse(result) {
1025
+ const websites = toArrayFromEdges(result.data?.websites?.edges).map((website) => ({
1026
+ ...website,
1027
+ documents: toArrayFromEdges(website.documents?.edges)
1028
+ }));
1029
+ const totalCount = result.data?.websites?.totalCount || 0;
1030
+ const isEmpty = totalCount === 0;
1031
+ const error = result.error;
1032
+ return { websites, totalCount, isEmpty, error };
1033
+ }
1034
+ // Annotate the CommonJS export names for ESM import in node:
1035
+ 0 && (module.exports = {
1036
+ makeGetDocumentResponse,
1037
+ makeGetDocumentsResponse,
1038
+ makeGetTagResponse,
1039
+ makeGetTagsResponse,
1040
+ makeGetWebsitesResponse
1041
+ });