@gitbook/api 0.3.0 → 0.4.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,13 @@ __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
+ SpaceRelationType: () => SpaceRelationType,
53
+ SpaceType: () => SpaceType,
54
+ TeamMemberRole: () => TeamMemberRole
46
55
  });
47
56
  module.exports = __toCommonJS(src_exports);
48
57
 
@@ -56,6 +65,23 @@ var ContentVisibility = /* @__PURE__ */ ((ContentVisibility2) => {
56
65
  ContentVisibility2["Private"] = "private";
57
66
  return ContentVisibility2;
58
67
  })(ContentVisibility || {});
68
+ var SpaceType = /* @__PURE__ */ ((SpaceType2) => {
69
+ SpaceType2["Application"] = "application";
70
+ SpaceType2["Website"] = "website";
71
+ SpaceType2["Service"] = "service";
72
+ SpaceType2["Library"] = "library";
73
+ SpaceType2["CloudResource"] = "cloud-resource";
74
+ SpaceType2["Database"] = "database";
75
+ SpaceType2["Other"] = "other";
76
+ return SpaceType2;
77
+ })(SpaceType || {});
78
+ var SpaceRelationType = /* @__PURE__ */ ((SpaceRelationType2) => {
79
+ SpaceRelationType2["DependsOn"] = "dependsOn";
80
+ SpaceRelationType2["DependencyOf"] = "dependencyOf";
81
+ SpaceRelationType2["PartOf"] = "partOf";
82
+ SpaceRelationType2["HasPart"] = "hasPart";
83
+ return SpaceRelationType2;
84
+ })(SpaceRelationType || {});
59
85
  var ImportContentSource = /* @__PURE__ */ ((ImportContentSource2) => {
60
86
  ImportContentSource2["Website"] = "website";
61
87
  ImportContentSource2["Docx"] = "docx";
@@ -71,6 +97,32 @@ var ImportContentSource = /* @__PURE__ */ ((ImportContentSource2) => {
71
97
  ImportContentSource2["OpenApi"] = "open-api";
72
98
  return ImportContentSource2;
73
99
  })(ImportContentSource || {});
100
+ var GitSyncOperationState = /* @__PURE__ */ ((GitSyncOperationState2) => {
101
+ GitSyncOperationState2["Running"] = "running";
102
+ GitSyncOperationState2["Failure"] = "failure";
103
+ GitSyncOperationState2["Success"] = "success";
104
+ return GitSyncOperationState2;
105
+ })(GitSyncOperationState || {});
106
+ var OrganizationType = /* @__PURE__ */ ((OrganizationType2) => {
107
+ OrganizationType2["Business"] = "business";
108
+ OrganizationType2["Community"] = "community";
109
+ return OrganizationType2;
110
+ })(OrganizationType || {});
111
+ var OrganizationUseCase = /* @__PURE__ */ ((OrganizationUseCase2) => {
112
+ OrganizationUseCase2["ProductDocs"] = "productDocs";
113
+ OrganizationUseCase2["TeamKnowledgeBase"] = "teamKnowledgeBase";
114
+ OrganizationUseCase2["DesignSystem"] = "designSystem";
115
+ OrganizationUseCase2["OpenSourceDocs"] = "openSourceDocs";
116
+ OrganizationUseCase2["Notes"] = "notes";
117
+ OrganizationUseCase2["Other"] = "other";
118
+ return OrganizationUseCase2;
119
+ })(OrganizationUseCase || {});
120
+ var OrganizationCommunityType = /* @__PURE__ */ ((OrganizationCommunityType2) => {
121
+ OrganizationCommunityType2["NonProfit"] = "nonProfit";
122
+ OrganizationCommunityType2["OpenSource"] = "openSource";
123
+ OrganizationCommunityType2["Education"] = "education";
124
+ return OrganizationCommunityType2;
125
+ })(OrganizationCommunityType || {});
74
126
  var MemberRole = /* @__PURE__ */ ((MemberRole2) => {
75
127
  MemberRole2["Admin"] = "admin";
76
128
  MemberRole2["Create"] = "create";
@@ -80,6 +132,11 @@ var MemberRole = /* @__PURE__ */ ((MemberRole2) => {
80
132
  MemberRole2["Read"] = "read";
81
133
  return MemberRole2;
82
134
  })(MemberRole || {});
135
+ var TeamMemberRole = /* @__PURE__ */ ((TeamMemberRole2) => {
136
+ TeamMemberRole2["Admin"] = "admin";
137
+ TeamMemberRole2["Participant"] = "participant";
138
+ return TeamMemberRole2;
139
+ })(TeamMemberRole || {});
83
140
  var ChangeRequestStatus = /* @__PURE__ */ ((ChangeRequestStatus2) => {
84
141
  ChangeRequestStatus2["Draft"] = "draft";
85
142
  ChangeRequestStatus2["Open"] = "open";
@@ -87,6 +144,11 @@ var ChangeRequestStatus = /* @__PURE__ */ ((ChangeRequestStatus2) => {
87
144
  ChangeRequestStatus2["Merged"] = "merged";
88
145
  return ChangeRequestStatus2;
89
146
  })(ChangeRequestStatus || {});
147
+ var ChangeRequestReviewStatus = /* @__PURE__ */ ((ChangeRequestReviewStatus2) => {
148
+ ChangeRequestReviewStatus2["ChangesRequested"] = "changes-requested";
149
+ ChangeRequestReviewStatus2["Approved"] = "approved";
150
+ return ChangeRequestReviewStatus2;
151
+ })(ChangeRequestReviewStatus || {});
90
152
  var AnalyticsSearchPeriod = /* @__PURE__ */ ((AnalyticsSearchPeriod2) => {
91
153
  AnalyticsSearchPeriod2["LastMonth"] = "last_month";
92
154
  AnalyticsSearchPeriod2["LastWeek"] = "last_week";
@@ -100,6 +162,7 @@ var AnalyticsTrafficInterval = /* @__PURE__ */ ((AnalyticsTrafficInterval2) => {
100
162
  return AnalyticsTrafficInterval2;
101
163
  })(AnalyticsTrafficInterval || {});
102
164
  var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
165
+ IntegrationScope2["OrganizationEntitiesWrite"] = "organization:entities:write";
103
166
  IntegrationScope2["SpaceViewsRead"] = "space:views:read";
104
167
  IntegrationScope2["SpaceContentRead"] = "space:content:read";
105
168
  IntegrationScope2["SpaceContentWrite"] = "space:content:write";
@@ -125,6 +188,7 @@ var IntegrationCategory = /* @__PURE__ */ ((IntegrationCategory2) => {
125
188
  var IntegrationVisibility = /* @__PURE__ */ ((IntegrationVisibility2) => {
126
189
  IntegrationVisibility2["Public"] = "public";
127
190
  IntegrationVisibility2["Private"] = "private";
191
+ IntegrationVisibility2["Unlisted"] = "unlisted";
128
192
  return IntegrationVisibility2;
129
193
  })(IntegrationVisibility || {});
130
194
  var IntegrationInstallationStatus = /* @__PURE__ */ ((IntegrationInstallationStatus2) => {
@@ -201,6 +265,12 @@ var ContentKitIcon = /* @__PURE__ */ ((ContentKitIcon2) => {
201
265
  ContentKitIcon2["LinkExternal"] = "link-external";
202
266
  return ContentKitIcon2;
203
267
  })(ContentKitIcon || {});
268
+ var CustomFieldType = /* @__PURE__ */ ((CustomFieldType2) => {
269
+ CustomFieldType2["Text"] = "text";
270
+ CustomFieldType2["Number"] = "number";
271
+ CustomFieldType2["Boolean"] = "boolean";
272
+ return CustomFieldType2;
273
+ })(CustomFieldType || {});
204
274
  var ContentType = /* @__PURE__ */ ((ContentType2) => {
205
275
  ContentType2["Json"] = "application/json";
206
276
  ContentType2["FormData"] = "multipart/form-data";
@@ -361,13 +431,31 @@ var Api = class extends HttpClient {
361
431
  format: "json",
362
432
  ...params
363
433
  }),
364
- askQuery: (query, params = {}) => this.request({
434
+ askQueryWithGet: (query, params = {}) => this.request({
365
435
  path: `/search/ask`,
366
436
  method: "GET",
367
437
  query,
368
438
  secure: true,
369
439
  format: "json",
370
440
  ...params
441
+ }),
442
+ askQuery: (data, params = {}) => this.request({
443
+ path: `/search/ask`,
444
+ method: "POST",
445
+ body: data,
446
+ secure: true,
447
+ type: "application/json" /* Json */,
448
+ format: "json",
449
+ ...params
450
+ }),
451
+ getRecommendedQuestions: (data, params = {}) => this.request({
452
+ path: `/search/questions`,
453
+ method: "POST",
454
+ body: data,
455
+ secure: true,
456
+ type: "application/json" /* Json */,
457
+ format: "json",
458
+ ...params
371
459
  })
372
460
  };
373
461
  this.user = {
@@ -404,6 +492,29 @@ var Api = class extends HttpClient {
404
492
  format: "json",
405
493
  ...params
406
494
  }),
495
+ updateSpaceById: (spaceId, data, params = {}) => this.request({
496
+ path: `/spaces/${spaceId}`,
497
+ method: "PATCH",
498
+ body: data,
499
+ secure: true,
500
+ type: "application/json" /* Json */,
501
+ format: "json",
502
+ ...params
503
+ }),
504
+ generateSpaceHiveReadAccessToken: (spaceId, params = {}) => this.request({
505
+ path: `/spaces/${spaceId}/hive/token`,
506
+ method: "POST",
507
+ secure: true,
508
+ format: "json",
509
+ ...params
510
+ }),
511
+ duplicateSpace: (spaceId, params = {}) => this.request({
512
+ path: `/spaces/${spaceId}/duplicate`,
513
+ method: "POST",
514
+ secure: true,
515
+ format: "json",
516
+ ...params
517
+ }),
407
518
  searchSpaceContent: (spaceId, query, params = {}) => this.request({
408
519
  path: `/spaces/${spaceId}/search`,
409
520
  method: "GET",
@@ -412,7 +523,7 @@ var Api = class extends HttpClient {
412
523
  format: "json",
413
524
  ...params
414
525
  }),
415
- askQueryInSpace: (spaceId, query, params = {}) => this.request({
526
+ askQueryInSpaceWithGet: (spaceId, query, params = {}) => this.request({
416
527
  path: `/spaces/${spaceId}/search/ask`,
417
528
  method: "GET",
418
529
  query,
@@ -420,6 +531,22 @@ var Api = class extends HttpClient {
420
531
  format: "json",
421
532
  ...params
422
533
  }),
534
+ askQueryInSpace: (spaceId, data, params = {}) => this.request({
535
+ path: `/spaces/${spaceId}/search/ask`,
536
+ method: "POST",
537
+ body: data,
538
+ secure: true,
539
+ type: "application/json" /* Json */,
540
+ format: "json",
541
+ ...params
542
+ }),
543
+ getRecommendedQuestionsInSpace: (spaceId, params = {}) => this.request({
544
+ path: `/spaces/${spaceId}/search/questions`,
545
+ method: "GET",
546
+ secure: true,
547
+ format: "json",
548
+ ...params
549
+ }),
423
550
  importGitRepository: (spaceId, data, params = {}) => this.request({
424
551
  path: `/spaces/${spaceId}/git/import`,
425
552
  method: "POST",
@@ -524,6 +651,21 @@ var Api = class extends HttpClient {
524
651
  format: "json",
525
652
  ...params
526
653
  }),
654
+ listChangeRequestsForSpace: (spaceId, query, params = {}) => this.request({
655
+ path: `/spaces/${spaceId}/change-requests`,
656
+ method: "GET",
657
+ query,
658
+ secure: true,
659
+ format: "json",
660
+ ...params
661
+ }),
662
+ getChangeRequestById: (spaceId, changeRequestId, params = {}) => this.request({
663
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}`,
664
+ method: "GET",
665
+ secure: true,
666
+ format: "json",
667
+ ...params
668
+ }),
527
669
  mergeChangeRequest: (spaceId, changeRequestId, params = {}) => this.request({
528
670
  path: `/spaces/${spaceId}/change-requests/${changeRequestId}/merge`,
529
671
  method: "POST",
@@ -538,6 +680,128 @@ var Api = class extends HttpClient {
538
680
  format: "json",
539
681
  ...params
540
682
  }),
683
+ getReviewsByChangeRequestId: (spaceId, changeRequestId, query, params = {}) => this.request({
684
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/reviews`,
685
+ method: "GET",
686
+ query,
687
+ secure: true,
688
+ format: "json",
689
+ ...params
690
+ }),
691
+ submitChangeRequestReview: (spaceId, changeRequestId, data, params = {}) => this.request({
692
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/reviews`,
693
+ method: "POST",
694
+ body: data,
695
+ secure: true,
696
+ type: "application/json" /* Json */,
697
+ format: "json",
698
+ ...params
699
+ }),
700
+ getRequestedReviewersByChangeRequestId: (spaceId, changeRequestId, query, params = {}) => this.request({
701
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/requested-reviewers`,
702
+ method: "GET",
703
+ query,
704
+ secure: true,
705
+ format: "json",
706
+ ...params
707
+ }),
708
+ requestReviewersForChangeRequest: (spaceId, changeRequestId, data, params = {}) => this.request({
709
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/requested-reviewers`,
710
+ method: "POST",
711
+ body: data,
712
+ secure: true,
713
+ type: "application/json" /* Json */,
714
+ format: "json",
715
+ ...params
716
+ }),
717
+ listCommentsInChangeRequest: (spaceId, changeRequestId, query, params = {}) => this.request({
718
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments`,
719
+ method: "GET",
720
+ query,
721
+ secure: true,
722
+ format: "json",
723
+ ...params
724
+ }),
725
+ postCommentInChangeRequest: (spaceId, changeRequestId, data, params = {}) => this.request({
726
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments`,
727
+ method: "POST",
728
+ body: data,
729
+ secure: true,
730
+ type: "application/json" /* Json */,
731
+ format: "json",
732
+ ...params
733
+ }),
734
+ getCommentInChangeRequest: (spaceId, changeRequestId, commentId, query, params = {}) => this.request({
735
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments/${commentId}`,
736
+ method: "GET",
737
+ query,
738
+ secure: true,
739
+ format: "json",
740
+ ...params
741
+ }),
742
+ deleteCommentInChangeRequest: (spaceId, changeRequestId, commentId, params = {}) => this.request({
743
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments/${commentId}`,
744
+ method: "DELETE",
745
+ secure: true,
746
+ ...params
747
+ }),
748
+ updateCommentInChangeRequest: (spaceId, changeRequestId, commentId, data, params = {}) => this.request({
749
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments/${commentId}`,
750
+ method: "PUT",
751
+ body: data,
752
+ secure: true,
753
+ type: "application/json" /* Json */,
754
+ format: "json",
755
+ ...params
756
+ }),
757
+ listCommentRepliesInChangeRequest: (spaceId, changeRequestId, commentId, query, params = {}) => this.request({
758
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments/${commentId}/replies`,
759
+ method: "GET",
760
+ query,
761
+ secure: true,
762
+ format: "json",
763
+ ...params
764
+ }),
765
+ postCommentReplyInChangeRequest: (spaceId, changeRequestId, commentId, data, query, params = {}) => this.request({
766
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments/${commentId}/replies`,
767
+ method: "POST",
768
+ query,
769
+ body: data,
770
+ secure: true,
771
+ type: "application/json" /* Json */,
772
+ format: "json",
773
+ ...params
774
+ }),
775
+ getCommentReplyInChangeRequest: (spaceId, changeRequestId, commentId, commentReplyId, query, params = {}) => this.request({
776
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments/${commentId}/replies/${commentReplyId}`,
777
+ method: "GET",
778
+ query,
779
+ secure: true,
780
+ format: "json",
781
+ ...params
782
+ }),
783
+ updateCommentReplyInChangeRequest: (spaceId, changeRequestId, commentId, commentReplyId, data, params = {}) => this.request({
784
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments/${commentId}/replies/${commentReplyId}`,
785
+ method: "PUT",
786
+ body: data,
787
+ secure: true,
788
+ type: "application/json" /* Json */,
789
+ format: "json",
790
+ ...params
791
+ }),
792
+ deleteCommentReplyInChangeRequest: (spaceId, changeRequestId, commentId, commentReplyId, params = {}) => this.request({
793
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments/${commentId}/replies/${commentReplyId}`,
794
+ method: "DELETE",
795
+ secure: true,
796
+ ...params
797
+ }),
798
+ getContributorsByChangeRequestId: (spaceId, changeRequestId, params = {}) => this.request({
799
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/contributors`,
800
+ method: "GET",
801
+ secure: true,
802
+ format: "json",
803
+ ...params
804
+ }),
541
805
  getRevisionOfChangeRequestById: (spaceId, changeRequestId, params = {}) => this.request({
542
806
  path: `/spaces/${spaceId}/change-requests/${changeRequestId}/content`,
543
807
  method: "GET",
@@ -616,6 +880,86 @@ var Api = class extends HttpClient {
616
880
  format: "json",
617
881
  ...params
618
882
  }),
883
+ listCommentsInSpace: (spaceId, query, params = {}) => this.request({
884
+ path: `/spaces/${spaceId}/comments`,
885
+ method: "GET",
886
+ query,
887
+ secure: true,
888
+ format: "json",
889
+ ...params
890
+ }),
891
+ postCommentInSpace: (spaceId, data, params = {}) => this.request({
892
+ path: `/spaces/${spaceId}/comments`,
893
+ method: "POST",
894
+ body: data,
895
+ secure: true,
896
+ type: "application/json" /* Json */,
897
+ format: "json",
898
+ ...params
899
+ }),
900
+ getCommentInSpace: (spaceId, commentId, query, params = {}) => this.request({
901
+ path: `/spaces/${spaceId}/comments/${commentId}`,
902
+ method: "GET",
903
+ query,
904
+ secure: true,
905
+ format: "json",
906
+ ...params
907
+ }),
908
+ deleteCommentInSpace: (spaceId, commentId, params = {}) => this.request({
909
+ path: `/spaces/${spaceId}/comments/${commentId}`,
910
+ method: "DELETE",
911
+ secure: true,
912
+ ...params
913
+ }),
914
+ updateCommentInSpace: (spaceId, commentId, data, params = {}) => this.request({
915
+ path: `/spaces/${spaceId}/comments/${commentId}`,
916
+ method: "PUT",
917
+ body: data,
918
+ secure: true,
919
+ type: "application/json" /* Json */,
920
+ format: "json",
921
+ ...params
922
+ }),
923
+ listCommentRepliesInSpace: (spaceId, commentId, query, params = {}) => this.request({
924
+ path: `/spaces/${spaceId}/comments/${commentId}/replies`,
925
+ method: "GET",
926
+ query,
927
+ secure: true,
928
+ format: "json",
929
+ ...params
930
+ }),
931
+ postCommentReplyInSpace: (spaceId, commentId, data, params = {}) => this.request({
932
+ path: `/spaces/${spaceId}/comments/${commentId}/replies`,
933
+ method: "POST",
934
+ body: data,
935
+ secure: true,
936
+ type: "application/json" /* Json */,
937
+ format: "json",
938
+ ...params
939
+ }),
940
+ getCommentReplyInSpace: (spaceId, commentId, commentReplyId, query, params = {}) => this.request({
941
+ path: `/spaces/${spaceId}/comments/${commentId}/replies/${commentReplyId}`,
942
+ method: "GET",
943
+ query,
944
+ secure: true,
945
+ format: "json",
946
+ ...params
947
+ }),
948
+ updateCommentReplyInSpace: (spaceId, commentId, commentReplyId, data, params = {}) => this.request({
949
+ path: `/spaces/${spaceId}/comments/${commentId}/replies/${commentReplyId}`,
950
+ method: "PUT",
951
+ body: data,
952
+ secure: true,
953
+ type: "application/json" /* Json */,
954
+ format: "json",
955
+ ...params
956
+ }),
957
+ deleteCommentReplyInSpace: (spaceId, commentId, commentReplyId, params = {}) => this.request({
958
+ path: `/spaces/${spaceId}/comments/${commentId}/replies/${commentReplyId}`,
959
+ method: "DELETE",
960
+ secure: true,
961
+ ...params
962
+ }),
619
963
  listPermissionsAggregateInSpace: (spaceId, query, params = {}) => this.request({
620
964
  path: `/spaces/${spaceId}/permissions/aggregate`,
621
965
  method: "GET",
@@ -623,6 +967,113 @@ var Api = class extends HttpClient {
623
967
  secure: true,
624
968
  format: "json",
625
969
  ...params
970
+ }),
971
+ getSpacePublishingAuthById: (spaceId, params = {}) => this.request({
972
+ path: `/spaces/${spaceId}/publishing/auth`,
973
+ method: "GET",
974
+ secure: true,
975
+ format: "json",
976
+ ...params
977
+ }),
978
+ updateSpacePublishingAuthById: (spaceId, data, params = {}) => this.request({
979
+ path: `/spaces/${spaceId}/publishing/auth`,
980
+ method: "POST",
981
+ body: data,
982
+ secure: true,
983
+ type: "application/json" /* Json */,
984
+ format: "json",
985
+ ...params
986
+ }),
987
+ listSpaceIntegrationsBlocks: (spaceId, params = {}) => this.request(
988
+ {
989
+ path: `/spaces/${spaceId}/integration-blocks`,
990
+ method: "GET",
991
+ secure: true,
992
+ format: "json",
993
+ ...params
994
+ }
995
+ ),
996
+ listSpaceRelations: (spaceId, query, params = {}) => this.request({
997
+ path: `/spaces/${spaceId}/relations`,
998
+ method: "GET",
999
+ query,
1000
+ secure: true,
1001
+ format: "json",
1002
+ ...params
1003
+ }),
1004
+ createSpaceRelation: (spaceId, data, params = {}) => this.request({
1005
+ path: `/spaces/${spaceId}/relations`,
1006
+ method: "POST",
1007
+ body: data,
1008
+ secure: true,
1009
+ type: "application/json" /* Json */,
1010
+ format: "json",
1011
+ ...params
1012
+ }),
1013
+ getSpaceRelation: (spaceId, targetSpaceId, params = {}) => this.request({
1014
+ path: `/spaces/${spaceId}/relations/${targetSpaceId}`,
1015
+ method: "GET",
1016
+ secure: true,
1017
+ format: "json",
1018
+ ...params
1019
+ }),
1020
+ deleteSpaceRelation: (spaceId, targetSpaceId, params = {}) => this.request({
1021
+ path: `/spaces/${spaceId}/relations/${targetSpaceId}`,
1022
+ method: "DELETE",
1023
+ secure: true,
1024
+ ...params
1025
+ }),
1026
+ getSpaceCustomFields: (spaceId, params = {}) => this.request({
1027
+ path: `/spaces/${spaceId}/custom-fields`,
1028
+ method: "GET",
1029
+ secure: true,
1030
+ format: "json",
1031
+ ...params
1032
+ }),
1033
+ updateSpaceCustomFields: (spaceId, data, params = {}) => this.request({
1034
+ path: `/spaces/${spaceId}/custom-fields`,
1035
+ method: "PATCH",
1036
+ body: data,
1037
+ secure: true,
1038
+ type: "application/json" /* Json */,
1039
+ ...params
1040
+ }),
1041
+ listSpaceEntities: (spaceId, query, params = {}) => this.request({
1042
+ path: `/spaces/${spaceId}/entities`,
1043
+ method: "GET",
1044
+ query,
1045
+ secure: true,
1046
+ format: "json",
1047
+ ...params
1048
+ }),
1049
+ addSpaceEntities: (spaceId, data, params = {}) => this.request({
1050
+ path: `/spaces/${spaceId}/entities`,
1051
+ method: "POST",
1052
+ body: data,
1053
+ secure: true,
1054
+ type: "application/json" /* Json */,
1055
+ ...params
1056
+ }),
1057
+ getSpaceEntity: (spaceId, integrationName, entityId, params = {}) => this.request({
1058
+ path: `/spaces/${spaceId}/entities/${integrationName}/${entityId}`,
1059
+ method: "GET",
1060
+ secure: true,
1061
+ format: "json",
1062
+ ...params
1063
+ }),
1064
+ updateSpaceEntity: (spaceId, integrationName, entityId, data, params = {}) => this.request({
1065
+ path: `/spaces/${spaceId}/entities/${integrationName}/${entityId}`,
1066
+ method: "PATCH",
1067
+ body: data,
1068
+ secure: true,
1069
+ type: "application/json" /* Json */,
1070
+ ...params
1071
+ }),
1072
+ deleteSpaceEntity: (spaceId, integrationName, entityId, params = {}) => this.request({
1073
+ path: `/spaces/${spaceId}/entities/${integrationName}/${entityId}`,
1074
+ method: "DELETE",
1075
+ secure: true,
1076
+ ...params
626
1077
  })
627
1078
  };
628
1079
  this.collections = {
@@ -633,6 +1084,15 @@ var Api = class extends HttpClient {
633
1084
  format: "json",
634
1085
  ...params
635
1086
  }),
1087
+ updateCollectionById: (collectionId, data, params = {}) => this.request({
1088
+ path: `/collections/${collectionId}`,
1089
+ method: "PATCH",
1090
+ body: data,
1091
+ secure: true,
1092
+ type: "application/json" /* Json */,
1093
+ format: "json",
1094
+ ...params
1095
+ }),
636
1096
  listSpacesInCollectionById: (collectionId, query, params = {}) => this.request({
637
1097
  path: `/collections/${collectionId}/spaces`,
638
1098
  method: "GET",
@@ -648,6 +1108,22 @@ var Api = class extends HttpClient {
648
1108
  secure: true,
649
1109
  format: "json",
650
1110
  ...params
1111
+ }),
1112
+ getCollectionPublishingAuthById: (collectionId, params = {}) => this.request({
1113
+ path: `/collections/${collectionId}/publishing/auth`,
1114
+ method: "GET",
1115
+ secure: true,
1116
+ format: "json",
1117
+ ...params
1118
+ }),
1119
+ updateCollectionPublishingAuthById: (collectionId, data, params = {}) => this.request({
1120
+ path: `/collections/${collectionId}/publishing/auth`,
1121
+ method: "POST",
1122
+ body: data,
1123
+ secure: true,
1124
+ type: "application/json" /* Json */,
1125
+ format: "json",
1126
+ ...params
651
1127
  })
652
1128
  };
653
1129
  this.integrations = {
@@ -689,6 +1165,30 @@ var Api = class extends HttpClient {
689
1165
  format: "json",
690
1166
  ...params
691
1167
  }),
1168
+ installIntegration: (integrationName, data, params = {}) => this.request({
1169
+ path: `/integrations/${integrationName}/installations`,
1170
+ method: "POST",
1171
+ body: data,
1172
+ secure: true,
1173
+ type: "application/json" /* Json */,
1174
+ format: "json",
1175
+ ...params
1176
+ }),
1177
+ listIntegrationEvents: (integrationName, query, params = {}) => this.request({
1178
+ path: `/integrations/${integrationName}/events`,
1179
+ method: "GET",
1180
+ query,
1181
+ secure: true,
1182
+ format: "json",
1183
+ ...params
1184
+ }),
1185
+ getIntegrationEvent: (integrationName, eventId, params = {}) => this.request({
1186
+ path: `/integrations/${integrationName}/events/${eventId}`,
1187
+ method: "GET",
1188
+ secure: true,
1189
+ format: "json",
1190
+ ...params
1191
+ }),
692
1192
  listIntegrationSpaceInstallations: (integrationName, query, params = {}) => this.request({
693
1193
  path: `/integrations/${integrationName}/spaces`,
694
1194
  method: "GET",
@@ -697,6 +1197,20 @@ var Api = class extends HttpClient {
697
1197
  format: "json",
698
1198
  ...params
699
1199
  }),
1200
+ updateIntegrationDevSpace: (integrationName, spaceId, data, params = {}) => this.request({
1201
+ path: `/integrations/${integrationName}/spaces/${spaceId}/dev`,
1202
+ method: "PUT",
1203
+ body: data,
1204
+ secure: true,
1205
+ type: "application/json" /* Json */,
1206
+ ...params
1207
+ }),
1208
+ removeIntegrationDevSpace: (integrationName, spaceId, params = {}) => this.request({
1209
+ path: `/integrations/${integrationName}/spaces/${spaceId}/dev`,
1210
+ method: "DELETE",
1211
+ secure: true,
1212
+ ...params
1213
+ }),
700
1214
  renderIntegrationUiWithGet: (integrationName, query, params = {}) => this.request({
701
1215
  path: `/integrations/${integrationName}/render`,
702
1216
  method: "GET",
@@ -723,6 +1237,12 @@ var Api = class extends HttpClient {
723
1237
  format: "json",
724
1238
  ...params
725
1239
  }),
1240
+ uninstallIntegration: (integrationName, installationId, params = {}) => this.request({
1241
+ path: `/integrations/${integrationName}/installations/${installationId}`,
1242
+ method: "DELETE",
1243
+ secure: true,
1244
+ ...params
1245
+ }),
726
1246
  createIntegrationInstallationToken: (integrationName, installationId, params = {}) => this.request({
727
1247
  path: `/integrations/${integrationName}/installations/${installationId}/tokens`,
728
1248
  method: "POST",
@@ -730,6 +1250,15 @@ var Api = class extends HttpClient {
730
1250
  format: "json",
731
1251
  ...params
732
1252
  }),
1253
+ installIntegrationOnSpace: (integrationName, installationId, data, params = {}) => this.request({
1254
+ path: `/integrations/${integrationName}/installations/${installationId}/spaces`,
1255
+ method: "POST",
1256
+ body: data,
1257
+ secure: true,
1258
+ type: "application/json" /* Json */,
1259
+ format: "json",
1260
+ ...params
1261
+ }),
733
1262
  updateIntegrationSpaceInstallation: (integrationName, installationId, spaceId, data, params = {}) => this.request({
734
1263
  path: `/integrations/${integrationName}/installations/${installationId}/spaces/${spaceId}`,
735
1264
  method: "PATCH",
@@ -738,6 +1267,27 @@ var Api = class extends HttpClient {
738
1267
  type: "application/json" /* Json */,
739
1268
  format: "json",
740
1269
  ...params
1270
+ }),
1271
+ uninstallIntegrationFromSpace: (integrationName, installationId, spaceId, params = {}) => this.request({
1272
+ path: `/integrations/${integrationName}/installations/${installationId}/spaces/${spaceId}`,
1273
+ method: "DELETE",
1274
+ secure: true,
1275
+ ...params
1276
+ }),
1277
+ getIntegrationEntities: (integrationName, installationId, params = {}) => this.request({
1278
+ path: `/integrations/${integrationName}/installations/${installationId}/entities`,
1279
+ method: "GET",
1280
+ secure: true,
1281
+ format: "json",
1282
+ ...params
1283
+ }),
1284
+ syncIntegrationEntities: (integrationName, installationId, data, params = {}) => this.request({
1285
+ path: `/integrations/${integrationName}/installations/${installationId}/entities`,
1286
+ method: "POST",
1287
+ body: data,
1288
+ secure: true,
1289
+ type: "application/json" /* Json */,
1290
+ ...params
741
1291
  })
742
1292
  };
743
1293
  this.orgs = {
@@ -749,6 +1299,22 @@ var Api = class extends HttpClient {
749
1299
  format: "json",
750
1300
  ...params
751
1301
  }),
1302
+ createOrganization: (data, params = {}) => this.request({
1303
+ path: `/orgs`,
1304
+ method: "POST",
1305
+ body: data,
1306
+ secure: true,
1307
+ type: "application/json" /* Json */,
1308
+ format: "json",
1309
+ ...params
1310
+ }),
1311
+ getOrganizationById: (organizationId, params = {}) => this.request({
1312
+ path: `/orgs/${organizationId}`,
1313
+ method: "GET",
1314
+ secure: true,
1315
+ format: "json",
1316
+ ...params
1317
+ }),
752
1318
  listMembersInOrganizationById: (organizationId, query, params = {}) => this.request({
753
1319
  path: `/orgs/${organizationId}/members`,
754
1320
  method: "GET",
@@ -779,10 +1345,17 @@ var Api = class extends HttpClient {
779
1345
  secure: true,
780
1346
  ...params
781
1347
  }),
1348
+ updateOrganizationMemberLastSeenAt: (organizationId, params = {}) => this.request({
1349
+ path: `/orgs/${organizationId}/ping`,
1350
+ method: "POST",
1351
+ secure: true,
1352
+ ...params
1353
+ }),
782
1354
  setUserAsSsoMemberForOrganization: (organizationId, userId, params = {}) => this.request({
783
1355
  path: `/orgs/${organizationId}/members/${userId}/sso`,
784
1356
  method: "POST",
785
1357
  secure: true,
1358
+ format: "json",
786
1359
  ...params
787
1360
  }),
788
1361
  listSpacesForOrganizationMember: (organizationId, userId, query, params = {}) => this.request({
@@ -793,6 +1366,16 @@ var Api = class extends HttpClient {
793
1366
  format: "json",
794
1367
  ...params
795
1368
  }),
1369
+ listTeamsForOrganizationMember: (organizationId, userId, query, params = {}) => this.request(
1370
+ {
1371
+ path: `/orgs/${organizationId}/members/${userId}/teams`,
1372
+ method: "GET",
1373
+ query,
1374
+ secure: true,
1375
+ format: "json",
1376
+ ...params
1377
+ }
1378
+ ),
796
1379
  listTeamsInOrganizationById: (organizationId, query, params = {}) => this.request({
797
1380
  path: `/orgs/${organizationId}/teams`,
798
1381
  method: "GET",
@@ -848,10 +1431,12 @@ var Api = class extends HttpClient {
848
1431
  format: "json",
849
1432
  ...params
850
1433
  }),
851
- addMemberToOrganizationTeamById: (organizationId, teamId, userId, params = {}) => this.request({
1434
+ addMemberToOrganizationTeamById: (organizationId, teamId, userId, data, params = {}) => this.request({
852
1435
  path: `/orgs/${organizationId}/teams/${teamId}/members/${userId}`,
853
1436
  method: "PUT",
1437
+ body: data,
854
1438
  secure: true,
1439
+ type: "application/json" /* Json */,
855
1440
  ...params
856
1441
  }),
857
1442
  deleteMemberFromOrganizationTeamById: (organizationId, teamId, userId, params = {}) => this.request({
@@ -924,6 +1509,23 @@ var Api = class extends HttpClient {
924
1509
  format: "json",
925
1510
  ...params
926
1511
  }),
1512
+ createSpace: (organizationId, data, params = {}) => this.request({
1513
+ path: `/orgs/${organizationId}/spaces`,
1514
+ method: "POST",
1515
+ body: data,
1516
+ secure: true,
1517
+ type: "application/json" /* Json */,
1518
+ format: "json",
1519
+ ...params
1520
+ }),
1521
+ listSpacesWithGitSyncInOrganizationById: (organizationId, query, params = {}) => this.request({
1522
+ path: `/orgs/${organizationId}/spaces/gitsync`,
1523
+ method: "GET",
1524
+ query,
1525
+ secure: true,
1526
+ format: "json",
1527
+ ...params
1528
+ }),
927
1529
  listCollectionsInOrganizationById: (organizationId, query, params = {}) => this.request({
928
1530
  path: `/orgs/${organizationId}/collections`,
929
1531
  method: "GET",
@@ -954,6 +1556,111 @@ var Api = class extends HttpClient {
954
1556
  type: "application/json" /* Json */,
955
1557
  format: "json",
956
1558
  ...params
1559
+ }),
1560
+ listOrganizationCustomFields: (organizationId, query, params = {}) => this.request({
1561
+ path: `/orgs/${organizationId}/custom-fields`,
1562
+ method: "GET",
1563
+ query,
1564
+ secure: true,
1565
+ format: "json",
1566
+ ...params
1567
+ }),
1568
+ createOrganizationCustomField: (organizationId, data, params = {}) => this.request({
1569
+ path: `/orgs/${organizationId}/custom-fields`,
1570
+ method: "POST",
1571
+ body: data,
1572
+ secure: true,
1573
+ type: "application/json" /* Json */,
1574
+ format: "json",
1575
+ ...params
1576
+ }),
1577
+ getOrganizationCustomFieldByName: (organizationId, fieldName, params = {}) => this.request({
1578
+ path: `/orgs/${organizationId}/custom-fields/${fieldName}`,
1579
+ method: "GET",
1580
+ secure: true,
1581
+ format: "json",
1582
+ ...params
1583
+ }),
1584
+ updateOrganizationCustomField: (organizationId, fieldName, data, params = {}) => this.request({
1585
+ path: `/orgs/${organizationId}/custom-fields/${fieldName}`,
1586
+ method: "PATCH",
1587
+ body: data,
1588
+ secure: true,
1589
+ type: "application/json" /* Json */,
1590
+ format: "json",
1591
+ ...params
1592
+ }),
1593
+ deleteOrganizationCustomField: (organizationId, fieldName, params = {}) => this.request({
1594
+ path: `/orgs/${organizationId}/custom-fields/${fieldName}`,
1595
+ method: "DELETE",
1596
+ secure: true,
1597
+ ...params
1598
+ }),
1599
+ listSpaceRelationsInOrganization: (organizationId, query, params = {}) => this.request({
1600
+ path: `/orgs/${organizationId}/space-relations`,
1601
+ method: "GET",
1602
+ query,
1603
+ secure: true,
1604
+ format: "json",
1605
+ ...params
1606
+ }),
1607
+ listEntitiesInOrganization: (organizationId, query, params = {}) => this.request({
1608
+ path: `/orgs/${organizationId}/entities`,
1609
+ method: "GET",
1610
+ query,
1611
+ secure: true,
1612
+ format: "json",
1613
+ ...params
1614
+ }),
1615
+ listEnvironments: (organizationId, query, params = {}) => this.request({
1616
+ path: `/orgs/${organizationId}/environments`,
1617
+ method: "GET",
1618
+ query,
1619
+ secure: true,
1620
+ format: "json",
1621
+ ...params
1622
+ }),
1623
+ createEnvironment: (organizationId, data, params = {}) => this.request({
1624
+ path: `/orgs/${organizationId}/environments`,
1625
+ method: "POST",
1626
+ body: data,
1627
+ secure: true,
1628
+ type: "application/json" /* Json */,
1629
+ format: "json",
1630
+ ...params
1631
+ }),
1632
+ getEnvironmentByName: (organizationId, environmentName, params = {}) => this.request({
1633
+ path: `/orgs/${organizationId}/environments/${environmentName}`,
1634
+ method: "GET",
1635
+ secure: true,
1636
+ format: "json",
1637
+ ...params
1638
+ }),
1639
+ updateEnvironment: (organizationId, environmentName, data, params = {}) => this.request({
1640
+ path: `/orgs/${organizationId}/environments/${environmentName}`,
1641
+ method: "PATCH",
1642
+ body: data,
1643
+ secure: true,
1644
+ type: "application/json" /* Json */,
1645
+ format: "json",
1646
+ ...params
1647
+ }),
1648
+ deleteEnvironment: (organizationId, environmentName, params = {}) => this.request({
1649
+ path: `/orgs/${organizationId}/environments/${environmentName}`,
1650
+ method: "DELETE",
1651
+ secure: true,
1652
+ ...params
1653
+ })
1654
+ };
1655
+ this.internal = {
1656
+ generateHiveAccessToken: (data, params = {}) => this.request({
1657
+ path: `/internal/hive/token`,
1658
+ method: "POST",
1659
+ body: data,
1660
+ secure: true,
1661
+ type: "application/json" /* Json */,
1662
+ format: "json",
1663
+ ...params
957
1664
  })
958
1665
  };
959
1666
  this.urls = {
@@ -1033,6 +1740,7 @@ var GitBookAPI = class extends Api {
1033
1740
  Api,
1034
1741
  BillingInterval,
1035
1742
  BillingProduct,
1743
+ ChangeRequestReviewStatus,
1036
1744
  ChangeRequestStatus,
1037
1745
  CloudflareHostnameStatus,
1038
1746
  CloudflareHostnameTLSStatus,
@@ -1040,8 +1748,10 @@ var GitBookAPI = class extends Api {
1040
1748
  ContentKitIcon,
1041
1749
  ContentType,
1042
1750
  ContentVisibility,
1751
+ CustomFieldType,
1043
1752
  GITBOOK_DEFAULT_ENDPOINT,
1044
1753
  GitBookAPI,
1754
+ GitSyncOperationState,
1045
1755
  HttpClient,
1046
1756
  ImportContentSource,
1047
1757
  IntegrationCategory,
@@ -1050,5 +1760,11 @@ var GitBookAPI = class extends Api {
1050
1760
  IntegrationScope,
1051
1761
  IntegrationVisibility,
1052
1762
  MemberRole,
1053
- PurgeCDNCacheContextType
1763
+ OrganizationCommunityType,
1764
+ OrganizationType,
1765
+ OrganizationUseCase,
1766
+ PurgeCDNCacheContextType,
1767
+ SpaceRelationType,
1768
+ SpaceType,
1769
+ TeamMemberRole
1054
1770
  });