-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathbasehub-types.d.ts
More file actions
1605 lines (1491 loc) · 57.5 KB
/
basehub-types.d.ts
File metadata and controls
1605 lines (1491 loc) · 57.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
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
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
// @ts-nocheck
/*=============================================================================
* This file was automatically generated by the BaseHub SDK and contains type
* definitions based on your repository schema. Credits to https://genql.dev/
* for the type generation.
*
* You can safely commit this to version control.
*============================================================================*/
declare module "basehub" {
export interface Query extends _Query {}
export interface QueryGenqlSelection extends _QueryGenqlSelection {}
export interface Mutation extends _Mutation {}
export interface MutationGenqlSelection extends _MutationGenqlSelection {}
export interface FragmentsMap extends _FragmentsMap {}
export interface Scalars extends _Scalars {}
}
import type { Transaction } from 'basehub/api-transaction'
interface _Query extends Query {}
interface _QueryGenqlSelection extends QueryGenqlSelection {}
interface _Mutation extends Mutation {}
interface _MutationGenqlSelection extends MutationGenqlSelection {}
interface _FragmentsMap extends FragmentsMap {}
interface _Scalars extends Scalars {}
export interface Scalars {
BSHBEventSchema: ({
name: string;
required: boolean;
placeholder?: string;
defaultValue?: string;
helpText?: string
} & {
id: string;
label: string
} & ({
type: "text" | "textarea" | "number" | "date" | "datetime" | "email" | "checkbox" | "hidden"
} | {
type: "select" | "radio";
options: string[];
multiple: boolean
} | {
type: "file"
}))[],
BSHBRichTextContentSchema: RichTextNode[],
BSHBRichTextTOCSchema: RichTextTocNode[],
Boolean: boolean,
CodeSnippetLanguage: B_Language,
DateTime: any,
Float: number,
ID: string,
Int: number,
JSON: any,
String: string,
bshb_event__530312905: `bshb_event__530312905:${string}`,
schema_bshb_event__530312905: {email: string;},
bshb_workflow_218139063: `bshb_workflow_218139063:${string}`,
schema_bshb_workflow_218139063: { timestamp: string, type: 'list-block.created', data: {
listBlockId: string;
listBlockTitle?: string;
blockId: string
} },
}
export type AnalyticsKeyScope = 'query' | 'send'
export interface Authors {
_analyticsKey: Scalars['String']
_dashboardUrl: Scalars['String']
_id: Scalars['String']
_idPath: Scalars['String']
_meta: ListMeta
/** The key used to search from the frontend. */
_searchKey: Scalars['String']
_slug: Scalars['String']
_slugPath: Scalars['String']
_sys: BlockDocumentSys
_title: Scalars['String']
/** Returns the first item in the list, or null if the list is empty. Useful when you expect only one result. */
item: (AuthorsItem | null)
/** Returns the list of items after filtering and paginating according to the arguments sent by the client. */
items: AuthorsItem[]
__typename: 'Authors'
}
export interface AuthorsItem {
_analyticsKey: Scalars['String']
_dashboardUrl: Scalars['String']
/** Array of search highlight information with field names and HTML markup */
_highlight: (SearchHighlight[] | null)
_id: Scalars['String']
_idPath: Scalars['String']
_slug: Scalars['String']
_slugPath: Scalars['String']
_sys: BlockDocumentSys
_title: Scalars['String']
avatar: BlockImage
__typename: 'AuthorsItem'
}
export type AuthorsItemOrderByEnum = '_sys_createdAt__ASC' | '_sys_createdAt__DESC' | '_sys_hash__ASC' | '_sys_hash__DESC' | '_sys_id__ASC' | '_sys_id__DESC' | '_sys_lastModifiedAt__ASC' | '_sys_lastModifiedAt__DESC' | '_sys_slug__ASC' | '_sys_slug__DESC' | '_sys_title__ASC' | '_sys_title__DESC' | 'avatar__ASC' | 'avatar__DESC' | 'untitled__ASC' | 'untitled__DESC'
export interface BaseRichTextJson {
blocks: Scalars['String']
content: Scalars['BSHBRichTextContentSchema']
toc: Scalars['BSHBRichTextTOCSchema']
__typename: 'BaseRichTextJson'
}
export interface BlockAudio {
/** The duration of the audio in seconds. If the duration is not available, it will be estimated based on the file size. */
duration: Scalars['Float']
fileName: Scalars['String']
fileSize: Scalars['Int']
lastModified: Scalars['Float']
mimeType: Scalars['String']
url: Scalars['String']
__typename: 'BlockAudio'
}
export interface BlockCodeSnippet {
allowedLanguages: Scalars['CodeSnippetLanguage'][]
code: Scalars['String']
/** @deprecated Figuring out the correct api. */
html: Scalars['String']
language: Scalars['CodeSnippetLanguage']
__typename: 'BlockCodeSnippet'
}
export interface BlockColor {
b: Scalars['Int']
g: Scalars['Int']
hex: Scalars['String']
hsl: Scalars['String']
r: Scalars['Int']
rgb: Scalars['String']
__typename: 'BlockColor'
}
export type BlockDocument = (Authors | AuthorsItem | Blog | Meta | Newsletter | Posts | PostsItem | _AgentStart | authorsItem_AsList | postsItem_AsList) & { __isUnion?: true }
export interface BlockDocumentSys {
apiNamePath: Scalars['String']
createdAt: Scalars['String']
hash: Scalars['String']
id: Scalars['ID']
idPath: Scalars['String']
lastModifiedAt: Scalars['String']
slug: Scalars['String']
slugPath: Scalars['String']
title: Scalars['String']
__typename: 'BlockDocumentSys'
}
export interface BlockFile {
fileName: Scalars['String']
fileSize: Scalars['Int']
lastModified: Scalars['Float']
mimeType: Scalars['String']
url: Scalars['String']
__typename: 'BlockFile'
}
export interface BlockImage {
alt: (Scalars['String'] | null)
aspectRatio: Scalars['String']
blurDataURL: Scalars['String']
fileName: Scalars['String']
fileSize: Scalars['Int']
height: Scalars['Int']
lastModified: Scalars['Float']
mimeType: Scalars['String']
/** @deprecated Renamed to `blurDataURL` to match Next.js Image's naming convention. */
placeholderURL: Scalars['String']
/** @deprecated Use `url` instead. */
rawUrl: Scalars['String']
thumbhash: Scalars['String']
/**
* This field is used to generate the image URL with the provided options. The options are passed as arguments. For example, if you want to resize the image to 200x200 pixels, you can use the following query:
*
* ```graphql
* {
* imageBlock {
* url(width: 200, height: 200)
* }
* }
* ```
*
* This will return the URL with the width and height set to 200 pixels.
*
* BaseHub uses Cloudflare for image resizing. Check out [all available options in their docs](https://developers.cloudflare.com/images/transform-images/transform-via-workers/#fetch-options).
*
*/
url: Scalars['String']
width: Scalars['Int']
__typename: 'BlockImage'
}
export type BlockList = (Authors | Posts | authorsItem_AsList | postsItem_AsList) & { __isUnion?: true }
export interface BlockOgImage {
height: Scalars['Int']
url: Scalars['String']
width: Scalars['Int']
__typename: 'BlockOgImage'
}
/** Rich text block */
export type BlockRichText = (Body) & { __isUnion?: true }
export interface BlockVideo {
aspectRatio: Scalars['String']
/** The duration of the video in seconds. If the duration is not available, it will be estimated based on the file size. */
duration: Scalars['Float']
fileName: Scalars['String']
fileSize: Scalars['Int']
height: Scalars['Int']
lastModified: Scalars['Float']
mimeType: Scalars['String']
url: Scalars['String']
width: Scalars['Int']
__typename: 'BlockVideo'
}
export interface Blog {
_analyticsKey: Scalars['String']
_dashboardUrl: Scalars['String']
_id: Scalars['String']
_idPath: Scalars['String']
_slug: Scalars['String']
_slugPath: Scalars['String']
_sys: BlockDocumentSys
_title: Scalars['String']
authors: Authors
morePosts: Scalars['String']
posts: Posts
__typename: 'Blog'
}
export interface Body {
html: Scalars['String']
json: BodyRichText
markdown: Scalars['String']
plainText: Scalars['String']
readingTime: Scalars['Int']
__typename: 'Body'
}
export interface BodyRichText {
content: Scalars['BSHBRichTextContentSchema']
toc: Scalars['BSHBRichTextTOCSchema']
__typename: 'BodyRichText'
}
export interface GetUploadSignedURL {
signedURL: Scalars['String']
uploadURL: Scalars['String']
__typename: 'GetUploadSignedURL'
}
export interface ListMeta {
/** Number of items after applying filters but before pagination */
filteredCount: Scalars['Int']
/** Total number of items in collection before any filtering/pagination */
totalCount: Scalars['Int']
__typename: 'ListMeta'
}
export type MediaBlock = (BlockAudio | BlockFile | BlockImage | BlockVideo) & { __isUnion?: true }
export type MediaBlockUnion = (BlockAudio | BlockFile | BlockImage | BlockVideo) & { __isUnion?: true }
export interface Meta {
_analyticsKey: Scalars['String']
_dashboardUrl: Scalars['String']
_id: Scalars['String']
_idPath: Scalars['String']
_slug: Scalars['String']
_slugPath: Scalars['String']
_sys: BlockDocumentSys
_title: Scalars['String']
description: (Scalars['String'] | null)
ogImage: BlockOgImage
title: (Scalars['String'] | null)
__typename: 'Meta'
}
export interface Mutation {
/**
* Returns a signed url and an upload url so that you can upload files into your repository.
*
* Example usage with JavaScript:
* ```js
* async function handleUpload(file: File) {
* const { getUploadSignedURL } = await basehub().mutation({
* getUploadSignedURL: {
* __args: { fileName: file.name },
* signedURL: true,
* uploadURL: true,
* }
* })
*
* const { signedURL, uploadURL } = getUploadSignedURL
*
* await fetch(signedURL, { method: 'PUT', body: file })
*
* // done! do something with the uploadURL now
* }
* ```
*
*/
getUploadSignedURL: GetUploadSignedURL
/** Start a job that can be awaited and the result given directly. Under the hood, it runs `transactionAsync` and polls for the result until it is available. You can pass a `timeout` argument, the default being 30_000ms. */
transaction: TransactionStatus
/** Start an asynchronous job to mutate BaseHub data. Returns a transaction ID which you can use to get the result of the job. */
transactionAsync: Scalars['String']
transactionStatus: TransactionStatus
__typename: 'Mutation'
}
export interface Newsletter {
_analyticsKey: Scalars['String']
_dashboardUrl: Scalars['String']
_id: Scalars['String']
_idPath: Scalars['String']
_slug: Scalars['String']
_slugPath: Scalars['String']
_sys: BlockDocumentSys
_title: Scalars['String']
sendNewPost: SendNewPost
subscribers: Subscribers
__typename: 'Newsletter'
}
export interface Posts {
_analyticsKey: Scalars['String']
_dashboardUrl: Scalars['String']
_id: Scalars['String']
_idPath: Scalars['String']
_meta: ListMeta
/** The key used to search from the frontend. */
_searchKey: Scalars['String']
_slug: Scalars['String']
_slugPath: Scalars['String']
_sys: BlockDocumentSys
_title: Scalars['String']
/** Returns the first item in the list, or null if the list is empty. Useful when you expect only one result. */
item: (PostsItem | null)
/** Returns the list of items after filtering and paginating according to the arguments sent by the client. */
items: PostsItem[]
__typename: 'Posts'
}
export interface PostsItem {
_analyticsKey: Scalars['String']
_dashboardUrl: Scalars['String']
/** Array of search highlight information with field names and HTML markup */
_highlight: (SearchHighlight[] | null)
_id: Scalars['String']
_idPath: Scalars['String']
_slug: Scalars['String']
_slugPath: Scalars['String']
_sys: BlockDocumentSys
_title: Scalars['String']
author: AuthorsItem
body: Body
coverImage: BlockImage
/** ISO 8601 date string. */
date: Scalars['String']
excerpt: Scalars['String']
__typename: 'PostsItem'
}
export type PostsItemOrderByEnum = '_sys_createdAt__ASC' | '_sys_createdAt__DESC' | '_sys_hash__ASC' | '_sys_hash__DESC' | '_sys_id__ASC' | '_sys_id__DESC' | '_sys_lastModifiedAt__ASC' | '_sys_lastModifiedAt__DESC' | '_sys_slug__ASC' | '_sys_slug__DESC' | '_sys_title__ASC' | '_sys_title__DESC' | 'author__ASC' | 'author__DESC' | 'body__ASC' | 'body__DESC' | 'coverImage__ASC' | 'coverImage__DESC' | 'date__ASC' | 'date__DESC' | 'excerpt__ASC' | 'excerpt__DESC'
export interface Query {
_agent: (_AgentStart | null)
/** Query across the custom AI agents in the repository. */
_agents: _agents
/** Query across all of the instances of a component. Pass in filters and sorts if you want, and get each instance via the `items` key. */
_componentInstances: _components
/** The diff between the current branch and the head commit. */
_diff: Scalars['JSON']
/** The structure of the repository. Used by START. */
_structure: Scalars['JSON']
_sys: RepoSys
blog: Blog
meta: Meta
newsletter: Newsletter
__typename: 'Query'
}
export interface RepoSys {
branches: _Branches
dashboardUrl: Scalars['String']
forkUrl: Scalars['String']
hash: Scalars['String']
id: Scalars['ID']
playgroundInfo: (_PlaygroundInfo | null)
slug: Scalars['String']
title: Scalars['String']
__typename: 'RepoSys'
}
export type RichTextJson = (BaseRichTextJson | BodyRichText) & { __isUnion?: true }
export interface SearchHighlight {
/** The field/path that was matched (e.g., "title", "body.content") */
by: Scalars['String']
/** HTML snippet with <mark> tags around the matched terms */
snippet: Scalars['String']
__typename: 'SearchHighlight'
}
export interface SendNewPost {
/** The `webhookSecret` is used to verify the authenticity of the webhook request, and also to type the payload. */
webhookSecret: Scalars['bshb_workflow_218139063']
__typename: 'SendNewPost'
}
export interface Subscribers {
/** The `adminKey` gives clients the ability to query, delete and update this block's data. **It's not meant to be exposed to the public.** */
adminKey: Scalars['bshb_event__530312905']
/** The `ingestKey` gives clients the ability to send new events to this block. Generally, it's safe to expose it to the public. */
ingestKey: Scalars['bshb_event__530312905']
schema: Scalars['BSHBEventSchema']
__typename: 'Subscribers'
}
export interface TransactionStatus {
/** Duration in milliseconds. */
duration: (Scalars['Int'] | null)
endedAt: (Scalars['String'] | null)
id: Scalars['String']
message: (Scalars['String'] | null)
startedAt: Scalars['String']
status: TransactionStatusEnum
__typename: 'TransactionStatus'
}
export type TransactionStatusEnum = 'Cancelled' | 'Completed' | 'Failed' | 'Running' | 'Scheduled'
export interface Variant {
apiName: Scalars['String']
color: Scalars['String']
id: Scalars['String']
isDefault: Scalars['Boolean']
label: Scalars['String']
__typename: 'Variant'
}
export interface _AgentStart {
_agentKey: Scalars['String']
_analyticsKey: Scalars['String']
_dashboardUrl: Scalars['String']
_id: Scalars['String']
_idPath: Scalars['String']
_slug: Scalars['String']
_slugPath: Scalars['String']
_sys: BlockDocumentSys
_title: Scalars['String']
accent: Scalars['String']
avatar: Scalars['String']
chatUrl: Scalars['String']
commit: Scalars['Boolean']
description: Scalars['String']
edit: Scalars['Boolean']
embedUrl: Scalars['String']
getUserInfo: Scalars['Boolean']
grayscale: Scalars['String']
manageBranches: Scalars['Boolean']
mcpUrl: Scalars['String']
model: Scalars['String']
openRouterKey: (Scalars['String'] | null)
searchTheWeb: Scalars['Boolean']
slackInstallUrl: Scalars['String']
systemPrompt: Scalars['String']
__typename: '_AgentStart'
}
export interface _BranchInfo {
archivedAt: (Scalars['String'] | null)
archivedBy: (Scalars['String'] | null)
authorId: (Scalars['String'] | null)
contributors: (Scalars['String'][] | null)
createdAt: Scalars['String']
description: (Scalars['String'] | null)
git: (_GitInfo | null)
headCommit: (_CommitInfo | null)
headCommitId: (Scalars['String'] | null)
id: Scalars['ID']
inlineSuggestionAppliedAt: (Scalars['String'] | null)
isDefault: Scalars['Boolean']
isInlineSuggestion: (Scalars['Boolean'] | null)
name: Scalars['String']
playgroundId: (Scalars['String'] | null)
rollbackCommitId: (Scalars['String'] | null)
rollbackIsoDate: (Scalars['String'] | null)
sourceBranchId: (Scalars['String'] | null)
updatedAt: (Scalars['String'] | null)
workingRootBlockId: (Scalars['String'] | null)
__typename: '_BranchInfo'
}
export interface _Branches {
_meta: ListMeta
items: _BranchInfo[]
__typename: '_Branches'
}
export interface _CommitInfo {
authorId: Scalars['String']
branchId: Scalars['String']
contributors: (Scalars['String'][] | null)
createdAt: Scalars['String']
hash: Scalars['String']
id: Scalars['String']
mergeParentCommitId: (Scalars['String'] | null)
message: Scalars['String']
parentCommitId: (Scalars['String'] | null)
/** Whether this commit is from a playground branch. */
playgroundId: (Scalars['String'] | null)
repoId: Scalars['String']
rootBlockId: Scalars['String']
__typename: '_CommitInfo'
}
export interface _GitInfo {
branch: Scalars['String']
deploymentUrl: (Scalars['String'] | null)
__typename: '_GitInfo'
}
export interface _PlaygroundInfo {
claimUrl: (Scalars['String'] | null)
editUrl: Scalars['String']
expiresAt: (Scalars['String'] | null)
id: (Scalars['String'] | null)
__typename: '_PlaygroundInfo'
}
export type _ResolveTargetsWithEnum = 'id' | 'objectName'
export type _StructureFormatEnum = 'json' | 'xml'
export interface _agents {
start: _AgentStart
__typename: '_agents'
}
export interface _components {
authorsItem: authorsItem_AsList
postsItem: postsItem_AsList
__typename: '_components'
}
export interface authorsItem_AsList {
_analyticsKey: Scalars['String']
_dashboardUrl: Scalars['String']
_id: Scalars['String']
_idPath: Scalars['String']
_meta: ListMeta
/** The key used to search from the frontend. */
_searchKey: Scalars['String']
_slug: Scalars['String']
_slugPath: Scalars['String']
_sys: BlockDocumentSys
_title: Scalars['String']
/** Returns the first item in the list, or null if the list is empty. Useful when you expect only one result. */
item: (AuthorsItem | null)
/** Returns the list of items after filtering and paginating according to the arguments sent by the client. */
items: AuthorsItem[]
__typename: 'authorsItem_AsList'
}
export interface postsItem_AsList {
_analyticsKey: Scalars['String']
_dashboardUrl: Scalars['String']
_id: Scalars['String']
_idPath: Scalars['String']
_meta: ListMeta
/** The key used to search from the frontend. */
_searchKey: Scalars['String']
_slug: Scalars['String']
_slugPath: Scalars['String']
_sys: BlockDocumentSys
_title: Scalars['String']
/** Returns the first item in the list, or null if the list is empty. Useful when you expect only one result. */
item: (PostsItem | null)
/** Returns the list of items after filtering and paginating according to the arguments sent by the client. */
items: PostsItem[]
__typename: 'postsItem_AsList'
}
export interface AuthorsGenqlSelection{
_analyticsKey?: { __args: {
/**
* The scope of the analytics key. Use `send` for just ingesting data. Use `query` if you need to show an analytics data in your website.
*
* Have in mind, if you expose your `query` analytics key in the frontend, you'll be exposing all of this block's analytics data to the public. This is generally safe, but it might not be in your case.
*/
scope?: (AnalyticsKeyScope | null)} } | boolean | number
_dashboardUrl?: boolean | number
_id?: boolean | number
_idPath?: boolean | number
_meta?: ListMetaGenqlSelection
/** The key used to search from the frontend. */
_searchKey?: boolean | number
_slug?: boolean | number
_slugPath?: boolean | number
_sys?: BlockDocumentSysGenqlSelection
_title?: boolean | number
/** Returns the first item in the list, or null if the list is empty. Useful when you expect only one result. */
item?: AuthorsItemGenqlSelection
/** Returns the list of items after filtering and paginating according to the arguments sent by the client. */
items?: AuthorsItemGenqlSelection
__typename?: boolean | number
__fragmentOn?: "Authors"
}
export interface AuthorsItemGenqlSelection{
_analyticsKey?: { __args: {
/**
* The scope of the analytics key. Use `send` for just ingesting data. Use `query` if you need to show an analytics data in your website.
*
* Have in mind, if you expose your `query` analytics key in the frontend, you'll be exposing all of this block's analytics data to the public. This is generally safe, but it might not be in your case.
*/
scope?: (AnalyticsKeyScope | null)} } | boolean | number
_dashboardUrl?: boolean | number
/** Array of search highlight information with field names and HTML markup */
_highlight?: SearchHighlightGenqlSelection
_id?: boolean | number
_idPath?: boolean | number
_slug?: boolean | number
_slugPath?: boolean | number
_sys?: BlockDocumentSysGenqlSelection
_title?: boolean | number
avatar?: BlockImageGenqlSelection
__typename?: boolean | number
__fragmentOn?: "AuthorsItem"
}
export interface AuthorsItemFilterInput {AND?: (AuthorsItemFilterInput | null),OR?: (AuthorsItemFilterInput | null),_id?: (StringFilter | null),_slug?: (StringFilter | null),_sys_apiNamePath?: (StringFilter | null),_sys_createdAt?: (DateFilter | null),_sys_hash?: (StringFilter | null),_sys_id?: (StringFilter | null),_sys_idPath?: (StringFilter | null),_sys_lastModifiedAt?: (DateFilter | null),_sys_slug?: (StringFilter | null),_sys_slugPath?: (StringFilter | null),_sys_title?: (StringFilter | null),_title?: (StringFilter | null)}
export interface AuthorsItemSearchInput {
/** Searchable fields for query */
by?: (Scalars['String'][] | null),
/** Search query */
q?: (Scalars['String'] | null)}
export interface BaseRichTextJsonGenqlSelection{
blocks?: boolean | number
content?: boolean | number
toc?: boolean | number
__typename?: boolean | number
__fragmentOn?: "BaseRichTextJson"
}
export interface BlockAudioGenqlSelection{
/** The duration of the audio in seconds. If the duration is not available, it will be estimated based on the file size. */
duration?: boolean | number
fileName?: boolean | number
fileSize?: boolean | number
lastModified?: boolean | number
mimeType?: boolean | number
url?: boolean | number
__typename?: boolean | number
__fragmentOn?: "BlockAudio"
}
export interface BlockCodeSnippetGenqlSelection{
allowedLanguages?: boolean | number
code?: boolean | number
/** @deprecated Figuring out the correct api. */
html?: { __args: {
/** Theme for the code snippet */
theme?: (Scalars['String'] | null)} } | boolean | number
language?: boolean | number
__typename?: boolean | number
__fragmentOn?: "BlockCodeSnippet"
}
export interface BlockColorGenqlSelection{
b?: boolean | number
g?: boolean | number
hex?: boolean | number
hsl?: boolean | number
r?: boolean | number
rgb?: boolean | number
__typename?: boolean | number
__fragmentOn?: "BlockColor"
}
export interface BlockDocumentGenqlSelection{
_analyticsKey?: { __args: {
/**
* The scope of the analytics key. Use `send` for just ingesting data. Use `query` if you need to show an analytics data in your website.
*
* Have in mind, if you expose your `query` analytics key in the frontend, you'll be exposing all of this block's analytics data to the public. This is generally safe, but it might not be in your case.
*/
scope?: (AnalyticsKeyScope | null)} } | boolean | number
_dashboardUrl?: boolean | number
_id?: boolean | number
_idPath?: boolean | number
_slug?: boolean | number
_slugPath?: boolean | number
_sys?: BlockDocumentSysGenqlSelection
_title?: boolean | number
on_Authors?: AuthorsGenqlSelection
on_AuthorsItem?: AuthorsItemGenqlSelection
on_Blog?: BlogGenqlSelection
on_Meta?: MetaGenqlSelection
on_Newsletter?: NewsletterGenqlSelection
on_Posts?: PostsGenqlSelection
on_PostsItem?: PostsItemGenqlSelection
on__AgentStart?: _AgentStartGenqlSelection
on_authorsItem_AsList?: authorsItem_AsListGenqlSelection
on_postsItem_AsList?: postsItem_AsListGenqlSelection
__typename?: boolean | number
__fragmentOn?: "BlockDocument"
}
export interface BlockDocumentSysGenqlSelection{
apiNamePath?: boolean | number
createdAt?: boolean | number
hash?: boolean | number
id?: boolean | number
idPath?: boolean | number
lastModifiedAt?: boolean | number
slug?: boolean | number
slugPath?: boolean | number
title?: boolean | number
__typename?: boolean | number
__fragmentOn?: "BlockDocumentSys"
}
export interface BlockFileGenqlSelection{
fileName?: boolean | number
fileSize?: boolean | number
lastModified?: boolean | number
mimeType?: boolean | number
url?: boolean | number
__typename?: boolean | number
__fragmentOn?: "BlockFile"
}
export interface BlockImageGenqlSelection{
alt?: boolean | number
aspectRatio?: boolean | number
blurDataURL?: boolean | number
fileName?: boolean | number
fileSize?: boolean | number
height?: boolean | number
lastModified?: boolean | number
mimeType?: boolean | number
/** @deprecated Renamed to `blurDataURL` to match Next.js Image's naming convention. */
placeholderURL?: boolean | number
/** @deprecated Use `url` instead. */
rawUrl?: boolean | number
thumbhash?: boolean | number
/**
* This field is used to generate the image URL with the provided options. The options are passed as arguments. For example, if you want to resize the image to 200x200 pixels, you can use the following query:
*
* ```graphql
* {
* imageBlock {
* url(width: 200, height: 200)
* }
* }
* ```
*
* This will return the URL with the width and height set to 200 pixels.
*
* BaseHub uses Cloudflare for image resizing. Check out [all available options in their docs](https://developers.cloudflare.com/images/transform-images/transform-via-workers/#fetch-options).
*
*/
url?: { __args: {anim?: (Scalars['String'] | null), background?: (Scalars['String'] | null), blur?: (Scalars['Int'] | null), border?: (Scalars['String'] | null), brightness?: (Scalars['Int'] | null), compression?: (Scalars['String'] | null), contrast?: (Scalars['Int'] | null), dpr?: (Scalars['Int'] | null), fit?: (Scalars['String'] | null), format?: (Scalars['String'] | null), gamma?: (Scalars['String'] | null), gravity?: (Scalars['String'] | null), height?: (Scalars['Int'] | null), metadata?: (Scalars['String'] | null), quality?: (Scalars['Int'] | null), rotate?: (Scalars['String'] | null), sharpen?: (Scalars['String'] | null), trim?: (Scalars['String'] | null), width?: (Scalars['Int'] | null)} } | boolean | number
width?: boolean | number
__typename?: boolean | number
__fragmentOn?: "BlockImage"
}
export interface BlockListGenqlSelection{
_analyticsKey?: { __args: {
/**
* The scope of the analytics key. Use `send` for just ingesting data. Use `query` if you need to show an analytics data in your website.
*
* Have in mind, if you expose your `query` analytics key in the frontend, you'll be exposing all of this block's analytics data to the public. This is generally safe, but it might not be in your case.
*/
scope?: (AnalyticsKeyScope | null)} } | boolean | number
_dashboardUrl?: boolean | number
_id?: boolean | number
_idPath?: boolean | number
_meta?: ListMetaGenqlSelection
/** The key used to search from the frontend. */
_searchKey?: boolean | number
_slug?: boolean | number
_slugPath?: boolean | number
_sys?: BlockDocumentSysGenqlSelection
_title?: boolean | number
on_Authors?: AuthorsGenqlSelection
on_Posts?: PostsGenqlSelection
on_authorsItem_AsList?: authorsItem_AsListGenqlSelection
on_postsItem_AsList?: postsItem_AsListGenqlSelection
__typename?: boolean | number
__fragmentOn?: "BlockList"
}
export interface BlockOgImageGenqlSelection{
height?: boolean | number
url?: boolean | number
width?: boolean | number
__typename?: boolean | number
__fragmentOn?: "BlockOgImage"
}
/** Rich text block */
export interface BlockRichTextGenqlSelection{
html?: { __args: {
/** It automatically generates a unique id for each heading present in the HTML. Enabled by default. */
slugs?: (Scalars['Boolean'] | null),
/** Inserts a table of contents at the beginning of the HTML. */
toc?: (Scalars['Boolean'] | null)} } | boolean | number
json?: RichTextJsonGenqlSelection
markdown?: boolean | number
plainText?: boolean | number
readingTime?: { __args: {
/** Words per minute, defaults to average 183wpm */
wpm?: (Scalars['Int'] | null)} } | boolean | number
on_Body?: BodyGenqlSelection
__typename?: boolean | number
__fragmentOn?: "BlockRichText"
}
export interface BlockVideoGenqlSelection{
aspectRatio?: boolean | number
/** The duration of the video in seconds. If the duration is not available, it will be estimated based on the file size. */
duration?: boolean | number
fileName?: boolean | number
fileSize?: boolean | number
height?: boolean | number
lastModified?: boolean | number
mimeType?: boolean | number
url?: boolean | number
width?: boolean | number
__typename?: boolean | number
__fragmentOn?: "BlockVideo"
}
export interface BlogGenqlSelection{
_analyticsKey?: { __args: {
/**
* The scope of the analytics key. Use `send` for just ingesting data. Use `query` if you need to show an analytics data in your website.
*
* Have in mind, if you expose your `query` analytics key in the frontend, you'll be exposing all of this block's analytics data to the public. This is generally safe, but it might not be in your case.
*/
scope?: (AnalyticsKeyScope | null)} } | boolean | number
_dashboardUrl?: boolean | number
_id?: boolean | number
_idPath?: boolean | number
_slug?: boolean | number
_slugPath?: boolean | number
_sys?: BlockDocumentSysGenqlSelection
_title?: boolean | number
authors?: (AuthorsGenqlSelection & { __args?: {
/** Filter by a field. */
filter?: (AuthorsItemFilterInput | null),
/** Limit the number of items returned. Defaults to 500. */
first?: (Scalars['Int'] | null),
/** Order by a field. */
orderBy?: (AuthorsItemOrderByEnum | null),
/** Search configuration */
search?: (AuthorsItemSearchInput | null),
/** Skip the first n items. */
skip?: (Scalars['Int'] | null)} })
morePosts?: boolean | number
posts?: (PostsGenqlSelection & { __args?: {
/** Filter by a field. */
filter?: (PostsItemFilterInput | null),
/** Limit the number of items returned. Defaults to 500. */
first?: (Scalars['Int'] | null),
/** Order by a field. */
orderBy?: (PostsItemOrderByEnum | null),
/** Search configuration */
search?: (PostsItemSearchInput | null),
/** Skip the first n items. */
skip?: (Scalars['Int'] | null)} })
__typename?: boolean | number
__fragmentOn?: "Blog"
}
export interface BodyGenqlSelection{
html?: { __args: {
/** It automatically generates a unique id for each heading present in the HTML. Enabled by default. */
slugs?: (Scalars['Boolean'] | null),
/** Inserts a table of contents at the beginning of the HTML. */
toc?: (Scalars['Boolean'] | null)} } | boolean | number
json?: BodyRichTextGenqlSelection
markdown?: boolean | number
plainText?: boolean | number
readingTime?: { __args: {
/** Words per minute, defaults to average 183wpm */
wpm?: (Scalars['Int'] | null)} } | boolean | number
__typename?: boolean | number
__fragmentOn?: "Body"
}
export interface BodyRichTextGenqlSelection{
content?: boolean | number
toc?: boolean | number
__typename?: boolean | number
__fragmentOn?: "BodyRichText"
}
export interface DateFilter {eq?: (Scalars['DateTime'] | null),isAfter?: (Scalars['DateTime'] | null),isBefore?: (Scalars['DateTime'] | null),isNull?: (Scalars['Boolean'] | null),neq?: (Scalars['DateTime'] | null),onOrAfter?: (Scalars['DateTime'] | null),onOrBefore?: (Scalars['DateTime'] | null)}
export interface GetUploadSignedURLGenqlSelection{
signedURL?: boolean | number
uploadURL?: boolean | number
__typename?: boolean | number
__fragmentOn?: "GetUploadSignedURL"
}
export interface ListFilter {isEmpty?: (Scalars['Boolean'] | null),length?: (Scalars['Int'] | null)}
export interface ListMetaGenqlSelection{
/** Number of items after applying filters but before pagination */
filteredCount?: boolean | number
/** Total number of items in collection before any filtering/pagination */
totalCount?: boolean | number
__typename?: boolean | number
__fragmentOn?: "ListMeta"
}
export interface MediaBlockGenqlSelection{
fileName?: boolean | number
fileSize?: boolean | number
lastModified?: boolean | number
mimeType?: boolean | number
url?: boolean | number
on_BlockAudio?: BlockAudioGenqlSelection
on_BlockFile?: BlockFileGenqlSelection
on_BlockImage?: BlockImageGenqlSelection
on_BlockVideo?: BlockVideoGenqlSelection
__typename?: boolean | number
__fragmentOn?: "MediaBlock"
}
export interface MediaBlockUnionGenqlSelection{
on_BlockAudio?:BlockAudioGenqlSelection,
on_BlockFile?:BlockFileGenqlSelection,
on_BlockImage?:BlockImageGenqlSelection,
on_BlockVideo?:BlockVideoGenqlSelection,
on_MediaBlock?: MediaBlockGenqlSelection,
__typename?: boolean | number,
__fragmentOn?: "MediaBlockUnion"
}
export interface MetaGenqlSelection{
_analyticsKey?: { __args: {
/**
* The scope of the analytics key. Use `send` for just ingesting data. Use `query` if you need to show an analytics data in your website.
*
* Have in mind, if you expose your `query` analytics key in the frontend, you'll be exposing all of this block's analytics data to the public. This is generally safe, but it might not be in your case.
*/
scope?: (AnalyticsKeyScope | null)} } | boolean | number
_dashboardUrl?: boolean | number
_id?: boolean | number
_idPath?: boolean | number
_slug?: boolean | number
_slugPath?: boolean | number
_sys?: BlockDocumentSysGenqlSelection
_title?: boolean | number
description?: boolean | number
ogImage?: BlockOgImageGenqlSelection
title?: boolean | number
__typename?: boolean | number
__fragmentOn?: "Meta"
}
export interface MutationGenqlSelection{
/**
* Returns a signed url and an upload url so that you can upload files into your repository.
*
* Example usage with JavaScript:
* ```js
* async function handleUpload(file: File) {
* const { getUploadSignedURL } = await basehub().mutation({
* getUploadSignedURL: {
* __args: { fileName: file.name },
* signedURL: true,
* uploadURL: true,