@gitbook/api 0.11.0 → 0.11.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.
package/dist/client.d.ts CHANGED
@@ -172,17 +172,6 @@ export interface RequestCreateSpace {
172
172
  emoji?: Emoji;
173
173
  /** Private spaces are no longer supported by GitBook. */
174
174
  private?: boolean;
175
- /**
176
- * - `application`: A fully-packaged application, like a mobile application, desktop application, or a CLI-type tool.
177
- * - `website`: A single web page or a collection of related web pages under a single domain.
178
- * - `service`: An independently-deployable software unit that is usually is operated by a person or a team.
179
- * - `library`: A reusable collection of objects, functions, and methods. A library is typically used by other spaces.
180
- * - `cloud-resource`: An entity or service provided by a cloud vendor, with consumer-managed configuration and monitoring.
181
- * - `database`: A databse entity, persisting data. A database is typically used by services or applications.
182
- * - `other`: A space that doesn’t match the service, library, or application type.
183
- *
184
- */
185
- type?: SpaceType;
186
175
  /** ID of a parent collection */
187
176
  parent?: string;
188
177
  }
@@ -271,24 +260,6 @@ export interface User {
271
260
  location?: string;
272
261
  };
273
262
  }
274
- export interface UserPreferences {
275
- /** Type of Object, always equals to "user-preferences" */
276
- object: 'user-preferences';
277
- /** Preferred theme for the application */
278
- theme: UserPreferencesTheme;
279
- /** URLs associated with the object */
280
- urls: {
281
- location?: string;
282
- };
283
- }
284
- /**
285
- * Preferred theme for the application
286
- */
287
- export declare enum UserPreferencesTheme {
288
- Light = "light",
289
- Dark = "dark",
290
- Default = "default"
291
- }
292
263
  /**
293
264
  * The API token details, excluding the token itself.
294
265
  */
@@ -358,6 +329,16 @@ export interface ImportContentResult {
358
329
  /** How many resources were processed */
359
330
  totalResources: number;
360
331
  }
332
+ export declare type Embed = {
333
+ title: string;
334
+ site: string;
335
+ icon?: string;
336
+ } & ({
337
+ type: 'link';
338
+ } | {
339
+ type: 'rich';
340
+ html: string;
341
+ });
361
342
  export declare type Comment = {
362
343
  object: 'comment';
363
344
  id: string;
@@ -414,25 +395,469 @@ export interface MarkdownDocument {
414
395
  }
415
396
  export interface JSONDocument {
416
397
  document: {
417
- nodes: object[];
398
+ object: 'document';
399
+ data: object;
400
+ nodes: DocumentBlocksTopLevels[];
401
+ };
402
+ }
403
+ export declare type DocumentBlocksEssentials = DocumentBlockParagraph | DocumentBlockHeading | DocumentBlockListOrdered | DocumentBlockListUnordered | DocumentBlockListTasks | DocumentBlockDivider;
404
+ export declare type DocumentBlocksTopLevels = DocumentBlocksEssentials | DocumentBlockQuote | DocumentBlockHint | DocumentBlockImages | DocumentBlockFile | DocumentBlockDrawing | DocumentBlockEmbed | DocumentBlockCode | DocumentBlockMath | DocumentBlockExpandable | DocumentBlockTabs | DocumentBlockTable | DocumentBlockSwagger | DocumentBlockContentRef | DocumentBlockIntegration;
405
+ export interface DocumentNodeText {
406
+ object: 'text';
407
+ key?: string;
408
+ leaves: DocumentTextLeaf[];
409
+ }
410
+ export interface DocumentNodeFragment {
411
+ object: 'fragment';
412
+ key?: string;
413
+ fragment?: string;
414
+ type?: string;
415
+ nodes: DocumentBlocksEssentials[];
416
+ }
417
+ export interface DocumentTextLeaf {
418
+ object: 'leaf';
419
+ text: string;
420
+ marks: DocumentTextMark[];
421
+ }
422
+ export declare type DocumentTextMark = {
423
+ object: 'mark';
424
+ } & ({
425
+ type: 'bold';
426
+ } | {
427
+ type: 'italic';
428
+ } | {
429
+ type: 'code';
430
+ } | {
431
+ type: 'strikethrough';
432
+ } | {
433
+ type: 'color';
434
+ data: {
435
+ text: 'default' | 'green' | 'blue' | 'red' | 'orange' | 'yellow' | 'purple';
436
+ background: 'default' | 'green' | 'blue' | 'red' | 'orange' | 'yellow' | 'purple';
437
+ };
438
+ });
439
+ export interface DocumentInlineLink {
440
+ object: 'inline';
441
+ type: 'link';
442
+ key?: string;
443
+ nodes: DocumentNodeText[];
444
+ data: {
445
+ ref: ContentRef;
446
+ };
447
+ }
448
+ export interface DocumentInlineMath {
449
+ object: 'inline';
450
+ type: 'inline-math';
451
+ key?: string;
452
+ data: {
453
+ formula: string;
454
+ };
455
+ isVoid: true;
456
+ }
457
+ export interface DocumentInlineEmoji {
458
+ object: 'inline';
459
+ type: 'emoji';
460
+ key?: string;
461
+ data: {
462
+ code: string;
463
+ };
464
+ isVoid: true;
465
+ }
466
+ export interface DocumentInlineImage {
467
+ object: 'inline';
468
+ type: 'inline-image';
469
+ key?: string;
470
+ data: {
471
+ ref: ContentRefURL | ContentRefFile;
472
+ refDark?: ContentRefURL | ContentRefFile;
473
+ caption?: string;
474
+ size?: 'original' | 'line';
475
+ };
476
+ isVoid: true;
477
+ }
478
+ export interface DocumentInlineMention {
479
+ object: 'inline';
480
+ type: 'mention';
481
+ key?: string;
482
+ data: {
483
+ ref: ContentRef;
484
+ };
485
+ isVoid: true;
486
+ }
487
+ export interface DocumentInlineAnnotation {
488
+ object: 'inline';
489
+ type: 'annotation';
490
+ key?: string;
491
+ fragments: (DocumentNodeFragment & {
492
+ type: 'annotation-body';
493
+ nodes: (DocumentBlocksEssentials | DocumentBlockCode)[];
494
+ })[];
495
+ isVoid: true;
496
+ }
497
+ export declare type DocumentInlinesRich = DocumentInlineImage;
498
+ export interface DocumentBlockParagraph {
499
+ object: 'block';
500
+ type: 'paragraph';
501
+ key?: string;
502
+ nodes: any[];
503
+ }
504
+ export interface DocumentBlockHeading {
505
+ object: 'block';
506
+ type: 'heading-1' | 'heading-2' | 'heading-3';
507
+ key?: string;
508
+ nodes: (DocumentNodeText | DocumentInlineLink | DocumentInlineEmoji | DocumentInlineMath | DocumentInlineImage | DocumentInlineAnnotation | DocumentInlineMention)[];
509
+ data: {
510
+ id?: string;
511
+ };
512
+ meta?: {
513
+ id: string;
514
+ };
515
+ }
516
+ export interface DocumentBlockQuote {
517
+ object: 'block';
518
+ type: 'quote';
519
+ key?: string;
520
+ nodes: (DocumentBlocksEssentials | DocumentBlockQuote)[];
521
+ }
522
+ export interface DocumentBlockHint {
523
+ object: 'block';
524
+ type: 'hint';
525
+ key?: string;
526
+ data: {
527
+ style: 'info' | 'warning' | 'danger' | 'success';
528
+ };
529
+ nodes: DocumentBlocksEssentials[];
530
+ }
531
+ export interface DocumentBlockListUnordered {
532
+ object: 'block';
533
+ type: 'list-unordered';
534
+ key?: string;
535
+ nodes: DocumentBlockListItem[];
536
+ }
537
+ export interface DocumentBlockListOrdered {
538
+ object: 'block';
539
+ type: 'list-ordered';
540
+ key?: string;
541
+ data: {
542
+ start?: number;
543
+ };
544
+ nodes: DocumentBlockListItem[];
545
+ }
546
+ export interface DocumentBlockListTasks {
547
+ object: 'block';
548
+ type: 'list-tasks';
549
+ key?: string;
550
+ nodes: DocumentBlockTaskListItem[];
551
+ }
552
+ export interface DocumentBlockListItem {
553
+ object: 'block';
554
+ type: 'list-item';
555
+ key?: string;
556
+ nodes: DocumentBlocksEssentials[];
557
+ }
558
+ export declare type DocumentBlockTaskListItem = DocumentBlockListItem & {
559
+ data: {
560
+ checked: boolean;
561
+ };
562
+ };
563
+ export interface DocumentBlockImages {
564
+ object: 'block';
565
+ type: 'images';
566
+ key?: string;
567
+ data: {
568
+ align?: 'center' | 'left' | 'right';
569
+ fullWidth?: boolean;
570
+ };
571
+ nodes: DocumentBlockImage[];
572
+ isVoid: true;
573
+ }
574
+ export interface DocumentBlockImage {
575
+ object: 'block';
576
+ type: 'image';
577
+ key?: string;
578
+ data: {
579
+ ref: ContentRefURL | ContentRefFile;
580
+ refDark?: ContentRefURL | ContentRefFile;
581
+ width?: number | {
582
+ unit: string;
583
+ value: number;
584
+ };
585
+ height?: any;
586
+ };
587
+ fragments: (DocumentNodeFragment & {
588
+ type: 'caption';
589
+ nodes: DocumentBlockParagraph[];
590
+ })[];
591
+ isVoid: true;
592
+ }
593
+ export interface DocumentBlockFile {
594
+ object: 'block';
595
+ type: 'file';
596
+ key?: string;
597
+ data: {
598
+ ref: ContentRefFile;
599
+ };
600
+ isVoid: true;
601
+ }
602
+ export interface DocumentBlockDrawing {
603
+ object: 'block';
604
+ type: 'drawing';
605
+ key?: string;
606
+ data: {
607
+ ref?: ContentRefFile;
608
+ };
609
+ isVoid: true;
610
+ }
611
+ export interface DocumentBlockEmbed {
612
+ object: 'block';
613
+ type: 'embed';
614
+ key?: string;
615
+ data: {
616
+ url: string;
617
+ fullWidth?: boolean;
618
+ };
619
+ isVoid: true;
620
+ }
621
+ export interface DocumentBlockCode {
622
+ object: 'block';
623
+ type: 'code';
624
+ key?: string;
625
+ data: {
626
+ syntax?: string;
627
+ title?: string;
628
+ overflow?: 'scroll' | 'wrap';
629
+ lineNumbers?: boolean;
630
+ fullWidth?: boolean;
631
+ };
632
+ nodes: DocumentBlockCodeLine[];
633
+ }
634
+ export interface DocumentBlockCodeLine {
635
+ object: 'block';
636
+ type: 'code-line';
637
+ key?: string;
638
+ nodes: (DocumentNodeText | DocumentInlineAnnotation)[];
639
+ data: {
640
+ highlighted?: boolean;
641
+ };
642
+ }
643
+ export interface DocumentBlockMath {
644
+ object: 'block';
645
+ type: 'math';
646
+ key?: string;
647
+ data: {
648
+ formula: string;
649
+ };
650
+ isVoid: true;
651
+ }
652
+ export interface DocumentBlockExpandable {
653
+ object: 'block';
654
+ type: 'expandable';
655
+ key?: string;
656
+ isVoid: true;
657
+ fragments: ((DocumentNodeFragment & {
658
+ fragment: 'expandable-title';
659
+ type: 'expandable-title';
660
+ nodes: DocumentBlockParagraph[];
661
+ }) | (DocumentNodeFragment & {
662
+ fragment: 'expandable-body';
663
+ type: 'expandable-body';
664
+ nodes: (DocumentBlocksEssentials | DocumentBlockCode)[];
665
+ }))[];
666
+ meta?: {
667
+ id: string;
668
+ };
669
+ }
670
+ export interface DocumentBlockTabs {
671
+ object: 'block';
672
+ type: 'tabs';
673
+ key?: string;
674
+ nodes: DocumentBlockTabsItem[];
675
+ }
676
+ export interface DocumentBlockSwagger {
677
+ object: 'block';
678
+ type: 'swagger';
679
+ key?: string;
680
+ data: {
681
+ ref: ContentRefFile;
682
+ path?: string;
683
+ method?: string;
684
+ expanded?: boolean;
685
+ fullWidth?: boolean;
686
+ };
687
+ isVoid: true;
688
+ meta?: {
689
+ id: string;
690
+ };
691
+ }
692
+ export interface DocumentBlockTable {
693
+ object: 'block';
694
+ type: 'table';
695
+ key?: string;
696
+ isVoid: true;
697
+ data: {
698
+ view: DocumentTableViewGrid | DocumentTableViewCards;
699
+ records: Record<string, DocumentTableRecord>;
700
+ definition: Record<string, DocumentTableDefinition>;
701
+ fullWidth?: boolean;
702
+ };
703
+ fragments: DocumentNodeFragment[];
704
+ }
705
+ export interface DocumentTableRecord {
706
+ orderIndex: string;
707
+ values: Record<string, number | string | boolean | string[] | ContentRef>;
708
+ }
709
+ export interface DocumentTableDefinitionBase {
710
+ id: string;
711
+ /** Title for the column */
712
+ title: string;
713
+ }
714
+ export declare type DocumentTableDefinition = DocumentTableDefinitionText | DocumentTableDefinitionNumber | DocumentTableDefinitionCheckbox | DocumentTableDefinitionFiles | DocumentTableDefinitionUsers | DocumentTableDefinitionRating | DocumentTableDefinitionSelect | DocumentTableDefinitionContentRef;
715
+ export declare type DocumentTableDefinitionText = DocumentTableDefinitionBase & {
716
+ type: 'text';
717
+ textAlignment: 'center' | 'right' | 'left';
718
+ };
719
+ export declare type DocumentTableDefinitionNumber = DocumentTableDefinitionBase & {
720
+ type: 'number';
721
+ };
722
+ export declare type DocumentTableDefinitionCheckbox = DocumentTableDefinitionBase & {
723
+ type: 'checkbox';
724
+ };
725
+ export declare type DocumentTableDefinitionFiles = DocumentTableDefinitionBase & {
726
+ type: 'files';
727
+ };
728
+ export declare type DocumentTableDefinitionUsers = DocumentTableDefinitionBase & {
729
+ type: 'users';
730
+ multiple: boolean;
731
+ };
732
+ export declare type DocumentTableDefinitionRating = DocumentTableDefinitionBase & {
733
+ type: 'rating';
734
+ max: number;
735
+ };
736
+ export declare type DocumentTableDefinitionSelect = DocumentTableDefinitionBase & {
737
+ type: 'select';
738
+ multiple: boolean;
739
+ options: DocumentTableSelectOption[];
740
+ };
741
+ export declare type DocumentTableDefinitionContentRef = DocumentTableDefinitionBase & {
742
+ type: 'content-ref';
743
+ };
744
+ export interface DocumentTableSelectOption {
745
+ value: string;
746
+ label: string;
747
+ color: string;
748
+ }
749
+ export interface DocumentTableViewCards {
750
+ type: 'cards';
751
+ /** Size of the cards. It indicates how many columns will be used */
752
+ cardSize: 'medium' | 'large';
753
+ /** Ordered list of the definition IDs to display */
754
+ columns: string[];
755
+ /** Definition ID to use as a target link for the card */
756
+ targetDefinition?: string;
757
+ /** Definition ID to use as a cover image */
758
+ coverDefinition?: string;
759
+ /** Should we display the column title or not */
760
+ hideColumnTitle?: boolean;
761
+ }
762
+ export interface DocumentTableViewGrid {
763
+ type: 'grid';
764
+ /** Ordered list of the definition IDs to display */
765
+ columns: string[];
766
+ /** Percent width of each column */
767
+ columnWidths?: Record<string, number>;
768
+ /** Should we display the header with column titles */
769
+ hideHeader: boolean;
770
+ /**
771
+ * Tables in GitBook originally used a scaled width approach i.e. the width defined
772
+ * in columnWidths would be scaled to ensure a 100% width table.
773
+ *
774
+ * We later changed this to treat the widths in columnWidths as exact values - they are
775
+ * never scaled. A columnWidth of 50 is rendered as 50px.
776
+ * In order to maintain backwards compatibility, we track whether or not we
777
+ * use the new system here.
778
+ * All new tables should have this value set to true, older tables will have it set
779
+ * to undefined.
780
+ */
781
+ useNewSizing?: boolean;
782
+ }
783
+ export interface DocumentBlockTabsItem {
784
+ object: 'block';
785
+ type: 'tabs-item';
786
+ key?: string;
787
+ nodes: (DocumentBlocksEssentials | DocumentBlockContentRef | DocumentBlockCode | DocumentBlockEmbed | DocumentBlockFile | DocumentBlockImages | DocumentBlockDrawing | DocumentBlockHint | DocumentBlockQuote | DocumentBlockMath | DocumentBlockIntegration)[];
788
+ data: {
789
+ title?: string;
790
+ };
791
+ meta?: {
792
+ id: string;
793
+ };
794
+ }
795
+ export interface DocumentBlockContentRef {
796
+ object: 'block';
797
+ type: 'content-ref';
798
+ key?: string;
799
+ data: {
800
+ ref: ContentRef;
418
801
  };
802
+ isVoid: true;
803
+ }
804
+ export interface DocumentBlockIntegration {
805
+ object: 'block';
806
+ type: 'integration';
807
+ key?: string;
808
+ data: {
809
+ integration: string;
810
+ block: string;
811
+ props: Record<string, any>;
812
+ action?: ContentKitAction;
813
+ url?: string;
814
+ fullWidth?: boolean;
815
+ };
816
+ isVoid: true;
817
+ }
818
+ export interface DocumentBlockDivider {
819
+ object: 'block';
820
+ type: 'divider';
821
+ key?: string;
822
+ isVoid: true;
823
+ }
824
+ export declare type ContentRef = ContentRefFile | ContentRefURL | ContentRefPage | ContentRefAnchor | ContentRefUser | ContentRefCollection | ContentRefSpace;
825
+ export interface ContentRefURL {
826
+ kind: 'url';
827
+ url: string;
828
+ }
829
+ export interface ContentRefFile {
830
+ kind: 'file';
831
+ file: string;
832
+ }
833
+ export interface ContentRefPage {
834
+ kind: 'page';
835
+ page: string;
836
+ space: string;
837
+ }
838
+ export interface ContentRefAnchor {
839
+ kind: 'anchor';
840
+ anchor: string;
841
+ space?: string;
842
+ page?: string;
843
+ }
844
+ export interface ContentRefUser {
845
+ kind: 'user';
846
+ user: string;
847
+ }
848
+ export interface ContentRefCollection {
849
+ kind: 'collection';
850
+ collection: string;
851
+ }
852
+ export interface ContentRefSpace {
853
+ kind: 'space';
854
+ space: string;
419
855
  }
420
856
  export interface Space {
421
857
  /** Type of Object, always equals to "space" */
422
858
  object: 'space';
423
859
  /** Unique identifier for the space */
424
860
  id: string;
425
- /**
426
- * - `application`: A fully-packaged application, like a mobile application, desktop application, or a CLI-type tool.
427
- * - `website`: A single web page or a collection of related web pages under a single domain.
428
- * - `service`: An independently-deployable software unit that is usually is operated by a person or a team.
429
- * - `library`: A reusable collection of objects, functions, and methods. A library is typically used by other spaces.
430
- * - `cloud-resource`: An entity or service provided by a cloud vendor, with consumer-managed configuration and monitoring.
431
- * - `database`: A databse entity, persisting data. A database is typically used by services or applications.
432
- * - `other`: A space that doesn’t match the service, library, or application type.
433
- *
434
- */
435
- type: SpaceType;
436
861
  /** Title of the space */
437
862
  title: string;
438
863
  /**
@@ -461,58 +886,6 @@ export interface Space {
461
886
  /** ID of the parent collection. */
462
887
  parent?: string;
463
888
  }
464
- /**
465
- * - `application`: A fully-packaged application, like a mobile application, desktop application, or a CLI-type tool.
466
- - `website`: A single web page or a collection of related web pages under a single domain.
467
- - `service`: An independently-deployable software unit that is usually is operated by a person or a team.
468
- - `library`: A reusable collection of objects, functions, and methods. A library is typically used by other spaces.
469
- - `cloud-resource`: An entity or service provided by a cloud vendor, with consumer-managed configuration and monitoring.
470
- - `database`: A databse entity, persisting data. A database is typically used by services or applications.
471
- - `other`: A space that doesn’t match the service, library, or application type.
472
- */
473
- export declare enum SpaceType {
474
- Application = "application",
475
- Website = "website",
476
- Service = "service",
477
- Library = "library",
478
- CloudResource = "cloud-resource",
479
- Database = "database",
480
- Other = "other"
481
- }
482
- export declare enum SpaceRelationType {
483
- DependsOn = "dependsOn",
484
- DependencyOf = "dependencyOf",
485
- PartOf = "partOf",
486
- HasPart = "hasPart"
487
- }
488
- /**
489
- * Edge of a space relation (target or source)
490
- */
491
- export interface SpaceRelationEdge {
492
- /** ID of the space */
493
- id: string;
494
- }
495
- /**
496
- * Relation between an origin space and another space
497
- */
498
- export interface SpaceRelation {
499
- id: string;
500
- type: SpaceRelationType;
501
- /** Other space in the relation. If undefined, the current user doesn't have access to it. */
502
- target: Space | SpaceRelationEdge;
503
- createdAt: Date;
504
- /** URLs associated with the object */
505
- urls: {
506
- location: string;
507
- };
508
- }
509
- /**
510
- * Relation between an origin space and another space
511
- */
512
- export declare type SpaceRelationPair = SpaceRelation & {
513
- target: SpaceRelationEdge;
514
- source: SpaceRelationEdge;
515
- };
516
889
  export interface RevisionBase {
517
890
  /** Type of Object, always equals to "revision" */
518
891
  object: 'revision';
@@ -761,20 +1134,27 @@ export interface OrganizationTeam {
761
1134
  export interface TeamMember {
762
1135
  /**
763
1136
  * "The role of a team member.
764
- * "admin": Can administrate team members.
765
- * "participant": Can participate in a team.
1137
+ * "owner": Can manage team members.
1138
+ * "member": Is a member of the team.
766
1139
  *
767
1140
  */
768
1141
  role: TeamMemberRole;
769
1142
  }
770
1143
  /**
771
1144
  * "The role of a team member.
772
- "admin": Can administrate team members.
773
- "participant": Can participate in a team.
1145
+ "owner": Can manage team members.
1146
+ "member": Is a member of the team.
774
1147
  */
775
1148
  export declare enum TeamMemberRole {
776
- Admin = "admin",
777
- Participant = "participant"
1149
+ Owner = "owner",
1150
+ Member = "member"
1151
+ }
1152
+ /**
1153
+ * A member of a team in an organization, including its relationship to it
1154
+ */
1155
+ export interface OrganizationTeamMember {
1156
+ organization: OrganizationMember;
1157
+ team: TeamMember;
778
1158
  }
779
1159
  export interface Capture {
780
1160
  /** Unique identifier for the capture */
@@ -793,6 +1173,8 @@ export interface Capture {
793
1173
  createdAt: string;
794
1174
  /** @format date-time */
795
1175
  stoppedAt?: string;
1176
+ /** @format date-time */
1177
+ editedAt?: string;
796
1178
  /** Count of events recorded. */
797
1179
  events: {
798
1180
  'terminal.command'?: number;
@@ -862,6 +1244,12 @@ export declare type CaptureFileRemovedEvent = BaseCaptureEvent & {
862
1244
  filename: string;
863
1245
  fileSnapshot: string;
864
1246
  };
1247
+ export interface UpdateCaptureSchema {
1248
+ /** A new title for the capture. */
1249
+ title?: string;
1250
+ /** Content of the capture. */
1251
+ body?: Document;
1252
+ }
865
1253
  export interface ChangeRequest {
866
1254
  /** Type of Object, always equals to "change-request" */
867
1255
  object: 'change-request';
@@ -1055,7 +1443,7 @@ export declare type SearchAIAnswerSource = {
1055
1443
  integration?: string;
1056
1444
  } | {
1057
1445
  type: 'capture';
1058
- id: string;
1446
+ captureId: string;
1059
1447
  source: string;
1060
1448
  });
1061
1449
  /**
@@ -1165,6 +1553,9 @@ export interface Integration {
1165
1553
  summary?: IntegrationSummary;
1166
1554
  /** URLs of images to showcase the integration */
1167
1555
  previewImages: string[];
1556
+ target: IntegrationTarget;
1557
+ /** If true, the integration has been verified by the GitBook team */
1558
+ verified: boolean;
1168
1559
  visibility: IntegrationVisibility;
1169
1560
  /** Permissions that should be granted to the integration */
1170
1561
  scopes: IntegrationScopes;
@@ -1175,13 +1566,19 @@ export interface Integration {
1175
1566
  configurations?: IntegrationConfigurations;
1176
1567
  /** External urls configured by the developer of the integration */
1177
1568
  externalLinks: IntegrationExternalLinks;
1569
+ owner: Organization;
1178
1570
  /** URLs associated with the object */
1179
1571
  urls: {
1572
+ location: string;
1180
1573
  icon?: string;
1181
1574
  app: string;
1182
1575
  assets: string;
1183
1576
  publicEndpoint: string;
1184
1577
  };
1578
+ /** The set of permissions for the integration */
1579
+ permissions: {
1580
+ admin: boolean;
1581
+ };
1185
1582
  /**
1186
1583
  * Security policy to validate the content of the integrations scripts and Contentkit. Will be sent as
1187
1584
  * headers when processing the script fetch event and the blocks fetch events.
@@ -1285,10 +1682,11 @@ export declare enum IntegrationInstallationSpaceSelection {
1285
1682
  }
1286
1683
  export declare enum IntegrationCategory {
1287
1684
  Analytics = "analytics",
1685
+ Captures = "captures",
1288
1686
  Collaboration = "collaboration",
1289
- Marketing = "marketing",
1290
1687
  Content = "content",
1291
1688
  Gitsync = "gitsync",
1689
+ Marketing = "marketing",
1292
1690
  Other = "other"
1293
1691
  }
1294
1692
  export interface IntegrationConfigurations {
@@ -1339,10 +1737,15 @@ export interface IntegrationInstallation {
1339
1737
  status: IntegrationInstallationStatus;
1340
1738
  /** Describe whether all spaces have been selected or there's a selection involved */
1341
1739
  space_selection: IntegrationInstallationSpaceSelection;
1740
+ /** Count of spaces, the installation is managing */
1741
+ spaces: number;
1342
1742
  /** Configuration of the integration at the account level */
1343
1743
  configuration: IntegrationInstallationConfiguration;
1744
+ createdAt: Date;
1745
+ updatedAt: Date;
1344
1746
  /** URLs associated with the object */
1345
1747
  urls: {
1748
+ location: string;
1346
1749
  app: string;
1347
1750
  publicEndpoint: string;
1348
1751
  };
@@ -1368,6 +1771,7 @@ export interface IntegrationSpaceInstallation {
1368
1771
  externalIds: IntegrationInstallationExternalIds;
1369
1772
  /** URLs associated with the object */
1370
1773
  urls: {
1774
+ location: string;
1371
1775
  publicEndpoint: string;
1372
1776
  };
1373
1777
  }
@@ -2295,7 +2699,7 @@ export interface ContentKitURL {
2295
2699
  /**
2296
2700
  * Channel to subscribe to for API updates.
2297
2701
  */
2298
- export declare type SubscriptionChannel = SpaceInfoChannel | SpaceGitInfoChannel | SpacePublishingAuthChannel | SpaceRelationsChannel | SpaceEntitiesChannel | SpaceCustomFieldsChannel | BackofficeUserInfoChannel | SpaceIntegrationsChannel | OrganizationCustomFieldsChannel | OrganizationEnvironmentsChannel | UserAPITokensChannel | UserPreferencesChannel | UserProfileChannel | ChangeRequestReviewsChannel | OrganizationMembersChannel | OrganizationMemberChannel | OrganizationTeamsChannel | OrganizationTeamChannel | OrganizationTeamMembersChannel | OrganizationTeamMemberChannel | OrganizationSpaceRelationsChannel | OrganizationSpacesChannel | OrganizationEntitiesChannel | OrganizationSchemasChannel | OrganizationCapturesChannel | {
2702
+ export declare type SubscriptionChannel = SpaceInfoChannel | SpaceGitInfoChannel | SpacePublishingAuthChannel | SpaceEntitiesChannel | SpaceCustomFieldsChannel | BackofficeUserInfoChannel | SpaceIntegrationsChannel | OrganizationCustomFieldsChannel | UserAPITokensChannel | UserProfileChannel | ChangeRequestReviewsChannel | OrganizationMembersChannel | OrganizationMemberChannel | OrganizationTeamsChannel | OrganizationTeamChannel | OrganizationTeamMembersChannel | OrganizationTeamMemberChannel | OrganizationSpacesChannel | OrganizationEntitiesChannel | OrganizationSchemasChannel | OrganizationCapturesChannel | OrganizationIntegrationsChannel | OrganizationInstallationsChannel | {
2299
2703
  channel: 'space-comments';
2300
2704
  space: string;
2301
2705
  changeRequest?: string;
@@ -2315,7 +2719,7 @@ export declare type SubscriptionChannel = SpaceInfoChannel | SpaceGitInfoChannel
2315
2719
  space: string;
2316
2720
  changeRequest?: string;
2317
2721
  comment: string;
2318
- };
2722
+ } | IntegrationChannel | IntegrationInstallationChannel | IntegrationSpaceInstallationChannel | IntegrationSpaceInstallationsChannel;
2319
2723
  export interface SpaceInfoChannel {
2320
2724
  channel: 'space';
2321
2725
  space: string;
@@ -2328,10 +2732,6 @@ export interface SpacePublishingAuthChannel {
2328
2732
  channel: 'space-publishing-auth';
2329
2733
  space: string;
2330
2734
  }
2331
- export interface SpaceRelationsChannel {
2332
- channel: 'space-relations';
2333
- space: string;
2334
- }
2335
2735
  export interface SpaceEntitiesChannel {
2336
2736
  channel: 'space-entities';
2337
2737
  space: string;
@@ -2352,10 +2752,6 @@ export interface UserAPITokensChannel {
2352
2752
  channel: 'user-api-tokens';
2353
2753
  user: string;
2354
2754
  }
2355
- export interface UserPreferencesChannel {
2356
- channel: 'user-preferences';
2357
- user: string;
2358
- }
2359
2755
  export interface UserProfileChannel {
2360
2756
  channel: 'user-profile';
2361
2757
  user: string;
@@ -2398,13 +2794,6 @@ export interface OrganizationTeamMemberChannel {
2398
2794
  team?: string;
2399
2795
  member: string;
2400
2796
  }
2401
- /**
2402
- * Subscription channel for changes in relations between spaces in an organization.
2403
- */
2404
- export interface OrganizationSpaceRelationsChannel {
2405
- channel: 'organization-space-relations';
2406
- organization: string;
2407
- }
2408
2797
  /**
2409
2798
  * Subscription channel for changes in spaces in an organization.
2410
2799
  */
@@ -2427,14 +2816,38 @@ export interface OrganizationSchemasChannel {
2427
2816
  channel: 'organization-schemas';
2428
2817
  organization: string;
2429
2818
  }
2430
- export interface OrganizationEnvironmentsChannel {
2431
- channel: 'organization-environments';
2432
- organization: string;
2433
- }
2434
2819
  export interface OrganizationCapturesChannel {
2435
2820
  channel: 'organization-captures';
2436
2821
  organization: string;
2437
2822
  }
2823
+ export interface OrganizationIntegrationsChannel {
2824
+ channel: 'organization-integrations';
2825
+ organization: string;
2826
+ }
2827
+ export interface OrganizationInstallationsChannel {
2828
+ channel: 'organization-installations';
2829
+ organization: string;
2830
+ }
2831
+ export interface IntegrationChannel {
2832
+ channel: 'integration';
2833
+ integration: string;
2834
+ }
2835
+ export interface IntegrationInstallationChannel {
2836
+ channel: 'integration-installation';
2837
+ integration: string;
2838
+ installation: string;
2839
+ }
2840
+ export interface IntegrationSpaceInstallationChannel {
2841
+ channel: 'integration-space-installation';
2842
+ integration: string;
2843
+ installation: string;
2844
+ space: string;
2845
+ }
2846
+ export interface IntegrationSpaceInstallationsChannel {
2847
+ channel: 'integration-space-installations';
2848
+ integration: string;
2849
+ installation: string;
2850
+ }
2438
2851
  /**
2439
2852
  * Custom field
2440
2853
  */
@@ -2479,52 +2892,6 @@ export interface UpdateCustomFieldValues {
2479
2892
  }
2480
2893
  export declare type CustomFieldOptions = string[];
2481
2894
  export declare type CustomFieldPlaceholder = string;
2482
- /**
2483
- * An environment
2484
- */
2485
- export interface Environment {
2486
- id: string;
2487
- name: EnvironmentName;
2488
- title: EnvironmentTitle;
2489
- /**
2490
- * Whether or not an environment is considered to have elevated responsibilities over other environments. Useful for distinguishing a production environment from a staging environment. Multiple primary environments are allowed. Your organization must have at least one primary environment.
2491
- *
2492
- */
2493
- primary: EnvironmentPrimary;
2494
- /** URLs associated with the object */
2495
- urls: {
2496
- location: string;
2497
- };
2498
- }
2499
- export declare type EnvironmentTitle = string;
2500
- /**
2501
- * Whether or not an environment is considered to have elevated responsibilities over other environments. Useful for distinguishing a production environment from a staging environment. Multiple primary environments are allowed. Your organization must have at least one primary environment.
2502
- */
2503
- export declare type EnvironmentPrimary = boolean;
2504
- /**
2505
- * @pattern ^[a-zA-Z_\-0-9]+$
2506
- */
2507
- export declare type EnvironmentName = string;
2508
- export interface CreateEnvironment {
2509
- name: EnvironmentName;
2510
- title: EnvironmentTitle;
2511
- /**
2512
- * Whether or not an environment is considered to have elevated responsibilities over other environments. Useful for distinguishing a production environment from a staging environment. Multiple primary environments are allowed. Your organization must have at least one primary environment.
2513
- *
2514
- */
2515
- primary?: EnvironmentPrimary;
2516
- }
2517
- /**
2518
- * An object containing the new title for an Environment
2519
- */
2520
- export interface UpdateEnvironment {
2521
- title?: EnvironmentTitle;
2522
- /**
2523
- * Whether or not an environment is considered to have elevated responsibilities over other environments. Useful for distinguishing a production environment from a staging environment. Multiple primary environments are allowed. Your organization must have at least one primary environment.
2524
- *
2525
- */
2526
- primary?: EnvironmentPrimary;
2527
- }
2528
2895
  export declare type QueryParamsType = Record<string | number, any>;
2529
2896
  export declare type ResponseFormat = keyof Omit<Body, 'body' | 'bodyUsed'>;
2530
2897
  export interface FullRequestParams extends Omit<RequestInit, 'body'> {
@@ -2667,28 +3034,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
2667
3034
  * @secure
2668
3035
  */
2669
3036
  getAuthenticatedUser: (params?: RequestParams) => Promise<HttpResponse<User, Error>>;
2670
- /**
2671
- * @description Returns the preferences for the user associated with the authentication provided in the request's authorization header.
2672
- *
2673
- * @tags users
2674
- * @name GetPreferencesForAuthenticatedUser
2675
- * @summary Get the preferences for the currently authenticated user
2676
- * @request GET:/user/preferences
2677
- * @secure
2678
- */
2679
- getPreferencesForAuthenticatedUser: (params?: RequestParams) => Promise<HttpResponse<UserPreferences, Error>>;
2680
- /**
2681
- * No description
2682
- *
2683
- * @tags users
2684
- * @name UpdatePreferencesForAuthenticatedUser
2685
- * @summary Update the preferences for the currently authenticated user
2686
- * @request PATCH:/user/preferences
2687
- * @secure
2688
- */
2689
- updatePreferencesForAuthenticatedUser: (data: {
2690
- theme: UserPreferencesTheme;
2691
- }, params?: RequestParams) => Promise<HttpResponse<UserPreferences, Error>>;
2692
3037
  };
2693
3038
  users: {
2694
3039
  /**
@@ -2724,7 +3069,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
2724
3069
  */
2725
3070
  updateSpaceById: (spaceId: string, data: {
2726
3071
  visibility?: ContentVisibility;
2727
- type?: SpaceType;
2728
3072
  }, params?: RequestParams) => Promise<HttpResponse<Space, Error>>;
2729
3073
  /**
2730
3074
  * No description
@@ -3491,59 +3835,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
3491
3835
  message: string;
3492
3836
  };
3493
3837
  }>>;
3494
- /**
3495
- * No description
3496
- *
3497
- * @tags spaces
3498
- * @name ListSpaceRelations
3499
- * @summary List all relations for a space
3500
- * @request GET:/spaces/{spaceId}/relations
3501
- * @secure
3502
- */
3503
- listSpaceRelations: (spaceId: string, query?: {
3504
- page?: string;
3505
- limit?: number;
3506
- }, params?: RequestParams) => Promise<HttpResponse<List & {
3507
- items: SpaceRelation[];
3508
- }, Error>>;
3509
- /**
3510
- * No description
3511
- *
3512
- * @tags spaces
3513
- * @name CreateSpaceRelation
3514
- * @summary Create a new relation between a source space and a target space
3515
- * @request POST:/spaces/{spaceId}/relations
3516
- * @secure
3517
- */
3518
- createSpaceRelation: (spaceId: string, data: {
3519
- target: string;
3520
- type: SpaceRelationType;
3521
- }, params?: RequestParams) => Promise<HttpResponse<SpaceRelation, Error>>;
3522
- /**
3523
- * No description
3524
- *
3525
- * @tags spaces
3526
- * @name GetSpaceRelation
3527
- * @summary Get the relation between 2 spaces.
3528
- * @request GET:/spaces/{spaceId}/relations/{targetSpaceId}
3529
- * @secure
3530
- */
3531
- getSpaceRelation: (spaceId: string, targetSpaceId: string, params?: RequestParams) => Promise<HttpResponse<SpaceRelation, Error | {
3532
- error: {
3533
- code: 404;
3534
- message: string;
3535
- };
3536
- }>>;
3537
- /**
3538
- * No description
3539
- *
3540
- * @tags spaces
3541
- * @name DeleteSpaceRelation
3542
- * @summary Delete a relation between spaces
3543
- * @request DELETE:/spaces/{spaceId}/relations/{targetSpaceId}
3544
- * @secure
3545
- */
3546
- deleteSpaceRelation: (spaceId: string, targetSpaceId: string, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
3547
3838
  /**
3548
3839
  * No description
3549
3840
  *
@@ -3663,6 +3954,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
3663
3954
  listIntegrations: (query?: {
3664
3955
  page?: string;
3665
3956
  limit?: number;
3957
+ category?: IntegrationCategory;
3958
+ blockDomain?: string;
3666
3959
  }, params?: RequestParams) => Promise<HttpResponse<List & {
3667
3960
  items: Integration[];
3668
3961
  }, Error>>;
@@ -3911,6 +4204,21 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
3911
4204
  message: string;
3912
4205
  };
3913
4206
  }>>;
4207
+ /**
4208
+ * No description
4209
+ *
4210
+ * @tags integrations
4211
+ * @name ListIntegrationInstallationSpaces
4212
+ * @summary List installations on spaces for an integration in an organization
4213
+ * @request GET:/integrations/{integrationName}/installations/{installationId}/spaces
4214
+ * @secure
4215
+ */
4216
+ listIntegrationInstallationSpaces: (integrationName: string, installationId: string, query?: {
4217
+ page?: string;
4218
+ limit?: number;
4219
+ }, params?: RequestParams) => Promise<HttpResponse<List & {
4220
+ items: IntegrationSpaceInstallation[];
4221
+ }, Error>>;
3914
4222
  /**
3915
4223
  * No description
3916
4224
  *
@@ -4176,7 +4484,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
4176
4484
  remove?: string[];
4177
4485
  }, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
4178
4486
  /**
4179
- * @description Lists members for the specified organization team.
4487
+ * @description Lists members, and their roles, for the specified organization team.
4180
4488
  *
4181
4489
  * @tags organizations
4182
4490
  * @name ListTeamMembersInOrganizationById
@@ -4188,7 +4496,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
4188
4496
  page?: string;
4189
4497
  limit?: number;
4190
4498
  }, params?: RequestParams) => Promise<HttpResponse<List & {
4191
- items: OrganizationMember[];
4499
+ items: OrganizationTeamMember[];
4192
4500
  }, Error>>;
4193
4501
  /**
4194
4502
  * @description Add or updates member in the specified organization team.
@@ -4481,77 +4789,35 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
4481
4789
  * No description
4482
4790
  *
4483
4791
  * @tags spaces
4484
- * @name ListSpaceRelationsInOrganization
4485
- * @summary List all relations between spaces in an organization
4486
- * @request GET:/orgs/{organizationId}/space-relations
4792
+ * @name ListOrganizationIntegrations
4793
+ * @summary List integrations owned by an organization
4794
+ * @request GET:/orgs/{organizationId}/integrations
4487
4795
  * @secure
4488
4796
  */
4489
- listSpaceRelationsInOrganization: (organizationId: string, query?: {
4797
+ listOrganizationIntegrations: (organizationId: string, query?: {
4490
4798
  page?: string;
4491
4799
  limit?: number;
4492
4800
  }, params?: RequestParams) => Promise<HttpResponse<List & {
4493
- items: SpaceRelationPair[];
4801
+ items: Integration[];
4494
4802
  }, Error>>;
4495
4803
  /**
4496
4804
  * No description
4497
4805
  *
4498
- * @tags organizations, environments
4499
- * @name ListEnvironments
4500
- * @summary Get the environments in an organization
4501
- * @request GET:/orgs/{organizationId}/environments
4806
+ * @tags spaces
4807
+ * @name ListOrganizationInstallations
4808
+ * @summary List installations of integrations in an organization.
4809
+ * @request GET:/orgs/{organizationId}/installations
4502
4810
  * @secure
4503
4811
  */
4504
- listEnvironments: (organizationId: string, query?: {
4812
+ listOrganizationInstallations: (organizationId: string, query?: {
4505
4813
  page?: string;
4506
4814
  limit?: number;
4507
4815
  }, params?: RequestParams) => Promise<HttpResponse<List & {
4508
- items?: Environment[];
4509
- }, any>>;
4510
- /**
4511
- * No description
4512
- *
4513
- * @tags organizations, environments
4514
- * @name CreateEnvironment
4515
- * @summary Create a new environment within an organization
4516
- * @request POST:/orgs/{organizationId}/environments
4517
- * @secure
4518
- */
4519
- createEnvironment: (organizationId: string, data: CreateEnvironment, params?: RequestParams) => Promise<HttpResponse<Environment, Error>>;
4520
- /**
4521
- * No description
4522
- *
4523
- * @tags organizations, environments
4524
- * @name GetEnvironmentByName
4525
- * @summary Get an environment by its name
4526
- * @request GET:/orgs/{organizationId}/environments/{environmentName}
4527
- * @secure
4528
- */
4529
- getEnvironmentByName: (organizationId: string, environmentName: string, params?: RequestParams) => Promise<HttpResponse<Environment, Error | {
4530
- error: {
4531
- code: 404;
4532
- message: string;
4533
- };
4534
- }>>;
4535
- /**
4536
- * No description
4537
- *
4538
- * @tags organizations, environments
4539
- * @name UpdateEnvironment
4540
- * @summary Update an existing environment within an organization
4541
- * @request PATCH:/orgs/{organizationId}/environments/{environmentName}
4542
- * @secure
4543
- */
4544
- updateEnvironment: (organizationId: string, environmentName: string, data: UpdateEnvironment, params?: RequestParams) => Promise<HttpResponse<Environment, Error>>;
4545
- /**
4546
- * No description
4547
- *
4548
- * @tags organizations, environments
4549
- * @name DeleteEnvironment
4550
- * @summary Delete an environment in an organization
4551
- * @request DELETE:/orgs/{organizationId}/environments/{environmentName}
4552
- * @secure
4553
- */
4554
- deleteEnvironment: (organizationId: string, environmentName: string, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
4816
+ items: {
4817
+ installation: IntegrationInstallation;
4818
+ integration: Integration;
4819
+ }[];
4820
+ }, Error>>;
4555
4821
  /**
4556
4822
  * No description
4557
4823
  *
@@ -4649,6 +4915,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
4649
4915
  format?: 'document' | 'markdown';
4650
4916
  page?: string;
4651
4917
  limit?: number;
4918
+ context?: 'walkthrough' | 'thread';
4652
4919
  }, params?: RequestParams) => Promise<HttpResponse<List & {
4653
4920
  items: Capture[];
4654
4921
  }, Error>>;
@@ -4689,6 +4956,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
4689
4956
  * @secure
4690
4957
  */
4691
4958
  deleteCapture: (organizationId: string, captureId: string, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
4959
+ /**
4960
+ * No description
4961
+ *
4962
+ * @tags organizations
4963
+ * @name UpdateCapture
4964
+ * @summary Update an existing capture
4965
+ * @request PUT:/orgs/{organizationId}/captures/{captureId}
4966
+ * @secure
4967
+ */
4968
+ updateCapture: (organizationId: string, captureId: string, data: UpdateCaptureSchema, params?: RequestParams) => Promise<HttpResponse<Capture, Error>>;
4692
4969
  /**
4693
4970
  * No description
4694
4971
  *
@@ -4761,6 +5038,18 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
4761
5038
  changeRequest?: ChangeRequest;
4762
5039
  page?: RevisionPageDocument | RevisionPageGroup;
4763
5040
  }, Error>>;
5041
+ /**
5042
+ * No description
5043
+ *
5044
+ * @tags urls
5045
+ * @name GetEmbedByUrl
5046
+ * @summary Resolve a URL to an embed
5047
+ * @request GET:/urls/embed
5048
+ * @secure
5049
+ */
5050
+ getEmbedByUrl: (query: {
5051
+ url: string;
5052
+ }, params?: RequestParams) => Promise<HttpResponse<Embed, Error>>;
4764
5053
  };
4765
5054
  }
4766
5055
  export {};