@gitbook/api 0.13.0 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/client.d.ts CHANGED
@@ -392,6 +392,17 @@ export interface CommentReply {
392
392
  location: string;
393
393
  };
394
394
  }
395
+ export declare type PublishedContentLookup = {
396
+ target: 'application' | 'content' | 'external';
397
+ redirect: URL;
398
+ } | {
399
+ space: string;
400
+ changeRequest?: string;
401
+ revision?: string;
402
+ pathname: string;
403
+ basePath: string;
404
+ apiToken: string;
405
+ };
395
406
  export declare type Document = MarkdownDocument | {
396
407
  document: JSONDocument;
397
408
  } | object;
@@ -404,20 +415,22 @@ export interface JSONDocument {
404
415
  data: object;
405
416
  nodes: DocumentBlocksTopLevels[];
406
417
  }
407
- export declare type DocumentBlocksEssentials = DocumentBlockParagraph | DocumentBlockHeading | DocumentBlockListOrdered | DocumentBlockListUnordered | DocumentBlockListTasks | DocumentBlockDivider;
408
- export declare type DocumentBlocksTopLevels = DocumentBlocksEssentials | DocumentBlockQuote | DocumentBlockHint | DocumentBlockImages | DocumentBlockFile | DocumentBlockDrawing | DocumentBlockEmbed | DocumentBlockCode | DocumentBlockMath | DocumentBlockExpandable | DocumentBlockTabs | DocumentBlockTable | DocumentBlockSwagger | DocumentBlockContentRef | DocumentBlockIntegration;
409
- export interface DocumentNodeText {
418
+ export declare type DocumentBlock = DocumentBlockParagraph | DocumentBlockHeading | DocumentBlockListOrdered | DocumentBlockListUnordered | DocumentBlockListTasks | DocumentBlockListItem | DocumentBlockDivider | DocumentBlockQuote | DocumentBlockHint | DocumentBlockImages | DocumentBlockImage | DocumentBlockFile | DocumentBlockDrawing | DocumentBlockEmbed | DocumentBlockCode | DocumentBlockCodeLine | DocumentBlockMath | DocumentBlockExpandable | DocumentBlockTabs | DocumentBlockTabsItem | DocumentBlockTable | DocumentBlockSwagger | DocumentBlockContentRef | DocumentBlockIntegration;
419
+ export declare type DocumentInline = DocumentInlineLink | DocumentInlineEmoji | DocumentInlineMath | DocumentInlineImage | DocumentInlineAnnotation | DocumentInlineMention;
420
+ export interface DocumentText {
410
421
  object: 'text';
411
422
  key?: string;
412
423
  leaves: DocumentTextLeaf[];
413
424
  }
414
- export interface DocumentNodeFragment {
425
+ export interface DocumentFragment {
415
426
  object: 'fragment';
416
427
  key?: string;
417
428
  fragment?: string;
418
429
  type?: string;
419
430
  nodes: DocumentBlocksEssentials[];
420
431
  }
432
+ export declare type DocumentBlocksEssentials = DocumentBlockParagraph | DocumentBlockHeading | DocumentBlockListOrdered | DocumentBlockListUnordered | DocumentBlockListTasks | DocumentBlockDivider;
433
+ export declare type DocumentBlocksTopLevels = DocumentBlocksEssentials | DocumentBlockQuote | DocumentBlockHint | DocumentBlockImages | DocumentBlockFile | DocumentBlockDrawing | DocumentBlockEmbed | DocumentBlockCode | DocumentBlockMath | DocumentBlockExpandable | DocumentBlockTabs | DocumentBlockTable | DocumentBlockSwagger | DocumentBlockContentRef | DocumentBlockIntegration;
421
434
  export interface DocumentTextLeaf {
422
435
  object: 'leaf';
423
436
  text: string;
@@ -452,7 +465,7 @@ export interface DocumentInlineLink {
452
465
  object: 'inline';
453
466
  type: 'link';
454
467
  key?: string;
455
- nodes: (DocumentNodeText | DocumentInlineImage)[];
468
+ nodes: (DocumentText | DocumentInlineImage)[];
456
469
  data: {
457
470
  ref: ContentRef;
458
471
  };
@@ -501,20 +514,19 @@ export interface DocumentInlineAnnotation {
501
514
  object: 'inline';
502
515
  type: 'annotation';
503
516
  key?: string;
504
- fragments: (DocumentNodeFragment & {
517
+ fragments: (DocumentFragment & {
505
518
  type: 'annotation-body';
506
519
  nodes: (DocumentBlocksEssentials | DocumentBlockCode)[];
507
520
  })[];
508
- isVoid: true;
509
- nodes: DocumentNodeText[];
521
+ isVoid: false;
522
+ nodes: DocumentText[];
510
523
  data?: object;
511
524
  }
512
- export declare type DocumentInlinesRich = DocumentNodeText | DocumentInlineLink | DocumentInlineEmoji | DocumentInlineMath | DocumentInlineImage | DocumentInlineAnnotation | DocumentInlineMention;
513
525
  export interface DocumentBlockParagraph {
514
526
  object: 'block';
515
527
  type: 'paragraph';
516
528
  key?: string;
517
- nodes: DocumentInlinesRich[];
529
+ nodes: (DocumentInline | DocumentText)[];
518
530
  isVoid?: false;
519
531
  data?: object;
520
532
  }
@@ -522,7 +534,7 @@ export interface DocumentBlockHeading {
522
534
  object: 'block';
523
535
  type: 'heading-1' | 'heading-2' | 'heading-3';
524
536
  key?: string;
525
- nodes: DocumentInlinesRich[];
537
+ nodes: (DocumentInline | DocumentText)[];
526
538
  data: {
527
539
  id?: string;
528
540
  };
@@ -571,7 +583,7 @@ export interface DocumentBlockListTasks {
571
583
  object: 'block';
572
584
  type: 'list-tasks';
573
585
  key?: string;
574
- nodes: DocumentBlockTaskListItem[];
586
+ nodes: DocumentBlockListItem[];
575
587
  isVoid?: false;
576
588
  data?: object;
577
589
  }
@@ -581,13 +593,10 @@ export interface DocumentBlockListItem {
581
593
  key?: string;
582
594
  nodes: DocumentBlocksEssentials[];
583
595
  isVoid?: false;
584
- data?: object;
585
- }
586
- export declare type DocumentBlockTaskListItem = DocumentBlockListItem & {
587
- data: {
588
- checked: boolean;
596
+ data?: {
597
+ checked?: boolean;
589
598
  };
590
- };
599
+ }
591
600
  export interface DocumentBlockImages {
592
601
  object: 'block';
593
602
  type: 'images';
@@ -606,18 +615,20 @@ export interface DocumentBlockImage {
606
615
  data: {
607
616
  ref: ContentRefURL | ContentRefFile;
608
617
  refDark?: ContentRefURL | ContentRefFile;
609
- width?: number | {
610
- unit: string;
611
- value: number;
612
- };
613
- height?: any;
618
+ width?: DocumentBlockImageDimension;
619
+ height?: DocumentBlockImageDimension;
620
+ alt?: string;
614
621
  };
615
- fragments: (DocumentNodeFragment & {
622
+ fragments: (DocumentFragment & {
616
623
  type: 'caption';
617
624
  nodes: DocumentBlockParagraph[];
618
625
  })[];
619
626
  isVoid: true;
620
627
  }
628
+ export declare type DocumentBlockImageDimension = number | {
629
+ unit: string;
630
+ value: number;
631
+ };
621
632
  export interface DocumentBlockFile {
622
633
  object: 'block';
623
634
  type: 'file';
@@ -664,7 +675,7 @@ export interface DocumentBlockCodeLine {
664
675
  object: 'block';
665
676
  type: 'code-line';
666
677
  key?: string;
667
- nodes: (DocumentNodeText | DocumentInlineAnnotation)[];
678
+ nodes: (DocumentText | DocumentInlineAnnotation)[];
668
679
  data: {
669
680
  highlighted?: boolean;
670
681
  };
@@ -685,11 +696,11 @@ export interface DocumentBlockExpandable {
685
696
  key?: string;
686
697
  isVoid: true;
687
698
  data: object;
688
- fragments: ((DocumentNodeFragment & {
699
+ fragments: ((DocumentFragment & {
689
700
  fragment: 'expandable-title';
690
701
  type: 'expandable-title';
691
702
  nodes: DocumentBlockParagraph[];
692
- }) | (DocumentNodeFragment & {
703
+ }) | (DocumentFragment & {
693
704
  fragment: 'expandable-body';
694
705
  type: 'expandable-body';
695
706
  nodes: (DocumentBlocksEssentials | DocumentBlockCode)[];
@@ -733,7 +744,7 @@ export interface DocumentBlockTable {
733
744
  definition: Record<string, DocumentTableDefinition>;
734
745
  fullWidth?: boolean;
735
746
  };
736
- fragments: DocumentNodeFragment[];
747
+ fragments: DocumentFragment[];
737
748
  }
738
749
  export interface DocumentTableRecord {
739
750
  orderIndex: string;
@@ -868,12 +879,15 @@ export interface ContentRefFile {
868
879
  export interface ContentRefPage {
869
880
  kind: 'page';
870
881
  page: string;
871
- space: string;
882
+ /** ID of the space the page is in. The page is considered as in the current space if none is provided. */
883
+ space?: string;
872
884
  }
873
885
  export interface ContentRefAnchor {
874
886
  kind: 'anchor';
875
887
  anchor: string;
888
+ /** ID of the space the page is in. The page is considered as in the current space if none is provided. */
876
889
  space?: string;
890
+ /** ID of the page the anchor is in. The anchor is considered as in the current page if none is provided. */
877
891
  page?: string;
878
892
  }
879
893
  export interface ContentRefUser {
@@ -972,6 +986,12 @@ export declare type RevisionPageDocument = RevisionPageBase & Document & {
972
986
  pages: (RevisionPageDocument | RevisionPageLink)[];
973
987
  git?: GitSyncBlob;
974
988
  };
989
+ export interface RevisionPageDocumentCover {
990
+ /** Content reference pointing to the source image. */
991
+ ref?: ContentRefFile;
992
+ /** Vertical position of the cover image. */
993
+ yPos: number;
994
+ }
975
995
  export declare type RevisionPageGroup = RevisionPageBase & {
976
996
  kind: 'group';
977
997
  type: 'group';
@@ -979,12 +999,49 @@ export declare type RevisionPageGroup = RevisionPageBase & {
979
999
  path: string;
980
1000
  pages: (RevisionPageDocument | RevisionPageLink)[];
981
1001
  };
1002
+ export declare type RevisionPageLayout = RevisionPageLayoutPreset | RevisionPageLayoutOptions;
1003
+ export interface RevisionPageLayoutOptions {
1004
+ /** Should the cover be visible? */
1005
+ cover?: boolean;
1006
+ /** Size of the cover image. */
1007
+ coverSize?: RevisionPageLayoutOptionsCoverSize;
1008
+ /** Should the title be visible? */
1009
+ title?: boolean;
1010
+ /** Should the description be visible? */
1011
+ description?: boolean;
1012
+ /** Should the table of contents be visible? */
1013
+ tableOfContents?: boolean;
1014
+ /** Should the outline be visible? */
1015
+ outline?: boolean;
1016
+ /** Should the pagination be visible? */
1017
+ pagination?: boolean;
1018
+ }
1019
+ /**
1020
+ * Size of the cover image.
1021
+ */
1022
+ export declare enum RevisionPageLayoutOptionsCoverSize {
1023
+ Hero = "hero",
1024
+ Full = "full"
1025
+ }
1026
+ /**
1027
+ * The core layout presets for a page.
1028
+ */
1029
+ export declare enum RevisionPageLayoutPreset {
1030
+ Docs = "docs",
1031
+ Editorial = "editorial",
1032
+ Landing = "landing"
1033
+ }
982
1034
  export declare type RevisionPageLink = RevisionPageBase & {
983
1035
  kind: 'link';
984
1036
  type: 'link';
985
1037
  target: ContentRef;
986
1038
  href?: string;
987
1039
  };
1040
+ export declare enum RevisionPageType {
1041
+ Document = "document",
1042
+ Group = "group",
1043
+ Link = "link"
1044
+ }
988
1045
  export interface RevisionFile {
989
1046
  id: string;
990
1047
  name: string;
@@ -998,6 +1055,10 @@ export interface RevisionFile {
998
1055
  };
999
1056
  git?: GitSyncBlob;
1000
1057
  }
1058
+ export interface RevisionFileImageDimensions {
1059
+ height: number;
1060
+ width: number;
1061
+ }
1001
1062
  export declare enum ImportContentSource {
1002
1063
  Website = "website",
1003
1064
  Docx = "docx",
@@ -1012,6 +1073,131 @@ export declare enum ImportContentSource {
1012
1073
  GoogleDocs = "google-docs",
1013
1074
  OpenApi = "open-api"
1014
1075
  }
1076
+ export interface ChangeAttributeContentReference {
1077
+ before?: ContentRef;
1078
+ after?: ContentRef;
1079
+ }
1080
+ export interface ChangeAttributeCustomFields {
1081
+ before?: Record<string, {
1082
+ value: CustomFieldValue;
1083
+ }>;
1084
+ after?: Record<string, {
1085
+ value: CustomFieldValue;
1086
+ }>;
1087
+ }
1088
+ export interface ChangeAttributeNumber {
1089
+ before?: number;
1090
+ after?: number;
1091
+ }
1092
+ export interface ChangeAttributeRevisionFileImageDimensions {
1093
+ before?: RevisionFileImageDimensions;
1094
+ after?: RevisionFileImageDimensions;
1095
+ }
1096
+ export interface ChangeAttributeRevisionPageDocumentCover {
1097
+ before?: RevisionPageDocumentCover;
1098
+ after?: RevisionPageDocumentCover;
1099
+ }
1100
+ export interface ChangeAttributeRevisionPageLayout {
1101
+ before?: RevisionPageLayout;
1102
+ after?: RevisionPageLayout;
1103
+ }
1104
+ export interface ChangeAttributeString {
1105
+ before?: string;
1106
+ after?: string;
1107
+ }
1108
+ export interface ChangedRevisionFile {
1109
+ id: string;
1110
+ name: string;
1111
+ contentType: string;
1112
+ downloadURL: string;
1113
+ }
1114
+ export interface ChangedRevisionPage {
1115
+ id: string;
1116
+ type: RevisionPageType;
1117
+ title: string;
1118
+ path?: string;
1119
+ }
1120
+ export interface RevisionFileChangeAttributes {
1121
+ name?: ChangeAttributeString;
1122
+ downloadURL?: ChangeAttributeString;
1123
+ size?: ChangeAttributeNumber;
1124
+ contentType?: ChangeAttributeString;
1125
+ dimensions?: ChangeAttributeRevisionFileImageDimensions;
1126
+ }
1127
+ export interface RevisionPageDocumentChangeAttributes {
1128
+ title?: ChangeAttributeString;
1129
+ description?: ChangeAttributeString;
1130
+ slug?: ChangeAttributeString;
1131
+ document?: ChangeAttributeString;
1132
+ cover?: ChangeAttributeRevisionPageDocumentCover;
1133
+ emoji?: ChangeAttributeString;
1134
+ layout?: ChangeAttributeRevisionPageLayout;
1135
+ customFields?: ChangeAttributeCustomFields;
1136
+ }
1137
+ export interface RevisionPageGroupChangeAttributes {
1138
+ title?: ChangeAttributeString;
1139
+ emoji?: ChangeAttributeString;
1140
+ slug?: ChangeAttributeString;
1141
+ customFields?: ChangeAttributeCustomFields;
1142
+ }
1143
+ export interface RevisionPageLinkChangeAttributes {
1144
+ title?: ChangeAttributeString;
1145
+ emoji?: ChangeAttributeString;
1146
+ target?: ChangeAttributeContentReference;
1147
+ customFields?: ChangeAttributeCustomFields;
1148
+ }
1149
+ export declare type RevisionSemanticChange = RevisionSemanticChangePageCreated | RevisionSemanticChangePageEdited | RevisionSemanticChangePageDeleted | RevisionSemanticChangePageMoved | RevisionSemanticChangeFileCreated | RevisionSemanticChangeFileEdited | RevisionSemanticChangeFileDeleted | RevisionSemanticChangeCustomFieldsEdited;
1150
+ export interface RevisionSemanticChangeCustomFieldsEdited {
1151
+ type: 'custom_fields_edited';
1152
+ customFields: ChangeAttributeCustomFields;
1153
+ }
1154
+ export interface RevisionSemanticChangeFileCreated {
1155
+ type: 'file_created';
1156
+ file: ChangedRevisionFile;
1157
+ }
1158
+ export interface RevisionSemanticChangeFileDeleted {
1159
+ type: 'file_deleted';
1160
+ file: ChangedRevisionFile;
1161
+ }
1162
+ export interface RevisionSemanticChangeFileEdited {
1163
+ type: 'file_edited';
1164
+ file: ChangedRevisionFile;
1165
+ attributes: RevisionFileChangeAttributes;
1166
+ }
1167
+ export interface RevisionSemanticChangePageCreated {
1168
+ type: 'page_created';
1169
+ page: ChangedRevisionPage;
1170
+ }
1171
+ export interface RevisionSemanticChangePageDeleted {
1172
+ type: 'page_deleted';
1173
+ page: ChangedRevisionPage;
1174
+ }
1175
+ export interface RevisionSemanticChangePageEdited {
1176
+ type: 'page_edited';
1177
+ page: ChangedRevisionPage;
1178
+ attributes: RevisionPageDocumentChangeAttributes | RevisionPageGroupChangeAttributes | RevisionPageLinkChangeAttributes;
1179
+ }
1180
+ export interface RevisionSemanticChangePageMoved {
1181
+ type: 'page_moved';
1182
+ page: ChangedRevisionPage;
1183
+ parent: {
1184
+ before?: ChangedRevisionPage;
1185
+ after?: ChangedRevisionPage;
1186
+ };
1187
+ }
1188
+ /**
1189
+ * The type of semantic change.
1190
+ */
1191
+ export declare enum RevisionSemanticChangeType {
1192
+ PageCreated = "page_created",
1193
+ PageEdited = "page_edited",
1194
+ PageDeleted = "page_deleted",
1195
+ PageMoved = "page_moved",
1196
+ FileCreated = "file_created",
1197
+ FileEdited = "file_edited",
1198
+ FileDeleted = "file_deleted",
1199
+ CustomFieldsEdited = "custom_fields_edited"
1200
+ }
1015
1201
  export interface GitSyncState {
1016
1202
  /** The provider of the Git Sync installation. */
1017
1203
  installationProvider?: string;
@@ -1311,6 +1497,44 @@ export interface UpdateCaptureSchema {
1311
1497
  /** Content of the capture. */
1312
1498
  body?: Document;
1313
1499
  }
1500
+ /**
1501
+ * Content audit relation
1502
+ */
1503
+ export interface ContentAuditRelation {
1504
+ id: string;
1505
+ /** The sources that are related */
1506
+ sources: ContentAuditSource[];
1507
+ /** The type of the relation between the sources */
1508
+ type: ContentAuditRelationType;
1509
+ /** A human readable description of the reason for the relation */
1510
+ reason?: string;
1511
+ /** The status of the relation */
1512
+ status: ContentAuditRelationStatus;
1513
+ /** The date at which the relation was created */
1514
+ createdAt: Date;
1515
+ }
1516
+ /**
1517
+ * The type of the relation between the sources
1518
+ */
1519
+ export declare type ContentAuditRelationType = 'contradiction' | 'duplicate';
1520
+ /**
1521
+ * Status of the audit relation to filter on
1522
+ */
1523
+ export declare type ContentAuditRelationStatus = 'pending' | 'rejected';
1524
+ export interface ContentAuditRelationStatusUpdate {
1525
+ /** Status of the audit relation to filter on */
1526
+ status: ContentAuditRelationStatus;
1527
+ }
1528
+ export declare type ContentAuditSource = ContentAuditSourceSection;
1529
+ /**
1530
+ * A GitBook section source
1531
+ */
1532
+ export interface ContentAuditSourceSection {
1533
+ id: string;
1534
+ type: 'section';
1535
+ space: Space;
1536
+ page: RevisionPageDocument;
1537
+ }
1314
1538
  export interface ChangeRequest {
1315
1539
  /** Type of Object, always equals to "change-request" */
1316
1540
  object: 'change-request';
@@ -1568,7 +1792,8 @@ export interface AnalyticsContentPage {
1568
1792
  feedbacks?: {
1569
1793
  score: number;
1570
1794
  total: number;
1571
- rating: 'unknown' | 'bad' | 'ok' | 'good';
1795
+ rating: string;
1796
+ ponderedScore: number;
1572
1797
  bad: number;
1573
1798
  ok: number;
1574
1799
  good: number;
@@ -2791,7 +3016,7 @@ export interface ContentKitURL {
2791
3016
  /**
2792
3017
  * Channel to subscribe to for API updates.
2793
3018
  */
2794
- export declare type SubscriptionChannel = SpaceInfoChannel | SpaceGitInfoChannel | SpacePublishingAuthChannel | SpacePublishingCustomizationChannel | SpaceEntitiesChannel | SpaceCustomFieldsChannel | BackofficeUserInfoChannel | SpaceIntegrationsChannel | OrganizationCustomFieldsChannel | UserAPITokensChannel | UserProfileChannel | ChangeRequestReviewsChannel | CollectionPublishingCustomizationChannel | OrganizationMembersChannel | OrganizationMemberChannel | OrganizationTeamsChannel | OrganizationTeamChannel | OrganizationTeamMembersChannel | OrganizationTeamMemberChannel | OrganizationSpacesChannel | OrganizationCollectionsChannel | OrganizationEntitiesChannel | OrganizationSchemasChannel | OrganizationCapturesChannel | OrganizationIntegrationsChannel | OrganizationInstallationsChannel | {
3019
+ export declare type SubscriptionChannel = SpaceInfoChannel | SpaceGitInfoChannel | SpacePublishingAuthChannel | SpacePublishingCustomizationChannel | SpaceEntitiesChannel | SpaceCustomFieldsChannel | BackofficeUserInfoChannel | SpaceIntegrationsChannel | OrganizationCustomFieldsChannel | UserAPITokensChannel | UserProfileChannel | ChangeRequestReviewsChannel | CollectionPublishingCustomizationChannel | OrganizationMembersChannel | OrganizationMemberChannel | OrganizationTeamsChannel | OrganizationTeamChannel | OrganizationTeamMembersChannel | OrganizationTeamMemberChannel | OrganizationSpacesChannel | OrganizationCollectionsChannel | OrganizationEntitiesChannel | OrganizationSchemasChannel | OrganizationCapturesChannel | OrganizationContentAuditsChannel | OrganizationIntegrationsChannel | OrganizationInstallationsChannel | {
2795
3020
  channel: 'space-comments';
2796
3021
  space: string;
2797
3022
  changeRequest?: string;
@@ -2927,6 +3152,10 @@ export interface OrganizationCapturesChannel {
2927
3152
  channel: 'organization-captures';
2928
3153
  organization: string;
2929
3154
  }
3155
+ export interface OrganizationContentAuditsChannel {
3156
+ channel: 'organization-content-audits';
3157
+ organization: string;
3158
+ }
2930
3159
  export interface OrganizationIntegrationsChannel {
2931
3160
  channel: 'organization-integrations';
2932
3161
  organization: string;
@@ -3853,6 +4082,21 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
3853
4082
  * @secure
3854
4083
  */
3855
4084
  getRevisionById: (spaceId: string, revisionId: string, params?: RequestParams) => Promise<HttpResponse<Revision, Error>>;
4085
+ /**
4086
+ * No description
4087
+ *
4088
+ * @name GetRevisionSemanticChanges
4089
+ * @summary Return the semantic changes between a revision and its parent.
4090
+ * @request GET:/spaces/{spaceId}/revisions/{revisionId}/changes
4091
+ * @secure
4092
+ */
4093
+ getRevisionSemanticChanges: (spaceId: string, revisionId: string, query?: {
4094
+ limit?: number;
4095
+ metadata?: boolean;
4096
+ }, params?: RequestParams) => Promise<HttpResponse<{
4097
+ changes: RevisionSemanticChange[];
4098
+ more?: number;
4099
+ }, Error>>;
3856
4100
  /**
3857
4101
  * No description
3858
4102
  *
@@ -5309,6 +5553,37 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
5309
5553
  askInOrganization: (organizationId: string, data: SearchAIQuery, params?: RequestParams) => Promise<HttpResponse<{
5310
5554
  answer?: SearchAIAnswer;
5311
5555
  }, Error>>;
5556
+ /**
5557
+ * No description
5558
+ *
5559
+ * @tags ai, spaces
5560
+ * @name ListContentAuditRelations
5561
+ * @summary List the content relations for in a given organization.
5562
+ * @request GET:/orgs/{organizationId}/insights/audit-relations
5563
+ * @secure
5564
+ */
5565
+ listContentAuditRelations: (organizationId: string, query?: {
5566
+ page?: string;
5567
+ limit?: number;
5568
+ status?: ContentAuditRelationStatus;
5569
+ }, params?: RequestParams) => Promise<HttpResponse<List & {
5570
+ items: ContentAuditRelation[];
5571
+ }, Error>>;
5572
+ /**
5573
+ * No description
5574
+ *
5575
+ * @tags organizations
5576
+ * @name UpdateContentAuditRelationStatusById
5577
+ * @summary Update an audit relation status
5578
+ * @request PATCH:/orgs/{organizationId}/insights/audit-relations/{relationId}
5579
+ * @secure
5580
+ */
5581
+ updateContentAuditRelationStatusById: (organizationId: string, relationId: string, data: ContentAuditRelationStatusUpdate, params?: RequestParams) => Promise<HttpResponse<ContentAuditRelation, Error | {
5582
+ error: {
5583
+ code: 404;
5584
+ message: string;
5585
+ };
5586
+ }>>;
5312
5587
  };
5313
5588
  internal: {
5314
5589
  /**
@@ -5355,6 +5630,19 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
5355
5630
  getEmbedByUrl: (query: {
5356
5631
  url: string;
5357
5632
  }, params?: RequestParams) => Promise<HttpResponse<Embed, Error>>;
5633
+ /**
5634
+ * No description
5635
+ *
5636
+ * @tags urls
5637
+ * @name GetPublishedContentByUrl
5638
+ * @summary Resolve a URL of a published content.
5639
+ * @request GET:/urls/published
5640
+ * @secure
5641
+ */
5642
+ getPublishedContentByUrl: (query: {
5643
+ url: URL;
5644
+ visitorAuthToken?: string;
5645
+ }, params?: RequestParams) => Promise<HttpResponse<PublishedContentLookup, Error>>;
5358
5646
  };
5359
5647
  }
5360
5648
  export {};
package/dist/index.cjs CHANGED
@@ -55,6 +55,10 @@ __export(src_exports, {
55
55
  OrganizationType: () => OrganizationType,
56
56
  OrganizationUseCase: () => OrganizationUseCase,
57
57
  PurgeCDNCacheContextType: () => PurgeCDNCacheContextType,
58
+ RevisionPageLayoutOptionsCoverSize: () => RevisionPageLayoutOptionsCoverSize,
59
+ RevisionPageLayoutPreset: () => RevisionPageLayoutPreset,
60
+ RevisionPageType: () => RevisionPageType,
61
+ RevisionSemanticChangeType: () => RevisionSemanticChangeType,
58
62
  TeamMemberRole: () => TeamMemberRole
59
63
  });
60
64
  module.exports = __toCommonJS(src_exports);
@@ -69,6 +73,23 @@ var ContentVisibility = /* @__PURE__ */ ((ContentVisibility2) => {
69
73
  ContentVisibility2["Private"] = "private";
70
74
  return ContentVisibility2;
71
75
  })(ContentVisibility || {});
76
+ var RevisionPageLayoutOptionsCoverSize = /* @__PURE__ */ ((RevisionPageLayoutOptionsCoverSize2) => {
77
+ RevisionPageLayoutOptionsCoverSize2["Hero"] = "hero";
78
+ RevisionPageLayoutOptionsCoverSize2["Full"] = "full";
79
+ return RevisionPageLayoutOptionsCoverSize2;
80
+ })(RevisionPageLayoutOptionsCoverSize || {});
81
+ var RevisionPageLayoutPreset = /* @__PURE__ */ ((RevisionPageLayoutPreset2) => {
82
+ RevisionPageLayoutPreset2["Docs"] = "docs";
83
+ RevisionPageLayoutPreset2["Editorial"] = "editorial";
84
+ RevisionPageLayoutPreset2["Landing"] = "landing";
85
+ return RevisionPageLayoutPreset2;
86
+ })(RevisionPageLayoutPreset || {});
87
+ var RevisionPageType = /* @__PURE__ */ ((RevisionPageType2) => {
88
+ RevisionPageType2["Document"] = "document";
89
+ RevisionPageType2["Group"] = "group";
90
+ RevisionPageType2["Link"] = "link";
91
+ return RevisionPageType2;
92
+ })(RevisionPageType || {});
72
93
  var ImportContentSource = /* @__PURE__ */ ((ImportContentSource2) => {
73
94
  ImportContentSource2["Website"] = "website";
74
95
  ImportContentSource2["Docx"] = "docx";
@@ -84,6 +105,17 @@ var ImportContentSource = /* @__PURE__ */ ((ImportContentSource2) => {
84
105
  ImportContentSource2["OpenApi"] = "open-api";
85
106
  return ImportContentSource2;
86
107
  })(ImportContentSource || {});
108
+ var RevisionSemanticChangeType = /* @__PURE__ */ ((RevisionSemanticChangeType2) => {
109
+ RevisionSemanticChangeType2["PageCreated"] = "page_created";
110
+ RevisionSemanticChangeType2["PageEdited"] = "page_edited";
111
+ RevisionSemanticChangeType2["PageDeleted"] = "page_deleted";
112
+ RevisionSemanticChangeType2["PageMoved"] = "page_moved";
113
+ RevisionSemanticChangeType2["FileCreated"] = "file_created";
114
+ RevisionSemanticChangeType2["FileEdited"] = "file_edited";
115
+ RevisionSemanticChangeType2["FileDeleted"] = "file_deleted";
116
+ RevisionSemanticChangeType2["CustomFieldsEdited"] = "custom_fields_edited";
117
+ return RevisionSemanticChangeType2;
118
+ })(RevisionSemanticChangeType || {});
87
119
  var GitSyncOperationState = /* @__PURE__ */ ((GitSyncOperationState2) => {
88
120
  GitSyncOperationState2["Running"] = "running";
89
121
  GitSyncOperationState2["Failure"] = "failure";
@@ -901,6 +933,14 @@ var Api = class extends HttpClient {
901
933
  format: "json",
902
934
  ...params
903
935
  }),
936
+ getRevisionSemanticChanges: (spaceId, revisionId, query, params = {}) => this.request({
937
+ path: `/spaces/${spaceId}/revisions/${revisionId}/changes`,
938
+ method: "GET",
939
+ query,
940
+ secure: true,
941
+ format: "json",
942
+ ...params
943
+ }),
904
944
  listFilesInRevisionById: (spaceId, revisionId, query, params = {}) => this.request({
905
945
  path: `/spaces/${spaceId}/revisions/${revisionId}/files`,
906
946
  method: "GET",
@@ -1763,6 +1803,23 @@ var Api = class extends HttpClient {
1763
1803
  type: "application/json" /* Json */,
1764
1804
  format: "json",
1765
1805
  ...params
1806
+ }),
1807
+ listContentAuditRelations: (organizationId, query, params = {}) => this.request({
1808
+ path: `/orgs/${organizationId}/insights/audit-relations`,
1809
+ method: "GET",
1810
+ query,
1811
+ secure: true,
1812
+ format: "json",
1813
+ ...params
1814
+ }),
1815
+ updateContentAuditRelationStatusById: (organizationId, relationId, data, params = {}) => this.request({
1816
+ path: `/orgs/${organizationId}/insights/audit-relations/${relationId}`,
1817
+ method: "PATCH",
1818
+ body: data,
1819
+ secure: true,
1820
+ type: "application/json" /* Json */,
1821
+ format: "json",
1822
+ ...params
1766
1823
  })
1767
1824
  };
1768
1825
  this.internal = {
@@ -1792,6 +1849,14 @@ var Api = class extends HttpClient {
1792
1849
  secure: true,
1793
1850
  format: "json",
1794
1851
  ...params
1852
+ }),
1853
+ getPublishedContentByUrl: (query, params = {}) => this.request({
1854
+ path: `/urls/published`,
1855
+ method: "GET",
1856
+ query,
1857
+ secure: true,
1858
+ format: "json",
1859
+ ...params
1795
1860
  })
1796
1861
  };
1797
1862
  }
@@ -1891,5 +1956,9 @@ var GitBookAPI = class extends Api {
1891
1956
  OrganizationType,
1892
1957
  OrganizationUseCase,
1893
1958
  PurgeCDNCacheContextType,
1959
+ RevisionPageLayoutOptionsCoverSize,
1960
+ RevisionPageLayoutPreset,
1961
+ RevisionPageType,
1962
+ RevisionSemanticChangeType,
1894
1963
  TeamMemberRole
1895
1964
  });