@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.js CHANGED
@@ -8,6 +8,23 @@ var ContentVisibility = /* @__PURE__ */ ((ContentVisibility2) => {
8
8
  ContentVisibility2["Private"] = "private";
9
9
  return ContentVisibility2;
10
10
  })(ContentVisibility || {});
11
+ var SpaceType = /* @__PURE__ */ ((SpaceType2) => {
12
+ SpaceType2["Application"] = "application";
13
+ SpaceType2["Website"] = "website";
14
+ SpaceType2["Service"] = "service";
15
+ SpaceType2["Library"] = "library";
16
+ SpaceType2["CloudResource"] = "cloud-resource";
17
+ SpaceType2["Database"] = "database";
18
+ SpaceType2["Other"] = "other";
19
+ return SpaceType2;
20
+ })(SpaceType || {});
21
+ var SpaceRelationType = /* @__PURE__ */ ((SpaceRelationType2) => {
22
+ SpaceRelationType2["DependsOn"] = "dependsOn";
23
+ SpaceRelationType2["DependencyOf"] = "dependencyOf";
24
+ SpaceRelationType2["PartOf"] = "partOf";
25
+ SpaceRelationType2["HasPart"] = "hasPart";
26
+ return SpaceRelationType2;
27
+ })(SpaceRelationType || {});
11
28
  var ImportContentSource = /* @__PURE__ */ ((ImportContentSource2) => {
12
29
  ImportContentSource2["Website"] = "website";
13
30
  ImportContentSource2["Docx"] = "docx";
@@ -23,6 +40,32 @@ var ImportContentSource = /* @__PURE__ */ ((ImportContentSource2) => {
23
40
  ImportContentSource2["OpenApi"] = "open-api";
24
41
  return ImportContentSource2;
25
42
  })(ImportContentSource || {});
43
+ var GitSyncOperationState = /* @__PURE__ */ ((GitSyncOperationState2) => {
44
+ GitSyncOperationState2["Running"] = "running";
45
+ GitSyncOperationState2["Failure"] = "failure";
46
+ GitSyncOperationState2["Success"] = "success";
47
+ return GitSyncOperationState2;
48
+ })(GitSyncOperationState || {});
49
+ var OrganizationType = /* @__PURE__ */ ((OrganizationType2) => {
50
+ OrganizationType2["Business"] = "business";
51
+ OrganizationType2["Community"] = "community";
52
+ return OrganizationType2;
53
+ })(OrganizationType || {});
54
+ var OrganizationUseCase = /* @__PURE__ */ ((OrganizationUseCase2) => {
55
+ OrganizationUseCase2["ProductDocs"] = "productDocs";
56
+ OrganizationUseCase2["TeamKnowledgeBase"] = "teamKnowledgeBase";
57
+ OrganizationUseCase2["DesignSystem"] = "designSystem";
58
+ OrganizationUseCase2["OpenSourceDocs"] = "openSourceDocs";
59
+ OrganizationUseCase2["Notes"] = "notes";
60
+ OrganizationUseCase2["Other"] = "other";
61
+ return OrganizationUseCase2;
62
+ })(OrganizationUseCase || {});
63
+ var OrganizationCommunityType = /* @__PURE__ */ ((OrganizationCommunityType2) => {
64
+ OrganizationCommunityType2["NonProfit"] = "nonProfit";
65
+ OrganizationCommunityType2["OpenSource"] = "openSource";
66
+ OrganizationCommunityType2["Education"] = "education";
67
+ return OrganizationCommunityType2;
68
+ })(OrganizationCommunityType || {});
26
69
  var MemberRole = /* @__PURE__ */ ((MemberRole2) => {
27
70
  MemberRole2["Admin"] = "admin";
28
71
  MemberRole2["Create"] = "create";
@@ -32,6 +75,11 @@ var MemberRole = /* @__PURE__ */ ((MemberRole2) => {
32
75
  MemberRole2["Read"] = "read";
33
76
  return MemberRole2;
34
77
  })(MemberRole || {});
78
+ var TeamMemberRole = /* @__PURE__ */ ((TeamMemberRole2) => {
79
+ TeamMemberRole2["Admin"] = "admin";
80
+ TeamMemberRole2["Participant"] = "participant";
81
+ return TeamMemberRole2;
82
+ })(TeamMemberRole || {});
35
83
  var ChangeRequestStatus = /* @__PURE__ */ ((ChangeRequestStatus2) => {
36
84
  ChangeRequestStatus2["Draft"] = "draft";
37
85
  ChangeRequestStatus2["Open"] = "open";
@@ -39,6 +87,11 @@ var ChangeRequestStatus = /* @__PURE__ */ ((ChangeRequestStatus2) => {
39
87
  ChangeRequestStatus2["Merged"] = "merged";
40
88
  return ChangeRequestStatus2;
41
89
  })(ChangeRequestStatus || {});
90
+ var ChangeRequestReviewStatus = /* @__PURE__ */ ((ChangeRequestReviewStatus2) => {
91
+ ChangeRequestReviewStatus2["ChangesRequested"] = "changes-requested";
92
+ ChangeRequestReviewStatus2["Approved"] = "approved";
93
+ return ChangeRequestReviewStatus2;
94
+ })(ChangeRequestReviewStatus || {});
42
95
  var AnalyticsSearchPeriod = /* @__PURE__ */ ((AnalyticsSearchPeriod2) => {
43
96
  AnalyticsSearchPeriod2["LastMonth"] = "last_month";
44
97
  AnalyticsSearchPeriod2["LastWeek"] = "last_week";
@@ -52,6 +105,7 @@ var AnalyticsTrafficInterval = /* @__PURE__ */ ((AnalyticsTrafficInterval2) => {
52
105
  return AnalyticsTrafficInterval2;
53
106
  })(AnalyticsTrafficInterval || {});
54
107
  var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
108
+ IntegrationScope2["OrganizationEntitiesWrite"] = "organization:entities:write";
55
109
  IntegrationScope2["SpaceViewsRead"] = "space:views:read";
56
110
  IntegrationScope2["SpaceContentRead"] = "space:content:read";
57
111
  IntegrationScope2["SpaceContentWrite"] = "space:content:write";
@@ -77,6 +131,7 @@ var IntegrationCategory = /* @__PURE__ */ ((IntegrationCategory2) => {
77
131
  var IntegrationVisibility = /* @__PURE__ */ ((IntegrationVisibility2) => {
78
132
  IntegrationVisibility2["Public"] = "public";
79
133
  IntegrationVisibility2["Private"] = "private";
134
+ IntegrationVisibility2["Unlisted"] = "unlisted";
80
135
  return IntegrationVisibility2;
81
136
  })(IntegrationVisibility || {});
82
137
  var IntegrationInstallationStatus = /* @__PURE__ */ ((IntegrationInstallationStatus2) => {
@@ -153,6 +208,12 @@ var ContentKitIcon = /* @__PURE__ */ ((ContentKitIcon2) => {
153
208
  ContentKitIcon2["LinkExternal"] = "link-external";
154
209
  return ContentKitIcon2;
155
210
  })(ContentKitIcon || {});
211
+ var CustomFieldType = /* @__PURE__ */ ((CustomFieldType2) => {
212
+ CustomFieldType2["Text"] = "text";
213
+ CustomFieldType2["Number"] = "number";
214
+ CustomFieldType2["Boolean"] = "boolean";
215
+ return CustomFieldType2;
216
+ })(CustomFieldType || {});
156
217
  var ContentType = /* @__PURE__ */ ((ContentType2) => {
157
218
  ContentType2["Json"] = "application/json";
158
219
  ContentType2["FormData"] = "multipart/form-data";
@@ -313,13 +374,31 @@ var Api = class extends HttpClient {
313
374
  format: "json",
314
375
  ...params
315
376
  }),
316
- askQuery: (query, params = {}) => this.request({
377
+ askQueryWithGet: (query, params = {}) => this.request({
317
378
  path: `/search/ask`,
318
379
  method: "GET",
319
380
  query,
320
381
  secure: true,
321
382
  format: "json",
322
383
  ...params
384
+ }),
385
+ askQuery: (data, params = {}) => this.request({
386
+ path: `/search/ask`,
387
+ method: "POST",
388
+ body: data,
389
+ secure: true,
390
+ type: "application/json" /* Json */,
391
+ format: "json",
392
+ ...params
393
+ }),
394
+ getRecommendedQuestions: (data, params = {}) => this.request({
395
+ path: `/search/questions`,
396
+ method: "POST",
397
+ body: data,
398
+ secure: true,
399
+ type: "application/json" /* Json */,
400
+ format: "json",
401
+ ...params
323
402
  })
324
403
  };
325
404
  this.user = {
@@ -356,6 +435,29 @@ var Api = class extends HttpClient {
356
435
  format: "json",
357
436
  ...params
358
437
  }),
438
+ updateSpaceById: (spaceId, data, params = {}) => this.request({
439
+ path: `/spaces/${spaceId}`,
440
+ method: "PATCH",
441
+ body: data,
442
+ secure: true,
443
+ type: "application/json" /* Json */,
444
+ format: "json",
445
+ ...params
446
+ }),
447
+ generateSpaceHiveReadAccessToken: (spaceId, params = {}) => this.request({
448
+ path: `/spaces/${spaceId}/hive/token`,
449
+ method: "POST",
450
+ secure: true,
451
+ format: "json",
452
+ ...params
453
+ }),
454
+ duplicateSpace: (spaceId, params = {}) => this.request({
455
+ path: `/spaces/${spaceId}/duplicate`,
456
+ method: "POST",
457
+ secure: true,
458
+ format: "json",
459
+ ...params
460
+ }),
359
461
  searchSpaceContent: (spaceId, query, params = {}) => this.request({
360
462
  path: `/spaces/${spaceId}/search`,
361
463
  method: "GET",
@@ -364,7 +466,7 @@ var Api = class extends HttpClient {
364
466
  format: "json",
365
467
  ...params
366
468
  }),
367
- askQueryInSpace: (spaceId, query, params = {}) => this.request({
469
+ askQueryInSpaceWithGet: (spaceId, query, params = {}) => this.request({
368
470
  path: `/spaces/${spaceId}/search/ask`,
369
471
  method: "GET",
370
472
  query,
@@ -372,6 +474,22 @@ var Api = class extends HttpClient {
372
474
  format: "json",
373
475
  ...params
374
476
  }),
477
+ askQueryInSpace: (spaceId, data, params = {}) => this.request({
478
+ path: `/spaces/${spaceId}/search/ask`,
479
+ method: "POST",
480
+ body: data,
481
+ secure: true,
482
+ type: "application/json" /* Json */,
483
+ format: "json",
484
+ ...params
485
+ }),
486
+ getRecommendedQuestionsInSpace: (spaceId, params = {}) => this.request({
487
+ path: `/spaces/${spaceId}/search/questions`,
488
+ method: "GET",
489
+ secure: true,
490
+ format: "json",
491
+ ...params
492
+ }),
375
493
  importGitRepository: (spaceId, data, params = {}) => this.request({
376
494
  path: `/spaces/${spaceId}/git/import`,
377
495
  method: "POST",
@@ -476,6 +594,21 @@ var Api = class extends HttpClient {
476
594
  format: "json",
477
595
  ...params
478
596
  }),
597
+ listChangeRequestsForSpace: (spaceId, query, params = {}) => this.request({
598
+ path: `/spaces/${spaceId}/change-requests`,
599
+ method: "GET",
600
+ query,
601
+ secure: true,
602
+ format: "json",
603
+ ...params
604
+ }),
605
+ getChangeRequestById: (spaceId, changeRequestId, params = {}) => this.request({
606
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}`,
607
+ method: "GET",
608
+ secure: true,
609
+ format: "json",
610
+ ...params
611
+ }),
479
612
  mergeChangeRequest: (spaceId, changeRequestId, params = {}) => this.request({
480
613
  path: `/spaces/${spaceId}/change-requests/${changeRequestId}/merge`,
481
614
  method: "POST",
@@ -490,6 +623,128 @@ var Api = class extends HttpClient {
490
623
  format: "json",
491
624
  ...params
492
625
  }),
626
+ getReviewsByChangeRequestId: (spaceId, changeRequestId, query, params = {}) => this.request({
627
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/reviews`,
628
+ method: "GET",
629
+ query,
630
+ secure: true,
631
+ format: "json",
632
+ ...params
633
+ }),
634
+ submitChangeRequestReview: (spaceId, changeRequestId, data, params = {}) => this.request({
635
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/reviews`,
636
+ method: "POST",
637
+ body: data,
638
+ secure: true,
639
+ type: "application/json" /* Json */,
640
+ format: "json",
641
+ ...params
642
+ }),
643
+ getRequestedReviewersByChangeRequestId: (spaceId, changeRequestId, query, params = {}) => this.request({
644
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/requested-reviewers`,
645
+ method: "GET",
646
+ query,
647
+ secure: true,
648
+ format: "json",
649
+ ...params
650
+ }),
651
+ requestReviewersForChangeRequest: (spaceId, changeRequestId, data, params = {}) => this.request({
652
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/requested-reviewers`,
653
+ method: "POST",
654
+ body: data,
655
+ secure: true,
656
+ type: "application/json" /* Json */,
657
+ format: "json",
658
+ ...params
659
+ }),
660
+ listCommentsInChangeRequest: (spaceId, changeRequestId, query, params = {}) => this.request({
661
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments`,
662
+ method: "GET",
663
+ query,
664
+ secure: true,
665
+ format: "json",
666
+ ...params
667
+ }),
668
+ postCommentInChangeRequest: (spaceId, changeRequestId, data, params = {}) => this.request({
669
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments`,
670
+ method: "POST",
671
+ body: data,
672
+ secure: true,
673
+ type: "application/json" /* Json */,
674
+ format: "json",
675
+ ...params
676
+ }),
677
+ getCommentInChangeRequest: (spaceId, changeRequestId, commentId, query, params = {}) => this.request({
678
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments/${commentId}`,
679
+ method: "GET",
680
+ query,
681
+ secure: true,
682
+ format: "json",
683
+ ...params
684
+ }),
685
+ deleteCommentInChangeRequest: (spaceId, changeRequestId, commentId, params = {}) => this.request({
686
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments/${commentId}`,
687
+ method: "DELETE",
688
+ secure: true,
689
+ ...params
690
+ }),
691
+ updateCommentInChangeRequest: (spaceId, changeRequestId, commentId, data, params = {}) => this.request({
692
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments/${commentId}`,
693
+ method: "PUT",
694
+ body: data,
695
+ secure: true,
696
+ type: "application/json" /* Json */,
697
+ format: "json",
698
+ ...params
699
+ }),
700
+ listCommentRepliesInChangeRequest: (spaceId, changeRequestId, commentId, query, params = {}) => this.request({
701
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments/${commentId}/replies`,
702
+ method: "GET",
703
+ query,
704
+ secure: true,
705
+ format: "json",
706
+ ...params
707
+ }),
708
+ postCommentReplyInChangeRequest: (spaceId, changeRequestId, commentId, data, query, params = {}) => this.request({
709
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments/${commentId}/replies`,
710
+ method: "POST",
711
+ query,
712
+ body: data,
713
+ secure: true,
714
+ type: "application/json" /* Json */,
715
+ format: "json",
716
+ ...params
717
+ }),
718
+ getCommentReplyInChangeRequest: (spaceId, changeRequestId, commentId, commentReplyId, query, params = {}) => this.request({
719
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments/${commentId}/replies/${commentReplyId}`,
720
+ method: "GET",
721
+ query,
722
+ secure: true,
723
+ format: "json",
724
+ ...params
725
+ }),
726
+ updateCommentReplyInChangeRequest: (spaceId, changeRequestId, commentId, commentReplyId, data, params = {}) => this.request({
727
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments/${commentId}/replies/${commentReplyId}`,
728
+ method: "PUT",
729
+ body: data,
730
+ secure: true,
731
+ type: "application/json" /* Json */,
732
+ format: "json",
733
+ ...params
734
+ }),
735
+ deleteCommentReplyInChangeRequest: (spaceId, changeRequestId, commentId, commentReplyId, params = {}) => this.request({
736
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments/${commentId}/replies/${commentReplyId}`,
737
+ method: "DELETE",
738
+ secure: true,
739
+ ...params
740
+ }),
741
+ getContributorsByChangeRequestId: (spaceId, changeRequestId, params = {}) => this.request({
742
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/contributors`,
743
+ method: "GET",
744
+ secure: true,
745
+ format: "json",
746
+ ...params
747
+ }),
493
748
  getRevisionOfChangeRequestById: (spaceId, changeRequestId, params = {}) => this.request({
494
749
  path: `/spaces/${spaceId}/change-requests/${changeRequestId}/content`,
495
750
  method: "GET",
@@ -568,6 +823,86 @@ var Api = class extends HttpClient {
568
823
  format: "json",
569
824
  ...params
570
825
  }),
826
+ listCommentsInSpace: (spaceId, query, params = {}) => this.request({
827
+ path: `/spaces/${spaceId}/comments`,
828
+ method: "GET",
829
+ query,
830
+ secure: true,
831
+ format: "json",
832
+ ...params
833
+ }),
834
+ postCommentInSpace: (spaceId, data, params = {}) => this.request({
835
+ path: `/spaces/${spaceId}/comments`,
836
+ method: "POST",
837
+ body: data,
838
+ secure: true,
839
+ type: "application/json" /* Json */,
840
+ format: "json",
841
+ ...params
842
+ }),
843
+ getCommentInSpace: (spaceId, commentId, query, params = {}) => this.request({
844
+ path: `/spaces/${spaceId}/comments/${commentId}`,
845
+ method: "GET",
846
+ query,
847
+ secure: true,
848
+ format: "json",
849
+ ...params
850
+ }),
851
+ deleteCommentInSpace: (spaceId, commentId, params = {}) => this.request({
852
+ path: `/spaces/${spaceId}/comments/${commentId}`,
853
+ method: "DELETE",
854
+ secure: true,
855
+ ...params
856
+ }),
857
+ updateCommentInSpace: (spaceId, commentId, data, params = {}) => this.request({
858
+ path: `/spaces/${spaceId}/comments/${commentId}`,
859
+ method: "PUT",
860
+ body: data,
861
+ secure: true,
862
+ type: "application/json" /* Json */,
863
+ format: "json",
864
+ ...params
865
+ }),
866
+ listCommentRepliesInSpace: (spaceId, commentId, query, params = {}) => this.request({
867
+ path: `/spaces/${spaceId}/comments/${commentId}/replies`,
868
+ method: "GET",
869
+ query,
870
+ secure: true,
871
+ format: "json",
872
+ ...params
873
+ }),
874
+ postCommentReplyInSpace: (spaceId, commentId, data, params = {}) => this.request({
875
+ path: `/spaces/${spaceId}/comments/${commentId}/replies`,
876
+ method: "POST",
877
+ body: data,
878
+ secure: true,
879
+ type: "application/json" /* Json */,
880
+ format: "json",
881
+ ...params
882
+ }),
883
+ getCommentReplyInSpace: (spaceId, commentId, commentReplyId, query, params = {}) => this.request({
884
+ path: `/spaces/${spaceId}/comments/${commentId}/replies/${commentReplyId}`,
885
+ method: "GET",
886
+ query,
887
+ secure: true,
888
+ format: "json",
889
+ ...params
890
+ }),
891
+ updateCommentReplyInSpace: (spaceId, commentId, commentReplyId, data, params = {}) => this.request({
892
+ path: `/spaces/${spaceId}/comments/${commentId}/replies/${commentReplyId}`,
893
+ method: "PUT",
894
+ body: data,
895
+ secure: true,
896
+ type: "application/json" /* Json */,
897
+ format: "json",
898
+ ...params
899
+ }),
900
+ deleteCommentReplyInSpace: (spaceId, commentId, commentReplyId, params = {}) => this.request({
901
+ path: `/spaces/${spaceId}/comments/${commentId}/replies/${commentReplyId}`,
902
+ method: "DELETE",
903
+ secure: true,
904
+ ...params
905
+ }),
571
906
  listPermissionsAggregateInSpace: (spaceId, query, params = {}) => this.request({
572
907
  path: `/spaces/${spaceId}/permissions/aggregate`,
573
908
  method: "GET",
@@ -575,6 +910,113 @@ var Api = class extends HttpClient {
575
910
  secure: true,
576
911
  format: "json",
577
912
  ...params
913
+ }),
914
+ getSpacePublishingAuthById: (spaceId, params = {}) => this.request({
915
+ path: `/spaces/${spaceId}/publishing/auth`,
916
+ method: "GET",
917
+ secure: true,
918
+ format: "json",
919
+ ...params
920
+ }),
921
+ updateSpacePublishingAuthById: (spaceId, data, params = {}) => this.request({
922
+ path: `/spaces/${spaceId}/publishing/auth`,
923
+ method: "POST",
924
+ body: data,
925
+ secure: true,
926
+ type: "application/json" /* Json */,
927
+ format: "json",
928
+ ...params
929
+ }),
930
+ listSpaceIntegrationsBlocks: (spaceId, params = {}) => this.request(
931
+ {
932
+ path: `/spaces/${spaceId}/integration-blocks`,
933
+ method: "GET",
934
+ secure: true,
935
+ format: "json",
936
+ ...params
937
+ }
938
+ ),
939
+ listSpaceRelations: (spaceId, query, params = {}) => this.request({
940
+ path: `/spaces/${spaceId}/relations`,
941
+ method: "GET",
942
+ query,
943
+ secure: true,
944
+ format: "json",
945
+ ...params
946
+ }),
947
+ createSpaceRelation: (spaceId, data, params = {}) => this.request({
948
+ path: `/spaces/${spaceId}/relations`,
949
+ method: "POST",
950
+ body: data,
951
+ secure: true,
952
+ type: "application/json" /* Json */,
953
+ format: "json",
954
+ ...params
955
+ }),
956
+ getSpaceRelation: (spaceId, targetSpaceId, params = {}) => this.request({
957
+ path: `/spaces/${spaceId}/relations/${targetSpaceId}`,
958
+ method: "GET",
959
+ secure: true,
960
+ format: "json",
961
+ ...params
962
+ }),
963
+ deleteSpaceRelation: (spaceId, targetSpaceId, params = {}) => this.request({
964
+ path: `/spaces/${spaceId}/relations/${targetSpaceId}`,
965
+ method: "DELETE",
966
+ secure: true,
967
+ ...params
968
+ }),
969
+ getSpaceCustomFields: (spaceId, params = {}) => this.request({
970
+ path: `/spaces/${spaceId}/custom-fields`,
971
+ method: "GET",
972
+ secure: true,
973
+ format: "json",
974
+ ...params
975
+ }),
976
+ updateSpaceCustomFields: (spaceId, data, params = {}) => this.request({
977
+ path: `/spaces/${spaceId}/custom-fields`,
978
+ method: "PATCH",
979
+ body: data,
980
+ secure: true,
981
+ type: "application/json" /* Json */,
982
+ ...params
983
+ }),
984
+ listSpaceEntities: (spaceId, query, params = {}) => this.request({
985
+ path: `/spaces/${spaceId}/entities`,
986
+ method: "GET",
987
+ query,
988
+ secure: true,
989
+ format: "json",
990
+ ...params
991
+ }),
992
+ addSpaceEntities: (spaceId, data, params = {}) => this.request({
993
+ path: `/spaces/${spaceId}/entities`,
994
+ method: "POST",
995
+ body: data,
996
+ secure: true,
997
+ type: "application/json" /* Json */,
998
+ ...params
999
+ }),
1000
+ getSpaceEntity: (spaceId, integrationName, entityId, params = {}) => this.request({
1001
+ path: `/spaces/${spaceId}/entities/${integrationName}/${entityId}`,
1002
+ method: "GET",
1003
+ secure: true,
1004
+ format: "json",
1005
+ ...params
1006
+ }),
1007
+ updateSpaceEntity: (spaceId, integrationName, entityId, data, params = {}) => this.request({
1008
+ path: `/spaces/${spaceId}/entities/${integrationName}/${entityId}`,
1009
+ method: "PATCH",
1010
+ body: data,
1011
+ secure: true,
1012
+ type: "application/json" /* Json */,
1013
+ ...params
1014
+ }),
1015
+ deleteSpaceEntity: (spaceId, integrationName, entityId, params = {}) => this.request({
1016
+ path: `/spaces/${spaceId}/entities/${integrationName}/${entityId}`,
1017
+ method: "DELETE",
1018
+ secure: true,
1019
+ ...params
578
1020
  })
579
1021
  };
580
1022
  this.collections = {
@@ -585,6 +1027,15 @@ var Api = class extends HttpClient {
585
1027
  format: "json",
586
1028
  ...params
587
1029
  }),
1030
+ updateCollectionById: (collectionId, data, params = {}) => this.request({
1031
+ path: `/collections/${collectionId}`,
1032
+ method: "PATCH",
1033
+ body: data,
1034
+ secure: true,
1035
+ type: "application/json" /* Json */,
1036
+ format: "json",
1037
+ ...params
1038
+ }),
588
1039
  listSpacesInCollectionById: (collectionId, query, params = {}) => this.request({
589
1040
  path: `/collections/${collectionId}/spaces`,
590
1041
  method: "GET",
@@ -600,6 +1051,22 @@ var Api = class extends HttpClient {
600
1051
  secure: true,
601
1052
  format: "json",
602
1053
  ...params
1054
+ }),
1055
+ getCollectionPublishingAuthById: (collectionId, params = {}) => this.request({
1056
+ path: `/collections/${collectionId}/publishing/auth`,
1057
+ method: "GET",
1058
+ secure: true,
1059
+ format: "json",
1060
+ ...params
1061
+ }),
1062
+ updateCollectionPublishingAuthById: (collectionId, data, params = {}) => this.request({
1063
+ path: `/collections/${collectionId}/publishing/auth`,
1064
+ method: "POST",
1065
+ body: data,
1066
+ secure: true,
1067
+ type: "application/json" /* Json */,
1068
+ format: "json",
1069
+ ...params
603
1070
  })
604
1071
  };
605
1072
  this.integrations = {
@@ -641,6 +1108,30 @@ var Api = class extends HttpClient {
641
1108
  format: "json",
642
1109
  ...params
643
1110
  }),
1111
+ installIntegration: (integrationName, data, params = {}) => this.request({
1112
+ path: `/integrations/${integrationName}/installations`,
1113
+ method: "POST",
1114
+ body: data,
1115
+ secure: true,
1116
+ type: "application/json" /* Json */,
1117
+ format: "json",
1118
+ ...params
1119
+ }),
1120
+ listIntegrationEvents: (integrationName, query, params = {}) => this.request({
1121
+ path: `/integrations/${integrationName}/events`,
1122
+ method: "GET",
1123
+ query,
1124
+ secure: true,
1125
+ format: "json",
1126
+ ...params
1127
+ }),
1128
+ getIntegrationEvent: (integrationName, eventId, params = {}) => this.request({
1129
+ path: `/integrations/${integrationName}/events/${eventId}`,
1130
+ method: "GET",
1131
+ secure: true,
1132
+ format: "json",
1133
+ ...params
1134
+ }),
644
1135
  listIntegrationSpaceInstallations: (integrationName, query, params = {}) => this.request({
645
1136
  path: `/integrations/${integrationName}/spaces`,
646
1137
  method: "GET",
@@ -649,6 +1140,20 @@ var Api = class extends HttpClient {
649
1140
  format: "json",
650
1141
  ...params
651
1142
  }),
1143
+ updateIntegrationDevSpace: (integrationName, spaceId, data, params = {}) => this.request({
1144
+ path: `/integrations/${integrationName}/spaces/${spaceId}/dev`,
1145
+ method: "PUT",
1146
+ body: data,
1147
+ secure: true,
1148
+ type: "application/json" /* Json */,
1149
+ ...params
1150
+ }),
1151
+ removeIntegrationDevSpace: (integrationName, spaceId, params = {}) => this.request({
1152
+ path: `/integrations/${integrationName}/spaces/${spaceId}/dev`,
1153
+ method: "DELETE",
1154
+ secure: true,
1155
+ ...params
1156
+ }),
652
1157
  renderIntegrationUiWithGet: (integrationName, query, params = {}) => this.request({
653
1158
  path: `/integrations/${integrationName}/render`,
654
1159
  method: "GET",
@@ -675,6 +1180,12 @@ var Api = class extends HttpClient {
675
1180
  format: "json",
676
1181
  ...params
677
1182
  }),
1183
+ uninstallIntegration: (integrationName, installationId, params = {}) => this.request({
1184
+ path: `/integrations/${integrationName}/installations/${installationId}`,
1185
+ method: "DELETE",
1186
+ secure: true,
1187
+ ...params
1188
+ }),
678
1189
  createIntegrationInstallationToken: (integrationName, installationId, params = {}) => this.request({
679
1190
  path: `/integrations/${integrationName}/installations/${installationId}/tokens`,
680
1191
  method: "POST",
@@ -682,6 +1193,15 @@ var Api = class extends HttpClient {
682
1193
  format: "json",
683
1194
  ...params
684
1195
  }),
1196
+ installIntegrationOnSpace: (integrationName, installationId, data, params = {}) => this.request({
1197
+ path: `/integrations/${integrationName}/installations/${installationId}/spaces`,
1198
+ method: "POST",
1199
+ body: data,
1200
+ secure: true,
1201
+ type: "application/json" /* Json */,
1202
+ format: "json",
1203
+ ...params
1204
+ }),
685
1205
  updateIntegrationSpaceInstallation: (integrationName, installationId, spaceId, data, params = {}) => this.request({
686
1206
  path: `/integrations/${integrationName}/installations/${installationId}/spaces/${spaceId}`,
687
1207
  method: "PATCH",
@@ -690,6 +1210,27 @@ var Api = class extends HttpClient {
690
1210
  type: "application/json" /* Json */,
691
1211
  format: "json",
692
1212
  ...params
1213
+ }),
1214
+ uninstallIntegrationFromSpace: (integrationName, installationId, spaceId, params = {}) => this.request({
1215
+ path: `/integrations/${integrationName}/installations/${installationId}/spaces/${spaceId}`,
1216
+ method: "DELETE",
1217
+ secure: true,
1218
+ ...params
1219
+ }),
1220
+ getIntegrationEntities: (integrationName, installationId, params = {}) => this.request({
1221
+ path: `/integrations/${integrationName}/installations/${installationId}/entities`,
1222
+ method: "GET",
1223
+ secure: true,
1224
+ format: "json",
1225
+ ...params
1226
+ }),
1227
+ syncIntegrationEntities: (integrationName, installationId, data, params = {}) => this.request({
1228
+ path: `/integrations/${integrationName}/installations/${installationId}/entities`,
1229
+ method: "POST",
1230
+ body: data,
1231
+ secure: true,
1232
+ type: "application/json" /* Json */,
1233
+ ...params
693
1234
  })
694
1235
  };
695
1236
  this.orgs = {
@@ -701,6 +1242,22 @@ var Api = class extends HttpClient {
701
1242
  format: "json",
702
1243
  ...params
703
1244
  }),
1245
+ createOrganization: (data, params = {}) => this.request({
1246
+ path: `/orgs`,
1247
+ method: "POST",
1248
+ body: data,
1249
+ secure: true,
1250
+ type: "application/json" /* Json */,
1251
+ format: "json",
1252
+ ...params
1253
+ }),
1254
+ getOrganizationById: (organizationId, params = {}) => this.request({
1255
+ path: `/orgs/${organizationId}`,
1256
+ method: "GET",
1257
+ secure: true,
1258
+ format: "json",
1259
+ ...params
1260
+ }),
704
1261
  listMembersInOrganizationById: (organizationId, query, params = {}) => this.request({
705
1262
  path: `/orgs/${organizationId}/members`,
706
1263
  method: "GET",
@@ -731,10 +1288,17 @@ var Api = class extends HttpClient {
731
1288
  secure: true,
732
1289
  ...params
733
1290
  }),
1291
+ updateOrganizationMemberLastSeenAt: (organizationId, params = {}) => this.request({
1292
+ path: `/orgs/${organizationId}/ping`,
1293
+ method: "POST",
1294
+ secure: true,
1295
+ ...params
1296
+ }),
734
1297
  setUserAsSsoMemberForOrganization: (organizationId, userId, params = {}) => this.request({
735
1298
  path: `/orgs/${organizationId}/members/${userId}/sso`,
736
1299
  method: "POST",
737
1300
  secure: true,
1301
+ format: "json",
738
1302
  ...params
739
1303
  }),
740
1304
  listSpacesForOrganizationMember: (organizationId, userId, query, params = {}) => this.request({
@@ -745,6 +1309,16 @@ var Api = class extends HttpClient {
745
1309
  format: "json",
746
1310
  ...params
747
1311
  }),
1312
+ listTeamsForOrganizationMember: (organizationId, userId, query, params = {}) => this.request(
1313
+ {
1314
+ path: `/orgs/${organizationId}/members/${userId}/teams`,
1315
+ method: "GET",
1316
+ query,
1317
+ secure: true,
1318
+ format: "json",
1319
+ ...params
1320
+ }
1321
+ ),
748
1322
  listTeamsInOrganizationById: (organizationId, query, params = {}) => this.request({
749
1323
  path: `/orgs/${organizationId}/teams`,
750
1324
  method: "GET",
@@ -800,10 +1374,12 @@ var Api = class extends HttpClient {
800
1374
  format: "json",
801
1375
  ...params
802
1376
  }),
803
- addMemberToOrganizationTeamById: (organizationId, teamId, userId, params = {}) => this.request({
1377
+ addMemberToOrganizationTeamById: (organizationId, teamId, userId, data, params = {}) => this.request({
804
1378
  path: `/orgs/${organizationId}/teams/${teamId}/members/${userId}`,
805
1379
  method: "PUT",
1380
+ body: data,
806
1381
  secure: true,
1382
+ type: "application/json" /* Json */,
807
1383
  ...params
808
1384
  }),
809
1385
  deleteMemberFromOrganizationTeamById: (organizationId, teamId, userId, params = {}) => this.request({
@@ -876,6 +1452,23 @@ var Api = class extends HttpClient {
876
1452
  format: "json",
877
1453
  ...params
878
1454
  }),
1455
+ createSpace: (organizationId, data, params = {}) => this.request({
1456
+ path: `/orgs/${organizationId}/spaces`,
1457
+ method: "POST",
1458
+ body: data,
1459
+ secure: true,
1460
+ type: "application/json" /* Json */,
1461
+ format: "json",
1462
+ ...params
1463
+ }),
1464
+ listSpacesWithGitSyncInOrganizationById: (organizationId, query, params = {}) => this.request({
1465
+ path: `/orgs/${organizationId}/spaces/gitsync`,
1466
+ method: "GET",
1467
+ query,
1468
+ secure: true,
1469
+ format: "json",
1470
+ ...params
1471
+ }),
879
1472
  listCollectionsInOrganizationById: (organizationId, query, params = {}) => this.request({
880
1473
  path: `/orgs/${organizationId}/collections`,
881
1474
  method: "GET",
@@ -906,6 +1499,111 @@ var Api = class extends HttpClient {
906
1499
  type: "application/json" /* Json */,
907
1500
  format: "json",
908
1501
  ...params
1502
+ }),
1503
+ listOrganizationCustomFields: (organizationId, query, params = {}) => this.request({
1504
+ path: `/orgs/${organizationId}/custom-fields`,
1505
+ method: "GET",
1506
+ query,
1507
+ secure: true,
1508
+ format: "json",
1509
+ ...params
1510
+ }),
1511
+ createOrganizationCustomField: (organizationId, data, params = {}) => this.request({
1512
+ path: `/orgs/${organizationId}/custom-fields`,
1513
+ method: "POST",
1514
+ body: data,
1515
+ secure: true,
1516
+ type: "application/json" /* Json */,
1517
+ format: "json",
1518
+ ...params
1519
+ }),
1520
+ getOrganizationCustomFieldByName: (organizationId, fieldName, params = {}) => this.request({
1521
+ path: `/orgs/${organizationId}/custom-fields/${fieldName}`,
1522
+ method: "GET",
1523
+ secure: true,
1524
+ format: "json",
1525
+ ...params
1526
+ }),
1527
+ updateOrganizationCustomField: (organizationId, fieldName, data, params = {}) => this.request({
1528
+ path: `/orgs/${organizationId}/custom-fields/${fieldName}`,
1529
+ method: "PATCH",
1530
+ body: data,
1531
+ secure: true,
1532
+ type: "application/json" /* Json */,
1533
+ format: "json",
1534
+ ...params
1535
+ }),
1536
+ deleteOrganizationCustomField: (organizationId, fieldName, params = {}) => this.request({
1537
+ path: `/orgs/${organizationId}/custom-fields/${fieldName}`,
1538
+ method: "DELETE",
1539
+ secure: true,
1540
+ ...params
1541
+ }),
1542
+ listSpaceRelationsInOrganization: (organizationId, query, params = {}) => this.request({
1543
+ path: `/orgs/${organizationId}/space-relations`,
1544
+ method: "GET",
1545
+ query,
1546
+ secure: true,
1547
+ format: "json",
1548
+ ...params
1549
+ }),
1550
+ listEntitiesInOrganization: (organizationId, query, params = {}) => this.request({
1551
+ path: `/orgs/${organizationId}/entities`,
1552
+ method: "GET",
1553
+ query,
1554
+ secure: true,
1555
+ format: "json",
1556
+ ...params
1557
+ }),
1558
+ listEnvironments: (organizationId, query, params = {}) => this.request({
1559
+ path: `/orgs/${organizationId}/environments`,
1560
+ method: "GET",
1561
+ query,
1562
+ secure: true,
1563
+ format: "json",
1564
+ ...params
1565
+ }),
1566
+ createEnvironment: (organizationId, data, params = {}) => this.request({
1567
+ path: `/orgs/${organizationId}/environments`,
1568
+ method: "POST",
1569
+ body: data,
1570
+ secure: true,
1571
+ type: "application/json" /* Json */,
1572
+ format: "json",
1573
+ ...params
1574
+ }),
1575
+ getEnvironmentByName: (organizationId, environmentName, params = {}) => this.request({
1576
+ path: `/orgs/${organizationId}/environments/${environmentName}`,
1577
+ method: "GET",
1578
+ secure: true,
1579
+ format: "json",
1580
+ ...params
1581
+ }),
1582
+ updateEnvironment: (organizationId, environmentName, data, params = {}) => this.request({
1583
+ path: `/orgs/${organizationId}/environments/${environmentName}`,
1584
+ method: "PATCH",
1585
+ body: data,
1586
+ secure: true,
1587
+ type: "application/json" /* Json */,
1588
+ format: "json",
1589
+ ...params
1590
+ }),
1591
+ deleteEnvironment: (organizationId, environmentName, params = {}) => this.request({
1592
+ path: `/orgs/${organizationId}/environments/${environmentName}`,
1593
+ method: "DELETE",
1594
+ secure: true,
1595
+ ...params
1596
+ })
1597
+ };
1598
+ this.internal = {
1599
+ generateHiveAccessToken: (data, params = {}) => this.request({
1600
+ path: `/internal/hive/token`,
1601
+ method: "POST",
1602
+ body: data,
1603
+ secure: true,
1604
+ type: "application/json" /* Json */,
1605
+ format: "json",
1606
+ ...params
909
1607
  })
910
1608
  };
911
1609
  this.urls = {
@@ -984,6 +1682,7 @@ export {
984
1682
  Api,
985
1683
  BillingInterval,
986
1684
  BillingProduct,
1685
+ ChangeRequestReviewStatus,
987
1686
  ChangeRequestStatus,
988
1687
  CloudflareHostnameStatus,
989
1688
  CloudflareHostnameTLSStatus,
@@ -991,8 +1690,10 @@ export {
991
1690
  ContentKitIcon,
992
1691
  ContentType,
993
1692
  ContentVisibility,
1693
+ CustomFieldType,
994
1694
  GITBOOK_DEFAULT_ENDPOINT,
995
1695
  GitBookAPI,
1696
+ GitSyncOperationState,
996
1697
  HttpClient,
997
1698
  ImportContentSource,
998
1699
  IntegrationCategory,
@@ -1001,5 +1702,11 @@ export {
1001
1702
  IntegrationScope,
1002
1703
  IntegrationVisibility,
1003
1704
  MemberRole,
1004
- PurgeCDNCacheContextType
1705
+ OrganizationCommunityType,
1706
+ OrganizationType,
1707
+ OrganizationUseCase,
1708
+ PurgeCDNCacheContextType,
1709
+ SpaceRelationType,
1710
+ SpaceType,
1711
+ TeamMemberRole
1005
1712
  };