@gitbook/api 0.3.0 → 0.5.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/index.cjs CHANGED
@@ -25,6 +25,7 @@ __export(src_exports, {
25
25
  Api: () => Api,
26
26
  BillingInterval: () => BillingInterval,
27
27
  BillingProduct: () => BillingProduct,
28
+ ChangeRequestReviewStatus: () => ChangeRequestReviewStatus,
28
29
  ChangeRequestStatus: () => ChangeRequestStatus,
29
30
  CloudflareHostnameStatus: () => CloudflareHostnameStatus,
30
31
  CloudflareHostnameTLSStatus: () => CloudflareHostnameTLSStatus,
@@ -32,8 +33,10 @@ __export(src_exports, {
32
33
  ContentKitIcon: () => ContentKitIcon,
33
34
  ContentType: () => ContentType,
34
35
  ContentVisibility: () => ContentVisibility,
36
+ CustomFieldType: () => CustomFieldType,
35
37
  GITBOOK_DEFAULT_ENDPOINT: () => GITBOOK_DEFAULT_ENDPOINT,
36
38
  GitBookAPI: () => GitBookAPI,
39
+ GitSyncOperationState: () => GitSyncOperationState,
37
40
  HttpClient: () => HttpClient,
38
41
  ImportContentSource: () => ImportContentSource,
39
42
  IntegrationCategory: () => IntegrationCategory,
@@ -42,7 +45,14 @@ __export(src_exports, {
42
45
  IntegrationScope: () => IntegrationScope,
43
46
  IntegrationVisibility: () => IntegrationVisibility,
44
47
  MemberRole: () => MemberRole,
45
- PurgeCDNCacheContextType: () => PurgeCDNCacheContextType
48
+ OrganizationCommunityType: () => OrganizationCommunityType,
49
+ OrganizationType: () => OrganizationType,
50
+ OrganizationUseCase: () => OrganizationUseCase,
51
+ PurgeCDNCacheContextType: () => PurgeCDNCacheContextType,
52
+ RecordingContext: () => RecordingContext,
53
+ SpaceRelationType: () => SpaceRelationType,
54
+ SpaceType: () => SpaceType,
55
+ TeamMemberRole: () => TeamMemberRole
46
56
  });
47
57
  module.exports = __toCommonJS(src_exports);
48
58
 
@@ -56,6 +66,23 @@ var ContentVisibility = /* @__PURE__ */ ((ContentVisibility2) => {
56
66
  ContentVisibility2["Private"] = "private";
57
67
  return ContentVisibility2;
58
68
  })(ContentVisibility || {});
69
+ var SpaceType = /* @__PURE__ */ ((SpaceType2) => {
70
+ SpaceType2["Application"] = "application";
71
+ SpaceType2["Website"] = "website";
72
+ SpaceType2["Service"] = "service";
73
+ SpaceType2["Library"] = "library";
74
+ SpaceType2["CloudResource"] = "cloud-resource";
75
+ SpaceType2["Database"] = "database";
76
+ SpaceType2["Other"] = "other";
77
+ return SpaceType2;
78
+ })(SpaceType || {});
79
+ var SpaceRelationType = /* @__PURE__ */ ((SpaceRelationType2) => {
80
+ SpaceRelationType2["DependsOn"] = "dependsOn";
81
+ SpaceRelationType2["DependencyOf"] = "dependencyOf";
82
+ SpaceRelationType2["PartOf"] = "partOf";
83
+ SpaceRelationType2["HasPart"] = "hasPart";
84
+ return SpaceRelationType2;
85
+ })(SpaceRelationType || {});
59
86
  var ImportContentSource = /* @__PURE__ */ ((ImportContentSource2) => {
60
87
  ImportContentSource2["Website"] = "website";
61
88
  ImportContentSource2["Docx"] = "docx";
@@ -71,6 +98,32 @@ var ImportContentSource = /* @__PURE__ */ ((ImportContentSource2) => {
71
98
  ImportContentSource2["OpenApi"] = "open-api";
72
99
  return ImportContentSource2;
73
100
  })(ImportContentSource || {});
101
+ var GitSyncOperationState = /* @__PURE__ */ ((GitSyncOperationState2) => {
102
+ GitSyncOperationState2["Running"] = "running";
103
+ GitSyncOperationState2["Failure"] = "failure";
104
+ GitSyncOperationState2["Success"] = "success";
105
+ return GitSyncOperationState2;
106
+ })(GitSyncOperationState || {});
107
+ var OrganizationType = /* @__PURE__ */ ((OrganizationType2) => {
108
+ OrganizationType2["Business"] = "business";
109
+ OrganizationType2["Community"] = "community";
110
+ return OrganizationType2;
111
+ })(OrganizationType || {});
112
+ var OrganizationUseCase = /* @__PURE__ */ ((OrganizationUseCase2) => {
113
+ OrganizationUseCase2["ProductDocs"] = "productDocs";
114
+ OrganizationUseCase2["TeamKnowledgeBase"] = "teamKnowledgeBase";
115
+ OrganizationUseCase2["DesignSystem"] = "designSystem";
116
+ OrganizationUseCase2["OpenSourceDocs"] = "openSourceDocs";
117
+ OrganizationUseCase2["Notes"] = "notes";
118
+ OrganizationUseCase2["Other"] = "other";
119
+ return OrganizationUseCase2;
120
+ })(OrganizationUseCase || {});
121
+ var OrganizationCommunityType = /* @__PURE__ */ ((OrganizationCommunityType2) => {
122
+ OrganizationCommunityType2["NonProfit"] = "nonProfit";
123
+ OrganizationCommunityType2["OpenSource"] = "openSource";
124
+ OrganizationCommunityType2["Education"] = "education";
125
+ return OrganizationCommunityType2;
126
+ })(OrganizationCommunityType || {});
74
127
  var MemberRole = /* @__PURE__ */ ((MemberRole2) => {
75
128
  MemberRole2["Admin"] = "admin";
76
129
  MemberRole2["Create"] = "create";
@@ -80,6 +133,17 @@ var MemberRole = /* @__PURE__ */ ((MemberRole2) => {
80
133
  MemberRole2["Read"] = "read";
81
134
  return MemberRole2;
82
135
  })(MemberRole || {});
136
+ var TeamMemberRole = /* @__PURE__ */ ((TeamMemberRole2) => {
137
+ TeamMemberRole2["Admin"] = "admin";
138
+ TeamMemberRole2["Participant"] = "participant";
139
+ return TeamMemberRole2;
140
+ })(TeamMemberRole || {});
141
+ var RecordingContext = /* @__PURE__ */ ((RecordingContext2) => {
142
+ RecordingContext2["Meeting"] = "meeting";
143
+ RecordingContext2["Conversation"] = "conversation";
144
+ RecordingContext2["Walkthrough"] = "walkthrough";
145
+ return RecordingContext2;
146
+ })(RecordingContext || {});
83
147
  var ChangeRequestStatus = /* @__PURE__ */ ((ChangeRequestStatus2) => {
84
148
  ChangeRequestStatus2["Draft"] = "draft";
85
149
  ChangeRequestStatus2["Open"] = "open";
@@ -87,6 +151,11 @@ var ChangeRequestStatus = /* @__PURE__ */ ((ChangeRequestStatus2) => {
87
151
  ChangeRequestStatus2["Merged"] = "merged";
88
152
  return ChangeRequestStatus2;
89
153
  })(ChangeRequestStatus || {});
154
+ var ChangeRequestReviewStatus = /* @__PURE__ */ ((ChangeRequestReviewStatus2) => {
155
+ ChangeRequestReviewStatus2["ChangesRequested"] = "changes-requested";
156
+ ChangeRequestReviewStatus2["Approved"] = "approved";
157
+ return ChangeRequestReviewStatus2;
158
+ })(ChangeRequestReviewStatus || {});
90
159
  var AnalyticsSearchPeriod = /* @__PURE__ */ ((AnalyticsSearchPeriod2) => {
91
160
  AnalyticsSearchPeriod2["LastMonth"] = "last_month";
92
161
  AnalyticsSearchPeriod2["LastWeek"] = "last_week";
@@ -100,6 +169,7 @@ var AnalyticsTrafficInterval = /* @__PURE__ */ ((AnalyticsTrafficInterval2) => {
100
169
  return AnalyticsTrafficInterval2;
101
170
  })(AnalyticsTrafficInterval || {});
102
171
  var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
172
+ IntegrationScope2["OrganizationEntitiesWrite"] = "organization:entities:write";
103
173
  IntegrationScope2["SpaceViewsRead"] = "space:views:read";
104
174
  IntegrationScope2["SpaceContentRead"] = "space:content:read";
105
175
  IntegrationScope2["SpaceContentWrite"] = "space:content:write";
@@ -107,6 +177,7 @@ var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
107
177
  IntegrationScope2["SpaceMetadataWrite"] = "space:metadata:write";
108
178
  IntegrationScope2["SpaceScriptInject"] = "space:script:inject";
109
179
  IntegrationScope2["SpaceScriptCookies"] = "space:script:cookies";
180
+ IntegrationScope2["SpaceGitSync"] = "space:git:sync";
110
181
  return IntegrationScope2;
111
182
  })(IntegrationScope || {});
112
183
  var IntegrationInstallationSpaceSelection = /* @__PURE__ */ ((IntegrationInstallationSpaceSelection2) => {
@@ -125,6 +196,7 @@ var IntegrationCategory = /* @__PURE__ */ ((IntegrationCategory2) => {
125
196
  var IntegrationVisibility = /* @__PURE__ */ ((IntegrationVisibility2) => {
126
197
  IntegrationVisibility2["Public"] = "public";
127
198
  IntegrationVisibility2["Private"] = "private";
199
+ IntegrationVisibility2["Unlisted"] = "unlisted";
128
200
  return IntegrationVisibility2;
129
201
  })(IntegrationVisibility || {});
130
202
  var IntegrationInstallationStatus = /* @__PURE__ */ ((IntegrationInstallationStatus2) => {
@@ -201,6 +273,12 @@ var ContentKitIcon = /* @__PURE__ */ ((ContentKitIcon2) => {
201
273
  ContentKitIcon2["LinkExternal"] = "link-external";
202
274
  return ContentKitIcon2;
203
275
  })(ContentKitIcon || {});
276
+ var CustomFieldType = /* @__PURE__ */ ((CustomFieldType2) => {
277
+ CustomFieldType2["Text"] = "text";
278
+ CustomFieldType2["Number"] = "number";
279
+ CustomFieldType2["Boolean"] = "boolean";
280
+ return CustomFieldType2;
281
+ })(CustomFieldType || {});
204
282
  var ContentType = /* @__PURE__ */ ((ContentType2) => {
205
283
  ContentType2["Json"] = "application/json";
206
284
  ContentType2["FormData"] = "multipart/form-data";
@@ -361,13 +439,31 @@ var Api = class extends HttpClient {
361
439
  format: "json",
362
440
  ...params
363
441
  }),
364
- askQuery: (query, params = {}) => this.request({
442
+ askQueryWithGet: (query, params = {}) => this.request({
365
443
  path: `/search/ask`,
366
444
  method: "GET",
367
445
  query,
368
446
  secure: true,
369
447
  format: "json",
370
448
  ...params
449
+ }),
450
+ askQuery: (data, params = {}) => this.request({
451
+ path: `/search/ask`,
452
+ method: "POST",
453
+ body: data,
454
+ secure: true,
455
+ type: "application/json" /* Json */,
456
+ format: "json",
457
+ ...params
458
+ }),
459
+ getRecommendedQuestions: (data, params = {}) => this.request({
460
+ path: `/search/questions`,
461
+ method: "POST",
462
+ body: data,
463
+ secure: true,
464
+ type: "application/json" /* Json */,
465
+ format: "json",
466
+ ...params
371
467
  })
372
468
  };
373
469
  this.user = {
@@ -404,6 +500,29 @@ var Api = class extends HttpClient {
404
500
  format: "json",
405
501
  ...params
406
502
  }),
503
+ updateSpaceById: (spaceId, data, params = {}) => this.request({
504
+ path: `/spaces/${spaceId}`,
505
+ method: "PATCH",
506
+ body: data,
507
+ secure: true,
508
+ type: "application/json" /* Json */,
509
+ format: "json",
510
+ ...params
511
+ }),
512
+ generateSpaceHiveReadAccessToken: (spaceId, params = {}) => this.request({
513
+ path: `/spaces/${spaceId}/hive/token`,
514
+ method: "POST",
515
+ secure: true,
516
+ format: "json",
517
+ ...params
518
+ }),
519
+ duplicateSpace: (spaceId, params = {}) => this.request({
520
+ path: `/spaces/${spaceId}/duplicate`,
521
+ method: "POST",
522
+ secure: true,
523
+ format: "json",
524
+ ...params
525
+ }),
407
526
  searchSpaceContent: (spaceId, query, params = {}) => this.request({
408
527
  path: `/spaces/${spaceId}/search`,
409
528
  method: "GET",
@@ -412,7 +531,7 @@ var Api = class extends HttpClient {
412
531
  format: "json",
413
532
  ...params
414
533
  }),
415
- askQueryInSpace: (spaceId, query, params = {}) => this.request({
534
+ askQueryInSpaceWithGet: (spaceId, query, params = {}) => this.request({
416
535
  path: `/spaces/${spaceId}/search/ask`,
417
536
  method: "GET",
418
537
  query,
@@ -420,6 +539,22 @@ var Api = class extends HttpClient {
420
539
  format: "json",
421
540
  ...params
422
541
  }),
542
+ askQueryInSpace: (spaceId, data, params = {}) => this.request({
543
+ path: `/spaces/${spaceId}/search/ask`,
544
+ method: "POST",
545
+ body: data,
546
+ secure: true,
547
+ type: "application/json" /* Json */,
548
+ format: "json",
549
+ ...params
550
+ }),
551
+ getRecommendedQuestionsInSpace: (spaceId, params = {}) => this.request({
552
+ path: `/spaces/${spaceId}/search/questions`,
553
+ method: "GET",
554
+ secure: true,
555
+ format: "json",
556
+ ...params
557
+ }),
423
558
  importGitRepository: (spaceId, data, params = {}) => this.request({
424
559
  path: `/spaces/${spaceId}/git/import`,
425
560
  method: "POST",
@@ -436,6 +571,13 @@ var Api = class extends HttpClient {
436
571
  type: "application/json" /* Json */,
437
572
  ...params
438
573
  }),
574
+ getSpaceGitInfo: (spaceId, params = {}) => this.request({
575
+ path: `/spaces/${spaceId}/git/info`,
576
+ method: "GET",
577
+ secure: true,
578
+ format: "json",
579
+ ...params
580
+ }),
439
581
  getContentAnalyticsForSpaceById: (spaceId, params = {}) => this.request({
440
582
  path: `/spaces/${spaceId}/insights/content`,
441
583
  method: "GET",
@@ -524,6 +666,21 @@ var Api = class extends HttpClient {
524
666
  format: "json",
525
667
  ...params
526
668
  }),
669
+ listChangeRequestsForSpace: (spaceId, query, params = {}) => this.request({
670
+ path: `/spaces/${spaceId}/change-requests`,
671
+ method: "GET",
672
+ query,
673
+ secure: true,
674
+ format: "json",
675
+ ...params
676
+ }),
677
+ getChangeRequestById: (spaceId, changeRequestId, params = {}) => this.request({
678
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}`,
679
+ method: "GET",
680
+ secure: true,
681
+ format: "json",
682
+ ...params
683
+ }),
527
684
  mergeChangeRequest: (spaceId, changeRequestId, params = {}) => this.request({
528
685
  path: `/spaces/${spaceId}/change-requests/${changeRequestId}/merge`,
529
686
  method: "POST",
@@ -538,6 +695,128 @@ var Api = class extends HttpClient {
538
695
  format: "json",
539
696
  ...params
540
697
  }),
698
+ getReviewsByChangeRequestId: (spaceId, changeRequestId, query, params = {}) => this.request({
699
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/reviews`,
700
+ method: "GET",
701
+ query,
702
+ secure: true,
703
+ format: "json",
704
+ ...params
705
+ }),
706
+ submitChangeRequestReview: (spaceId, changeRequestId, data, params = {}) => this.request({
707
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/reviews`,
708
+ method: "POST",
709
+ body: data,
710
+ secure: true,
711
+ type: "application/json" /* Json */,
712
+ format: "json",
713
+ ...params
714
+ }),
715
+ getRequestedReviewersByChangeRequestId: (spaceId, changeRequestId, query, params = {}) => this.request({
716
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/requested-reviewers`,
717
+ method: "GET",
718
+ query,
719
+ secure: true,
720
+ format: "json",
721
+ ...params
722
+ }),
723
+ requestReviewersForChangeRequest: (spaceId, changeRequestId, data, params = {}) => this.request({
724
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/requested-reviewers`,
725
+ method: "POST",
726
+ body: data,
727
+ secure: true,
728
+ type: "application/json" /* Json */,
729
+ format: "json",
730
+ ...params
731
+ }),
732
+ listCommentsInChangeRequest: (spaceId, changeRequestId, query, params = {}) => this.request({
733
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments`,
734
+ method: "GET",
735
+ query,
736
+ secure: true,
737
+ format: "json",
738
+ ...params
739
+ }),
740
+ postCommentInChangeRequest: (spaceId, changeRequestId, data, params = {}) => this.request({
741
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments`,
742
+ method: "POST",
743
+ body: data,
744
+ secure: true,
745
+ type: "application/json" /* Json */,
746
+ format: "json",
747
+ ...params
748
+ }),
749
+ getCommentInChangeRequest: (spaceId, changeRequestId, commentId, query, params = {}) => this.request({
750
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments/${commentId}`,
751
+ method: "GET",
752
+ query,
753
+ secure: true,
754
+ format: "json",
755
+ ...params
756
+ }),
757
+ deleteCommentInChangeRequest: (spaceId, changeRequestId, commentId, params = {}) => this.request({
758
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments/${commentId}`,
759
+ method: "DELETE",
760
+ secure: true,
761
+ ...params
762
+ }),
763
+ updateCommentInChangeRequest: (spaceId, changeRequestId, commentId, data, params = {}) => this.request({
764
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments/${commentId}`,
765
+ method: "PUT",
766
+ body: data,
767
+ secure: true,
768
+ type: "application/json" /* Json */,
769
+ format: "json",
770
+ ...params
771
+ }),
772
+ listCommentRepliesInChangeRequest: (spaceId, changeRequestId, commentId, query, params = {}) => this.request({
773
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments/${commentId}/replies`,
774
+ method: "GET",
775
+ query,
776
+ secure: true,
777
+ format: "json",
778
+ ...params
779
+ }),
780
+ postCommentReplyInChangeRequest: (spaceId, changeRequestId, commentId, data, query, params = {}) => this.request({
781
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments/${commentId}/replies`,
782
+ method: "POST",
783
+ query,
784
+ body: data,
785
+ secure: true,
786
+ type: "application/json" /* Json */,
787
+ format: "json",
788
+ ...params
789
+ }),
790
+ getCommentReplyInChangeRequest: (spaceId, changeRequestId, commentId, commentReplyId, query, params = {}) => this.request({
791
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments/${commentId}/replies/${commentReplyId}`,
792
+ method: "GET",
793
+ query,
794
+ secure: true,
795
+ format: "json",
796
+ ...params
797
+ }),
798
+ updateCommentReplyInChangeRequest: (spaceId, changeRequestId, commentId, commentReplyId, data, params = {}) => this.request({
799
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments/${commentId}/replies/${commentReplyId}`,
800
+ method: "PUT",
801
+ body: data,
802
+ secure: true,
803
+ type: "application/json" /* Json */,
804
+ format: "json",
805
+ ...params
806
+ }),
807
+ deleteCommentReplyInChangeRequest: (spaceId, changeRequestId, commentId, commentReplyId, params = {}) => this.request({
808
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments/${commentId}/replies/${commentReplyId}`,
809
+ method: "DELETE",
810
+ secure: true,
811
+ ...params
812
+ }),
813
+ getContributorsByChangeRequestId: (spaceId, changeRequestId, params = {}) => this.request({
814
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/contributors`,
815
+ method: "GET",
816
+ secure: true,
817
+ format: "json",
818
+ ...params
819
+ }),
541
820
  getRevisionOfChangeRequestById: (spaceId, changeRequestId, params = {}) => this.request({
542
821
  path: `/spaces/${spaceId}/change-requests/${changeRequestId}/content`,
543
822
  method: "GET",
@@ -616,6 +895,86 @@ var Api = class extends HttpClient {
616
895
  format: "json",
617
896
  ...params
618
897
  }),
898
+ listCommentsInSpace: (spaceId, query, params = {}) => this.request({
899
+ path: `/spaces/${spaceId}/comments`,
900
+ method: "GET",
901
+ query,
902
+ secure: true,
903
+ format: "json",
904
+ ...params
905
+ }),
906
+ postCommentInSpace: (spaceId, data, params = {}) => this.request({
907
+ path: `/spaces/${spaceId}/comments`,
908
+ method: "POST",
909
+ body: data,
910
+ secure: true,
911
+ type: "application/json" /* Json */,
912
+ format: "json",
913
+ ...params
914
+ }),
915
+ getCommentInSpace: (spaceId, commentId, query, params = {}) => this.request({
916
+ path: `/spaces/${spaceId}/comments/${commentId}`,
917
+ method: "GET",
918
+ query,
919
+ secure: true,
920
+ format: "json",
921
+ ...params
922
+ }),
923
+ deleteCommentInSpace: (spaceId, commentId, params = {}) => this.request({
924
+ path: `/spaces/${spaceId}/comments/${commentId}`,
925
+ method: "DELETE",
926
+ secure: true,
927
+ ...params
928
+ }),
929
+ updateCommentInSpace: (spaceId, commentId, data, params = {}) => this.request({
930
+ path: `/spaces/${spaceId}/comments/${commentId}`,
931
+ method: "PUT",
932
+ body: data,
933
+ secure: true,
934
+ type: "application/json" /* Json */,
935
+ format: "json",
936
+ ...params
937
+ }),
938
+ listCommentRepliesInSpace: (spaceId, commentId, query, params = {}) => this.request({
939
+ path: `/spaces/${spaceId}/comments/${commentId}/replies`,
940
+ method: "GET",
941
+ query,
942
+ secure: true,
943
+ format: "json",
944
+ ...params
945
+ }),
946
+ postCommentReplyInSpace: (spaceId, commentId, data, params = {}) => this.request({
947
+ path: `/spaces/${spaceId}/comments/${commentId}/replies`,
948
+ method: "POST",
949
+ body: data,
950
+ secure: true,
951
+ type: "application/json" /* Json */,
952
+ format: "json",
953
+ ...params
954
+ }),
955
+ getCommentReplyInSpace: (spaceId, commentId, commentReplyId, query, params = {}) => this.request({
956
+ path: `/spaces/${spaceId}/comments/${commentId}/replies/${commentReplyId}`,
957
+ method: "GET",
958
+ query,
959
+ secure: true,
960
+ format: "json",
961
+ ...params
962
+ }),
963
+ updateCommentReplyInSpace: (spaceId, commentId, commentReplyId, data, params = {}) => this.request({
964
+ path: `/spaces/${spaceId}/comments/${commentId}/replies/${commentReplyId}`,
965
+ method: "PUT",
966
+ body: data,
967
+ secure: true,
968
+ type: "application/json" /* Json */,
969
+ format: "json",
970
+ ...params
971
+ }),
972
+ deleteCommentReplyInSpace: (spaceId, commentId, commentReplyId, params = {}) => this.request({
973
+ path: `/spaces/${spaceId}/comments/${commentId}/replies/${commentReplyId}`,
974
+ method: "DELETE",
975
+ secure: true,
976
+ ...params
977
+ }),
619
978
  listPermissionsAggregateInSpace: (spaceId, query, params = {}) => this.request({
620
979
  path: `/spaces/${spaceId}/permissions/aggregate`,
621
980
  method: "GET",
@@ -623,6 +982,113 @@ var Api = class extends HttpClient {
623
982
  secure: true,
624
983
  format: "json",
625
984
  ...params
985
+ }),
986
+ getSpacePublishingAuthById: (spaceId, params = {}) => this.request({
987
+ path: `/spaces/${spaceId}/publishing/auth`,
988
+ method: "GET",
989
+ secure: true,
990
+ format: "json",
991
+ ...params
992
+ }),
993
+ updateSpacePublishingAuthById: (spaceId, data, params = {}) => this.request({
994
+ path: `/spaces/${spaceId}/publishing/auth`,
995
+ method: "POST",
996
+ body: data,
997
+ secure: true,
998
+ type: "application/json" /* Json */,
999
+ format: "json",
1000
+ ...params
1001
+ }),
1002
+ listSpaceIntegrationsBlocks: (spaceId, params = {}) => this.request(
1003
+ {
1004
+ path: `/spaces/${spaceId}/integration-blocks`,
1005
+ method: "GET",
1006
+ secure: true,
1007
+ format: "json",
1008
+ ...params
1009
+ }
1010
+ ),
1011
+ listSpaceRelations: (spaceId, query, params = {}) => this.request({
1012
+ path: `/spaces/${spaceId}/relations`,
1013
+ method: "GET",
1014
+ query,
1015
+ secure: true,
1016
+ format: "json",
1017
+ ...params
1018
+ }),
1019
+ createSpaceRelation: (spaceId, data, params = {}) => this.request({
1020
+ path: `/spaces/${spaceId}/relations`,
1021
+ method: "POST",
1022
+ body: data,
1023
+ secure: true,
1024
+ type: "application/json" /* Json */,
1025
+ format: "json",
1026
+ ...params
1027
+ }),
1028
+ getSpaceRelation: (spaceId, targetSpaceId, params = {}) => this.request({
1029
+ path: `/spaces/${spaceId}/relations/${targetSpaceId}`,
1030
+ method: "GET",
1031
+ secure: true,
1032
+ format: "json",
1033
+ ...params
1034
+ }),
1035
+ deleteSpaceRelation: (spaceId, targetSpaceId, params = {}) => this.request({
1036
+ path: `/spaces/${spaceId}/relations/${targetSpaceId}`,
1037
+ method: "DELETE",
1038
+ secure: true,
1039
+ ...params
1040
+ }),
1041
+ getSpaceCustomFields: (spaceId, params = {}) => this.request({
1042
+ path: `/spaces/${spaceId}/custom-fields`,
1043
+ method: "GET",
1044
+ secure: true,
1045
+ format: "json",
1046
+ ...params
1047
+ }),
1048
+ updateSpaceCustomFields: (spaceId, data, params = {}) => this.request({
1049
+ path: `/spaces/${spaceId}/custom-fields`,
1050
+ method: "PATCH",
1051
+ body: data,
1052
+ secure: true,
1053
+ type: "application/json" /* Json */,
1054
+ ...params
1055
+ }),
1056
+ listSpaceEntities: (spaceId, query, params = {}) => this.request({
1057
+ path: `/spaces/${spaceId}/entities`,
1058
+ method: "GET",
1059
+ query,
1060
+ secure: true,
1061
+ format: "json",
1062
+ ...params
1063
+ }),
1064
+ addSpaceEntities: (spaceId, data, params = {}) => this.request({
1065
+ path: `/spaces/${spaceId}/entities`,
1066
+ method: "POST",
1067
+ body: data,
1068
+ secure: true,
1069
+ type: "application/json" /* Json */,
1070
+ ...params
1071
+ }),
1072
+ getSpaceEntity: (spaceId, integrationName, entityId, params = {}) => this.request({
1073
+ path: `/spaces/${spaceId}/entities/${integrationName}/${entityId}`,
1074
+ method: "GET",
1075
+ secure: true,
1076
+ format: "json",
1077
+ ...params
1078
+ }),
1079
+ updateSpaceEntity: (spaceId, integrationName, entityId, data, params = {}) => this.request({
1080
+ path: `/spaces/${spaceId}/entities/${integrationName}/${entityId}`,
1081
+ method: "PATCH",
1082
+ body: data,
1083
+ secure: true,
1084
+ type: "application/json" /* Json */,
1085
+ ...params
1086
+ }),
1087
+ deleteSpaceEntity: (spaceId, integrationName, entityId, params = {}) => this.request({
1088
+ path: `/spaces/${spaceId}/entities/${integrationName}/${entityId}`,
1089
+ method: "DELETE",
1090
+ secure: true,
1091
+ ...params
626
1092
  })
627
1093
  };
628
1094
  this.collections = {
@@ -633,6 +1099,15 @@ var Api = class extends HttpClient {
633
1099
  format: "json",
634
1100
  ...params
635
1101
  }),
1102
+ updateCollectionById: (collectionId, data, params = {}) => this.request({
1103
+ path: `/collections/${collectionId}`,
1104
+ method: "PATCH",
1105
+ body: data,
1106
+ secure: true,
1107
+ type: "application/json" /* Json */,
1108
+ format: "json",
1109
+ ...params
1110
+ }),
636
1111
  listSpacesInCollectionById: (collectionId, query, params = {}) => this.request({
637
1112
  path: `/collections/${collectionId}/spaces`,
638
1113
  method: "GET",
@@ -648,6 +1123,22 @@ var Api = class extends HttpClient {
648
1123
  secure: true,
649
1124
  format: "json",
650
1125
  ...params
1126
+ }),
1127
+ getCollectionPublishingAuthById: (collectionId, params = {}) => this.request({
1128
+ path: `/collections/${collectionId}/publishing/auth`,
1129
+ method: "GET",
1130
+ secure: true,
1131
+ format: "json",
1132
+ ...params
1133
+ }),
1134
+ updateCollectionPublishingAuthById: (collectionId, data, params = {}) => this.request({
1135
+ path: `/collections/${collectionId}/publishing/auth`,
1136
+ method: "POST",
1137
+ body: data,
1138
+ secure: true,
1139
+ type: "application/json" /* Json */,
1140
+ format: "json",
1141
+ ...params
651
1142
  })
652
1143
  };
653
1144
  this.integrations = {
@@ -689,6 +1180,30 @@ var Api = class extends HttpClient {
689
1180
  format: "json",
690
1181
  ...params
691
1182
  }),
1183
+ installIntegration: (integrationName, data, params = {}) => this.request({
1184
+ path: `/integrations/${integrationName}/installations`,
1185
+ method: "POST",
1186
+ body: data,
1187
+ secure: true,
1188
+ type: "application/json" /* Json */,
1189
+ format: "json",
1190
+ ...params
1191
+ }),
1192
+ listIntegrationEvents: (integrationName, query, params = {}) => this.request({
1193
+ path: `/integrations/${integrationName}/events`,
1194
+ method: "GET",
1195
+ query,
1196
+ secure: true,
1197
+ format: "json",
1198
+ ...params
1199
+ }),
1200
+ getIntegrationEvent: (integrationName, eventId, params = {}) => this.request({
1201
+ path: `/integrations/${integrationName}/events/${eventId}`,
1202
+ method: "GET",
1203
+ secure: true,
1204
+ format: "json",
1205
+ ...params
1206
+ }),
692
1207
  listIntegrationSpaceInstallations: (integrationName, query, params = {}) => this.request({
693
1208
  path: `/integrations/${integrationName}/spaces`,
694
1209
  method: "GET",
@@ -697,6 +1212,20 @@ var Api = class extends HttpClient {
697
1212
  format: "json",
698
1213
  ...params
699
1214
  }),
1215
+ updateIntegrationDevSpace: (integrationName, spaceId, data, params = {}) => this.request({
1216
+ path: `/integrations/${integrationName}/spaces/${spaceId}/dev`,
1217
+ method: "PUT",
1218
+ body: data,
1219
+ secure: true,
1220
+ type: "application/json" /* Json */,
1221
+ ...params
1222
+ }),
1223
+ removeIntegrationDevSpace: (integrationName, spaceId, params = {}) => this.request({
1224
+ path: `/integrations/${integrationName}/spaces/${spaceId}/dev`,
1225
+ method: "DELETE",
1226
+ secure: true,
1227
+ ...params
1228
+ }),
700
1229
  renderIntegrationUiWithGet: (integrationName, query, params = {}) => this.request({
701
1230
  path: `/integrations/${integrationName}/render`,
702
1231
  method: "GET",
@@ -714,6 +1243,13 @@ var Api = class extends HttpClient {
714
1243
  format: "json",
715
1244
  ...params
716
1245
  }),
1246
+ getIntegrationInstallationById: (integrationName, installationId, params = {}) => this.request({
1247
+ path: `/integrations/${integrationName}/installations/${installationId}`,
1248
+ method: "GET",
1249
+ secure: true,
1250
+ format: "json",
1251
+ ...params
1252
+ }),
717
1253
  updateIntegrationInstallation: (integrationName, installationId, data, params = {}) => this.request({
718
1254
  path: `/integrations/${integrationName}/installations/${installationId}`,
719
1255
  method: "PATCH",
@@ -723,6 +1259,12 @@ var Api = class extends HttpClient {
723
1259
  format: "json",
724
1260
  ...params
725
1261
  }),
1262
+ uninstallIntegration: (integrationName, installationId, params = {}) => this.request({
1263
+ path: `/integrations/${integrationName}/installations/${installationId}`,
1264
+ method: "DELETE",
1265
+ secure: true,
1266
+ ...params
1267
+ }),
726
1268
  createIntegrationInstallationToken: (integrationName, installationId, params = {}) => this.request({
727
1269
  path: `/integrations/${integrationName}/installations/${installationId}/tokens`,
728
1270
  method: "POST",
@@ -730,6 +1272,15 @@ var Api = class extends HttpClient {
730
1272
  format: "json",
731
1273
  ...params
732
1274
  }),
1275
+ installIntegrationOnSpace: (integrationName, installationId, data, params = {}) => this.request({
1276
+ path: `/integrations/${integrationName}/installations/${installationId}/spaces`,
1277
+ method: "POST",
1278
+ body: data,
1279
+ secure: true,
1280
+ type: "application/json" /* Json */,
1281
+ format: "json",
1282
+ ...params
1283
+ }),
733
1284
  updateIntegrationSpaceInstallation: (integrationName, installationId, spaceId, data, params = {}) => this.request({
734
1285
  path: `/integrations/${integrationName}/installations/${installationId}/spaces/${spaceId}`,
735
1286
  method: "PATCH",
@@ -738,6 +1289,27 @@ var Api = class extends HttpClient {
738
1289
  type: "application/json" /* Json */,
739
1290
  format: "json",
740
1291
  ...params
1292
+ }),
1293
+ uninstallIntegrationFromSpace: (integrationName, installationId, spaceId, params = {}) => this.request({
1294
+ path: `/integrations/${integrationName}/installations/${installationId}/spaces/${spaceId}`,
1295
+ method: "DELETE",
1296
+ secure: true,
1297
+ ...params
1298
+ }),
1299
+ getIntegrationEntities: (integrationName, installationId, params = {}) => this.request({
1300
+ path: `/integrations/${integrationName}/installations/${installationId}/entities`,
1301
+ method: "GET",
1302
+ secure: true,
1303
+ format: "json",
1304
+ ...params
1305
+ }),
1306
+ syncIntegrationEntities: (integrationName, installationId, data, params = {}) => this.request({
1307
+ path: `/integrations/${integrationName}/installations/${installationId}/entities`,
1308
+ method: "POST",
1309
+ body: data,
1310
+ secure: true,
1311
+ type: "application/json" /* Json */,
1312
+ ...params
741
1313
  })
742
1314
  };
743
1315
  this.orgs = {
@@ -749,6 +1321,22 @@ var Api = class extends HttpClient {
749
1321
  format: "json",
750
1322
  ...params
751
1323
  }),
1324
+ createOrganization: (data, params = {}) => this.request({
1325
+ path: `/orgs`,
1326
+ method: "POST",
1327
+ body: data,
1328
+ secure: true,
1329
+ type: "application/json" /* Json */,
1330
+ format: "json",
1331
+ ...params
1332
+ }),
1333
+ getOrganizationById: (organizationId, params = {}) => this.request({
1334
+ path: `/orgs/${organizationId}`,
1335
+ method: "GET",
1336
+ secure: true,
1337
+ format: "json",
1338
+ ...params
1339
+ }),
752
1340
  listMembersInOrganizationById: (organizationId, query, params = {}) => this.request({
753
1341
  path: `/orgs/${organizationId}/members`,
754
1342
  method: "GET",
@@ -779,10 +1367,17 @@ var Api = class extends HttpClient {
779
1367
  secure: true,
780
1368
  ...params
781
1369
  }),
1370
+ updateOrganizationMemberLastSeenAt: (organizationId, params = {}) => this.request({
1371
+ path: `/orgs/${organizationId}/ping`,
1372
+ method: "POST",
1373
+ secure: true,
1374
+ ...params
1375
+ }),
782
1376
  setUserAsSsoMemberForOrganization: (organizationId, userId, params = {}) => this.request({
783
1377
  path: `/orgs/${organizationId}/members/${userId}/sso`,
784
1378
  method: "POST",
785
1379
  secure: true,
1380
+ format: "json",
786
1381
  ...params
787
1382
  }),
788
1383
  listSpacesForOrganizationMember: (organizationId, userId, query, params = {}) => this.request({
@@ -793,6 +1388,16 @@ var Api = class extends HttpClient {
793
1388
  format: "json",
794
1389
  ...params
795
1390
  }),
1391
+ listTeamsForOrganizationMember: (organizationId, userId, query, params = {}) => this.request(
1392
+ {
1393
+ path: `/orgs/${organizationId}/members/${userId}/teams`,
1394
+ method: "GET",
1395
+ query,
1396
+ secure: true,
1397
+ format: "json",
1398
+ ...params
1399
+ }
1400
+ ),
796
1401
  listTeamsInOrganizationById: (organizationId, query, params = {}) => this.request({
797
1402
  path: `/orgs/${organizationId}/teams`,
798
1403
  method: "GET",
@@ -848,10 +1453,12 @@ var Api = class extends HttpClient {
848
1453
  format: "json",
849
1454
  ...params
850
1455
  }),
851
- addMemberToOrganizationTeamById: (organizationId, teamId, userId, params = {}) => this.request({
1456
+ addMemberToOrganizationTeamById: (organizationId, teamId, userId, data, params = {}) => this.request({
852
1457
  path: `/orgs/${organizationId}/teams/${teamId}/members/${userId}`,
853
1458
  method: "PUT",
1459
+ body: data,
854
1460
  secure: true,
1461
+ type: "application/json" /* Json */,
855
1462
  ...params
856
1463
  }),
857
1464
  deleteMemberFromOrganizationTeamById: (organizationId, teamId, userId, params = {}) => this.request({
@@ -924,6 +1531,23 @@ var Api = class extends HttpClient {
924
1531
  format: "json",
925
1532
  ...params
926
1533
  }),
1534
+ createSpace: (organizationId, data, params = {}) => this.request({
1535
+ path: `/orgs/${organizationId}/spaces`,
1536
+ method: "POST",
1537
+ body: data,
1538
+ secure: true,
1539
+ type: "application/json" /* Json */,
1540
+ format: "json",
1541
+ ...params
1542
+ }),
1543
+ listSpacesWithGitSyncInOrganizationById: (organizationId, query, params = {}) => this.request({
1544
+ path: `/orgs/${organizationId}/spaces/gitsync`,
1545
+ method: "GET",
1546
+ query,
1547
+ secure: true,
1548
+ format: "json",
1549
+ ...params
1550
+ }),
927
1551
  listCollectionsInOrganizationById: (organizationId, query, params = {}) => this.request({
928
1552
  path: `/orgs/${organizationId}/collections`,
929
1553
  method: "GET",
@@ -954,6 +1578,135 @@ var Api = class extends HttpClient {
954
1578
  type: "application/json" /* Json */,
955
1579
  format: "json",
956
1580
  ...params
1581
+ }),
1582
+ listOrganizationCustomFields: (organizationId, query, params = {}) => this.request({
1583
+ path: `/orgs/${organizationId}/custom-fields`,
1584
+ method: "GET",
1585
+ query,
1586
+ secure: true,
1587
+ format: "json",
1588
+ ...params
1589
+ }),
1590
+ createOrganizationCustomField: (organizationId, data, params = {}) => this.request({
1591
+ path: `/orgs/${organizationId}/custom-fields`,
1592
+ method: "POST",
1593
+ body: data,
1594
+ secure: true,
1595
+ type: "application/json" /* Json */,
1596
+ format: "json",
1597
+ ...params
1598
+ }),
1599
+ getOrganizationCustomFieldByName: (organizationId, fieldName, params = {}) => this.request({
1600
+ path: `/orgs/${organizationId}/custom-fields/${fieldName}`,
1601
+ method: "GET",
1602
+ secure: true,
1603
+ format: "json",
1604
+ ...params
1605
+ }),
1606
+ updateOrganizationCustomField: (organizationId, fieldName, data, params = {}) => this.request({
1607
+ path: `/orgs/${organizationId}/custom-fields/${fieldName}`,
1608
+ method: "PATCH",
1609
+ body: data,
1610
+ secure: true,
1611
+ type: "application/json" /* Json */,
1612
+ format: "json",
1613
+ ...params
1614
+ }),
1615
+ deleteOrganizationCustomField: (organizationId, fieldName, params = {}) => this.request({
1616
+ path: `/orgs/${organizationId}/custom-fields/${fieldName}`,
1617
+ method: "DELETE",
1618
+ secure: true,
1619
+ ...params
1620
+ }),
1621
+ listSpaceRelationsInOrganization: (organizationId, query, params = {}) => this.request({
1622
+ path: `/orgs/${organizationId}/space-relations`,
1623
+ method: "GET",
1624
+ query,
1625
+ secure: true,
1626
+ format: "json",
1627
+ ...params
1628
+ }),
1629
+ listEntitiesInOrganization: (organizationId, query, params = {}) => this.request({
1630
+ path: `/orgs/${organizationId}/entities`,
1631
+ method: "GET",
1632
+ query,
1633
+ secure: true,
1634
+ format: "json",
1635
+ ...params
1636
+ }),
1637
+ listEnvironments: (organizationId, query, params = {}) => this.request({
1638
+ path: `/orgs/${organizationId}/environments`,
1639
+ method: "GET",
1640
+ query,
1641
+ secure: true,
1642
+ format: "json",
1643
+ ...params
1644
+ }),
1645
+ createEnvironment: (organizationId, data, params = {}) => this.request({
1646
+ path: `/orgs/${organizationId}/environments`,
1647
+ method: "POST",
1648
+ body: data,
1649
+ secure: true,
1650
+ type: "application/json" /* Json */,
1651
+ format: "json",
1652
+ ...params
1653
+ }),
1654
+ getEnvironmentByName: (organizationId, environmentName, params = {}) => this.request({
1655
+ path: `/orgs/${organizationId}/environments/${environmentName}`,
1656
+ method: "GET",
1657
+ secure: true,
1658
+ format: "json",
1659
+ ...params
1660
+ }),
1661
+ updateEnvironment: (organizationId, environmentName, data, params = {}) => this.request({
1662
+ path: `/orgs/${organizationId}/environments/${environmentName}`,
1663
+ method: "PATCH",
1664
+ body: data,
1665
+ secure: true,
1666
+ type: "application/json" /* Json */,
1667
+ format: "json",
1668
+ ...params
1669
+ }),
1670
+ deleteEnvironment: (organizationId, environmentName, params = {}) => this.request({
1671
+ path: `/orgs/${organizationId}/environments/${environmentName}`,
1672
+ method: "DELETE",
1673
+ secure: true,
1674
+ ...params
1675
+ }),
1676
+ startRecording: (organizationId, data, params = {}) => this.request({
1677
+ path: `/orgs/${organizationId}/recordings`,
1678
+ method: "POST",
1679
+ body: data,
1680
+ secure: true,
1681
+ type: "application/json" /* Json */,
1682
+ format: "json",
1683
+ ...params
1684
+ }),
1685
+ addEventsToRecording: (organizationId, recordingId, data, params = {}) => this.request({
1686
+ path: `/orgs/${organizationId}/recordings/${recordingId}/events`,
1687
+ method: "POST",
1688
+ body: data,
1689
+ secure: true,
1690
+ type: "application/json" /* Json */,
1691
+ ...params
1692
+ }),
1693
+ stopRecording: (organizationId, recordingId, params = {}) => this.request({
1694
+ path: `/orgs/${organizationId}/recordings/${recordingId}/stop`,
1695
+ method: "POST",
1696
+ secure: true,
1697
+ format: "json",
1698
+ ...params
1699
+ })
1700
+ };
1701
+ this.internal = {
1702
+ generateHiveAccessToken: (data, params = {}) => this.request({
1703
+ path: `/internal/hive/token`,
1704
+ method: "POST",
1705
+ body: data,
1706
+ secure: true,
1707
+ type: "application/json" /* Json */,
1708
+ format: "json",
1709
+ ...params
957
1710
  })
958
1711
  };
959
1712
  this.urls = {
@@ -1033,6 +1786,7 @@ var GitBookAPI = class extends Api {
1033
1786
  Api,
1034
1787
  BillingInterval,
1035
1788
  BillingProduct,
1789
+ ChangeRequestReviewStatus,
1036
1790
  ChangeRequestStatus,
1037
1791
  CloudflareHostnameStatus,
1038
1792
  CloudflareHostnameTLSStatus,
@@ -1040,8 +1794,10 @@ var GitBookAPI = class extends Api {
1040
1794
  ContentKitIcon,
1041
1795
  ContentType,
1042
1796
  ContentVisibility,
1797
+ CustomFieldType,
1043
1798
  GITBOOK_DEFAULT_ENDPOINT,
1044
1799
  GitBookAPI,
1800
+ GitSyncOperationState,
1045
1801
  HttpClient,
1046
1802
  ImportContentSource,
1047
1803
  IntegrationCategory,
@@ -1050,5 +1806,12 @@ var GitBookAPI = class extends Api {
1050
1806
  IntegrationScope,
1051
1807
  IntegrationVisibility,
1052
1808
  MemberRole,
1053
- PurgeCDNCacheContextType
1809
+ OrganizationCommunityType,
1810
+ OrganizationType,
1811
+ OrganizationUseCase,
1812
+ PurgeCDNCacheContextType,
1813
+ RecordingContext,
1814
+ SpaceRelationType,
1815
+ SpaceType,
1816
+ TeamMemberRole
1054
1817
  });