@gitbook/api 0.62.0 → 0.64.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -172,7 +172,7 @@ var require_node = __commonJS({
172
172
 
173
173
  // package.json
174
174
  var name = "@gitbook/api";
175
- var version = "0.62.0";
175
+ var version = "0.64.1";
176
176
 
177
177
  // src/client.ts
178
178
  var import_event_iterator = __toESM(require_node(), 1);
@@ -430,17 +430,17 @@ var IntegrationCategory = /* @__PURE__ */ ((IntegrationCategory2) => {
430
430
  IntegrationCategory2["Other"] = "other";
431
431
  return IntegrationCategory2;
432
432
  })(IntegrationCategory || {});
433
- var ChangeRequestReviewStatus = /* @__PURE__ */ ((ChangeRequestReviewStatus2) => {
434
- ChangeRequestReviewStatus2["ChangesRequested"] = "changes-requested";
435
- ChangeRequestReviewStatus2["Approved"] = "approved";
436
- return ChangeRequestReviewStatus2;
437
- })(ChangeRequestReviewStatus || {});
438
433
  var ContentReferenceStatus = /* @__PURE__ */ ((ContentReferenceStatus2) => {
439
434
  ContentReferenceStatus2["Ok"] = "ok";
440
435
  ContentReferenceStatus2["Broken"] = "broken";
441
436
  ContentReferenceStatus2["InApp"] = "in-app";
442
437
  return ContentReferenceStatus2;
443
438
  })(ContentReferenceStatus || {});
439
+ var ChangeRequestReviewStatus = /* @__PURE__ */ ((ChangeRequestReviewStatus2) => {
440
+ ChangeRequestReviewStatus2["ChangesRequested"] = "changes-requested";
441
+ ChangeRequestReviewStatus2["Approved"] = "approved";
442
+ return ChangeRequestReviewStatus2;
443
+ })(ChangeRequestReviewStatus || {});
444
444
  var RevisionPageType = /* @__PURE__ */ ((RevisionPageType2) => {
445
445
  RevisionPageType2["Document"] = "document";
446
446
  RevisionPageType2["Group"] = "group";
@@ -489,6 +489,7 @@ var CustomizationLocale = /* @__PURE__ */ ((CustomizationLocale2) => {
489
489
  CustomizationLocale2["Ja"] = "ja";
490
490
  CustomizationLocale2["De"] = "de";
491
491
  CustomizationLocale2["Nl"] = "nl";
492
+ CustomizationLocale2["No"] = "no";
492
493
  CustomizationLocale2["PtBr"] = "pt-br";
493
494
  return CustomizationLocale2;
494
495
  })(CustomizationLocale || {});
@@ -582,7 +583,7 @@ var BillingInterval = /* @__PURE__ */ ((BillingInterval2) => {
582
583
  var SiteType = /* @__PURE__ */ ((SiteType2) => {
583
584
  SiteType2["Basic"] = "basic";
584
585
  SiteType2["Premium"] = "premium";
585
- SiteType2["Audience"] = "audience";
586
+ SiteType2["Ultimate"] = "ultimate";
586
587
  SiteType2["LegacyBasic"] = "legacy-basic";
587
588
  SiteType2["LegacyPremium"] = "legacy-premium";
588
589
  return SiteType2;
@@ -708,163 +709,26 @@ var ContentType = /* @__PURE__ */ ((ContentType2) => {
708
709
  return ContentType2;
709
710
  })(ContentType || {});
710
711
  var HttpClient = class {
712
+ baseUrl = "{host}/v1";
713
+ securityData = null;
714
+ securityWorker;
715
+ abortControllers = /* @__PURE__ */ new Map();
716
+ customFetch = (...fetchParams) => fetch(...fetchParams);
717
+ baseApiParams = {
718
+ credentials: "same-origin",
719
+ headers: {},
720
+ redirect: "follow",
721
+ referrerPolicy: "no-referrer"
722
+ };
711
723
  constructor(apiConfig = {}) {
712
- this.baseUrl = "{host}/v1";
713
- this.securityData = null;
714
- this.abortControllers = /* @__PURE__ */ new Map();
715
- this.customFetch = (...fetchParams) => fetch(...fetchParams);
716
- this.baseApiParams = {
717
- credentials: "same-origin",
718
- headers: {},
719
- redirect: "follow",
720
- referrerPolicy: "no-referrer"
721
- };
722
- this.setSecurityData = (data) => {
723
- this.securityData = data;
724
- };
725
- this.contentFormatters = {
726
- ["application/json" /* Json */]: (input) => input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input,
727
- ["text/plain" /* Text */]: (input) => input !== null && typeof input !== "string" ? JSON.stringify(input) : input,
728
- ["multipart/form-data" /* FormData */]: (input) => Object.keys(input || {}).reduce((formData, key) => {
729
- const property = input[key];
730
- formData.append(
731
- key,
732
- property instanceof Blob ? property : typeof property === "object" && property !== null ? JSON.stringify(property) : `${property}`
733
- );
734
- return formData;
735
- }, new FormData()),
736
- ["application/x-www-form-urlencoded" /* UrlEncoded */]: (input) => this.toQueryString(input)
737
- };
738
- this.createAbortSignal = (cancelToken) => {
739
- if (this.abortControllers.has(cancelToken)) {
740
- const abortController2 = this.abortControllers.get(cancelToken);
741
- if (abortController2) {
742
- return abortController2.signal;
743
- }
744
- return void 0;
745
- }
746
- const abortController = new AbortController();
747
- this.abortControllers.set(cancelToken, abortController);
748
- return abortController.signal;
749
- };
750
- this.abortRequest = (cancelToken) => {
751
- const abortController = this.abortControllers.get(cancelToken);
752
- if (abortController) {
753
- abortController.abort();
754
- this.abortControllers.delete(cancelToken);
755
- }
756
- };
757
- this.request = async ({
758
- body,
759
- secure,
760
- path,
761
- type,
762
- query,
763
- format,
764
- baseUrl,
765
- cancelToken,
766
- ...params
767
- }) => {
768
- const secureParams = (typeof secure === "boolean" ? secure : this.baseApiParams.secure) && this.securityWorker && await this.securityWorker(this.securityData) || {};
769
- const requestParams = this.mergeRequestParams(params, secureParams);
770
- const queryString = query && this.toQueryString(query);
771
- const payloadFormatter = this.contentFormatters[type || "application/json" /* Json */];
772
- const responseFormat = format || requestParams.format;
773
- return this.customFetch(
774
- `${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`,
775
- {
776
- ...requestParams,
777
- headers: {
778
- ...requestParams.headers || {},
779
- ...type && type !== "multipart/form-data" /* FormData */ ? { "Content-Type": type } : {}
780
- },
781
- signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
782
- body: typeof body === "undefined" || body === null ? null : payloadFormatter(body)
783
- }
784
- ).then(async (response) => {
785
- const r = response;
786
- r.data = null;
787
- r.error = null;
788
- const data = !responseFormat ? r : await response[responseFormat]().then((data2) => {
789
- if (r.ok) {
790
- r.data = data2;
791
- } else {
792
- throw new Error(`${response.status} ${response.statusText}`);
793
- }
794
- return r;
795
- });
796
- if (cancelToken) {
797
- this.abortControllers.delete(cancelToken);
798
- }
799
- if (!response.ok)
800
- throw new Error(`${response.status} ${response.statusText}`);
801
- return data;
802
- });
803
- };
804
- this.streamRequest = function({
805
- path,
806
- baseUrl,
807
- cancelToken,
808
- secure,
809
- ...params
810
- }) {
811
- return new import_event_iterator.EventIterator((queue) => {
812
- (async () => {
813
- const secureParams = (typeof secure === "boolean" ? secure : this.baseApiParams.secure) && this.securityWorker && await this.securityWorker(this.securityData) || {};
814
- const { query: requestQuery, ...requestParams } = this.mergeRequestParams(
815
- params,
816
- secureParams
817
- );
818
- const queryString = requestQuery ? this.toQueryString(requestQuery) : void 0;
819
- const response = await this.customFetch(
820
- `${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`,
821
- {
822
- ...requestParams,
823
- signal: cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal
824
- }
825
- );
826
- if (!response.ok) {
827
- throw new Error(`${response.status} ${response.statusText}`);
828
- return;
829
- }
830
- const reader = response.body.getReader();
831
- const stop = () => {
832
- reader.cancel();
833
- queue.stop();
834
- };
835
- const parser = createParser((event) => {
836
- if (event.type === "event") {
837
- if (event.data === "done") {
838
- stop();
839
- } else {
840
- const data = JSON.parse(event.data);
841
- queue.push(data);
842
- }
843
- }
844
- });
845
- const decoder = new TextDecoder();
846
- while (true) {
847
- const { done, value } = await reader.read();
848
- if (value) {
849
- parser.feed(decoder.decode(value));
850
- }
851
- if (done) {
852
- break;
853
- }
854
- }
855
- stop();
856
- })().catch((error) => {
857
- queue.fail(error);
858
- });
859
- });
860
- };
861
724
  Object.assign(this, apiConfig);
862
725
  }
726
+ setSecurityData = (data) => {
727
+ this.securityData = data;
728
+ };
863
729
  encodeQueryParam(key, value) {
864
730
  const encodedKey = encodeURIComponent(key);
865
- return `${encodedKey}=${encodeURIComponent(
866
- typeof value === "number" ? value : `${value}`
867
- )}`;
731
+ return `${encodedKey}=${encodeURIComponent(typeof value === "number" ? value : `${value}`)}`;
868
732
  }
869
733
  addQueryParam(query, key) {
870
734
  return this.encodeQueryParam(key, query[key]);
@@ -884,6 +748,19 @@ var HttpClient = class {
884
748
  const queryString = this.toQueryString(rawQuery);
885
749
  return queryString ? `?${queryString}` : "";
886
750
  }
751
+ contentFormatters = {
752
+ ["application/json" /* Json */]: (input) => input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input,
753
+ ["text/plain" /* Text */]: (input) => input !== null && typeof input !== "string" ? JSON.stringify(input) : input,
754
+ ["multipart/form-data" /* FormData */]: (input) => Object.keys(input || {}).reduce((formData, key) => {
755
+ const property = input[key];
756
+ formData.append(
757
+ key,
758
+ property instanceof Blob ? property : typeof property === "object" && property !== null ? JSON.stringify(property) : `${property}`
759
+ );
760
+ return formData;
761
+ }, new FormData()),
762
+ ["application/x-www-form-urlencoded" /* UrlEncoded */]: (input) => this.toQueryString(input)
763
+ };
887
764
  mergeRequestParams(params1, params2) {
888
765
  return {
889
766
  ...this.baseApiParams,
@@ -896,2246 +773,2441 @@ var HttpClient = class {
896
773
  }
897
774
  };
898
775
  }
776
+ createAbortSignal = (cancelToken) => {
777
+ if (this.abortControllers.has(cancelToken)) {
778
+ const abortController2 = this.abortControllers.get(cancelToken);
779
+ if (abortController2) {
780
+ return abortController2.signal;
781
+ }
782
+ return void 0;
783
+ }
784
+ const abortController = new AbortController();
785
+ this.abortControllers.set(cancelToken, abortController);
786
+ return abortController.signal;
787
+ };
788
+ abortRequest = (cancelToken) => {
789
+ const abortController = this.abortControllers.get(cancelToken);
790
+ if (abortController) {
791
+ abortController.abort();
792
+ this.abortControllers.delete(cancelToken);
793
+ }
794
+ };
795
+ request = async ({
796
+ body,
797
+ secure,
798
+ path,
799
+ type,
800
+ query,
801
+ format,
802
+ baseUrl,
803
+ cancelToken,
804
+ ...params
805
+ }) => {
806
+ const secureParams = (typeof secure === "boolean" ? secure : this.baseApiParams.secure) && this.securityWorker && await this.securityWorker(this.securityData) || {};
807
+ const requestParams = this.mergeRequestParams(params, secureParams);
808
+ const queryString = query && this.toQueryString(query);
809
+ const payloadFormatter = this.contentFormatters[type || "application/json" /* Json */];
810
+ const responseFormat = format || requestParams.format;
811
+ return this.customFetch(
812
+ `${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`,
813
+ {
814
+ ...requestParams,
815
+ headers: {
816
+ ...requestParams.headers || {},
817
+ ...type && type !== "multipart/form-data" /* FormData */ ? { "Content-Type": type } : {}
818
+ },
819
+ signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
820
+ body: typeof body === "undefined" || body === null ? null : payloadFormatter(body)
821
+ }
822
+ ).then(async (response) => {
823
+ const r = response;
824
+ r.data = null;
825
+ r.error = null;
826
+ const data = !responseFormat ? r : await response[responseFormat]().then((data2) => {
827
+ if (r.ok) {
828
+ r.data = data2;
829
+ } else {
830
+ throw new Error(`${response.status} ${response.statusText}`);
831
+ }
832
+ return r;
833
+ });
834
+ if (cancelToken) {
835
+ this.abortControllers.delete(cancelToken);
836
+ }
837
+ if (!response.ok)
838
+ throw new Error(`${response.status} ${response.statusText}`);
839
+ return data;
840
+ });
841
+ };
842
+ streamRequest = ({
843
+ path,
844
+ baseUrl,
845
+ cancelToken,
846
+ secure,
847
+ ...params
848
+ }) => {
849
+ return new import_event_iterator.EventIterator((queue) => {
850
+ (async () => {
851
+ const secureParams = (typeof secure === "boolean" ? secure : this.baseApiParams.secure) && this.securityWorker && await this.securityWorker(this.securityData) || {};
852
+ const requestQuery = params.query;
853
+ const requestParams = this.mergeRequestParams(params, secureParams);
854
+ const queryString = requestQuery ? this.toQueryString(requestQuery) : void 0;
855
+ const response = await this.customFetch(
856
+ `${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`,
857
+ {
858
+ ...requestParams,
859
+ signal: cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal
860
+ }
861
+ );
862
+ if (!response.ok) {
863
+ throw new Error(`${response.status} ${response.statusText}`);
864
+ }
865
+ if (!response.body) {
866
+ throw new Error("Response body is empty");
867
+ }
868
+ const reader = response.body.getReader();
869
+ const stop = () => {
870
+ reader.cancel();
871
+ queue.stop();
872
+ };
873
+ const parser = createParser((event) => {
874
+ if (event.type === "event") {
875
+ if (event.data === "done") {
876
+ stop();
877
+ } else {
878
+ const data = JSON.parse(event.data);
879
+ queue.push(data);
880
+ }
881
+ }
882
+ });
883
+ const decoder = new TextDecoder();
884
+ while (true) {
885
+ const { done, value } = await reader.read();
886
+ if (value) {
887
+ parser.feed(decoder.decode(value));
888
+ }
889
+ if (done) {
890
+ break;
891
+ }
892
+ }
893
+ stop();
894
+ })().catch((error) => {
895
+ queue.fail(error);
896
+ });
897
+ });
898
+ };
899
899
  };
900
900
  var Api = class extends HttpClient {
901
- constructor() {
902
- super(...arguments);
903
- this.getApiInformation = (params = {}) => this.request({
904
- path: `/`,
901
+ getApiInformation = (params = {}) => this.request({
902
+ path: `/`,
903
+ method: "GET",
904
+ secure: true,
905
+ format: "json",
906
+ ...params
907
+ });
908
+ search = {
909
+ searchContent: (query, params = {}) => this.request({
910
+ path: `/search`,
905
911
  method: "GET",
912
+ query,
906
913
  secure: true,
907
914
  format: "json",
908
915
  ...params
909
- });
910
- this.search = {
911
- searchContent: (query, params = {}) => this.request({
912
- path: `/search`,
913
- method: "GET",
914
- query,
915
- secure: true,
916
- format: "json",
917
- ...params
918
- }),
919
- askQueryWithGet: (query, params = {}) => this.request({
920
- path: `/search/ask`,
921
- method: "GET",
922
- query,
923
- secure: true,
924
- format: "json",
925
- ...params
926
- }),
927
- askQuery: (data, query, params = {}) => this.request({
928
- path: `/search/ask`,
929
- method: "POST",
930
- query,
931
- body: data,
932
- secure: true,
933
- type: "application/json" /* Json */,
934
- format: "json",
935
- ...params
936
- }),
937
- getRecommendedQuestions: (data, params = {}) => this.request({
938
- path: `/search/questions`,
939
- method: "POST",
940
- body: data,
941
- secure: true,
942
- type: "application/json" /* Json */,
943
- format: "json",
944
- ...params
945
- })
946
- };
947
- this.user = {
948
- getAuthenticatedUser: (params = {}) => this.request({
949
- path: `/user`,
950
- method: "GET",
951
- secure: true,
952
- format: "json",
953
- ...params
954
- })
955
- };
956
- this.users = {
957
- getUserById: (userId, params = {}) => this.request({
958
- path: `/users/${userId}`,
959
- method: "GET",
960
- secure: true,
961
- format: "json",
962
- ...params
963
- })
964
- };
965
- this.spaces = {
966
- getSpaceById: (spaceId, query, params = {}) => this.request({
967
- path: `/spaces/${spaceId}`,
968
- method: "GET",
969
- query,
970
- secure: true,
971
- format: "json",
972
- ...params
973
- }),
974
- updateSpaceById: (spaceId, data, params = {}) => this.request({
975
- path: `/spaces/${spaceId}`,
976
- method: "PATCH",
977
- body: data,
978
- secure: true,
979
- type: "application/json" /* Json */,
980
- format: "json",
981
- ...params
982
- }),
983
- deleteSpaceById: (spaceId, params = {}) => this.request({
984
- path: `/spaces/${spaceId}`,
985
- method: "DELETE",
986
- secure: true,
987
- ...params
988
- }),
989
- duplicateSpace: (spaceId, params = {}) => this.request({
990
- path: `/spaces/${spaceId}/duplicate`,
991
- method: "POST",
992
- secure: true,
993
- format: "json",
994
- ...params
995
- }),
996
- restoreSpace: (spaceId, params = {}) => this.request({
997
- path: `/spaces/${spaceId}/restore`,
998
- method: "POST",
999
- secure: true,
1000
- format: "json",
1001
- ...params
1002
- }),
1003
- moveSpace: (spaceId, data, params = {}) => this.request({
1004
- path: `/spaces/${spaceId}/move`,
1005
- method: "POST",
1006
- body: data,
1007
- secure: true,
1008
- type: "application/json" /* Json */,
1009
- format: "json",
1010
- ...params
1011
- }),
1012
- transferSpace: (spaceId, data, params = {}) => this.request({
1013
- path: `/spaces/${spaceId}/transfer`,
1014
- method: "POST",
1015
- body: data,
1016
- secure: true,
1017
- type: "application/json" /* Json */,
1018
- format: "json",
1019
- ...params
1020
- }),
1021
- getEmbedByUrlInSpace: (spaceId, query, params = {}) => this.request({
1022
- path: `/spaces/${spaceId}/embed`,
1023
- method: "GET",
1024
- query,
1025
- secure: true,
1026
- format: "json",
1027
- ...params
1028
- }),
1029
- searchSpaceContent: (spaceId, query, params = {}) => this.request({
1030
- path: `/spaces/${spaceId}/search`,
1031
- method: "GET",
1032
- query,
1033
- secure: true,
1034
- format: "json",
1035
- ...params
1036
- }),
1037
- askQueryInSpaceWithGet: (spaceId, query, params = {}) => this.request({
1038
- path: `/spaces/${spaceId}/search/ask`,
1039
- method: "GET",
1040
- query,
1041
- secure: true,
1042
- format: "json",
1043
- ...params
1044
- }),
1045
- askQueryInSpace: (spaceId, data, query, params = {}) => this.request({
1046
- path: `/spaces/${spaceId}/search/ask`,
1047
- method: "POST",
1048
- query,
1049
- body: data,
1050
- secure: true,
1051
- type: "application/json" /* Json */,
1052
- format: "json",
1053
- ...params
1054
- }),
1055
- streamAskInSpace: (spaceId, query, params = {}) => this.streamRequest({
1056
- path: `/spaces/${spaceId}/search/ask/stream`,
1057
- method: "GET",
1058
- query,
1059
- secure: true,
1060
- ...params
1061
- }),
1062
- getRecommendedQuestionsInSpace: (spaceId, params = {}) => this.request({
1063
- path: `/spaces/${spaceId}/search/questions`,
1064
- method: "GET",
1065
- secure: true,
1066
- format: "json",
1067
- ...params
1068
- }),
1069
- streamRecommendedQuestionsInSpace: (spaceId, params = {}) => this.streamRequest({
1070
- path: `/spaces/${spaceId}/search/questions/stream`,
1071
- method: "GET",
1072
- secure: true,
1073
- ...params
1074
- }),
1075
- importGitRepository: (spaceId, data, params = {}) => this.request({
1076
- path: `/spaces/${spaceId}/git/import`,
1077
- method: "POST",
1078
- body: data,
1079
- secure: true,
1080
- type: "application/json" /* Json */,
1081
- ...params
1082
- }),
1083
- exportToGitRepository: (spaceId, data, params = {}) => this.request({
1084
- path: `/spaces/${spaceId}/git/export`,
1085
- method: "POST",
1086
- body: data,
1087
- secure: true,
1088
- type: "application/json" /* Json */,
1089
- ...params
1090
- }),
1091
- syncGitRepository: (spaceId, data, params = {}) => this.request({
1092
- path: `/spaces/${spaceId}/git/sync`,
1093
- method: "POST",
1094
- body: data,
1095
- secure: true,
1096
- type: "application/json" /* Json */,
1097
- ...params
1098
- }),
1099
- getSpaceGitInfo: (spaceId, params = {}) => this.request({
1100
- path: `/spaces/${spaceId}/git/info`,
1101
- method: "GET",
1102
- secure: true,
1103
- format: "json",
1104
- ...params
1105
- }),
1106
- getContentAnalyticsForSpaceById: (spaceId, params = {}) => this.request({
1107
- path: `/spaces/${spaceId}/insights/content`,
1108
- method: "GET",
1109
- secure: true,
1110
- format: "json",
1111
- ...params
1112
- }),
1113
- getSearchAnalyticsForSpaceById: (spaceId, query, params = {}) => this.request({
1114
- path: `/spaces/${spaceId}/insights/search`,
1115
- method: "GET",
1116
- query,
1117
- secure: true,
1118
- format: "json",
1119
- ...params
1120
- }),
1121
- getTrafficAnalyticsForSpaceById: (spaceId, query, params = {}) => this.request({
1122
- path: `/spaces/${spaceId}/insights/traffic`,
1123
- method: "GET",
1124
- query,
1125
- secure: true,
1126
- format: "json",
1127
- ...params
1128
- }),
1129
- trackViewInSpaceById: (spaceId, data, params = {}) => this.request({
1130
- path: `/spaces/${spaceId}/insights/track_view`,
1131
- method: "POST",
1132
- body: data,
1133
- secure: true,
1134
- type: "application/json" /* Json */,
1135
- ...params
1136
- }),
1137
- inviteToSpace: (spaceId, data, params = {}) => this.request({
1138
- path: `/spaces/${spaceId}/permissions`,
1139
- method: "POST",
1140
- body: data,
1141
- secure: true,
1142
- type: "application/json" /* Json */,
1143
- ...params
1144
- }),
1145
- removeTeamFromSpace: (spaceId, teamId, params = {}) => this.request({
1146
- path: `/spaces/${spaceId}/permissions/teams/${teamId}`,
1147
- method: "DELETE",
1148
- secure: true,
1149
- ...params
1150
- }),
1151
- getCurrentRevision: (spaceId, query, params = {}) => this.request({
1152
- path: `/spaces/${spaceId}/content`,
1153
- method: "GET",
1154
- query,
1155
- secure: true,
1156
- format: "json",
1157
- ...params
1158
- }),
1159
- importContent: (spaceId, data, params = {}) => this.request({
1160
- path: `/spaces/${spaceId}/content/import`,
1161
- method: "POST",
1162
- body: data,
1163
- secure: true,
1164
- type: "application/json" /* Json */,
1165
- format: "json",
1166
- ...params
1167
- }),
1168
- listPages: (spaceId, query, params = {}) => this.request({
1169
- path: `/spaces/${spaceId}/content/pages`,
1170
- method: "GET",
1171
- query,
1172
- secure: true,
1173
- format: "json",
1174
- ...params
1175
- }),
1176
- listFiles: (spaceId, query, params = {}) => this.request({
1177
- path: `/spaces/${spaceId}/content/files`,
1178
- method: "GET",
1179
- query,
1180
- secure: true,
1181
- format: "json",
1182
- ...params
1183
- }),
1184
- getFileById: (spaceId, fileId, query, params = {}) => this.request({
1185
- path: `/spaces/${spaceId}/content/files/${fileId}`,
1186
- method: "GET",
1187
- query,
1188
- secure: true,
1189
- format: "json",
1190
- ...params
1191
- }),
1192
- listSpaceFileBacklinks: (spaceId, fileId, query, params = {}) => this.request({
1193
- path: `/spaces/${spaceId}/content/files/${fileId}/backlinks`,
1194
- method: "GET",
1195
- query,
1196
- secure: true,
1197
- format: "json",
1198
- ...params
1199
- }),
1200
- getPageById: (spaceId, pageId, query, params = {}) => this.request({
1201
- path: `/spaces/${spaceId}/content/page/${pageId}`,
1202
- method: "GET",
1203
- query,
1204
- secure: true,
1205
- format: "json",
1206
- ...params
1207
- }),
1208
- listSpacePageBacklinks: (spaceId, pageId, query, params = {}) => this.request({
1209
- path: `/spaces/${spaceId}/content/pages/${pageId}/backlinks`,
1210
- method: "GET",
1211
- query,
1212
- secure: true,
1213
- format: "json",
1214
- ...params
1215
- }),
1216
- importContentInPageById: (spaceId, pageId, data, params = {}) => this.request({
1217
- path: `/spaces/${spaceId}/content/page/${pageId}/import`,
1218
- method: "POST",
1219
- body: data,
1220
- secure: true,
1221
- type: "application/json" /* Json */,
1222
- format: "json",
1223
- ...params
1224
- }),
1225
- getPageByPath: (spaceId, pagePath, query, params = {}) => this.request({
1226
- path: `/spaces/${spaceId}/content/path/${pagePath}`,
1227
- method: "GET",
1228
- query,
1229
- secure: true,
1230
- format: "json",
1231
- ...params
1232
- }),
1233
- getDocumentById: (spaceId, documentId, query, params = {}) => this.request({
1234
- path: `/spaces/${spaceId}/documents/${documentId}`,
1235
- method: "GET",
1236
- query,
1237
- secure: true,
1238
- format: "json",
1239
- ...params
1240
- }),
1241
- createChangeRequest: (spaceId, data, params = {}) => this.request({
1242
- path: `/spaces/${spaceId}/change-requests`,
1243
- method: "POST",
1244
- body: data,
1245
- secure: true,
1246
- type: "application/json" /* Json */,
1247
- format: "json",
1248
- ...params
1249
- }),
1250
- listChangeRequestsForSpace: (spaceId, query, params = {}) => this.request({
1251
- path: `/spaces/${spaceId}/change-requests`,
1252
- method: "GET",
1253
- query,
1254
- secure: true,
1255
- format: "json",
1256
- ...params
1257
- }),
1258
- getChangeRequestById: (spaceId, changeRequestId, params = {}) => this.request({
1259
- path: `/spaces/${spaceId}/change-requests/${changeRequestId}`,
1260
- method: "GET",
1261
- secure: true,
1262
- format: "json",
1263
- ...params
1264
- }),
1265
- updateChangeRequestById: (spaceId, changeRequestId, data, params = {}) => this.request({
1266
- path: `/spaces/${spaceId}/change-requests/${changeRequestId}`,
1267
- method: "PATCH",
1268
- body: data,
1269
- secure: true,
1270
- type: "application/json" /* Json */,
1271
- format: "json",
1272
- ...params
1273
- }),
1274
- mergeChangeRequest: (spaceId, changeRequestId, params = {}) => this.request({
1275
- path: `/spaces/${spaceId}/change-requests/${changeRequestId}/merge`,
1276
- method: "POST",
1277
- secure: true,
1278
- format: "json",
1279
- ...params
1280
- }),
1281
- updateChangeRequest: (spaceId, changeRequestId, params = {}) => this.request({
1282
- path: `/spaces/${spaceId}/change-requests/${changeRequestId}/update`,
1283
- method: "POST",
1284
- secure: true,
1285
- format: "json",
1286
- ...params
1287
- }),
1288
- getReviewsByChangeRequestId: (spaceId, changeRequestId, query, params = {}) => this.request({
1289
- path: `/spaces/${spaceId}/change-requests/${changeRequestId}/reviews`,
1290
- method: "GET",
1291
- query,
1292
- secure: true,
1293
- format: "json",
1294
- ...params
1295
- }),
1296
- submitChangeRequestReview: (spaceId, changeRequestId, data, params = {}) => this.request({
1297
- path: `/spaces/${spaceId}/change-requests/${changeRequestId}/reviews`,
1298
- method: "POST",
1299
- body: data,
1300
- secure: true,
1301
- type: "application/json" /* Json */,
1302
- format: "json",
1303
- ...params
1304
- }),
1305
- getRequestedReviewersByChangeRequestId: (spaceId, changeRequestId, query, params = {}) => this.request({
1306
- path: `/spaces/${spaceId}/change-requests/${changeRequestId}/requested-reviewers`,
1307
- method: "GET",
1308
- query,
1309
- secure: true,
1310
- format: "json",
1311
- ...params
1312
- }),
1313
- requestReviewersForChangeRequest: (spaceId, changeRequestId, data, params = {}) => this.request({
1314
- path: `/spaces/${spaceId}/change-requests/${changeRequestId}/requested-reviewers`,
1315
- method: "POST",
1316
- body: data,
1317
- secure: true,
1318
- type: "application/json" /* Json */,
1319
- format: "json",
1320
- ...params
1321
- }),
1322
- listChangeRequestLinks: (spaceId, changeRequestId, query, params = {}) => this.request({
1323
- path: `/spaces/${spaceId}/change-requests/${changeRequestId}/links`,
1324
- method: "GET",
1325
- query,
1326
- secure: true,
1327
- format: "json",
1328
- ...params
1329
- }),
1330
- listCommentsInChangeRequest: (spaceId, changeRequestId, query, params = {}) => this.request({
1331
- path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments`,
1332
- method: "GET",
1333
- query,
1334
- secure: true,
1335
- format: "json",
1336
- ...params
1337
- }),
1338
- postCommentInChangeRequest: (spaceId, changeRequestId, data, params = {}) => this.request({
1339
- path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments`,
1340
- method: "POST",
1341
- body: data,
1342
- secure: true,
1343
- type: "application/json" /* Json */,
1344
- format: "json",
1345
- ...params
1346
- }),
1347
- getCommentInChangeRequest: (spaceId, changeRequestId, commentId, query, params = {}) => this.request({
1348
- path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments/${commentId}`,
1349
- method: "GET",
1350
- query,
1351
- secure: true,
1352
- format: "json",
1353
- ...params
1354
- }),
1355
- deleteCommentInChangeRequest: (spaceId, changeRequestId, commentId, params = {}) => this.request({
1356
- path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments/${commentId}`,
1357
- method: "DELETE",
1358
- secure: true,
1359
- ...params
1360
- }),
1361
- updateCommentInChangeRequest: (spaceId, changeRequestId, commentId, data, params = {}) => this.request({
1362
- path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments/${commentId}`,
1363
- method: "PUT",
1364
- body: data,
1365
- secure: true,
1366
- type: "application/json" /* Json */,
1367
- format: "json",
1368
- ...params
1369
- }),
1370
- listCommentRepliesInChangeRequest: (spaceId, changeRequestId, commentId, query, params = {}) => this.request({
1371
- path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments/${commentId}/replies`,
1372
- method: "GET",
1373
- query,
1374
- secure: true,
1375
- format: "json",
1376
- ...params
1377
- }),
1378
- postCommentReplyInChangeRequest: (spaceId, changeRequestId, commentId, data, query, params = {}) => this.request({
1379
- path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments/${commentId}/replies`,
1380
- method: "POST",
1381
- query,
1382
- body: data,
1383
- secure: true,
1384
- type: "application/json" /* Json */,
1385
- format: "json",
1386
- ...params
1387
- }),
1388
- getCommentReplyInChangeRequest: (spaceId, changeRequestId, commentId, commentReplyId, query, params = {}) => this.request({
1389
- path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments/${commentId}/replies/${commentReplyId}`,
1390
- method: "GET",
1391
- query,
1392
- secure: true,
1393
- format: "json",
1394
- ...params
1395
- }),
1396
- updateCommentReplyInChangeRequest: (spaceId, changeRequestId, commentId, commentReplyId, data, params = {}) => this.request({
1397
- path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments/${commentId}/replies/${commentReplyId}`,
1398
- method: "PUT",
1399
- body: data,
1400
- secure: true,
1401
- type: "application/json" /* Json */,
1402
- format: "json",
1403
- ...params
1404
- }),
1405
- deleteCommentReplyInChangeRequest: (spaceId, changeRequestId, commentId, commentReplyId, params = {}) => this.request({
1406
- path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments/${commentId}/replies/${commentReplyId}`,
1407
- method: "DELETE",
1408
- secure: true,
1409
- ...params
1410
- }),
1411
- getContributorsByChangeRequestId: (spaceId, changeRequestId, params = {}) => this.request({
1412
- path: `/spaces/${spaceId}/change-requests/${changeRequestId}/contributors`,
1413
- method: "GET",
1414
- secure: true,
1415
- format: "json",
1416
- ...params
1417
- }),
1418
- getRevisionOfChangeRequestById: (spaceId, changeRequestId, query, params = {}) => this.request({
1419
- path: `/spaces/${spaceId}/change-requests/${changeRequestId}/content`,
1420
- method: "GET",
1421
- query,
1422
- secure: true,
1423
- format: "json",
1424
- ...params
1425
- }),
1426
- importContentInChangeRequest: (spaceId, changeRequestId, data, params = {}) => this.request({
1427
- path: `/spaces/${spaceId}/change-requests/${changeRequestId}/content/import`,
1428
- method: "POST",
1429
- body: data,
1430
- secure: true,
1431
- type: "application/json" /* Json */,
1432
- format: "json",
1433
- ...params
1434
- }),
1435
- listPagesInChangeRequest: (spaceId, changeRequestId, query, params = {}) => this.request({
1436
- path: `/spaces/${spaceId}/change-requests/${changeRequestId}/content/pages`,
1437
- method: "GET",
1438
- query,
1439
- secure: true,
1440
- format: "json",
1441
- ...params
1442
- }),
1443
- listFilesInChangeRequestById: (spaceId, changeRequestId, query, params = {}) => this.request({
1444
- path: `/spaces/${spaceId}/change-requests/${changeRequestId}/content/files`,
1445
- method: "GET",
1446
- query,
1447
- secure: true,
1448
- format: "json",
1449
- ...params
1450
- }),
1451
- getFileInChangeRequestById: (spaceId, changeRequestId, fileId, query, params = {}) => this.request({
1452
- path: `/spaces/${spaceId}/change-requests/${changeRequestId}/content/files/${fileId}`,
1453
- method: "GET",
1454
- query,
1455
- secure: true,
1456
- format: "json",
1457
- ...params
1458
- }),
1459
- listChangeRequestFileBacklinks: (spaceId, changeRequestId, fileId, query, params = {}) => this.request({
1460
- path: `/spaces/${spaceId}/change-requests/${changeRequestId}/content/files/${fileId}/backlinks`,
1461
- method: "GET",
1462
- query,
1463
- secure: true,
1464
- format: "json",
1465
- ...params
1466
- }),
1467
- getPageInChangeRequestById: (spaceId, changeRequestId, pageId, query, params = {}) => this.request({
1468
- path: `/spaces/${spaceId}/change-requests/${changeRequestId}/content/page/${pageId}`,
1469
- method: "GET",
1470
- query,
1471
- secure: true,
1472
- format: "json",
1473
- ...params
1474
- }),
1475
- listChangeRequestPageBacklinks: (spaceId, changeRequestId, pageId, query, params = {}) => this.request({
1476
- path: `/spaces/${spaceId}/change-requests/${changeRequestId}/content/page/${pageId}/backlinks`,
1477
- method: "GET",
1478
- query,
1479
- secure: true,
1480
- format: "json",
1481
- ...params
1482
- }),
1483
- importContentInChangeRequestPageById: (spaceId, changeRequestId, pageId, data, params = {}) => this.request({
1484
- path: `/spaces/${spaceId}/change-requests/${changeRequestId}/content/page/${pageId}/import`,
1485
- method: "POST",
1486
- body: data,
1487
- secure: true,
1488
- type: "application/json" /* Json */,
1489
- format: "json",
1490
- ...params
1491
- }),
1492
- getPageInChangeRequestByPath: (spaceId, changeRequestId, pagePath, query, params = {}) => this.request({
1493
- path: `/spaces/${spaceId}/change-requests/${changeRequestId}/content/path/${pagePath}`,
1494
- method: "GET",
1495
- query,
1496
- secure: true,
1497
- format: "json",
1498
- ...params
1499
- }),
1500
- touchContentInChangeRequest: (spaceId, changeRequestId, data, params = {}) => this.request({
1501
- path: `/spaces/${spaceId}/change-requests/${changeRequestId}/touched-content`,
1502
- method: "POST",
1503
- body: data,
1504
- secure: true,
1505
- type: "application/json" /* Json */,
1506
- format: "json",
1507
- ...params
1508
- }),
1509
- getChangeRequestPdf: (spaceId, changeRequestId, query, params = {}) => this.request({
1510
- path: `/spaces/${spaceId}/change-requests/${changeRequestId}/pdf`,
1511
- method: "GET",
1512
- query,
1513
- secure: true,
1514
- format: "json",
1515
- ...params
1516
- }),
1517
- getRevisionById: (spaceId, revisionId, query, params = {}) => this.request({
1518
- path: `/spaces/${spaceId}/revisions/${revisionId}`,
1519
- method: "GET",
1520
- query,
1521
- secure: true,
1522
- format: "json",
1523
- ...params
1524
- }),
1525
- getRevisionSemanticChanges: (spaceId, revisionId, query, params = {}) => this.request({
1526
- path: `/spaces/${spaceId}/revisions/${revisionId}/changes`,
1527
- method: "GET",
1528
- query,
1529
- secure: true,
1530
- format: "json",
1531
- ...params
1532
- }),
1533
- listPagesInRevisionById: (spaceId, revisionId, query, params = {}) => this.request({
1534
- path: `/spaces/${spaceId}/revisions/${revisionId}/pages`,
1535
- method: "GET",
1536
- query,
1537
- secure: true,
1538
- format: "json",
1539
- ...params
1540
- }),
1541
- listFilesInRevisionById: (spaceId, revisionId, query, params = {}) => this.request({
1542
- path: `/spaces/${spaceId}/revisions/${revisionId}/files`,
1543
- method: "GET",
1544
- query,
1545
- secure: true,
1546
- format: "json",
1547
- ...params
1548
- }),
1549
- getFileInRevisionById: (spaceId, revisionId, fileId, query, params = {}) => this.request({
1550
- path: `/spaces/${spaceId}/revisions/${revisionId}/files/${fileId}`,
1551
- method: "GET",
1552
- query,
1553
- secure: true,
1554
- format: "json",
1555
- ...params
1556
- }),
1557
- getPageInRevisionById: (spaceId, revisionId, pageId, query, params = {}) => this.request({
1558
- path: `/spaces/${spaceId}/revisions/${revisionId}/page/${pageId}`,
1559
- method: "GET",
1560
- query,
1561
- secure: true,
1562
- format: "json",
1563
- ...params
1564
- }),
1565
- getPageInRevisionByPath: (spaceId, revisionId, pagePath, query, params = {}) => this.request({
1566
- path: `/spaces/${spaceId}/revisions/${revisionId}/path/${pagePath}`,
1567
- method: "GET",
1568
- query,
1569
- secure: true,
1570
- format: "json",
1571
- ...params
1572
- }),
1573
- listCommentsInSpace: (spaceId, query, params = {}) => this.request({
1574
- path: `/spaces/${spaceId}/comments`,
1575
- method: "GET",
1576
- query,
1577
- secure: true,
1578
- format: "json",
1579
- ...params
1580
- }),
1581
- postCommentInSpace: (spaceId, data, params = {}) => this.request({
1582
- path: `/spaces/${spaceId}/comments`,
1583
- method: "POST",
1584
- body: data,
1585
- secure: true,
1586
- type: "application/json" /* Json */,
1587
- format: "json",
1588
- ...params
1589
- }),
1590
- getCommentInSpace: (spaceId, commentId, query, params = {}) => this.request({
1591
- path: `/spaces/${spaceId}/comments/${commentId}`,
1592
- method: "GET",
1593
- query,
1594
- secure: true,
1595
- format: "json",
1596
- ...params
1597
- }),
1598
- deleteCommentInSpace: (spaceId, commentId, params = {}) => this.request({
1599
- path: `/spaces/${spaceId}/comments/${commentId}`,
1600
- method: "DELETE",
1601
- secure: true,
1602
- ...params
1603
- }),
1604
- updateCommentInSpace: (spaceId, commentId, data, params = {}) => this.request({
1605
- path: `/spaces/${spaceId}/comments/${commentId}`,
1606
- method: "PUT",
1607
- body: data,
1608
- secure: true,
1609
- type: "application/json" /* Json */,
1610
- format: "json",
1611
- ...params
1612
- }),
1613
- listCommentRepliesInSpace: (spaceId, commentId, query, params = {}) => this.request({
1614
- path: `/spaces/${spaceId}/comments/${commentId}/replies`,
1615
- method: "GET",
1616
- query,
1617
- secure: true,
1618
- format: "json",
1619
- ...params
1620
- }),
1621
- postCommentReplyInSpace: (spaceId, commentId, data, params = {}) => this.request({
1622
- path: `/spaces/${spaceId}/comments/${commentId}/replies`,
1623
- method: "POST",
1624
- body: data,
1625
- secure: true,
1626
- type: "application/json" /* Json */,
1627
- format: "json",
1628
- ...params
1629
- }),
1630
- getCommentReplyInSpace: (spaceId, commentId, commentReplyId, query, params = {}) => this.request({
1631
- path: `/spaces/${spaceId}/comments/${commentId}/replies/${commentReplyId}`,
1632
- method: "GET",
1633
- query,
1634
- secure: true,
1635
- format: "json",
1636
- ...params
1637
- }),
1638
- updateCommentReplyInSpace: (spaceId, commentId, commentReplyId, data, params = {}) => this.request({
1639
- path: `/spaces/${spaceId}/comments/${commentId}/replies/${commentReplyId}`,
1640
- method: "PUT",
1641
- body: data,
1642
- secure: true,
1643
- type: "application/json" /* Json */,
1644
- format: "json",
1645
- ...params
1646
- }),
1647
- deleteCommentReplyInSpace: (spaceId, commentId, commentReplyId, params = {}) => this.request({
1648
- path: `/spaces/${spaceId}/comments/${commentId}/replies/${commentReplyId}`,
1649
- method: "DELETE",
1650
- secure: true,
1651
- ...params
1652
- }),
1653
- listPermissionsAggregateInSpace: (spaceId, query, params = {}) => this.request({
1654
- path: `/spaces/${spaceId}/permissions/aggregate`,
1655
- method: "GET",
1656
- query,
1657
- secure: true,
1658
- format: "json",
1659
- ...params
1660
- }),
1661
- getSpacePublishingCustomizationById: (spaceId, params = {}) => this.request({
1662
- path: `/spaces/${spaceId}/publishing/customization`,
1663
- method: "GET",
1664
- secure: true,
1665
- format: "json",
1666
- ...params
1667
- }),
1668
- updateSpacePublishingCustomizationById: (spaceId, data, params = {}) => this.request({
1669
- path: `/spaces/${spaceId}/publishing/customization`,
1670
- method: "PUT",
1671
- body: data,
1672
- secure: true,
1673
- type: "application/json" /* Json */,
1674
- format: "json",
1675
- ...params
1676
- }),
1677
- listSpaceIntegrations: (spaceId, query, params = {}) => this.request({
1678
- path: `/spaces/${spaceId}/integrations`,
1679
- method: "GET",
1680
- query,
1681
- secure: true,
1682
- format: "json",
1683
- ...params
1684
- }),
1685
- listSpaceIntegrationsBlocks: (spaceId, params = {}) => this.request({
1686
- path: `/spaces/${spaceId}/integration-blocks`,
1687
- method: "GET",
1688
- secure: true,
1689
- format: "json",
1690
- ...params
1691
- }),
1692
- listSpaceIntegrationScripts: (spaceId, params = {}) => this.request({
1693
- path: `/spaces/${spaceId}/integration-scripts`,
1694
- method: "GET",
1695
- secure: true,
1696
- format: "json",
1697
- ...params
1698
- }),
1699
- getSpaceCustomFields: (spaceId, params = {}) => this.request({
1700
- path: `/spaces/${spaceId}/custom-fields`,
1701
- method: "GET",
1702
- secure: true,
1703
- format: "json",
1704
- ...params
1705
- }),
1706
- updateSpaceCustomFields: (spaceId, data, params = {}) => this.request({
1707
- path: `/spaces/${spaceId}/custom-fields`,
1708
- method: "PATCH",
1709
- body: data,
1710
- secure: true,
1711
- type: "application/json" /* Json */,
1712
- ...params
1713
- }),
1714
- getPageFeedback: (spaceId, pageId, visitorId, params = {}) => this.request({
1715
- path: `/spaces/${spaceId}/pages/${pageId}/feedbacks/${visitorId}`,
1716
- method: "GET",
1717
- secure: true,
1718
- format: "json",
1719
- ...params
1720
- }),
1721
- createPageFeedback: (spaceId, pageId, visitorId, data, params = {}) => this.request({
1722
- path: `/spaces/${spaceId}/pages/${pageId}/feedbacks/${visitorId}`,
1723
- method: "PUT",
1724
- body: data,
1725
- secure: true,
1726
- type: "application/json" /* Json */,
1727
- format: "json",
1728
- ...params
1729
- }),
1730
- getSpacePdf: (spaceId, query, params = {}) => this.request({
1731
- path: `/spaces/${spaceId}/pdf`,
1732
- method: "GET",
1733
- query,
1734
- secure: true,
1735
- format: "json",
1736
- ...params
1737
- }),
1738
- createSpaceShareLink: (spaceId, data, params = {}) => this.request({
1739
- path: `/spaces/${spaceId}/share-links`,
1740
- method: "POST",
1741
- body: data,
1742
- secure: true,
1743
- type: "application/json" /* Json */,
1744
- format: "json",
1745
- ...params
1746
- }),
1747
- updateSpaceShareLinkById: (spaceId, shareLinkId, data, params = {}) => this.request({
1748
- path: `/spaces/${spaceId}/share-links/${shareLinkId}`,
1749
- method: "PATCH",
1750
- body: data,
1751
- secure: true,
1752
- type: "application/json" /* Json */,
1753
- format: "json",
1754
- ...params
1755
- }),
1756
- deleteSpaceShareLinkById: (spaceId, shareLinkId, params = {}) => this.request({
1757
- path: `/spaces/${spaceId}/share-links/${shareLinkId}`,
1758
- method: "DELETE",
1759
- secure: true,
1760
- ...params
1761
- }),
1762
- listSpaceLinks: (spaceId, query, params = {}) => this.request({
1763
- path: `/spaces/${spaceId}/links`,
1764
- method: "GET",
1765
- query,
1766
- secure: true,
1767
- format: "json",
1768
- ...params
1769
- })
1770
- };
1771
- this.collections = {
1772
- getCollectionById: (collectionId, params = {}) => this.request({
1773
- path: `/collections/${collectionId}`,
1774
- method: "GET",
1775
- secure: true,
1776
- format: "json",
1777
- ...params
1778
- }),
1779
- updateCollectionById: (collectionId, data, params = {}) => this.request({
1780
- path: `/collections/${collectionId}`,
1781
- method: "PATCH",
1782
- body: data,
1783
- secure: true,
1784
- type: "application/json" /* Json */,
1785
- format: "json",
1786
- ...params
1787
- }),
1788
- deleteCollectionById: (collectionId, params = {}) => this.request({
1789
- path: `/collections/${collectionId}`,
1790
- method: "DELETE",
1791
- secure: true,
1792
- ...params
1793
- }),
1794
- listSpacesInCollectionById: (collectionId, query, params = {}) => this.request({
1795
- path: `/collections/${collectionId}/spaces`,
1796
- method: "GET",
1797
- query,
1798
- secure: true,
1799
- format: "json",
1800
- ...params
1801
- }),
1802
- moveCollection: (collectionId, data, params = {}) => this.request({
1803
- path: `/collections/${collectionId}/move`,
1804
- method: "POST",
1805
- body: data,
1806
- secure: true,
1807
- type: "application/json" /* Json */,
1808
- format: "json",
1809
- ...params
1810
- }),
1811
- transferCollection: (collectionId, data, params = {}) => this.request({
1812
- path: `/collections/${collectionId}/transfer`,
1813
- method: "POST",
1814
- body: data,
1815
- secure: true,
1816
- type: "application/json" /* Json */,
1817
- format: "json",
1818
- ...params
1819
- }),
1820
- listPermissionsAggregateInCollection: (collectionId, query, params = {}) => this.request({
1821
- path: `/collections/${collectionId}/permissions/aggregate`,
1822
- method: "GET",
1823
- query,
1824
- secure: true,
1825
- format: "json",
1826
- ...params
1827
- }),
1828
- getCollectionPublishingCustomizationById: (collectionId, params = {}) => this.request({
1829
- path: `/collections/${collectionId}/publishing/customization`,
1830
- method: "GET",
1831
- secure: true,
1832
- format: "json",
1833
- ...params
1834
- }),
1835
- updateCollectionPublishingCustomizationById: (collectionId, data, params = {}) => this.request({
1836
- path: `/collections/${collectionId}/publishing/customization`,
1837
- method: "PUT",
1838
- body: data,
1839
- secure: true,
1840
- type: "application/json" /* Json */,
1841
- format: "json",
1842
- ...params
1843
- }),
1844
- createCollectionShareLink: (collectionId, data, params = {}) => this.request({
1845
- path: `/collections/${collectionId}/share-links`,
1846
- method: "POST",
1847
- body: data,
1848
- secure: true,
1849
- type: "application/json" /* Json */,
1850
- format: "json",
1851
- ...params
1852
- }),
1853
- updateCollectionShareLinkById: (collectionId, shareLinkId, data, params = {}) => this.request({
1854
- path: `/collections/${collectionId}/share-links/${shareLinkId}`,
1855
- method: "PATCH",
1856
- body: data,
1857
- secure: true,
1858
- type: "application/json" /* Json */,
1859
- format: "json",
1860
- ...params
1861
- }),
1862
- deleteCollectionShareLinkById: (collectionId, shareLinkId, params = {}) => this.request({
1863
- path: `/collections/${collectionId}/share-links/${shareLinkId}`,
1864
- method: "DELETE",
1865
- secure: true,
1866
- ...params
1867
- })
1868
- };
1869
- this.integrations = {
1870
- listIntegrations: (query, params = {}) => this.request({
1871
- path: `/integrations`,
1872
- method: "GET",
1873
- query,
1874
- secure: true,
1875
- format: "json",
1876
- ...params
1877
- }),
1878
- getIntegrationByName: (integrationName, params = {}) => this.request({
1879
- path: `/integrations/${integrationName}`,
1880
- method: "GET",
1881
- secure: true,
1882
- format: "json",
1883
- ...params
1884
- }),
1885
- publishIntegration: (integrationName, data, params = {}) => this.request({
1886
- path: `/integrations/${integrationName}`,
1887
- method: "POST",
1888
- body: data,
1889
- secure: true,
1890
- type: "application/json" /* Json */,
1891
- format: "json",
1892
- ...params
1893
- }),
1894
- unpublishIntegration: (integrationName, params = {}) => this.request({
1895
- path: `/integrations/${integrationName}`,
1896
- method: "DELETE",
1897
- secure: true,
1898
- ...params
1899
- }),
1900
- listIntegrationInstallations: (integrationName, query, params = {}) => this.request({
1901
- path: `/integrations/${integrationName}/installations`,
1902
- method: "GET",
1903
- query,
1904
- secure: true,
1905
- format: "json",
1906
- ...params
1907
- }),
1908
- installIntegration: (integrationName, data, params = {}) => this.request({
1909
- path: `/integrations/${integrationName}/installations`,
1910
- method: "POST",
1911
- body: data,
1912
- secure: true,
1913
- type: "application/json" /* Json */,
1914
- format: "json",
1915
- ...params
1916
- }),
1917
- listIntegrationEvents: (integrationName, query, params = {}) => this.request({
1918
- path: `/integrations/${integrationName}/events`,
1919
- method: "GET",
1920
- query,
1921
- secure: true,
1922
- format: "json",
1923
- ...params
1924
- }),
1925
- getIntegrationEvent: (integrationName, eventId, params = {}) => this.request({
1926
- path: `/integrations/${integrationName}/events/${eventId}`,
1927
- method: "GET",
1928
- secure: true,
1929
- format: "json",
1930
- ...params
1931
- }),
1932
- listIntegrationSpaceInstallations: (integrationName, query, params = {}) => this.request({
1933
- path: `/integrations/${integrationName}/spaces`,
1934
- method: "GET",
1935
- query,
1936
- secure: true,
1937
- format: "json",
1938
- ...params
1939
- }),
1940
- updateIntegrationDevSpace: (integrationName, spaceId, data, params = {}) => this.request({
1941
- path: `/integrations/${integrationName}/spaces/${spaceId}/dev`,
1942
- method: "PUT",
1943
- body: data,
1944
- secure: true,
1945
- type: "application/json" /* Json */,
1946
- ...params
1947
- }),
1948
- removeIntegrationDevSpace: (integrationName, spaceId, params = {}) => this.request({
1949
- path: `/integrations/${integrationName}/spaces/${spaceId}/dev`,
1950
- method: "DELETE",
1951
- secure: true,
1952
- ...params
1953
- }),
1954
- renderIntegrationUiWithGet: (integrationName, query, params = {}) => this.request({
1955
- path: `/integrations/${integrationName}/render`,
1956
- method: "GET",
1957
- query,
1958
- secure: true,
1959
- format: "json",
1960
- ...params
1961
- }),
1962
- renderIntegrationUiWithPost: (integrationName, data, params = {}) => this.request({
1963
- path: `/integrations/${integrationName}/render`,
1964
- method: "POST",
1965
- body: data,
1966
- secure: true,
1967
- type: "application/json" /* Json */,
1968
- format: "json",
1969
- ...params
1970
- }),
1971
- queueIntegrationTask: (integrationName, data, params = {}) => this.request({
1972
- path: `/integrations/${integrationName}/tasks`,
1973
- method: "POST",
1974
- body: data,
1975
- secure: true,
1976
- type: "application/json" /* Json */,
1977
- ...params
1978
- }),
1979
- getIntegrationInstallationById: (integrationName, installationId, params = {}) => this.request({
1980
- path: `/integrations/${integrationName}/installations/${installationId}`,
1981
- method: "GET",
1982
- secure: true,
1983
- format: "json",
1984
- ...params
1985
- }),
1986
- updateIntegrationInstallation: (integrationName, installationId, data, params = {}) => this.request({
1987
- path: `/integrations/${integrationName}/installations/${installationId}`,
1988
- method: "PATCH",
1989
- body: data,
1990
- secure: true,
1991
- type: "application/json" /* Json */,
1992
- format: "json",
1993
- ...params
1994
- }),
1995
- uninstallIntegration: (integrationName, installationId, params = {}) => this.request({
1996
- path: `/integrations/${integrationName}/installations/${installationId}`,
1997
- method: "DELETE",
1998
- secure: true,
1999
- ...params
2000
- }),
2001
- createIntegrationInstallationToken: (integrationName, installationId, params = {}) => this.request({
2002
- path: `/integrations/${integrationName}/installations/${installationId}/tokens`,
2003
- method: "POST",
2004
- secure: true,
2005
- format: "json",
2006
- ...params
2007
- }),
2008
- listIntegrationInstallationSpaces: (integrationName, installationId, query, params = {}) => this.request({
2009
- path: `/integrations/${integrationName}/installations/${installationId}/spaces`,
2010
- method: "GET",
2011
- query,
2012
- secure: true,
2013
- format: "json",
2014
- ...params
2015
- }),
2016
- installIntegrationOnSpace: (integrationName, installationId, data, params = {}) => this.request({
2017
- path: `/integrations/${integrationName}/installations/${installationId}/spaces`,
2018
- method: "POST",
2019
- body: data,
2020
- secure: true,
2021
- type: "application/json" /* Json */,
2022
- format: "json",
2023
- ...params
2024
- }),
2025
- getIntegrationSpaceInstallation: (integrationName, installationId, spaceId, params = {}) => this.request({
2026
- path: `/integrations/${integrationName}/installations/${installationId}/spaces/${spaceId}`,
2027
- method: "GET",
2028
- secure: true,
2029
- format: "json",
2030
- ...params
2031
- }),
2032
- updateIntegrationSpaceInstallation: (integrationName, installationId, spaceId, data, params = {}) => this.request({
2033
- path: `/integrations/${integrationName}/installations/${installationId}/spaces/${spaceId}`,
2034
- method: "PATCH",
2035
- body: data,
2036
- secure: true,
2037
- type: "application/json" /* Json */,
2038
- format: "json",
2039
- ...params
2040
- }),
2041
- uninstallIntegrationFromSpace: (integrationName, installationId, spaceId, params = {}) => this.request({
2042
- path: `/integrations/${integrationName}/installations/${installationId}/spaces/${spaceId}`,
2043
- method: "DELETE",
2044
- secure: true,
2045
- ...params
2046
- }),
2047
- listIntegrationInstallationSites: (integrationName, installationId, query, params = {}) => this.request({
2048
- path: `/integrations/${integrationName}/installations/${installationId}/sites`,
2049
- method: "GET",
2050
- query,
2051
- secure: true,
2052
- format: "json",
2053
- ...params
2054
- }),
2055
- installIntegrationOnSite: (integrationName, installationId, data, params = {}) => this.request({
2056
- path: `/integrations/${integrationName}/installations/${installationId}/sites`,
2057
- method: "POST",
2058
- body: data,
2059
- secure: true,
2060
- type: "application/json" /* Json */,
2061
- format: "json",
2062
- ...params
2063
- }),
2064
- getIntegrationSiteInstallation: (integrationName, installationId, siteId, params = {}) => this.request({
2065
- path: `/integrations/${integrationName}/installations/${installationId}/sites/${siteId}`,
2066
- method: "GET",
2067
- secure: true,
2068
- format: "json",
2069
- ...params
2070
- }),
2071
- updateIntegrationSiteInstallation: (integrationName, installationId, siteId, data, params = {}) => this.request({
2072
- path: `/integrations/${integrationName}/installations/${installationId}/sites/${siteId}`,
2073
- method: "PATCH",
2074
- body: data,
2075
- secure: true,
2076
- type: "application/json" /* Json */,
2077
- format: "json",
2078
- ...params
2079
- }),
2080
- uninstallIntegrationFromSite: (integrationName, installationId, siteId, params = {}) => this.request({
2081
- path: `/integrations/${integrationName}/installations/${installationId}/sites/${siteId}`,
2082
- method: "DELETE",
2083
- secure: true,
2084
- ...params
2085
- })
2086
- };
2087
- this.orgs = {
2088
- listOrganizationsForAuthenticatedUser: (query, params = {}) => this.request({
2089
- path: `/orgs`,
2090
- method: "GET",
2091
- query,
2092
- secure: true,
2093
- format: "json",
2094
- ...params
2095
- }),
2096
- createOrganization: (data, params = {}) => this.request({
2097
- path: `/orgs`,
2098
- method: "POST",
2099
- body: data,
2100
- secure: true,
2101
- type: "application/json" /* Json */,
2102
- format: "json",
2103
- ...params
2104
- }),
2105
- getOrganizationById: (organizationId, params = {}) => this.request({
2106
- path: `/orgs/${organizationId}`,
2107
- method: "GET",
2108
- secure: true,
2109
- format: "json",
2110
- ...params
2111
- }),
2112
- deleteOrganizationById: (organizationId, params = {}) => this.request({
2113
- path: `/orgs/${organizationId}`,
2114
- method: "DELETE",
2115
- secure: true,
2116
- ...params
2117
- }),
2118
- updateOrganizationById: (organizationId, data, params = {}) => this.request({
2119
- path: `/orgs/${organizationId}`,
2120
- method: "PATCH",
2121
- body: data,
2122
- secure: true,
2123
- type: "application/json" /* Json */,
2124
- format: "json",
2125
- ...params
2126
- }),
2127
- listMembersInOrganizationById: (organizationId, query, params = {}) => this.request({
2128
- path: `/orgs/${organizationId}/members`,
2129
- method: "GET",
2130
- query,
2131
- secure: true,
2132
- format: "json",
2133
- ...params
2134
- }),
2135
- getMemberInOrganizationById: (organizationId, userId, params = {}) => this.request({
2136
- path: `/orgs/${organizationId}/members/${userId}`,
2137
- method: "GET",
2138
- secure: true,
2139
- format: "json",
2140
- ...params
2141
- }),
2142
- updateMemberInOrganizationById: (organizationId, userId, data, params = {}) => this.request({
2143
- path: `/orgs/${organizationId}/members/${userId}`,
2144
- method: "PATCH",
2145
- body: data,
2146
- secure: true,
2147
- type: "application/json" /* Json */,
2148
- format: "json",
2149
- ...params
2150
- }),
2151
- removeMemberFromOrganizationById: (organizationId, userId, params = {}) => this.request({
2152
- path: `/orgs/${organizationId}/members/${userId}`,
2153
- method: "DELETE",
2154
- secure: true,
2155
- ...params
2156
- }),
2157
- updateOrganizationMemberLastSeenAt: (organizationId, params = {}) => this.request({
2158
- path: `/orgs/${organizationId}/ping`,
2159
- method: "POST",
2160
- secure: true,
2161
- ...params
2162
- }),
2163
- setUserAsSsoMemberForOrganization: (organizationId, userId, params = {}) => this.request({
2164
- path: `/orgs/${organizationId}/members/${userId}/sso`,
2165
- method: "POST",
2166
- secure: true,
2167
- format: "json",
2168
- ...params
2169
- }),
2170
- listSpacesForOrganizationMember: (organizationId, userId, query, params = {}) => this.request({
2171
- path: `/orgs/${organizationId}/members/${userId}/spaces`,
2172
- method: "GET",
2173
- query,
2174
- secure: true,
2175
- format: "json",
2176
- ...params
2177
- }),
2178
- listTeamsForOrganizationMember: (organizationId, userId, query, params = {}) => this.request({
2179
- path: `/orgs/${organizationId}/members/${userId}/teams`,
2180
- method: "GET",
2181
- query,
2182
- secure: true,
2183
- format: "json",
2184
- ...params
2185
- }),
2186
- listTeamsInOrganizationById: (organizationId, query, params = {}) => this.request({
2187
- path: `/orgs/${organizationId}/teams`,
2188
- method: "GET",
2189
- query,
2190
- secure: true,
2191
- format: "json",
2192
- ...params
2193
- }),
2194
- createOrganizationTeam: (organizationId, data, params = {}) => this.request({
2195
- path: `/orgs/${organizationId}/teams`,
2196
- method: "PUT",
2197
- body: data,
2198
- secure: true,
2199
- type: "application/json" /* Json */,
2200
- format: "json",
2201
- ...params
2202
- }),
2203
- getTeamInOrganizationById: (organizationId, teamId, params = {}) => this.request({
2204
- path: `/orgs/${organizationId}/teams/${teamId}`,
2205
- method: "GET",
2206
- secure: true,
2207
- format: "json",
2208
- ...params
2209
- }),
2210
- updateTeamInOrganizationById: (organizationId, teamId, data, params = {}) => this.request({
2211
- path: `/orgs/${organizationId}/teams/${teamId}`,
2212
- method: "PATCH",
2213
- body: data,
2214
- secure: true,
2215
- type: "application/json" /* Json */,
2216
- format: "json",
2217
- ...params
2218
- }),
2219
- removeTeamFromOrganizationById: (organizationId, teamId, params = {}) => this.request({
2220
- path: `/orgs/${organizationId}/teams/${teamId}`,
2221
- method: "DELETE",
2222
- secure: true,
2223
- ...params
2224
- }),
2225
- updateMembersInOrganizationTeam: (organizationId, teamId, data, params = {}) => this.request({
2226
- path: `/orgs/${organizationId}/teams/${teamId}/members`,
2227
- method: "PUT",
2228
- body: data,
2229
- secure: true,
2230
- type: "application/json" /* Json */,
2231
- ...params
2232
- }),
2233
- listTeamMembersInOrganizationById: (organizationId, teamId, query, params = {}) => this.request({
2234
- path: `/orgs/${organizationId}/teams/${teamId}/members`,
2235
- method: "GET",
2236
- query,
2237
- secure: true,
2238
- format: "json",
2239
- ...params
2240
- }),
2241
- addMemberToOrganizationTeamById: (organizationId, teamId, userId, data, params = {}) => this.request({
2242
- path: `/orgs/${organizationId}/teams/${teamId}/members/${userId}`,
2243
- method: "PUT",
2244
- body: data,
2245
- secure: true,
2246
- type: "application/json" /* Json */,
2247
- ...params
2248
- }),
2249
- deleteMemberFromOrganizationTeamById: (organizationId, teamId, userId, params = {}) => this.request({
2250
- path: `/orgs/${organizationId}/teams/${teamId}/members/${userId}`,
2251
- method: "DELETE",
2252
- secure: true,
2253
- ...params
2254
- }),
2255
- inviteUsersToOrganization: (organizationId, data, params = {}) => this.request({
2256
- path: `/orgs/${organizationId}/invites`,
2257
- method: "POST",
2258
- body: data,
2259
- secure: true,
2260
- type: "application/json" /* Json */,
2261
- format: "json",
2262
- ...params
2263
- }),
2264
- joinOrganizationWithInvite: (organizationId, inviteId, params = {}) => this.request({
2265
- path: `/orgs/${organizationId}/invites/${inviteId}`,
2266
- method: "POST",
2267
- secure: true,
2268
- format: "json",
2269
- ...params
2270
- }),
2271
- createOrganizationInvite: (organizationId, data, params = {}) => this.request({
2272
- path: `/orgs/${organizationId}/link-invites`,
2273
- method: "POST",
2274
- body: data,
2275
- secure: true,
2276
- type: "application/json" /* Json */,
2277
- format: "json",
2278
- ...params
2279
- }),
2280
- updateOrganizationInviteById: (organizationId, inviteId, data, params = {}) => this.request({
2281
- path: `/orgs/${organizationId}/link-invites/${inviteId}`,
2282
- method: "PATCH",
2283
- body: data,
2284
- secure: true,
2285
- type: "application/json" /* Json */,
2286
- format: "json",
2287
- ...params
2288
- }),
2289
- deleteOrganizationInviteById: (organizationId, inviteId, params = {}) => this.request({
2290
- path: `/orgs/${organizationId}/link-invites/${inviteId}`,
2291
- method: "DELETE",
2292
- secure: true,
2293
- ...params
2294
- }),
2295
- upgradeOrganizationPlan: (organizationId, data, params = {}) => this.request({
2296
- path: `/orgs/${organizationId}/billing`,
2297
- method: "POST",
2298
- body: data,
2299
- secure: true,
2300
- type: "application/json" /* Json */,
2301
- format: "json",
2302
- ...params
2303
- }),
2304
- getOrganizationBillingPortal: (organizationId, params = {}) => this.request({
2305
- path: `/orgs/${organizationId}/billing`,
2306
- method: "GET",
2307
- secure: true,
2308
- format: "json",
2309
- ...params
2310
- }),
2311
- previewBillingInvoice: (organizationId, query, params = {}) => this.request({
2312
- path: `/orgs/${organizationId}/billing/preview`,
2313
- method: "GET",
2314
- query,
2315
- secure: true,
2316
- format: "json",
2317
- ...params
2318
- }),
2319
- requestOrganizationUpgrade: (organizationId, params = {}) => this.request({
2320
- path: `/orgs/${organizationId}/request_upgrade`,
2321
- method: "POST",
2322
- secure: true,
2323
- format: "json",
2324
- ...params
2325
- }),
2326
- searchOrganizationContent: (organizationId, query, params = {}) => this.request({
2327
- path: `/orgs/${organizationId}/search`,
2328
- method: "GET",
2329
- query,
2330
- secure: true,
2331
- format: "json",
2332
- ...params
2333
- }),
2334
- listSpacesInOrganizationById: (organizationId, query, params = {}) => this.request({
2335
- path: `/orgs/${organizationId}/spaces`,
2336
- method: "GET",
2337
- query,
2338
- secure: true,
2339
- format: "json",
2340
- ...params
2341
- }),
2342
- createSpace: (organizationId, data, params = {}) => this.request({
2343
- path: `/orgs/${organizationId}/spaces`,
2344
- method: "POST",
2345
- body: data,
2346
- secure: true,
2347
- type: "application/json" /* Json */,
2348
- format: "json",
2349
- ...params
2350
- }),
2351
- listSpacesWithGitSyncInOrganizationById: (organizationId, query, params = {}) => this.request({
2352
- path: `/orgs/${organizationId}/spaces/gitsync`,
2353
- method: "GET",
2354
- query,
2355
- secure: true,
2356
- format: "json",
2357
- ...params
2358
- }),
2359
- listCollectionsInOrganizationById: (organizationId, query, params = {}) => this.request({
2360
- path: `/orgs/${organizationId}/collections`,
2361
- method: "GET",
2362
- query,
2363
- secure: true,
2364
- format: "json",
2365
- ...params
2366
- }),
2367
- createCollection: (organizationId, data, params = {}) => this.request({
2368
- path: `/orgs/${organizationId}/collections`,
2369
- method: "POST",
2370
- body: data,
2371
- secure: true,
2372
- type: "application/json" /* Json */,
2373
- format: "json",
2374
- ...params
2375
- }),
2376
- listOrganizationCustomFields: (organizationId, query, params = {}) => this.request({
2377
- path: `/orgs/${organizationId}/custom-fields`,
2378
- method: "GET",
2379
- query,
2380
- secure: true,
2381
- format: "json",
2382
- ...params
2383
- }),
2384
- createOrganizationCustomField: (organizationId, data, params = {}) => this.request({
2385
- path: `/orgs/${organizationId}/custom-fields`,
2386
- method: "POST",
2387
- body: data,
2388
- secure: true,
2389
- type: "application/json" /* Json */,
2390
- format: "json",
2391
- ...params
2392
- }),
2393
- getOrganizationCustomFieldByName: (organizationId, fieldName, params = {}) => this.request({
2394
- path: `/orgs/${organizationId}/custom-fields/${fieldName}`,
2395
- method: "GET",
2396
- secure: true,
2397
- format: "json",
2398
- ...params
2399
- }),
2400
- updateOrganizationCustomField: (organizationId, fieldName, data, params = {}) => this.request({
2401
- path: `/orgs/${organizationId}/custom-fields/${fieldName}`,
2402
- method: "PATCH",
2403
- body: data,
2404
- secure: true,
2405
- type: "application/json" /* Json */,
2406
- format: "json",
2407
- ...params
2408
- }),
2409
- deleteOrganizationCustomField: (organizationId, fieldName, params = {}) => this.request({
2410
- path: `/orgs/${organizationId}/custom-fields/${fieldName}`,
2411
- method: "DELETE",
2412
- secure: true,
2413
- ...params
2414
- }),
2415
- listOrganizationIntegrations: (organizationId, query, params = {}) => this.request({
2416
- path: `/orgs/${organizationId}/integrations`,
2417
- method: "GET",
2418
- query,
2419
- secure: true,
2420
- format: "json",
2421
- ...params
2422
- }),
2423
- getOrganizationIntegrationStatus: (organizationId, integrationName, params = {}) => this.request({
2424
- path: `/orgs/${organizationId}/integrations/${integrationName}/installation_status`,
2425
- method: "GET",
2426
- secure: true,
2427
- format: "json",
2428
- ...params
2429
- }),
2430
- listOrganizationInstallations: (organizationId, query, params = {}) => this.request({
2431
- path: `/orgs/${organizationId}/installations`,
2432
- method: "GET",
2433
- query,
2434
- secure: true,
2435
- format: "json",
2436
- ...params
2437
- }),
2438
- listOrganizationIntegrationsStatus: (organizationId, query, params = {}) => this.request({
2439
- path: `/orgs/${organizationId}/integrations/installations-status`,
2440
- method: "GET",
2441
- query,
2442
- secure: true,
2443
- format: "json",
2444
- ...params
2445
- }),
2446
- listOrgExperimentalFeatures: (organizationId, params = {}) => this.request({
2447
- path: `/orgs/${organizationId}/experiments`,
2448
- method: "GET",
2449
- secure: true,
2450
- format: "json",
2451
- ...params
2452
- }),
2453
- updateOrgExperimentalFeatures: (organizationId, data, params = {}) => this.request({
2454
- path: `/orgs/${organizationId}/experiments`,
2455
- method: "POST",
2456
- body: data,
2457
- secure: true,
2458
- type: "application/json" /* Json */,
2459
- ...params
2460
- }),
2461
- listSamlProvidersInOrganizationById: (organizationId, query, params = {}) => this.request({
2462
- path: `/orgs/${organizationId}/saml`,
2463
- method: "GET",
2464
- query,
2465
- secure: true,
2466
- format: "json",
2467
- ...params
2468
- }),
2469
- createOrganizationSamlProvider: (organizationId, data, params = {}) => this.request({
2470
- path: `/orgs/${organizationId}/saml`,
2471
- method: "POST",
2472
- body: data,
2473
- secure: true,
2474
- type: "application/json" /* Json */,
2475
- format: "json",
2476
- ...params
2477
- }),
2478
- getOrganizationSamlProviderById: (organizationId, samlProviderId, params = {}) => this.request({
2479
- path: `/orgs/${organizationId}/saml/${samlProviderId}`,
2480
- method: "GET",
2481
- secure: true,
2482
- format: "json",
2483
- ...params
2484
- }),
2485
- updateOrganizationSamlProvider: (organizationId, samlProviderId, data, params = {}) => this.request({
2486
- path: `/orgs/${organizationId}/saml/${samlProviderId}`,
2487
- method: "PATCH",
2488
- body: data,
2489
- secure: true,
2490
- type: "application/json" /* Json */,
2491
- format: "json",
2492
- ...params
2493
- }),
2494
- deleteOrganizationSamlProvider: (organizationId, samlProviderId, params = {}) => this.request({
2495
- path: `/orgs/${organizationId}/saml/${samlProviderId}`,
2496
- method: "DELETE",
2497
- secure: true,
2498
- ...params
2499
- }),
2500
- getUsageForOrganizationById: (organizationId, params = {}) => this.request({
2501
- path: `/orgs/${organizationId}/usage`,
2502
- method: "GET",
2503
- secure: true,
2504
- format: "json",
2505
- ...params
2506
- }),
2507
- getCollectionsUsageForOrganizationById: (organizationId, params = {}) => this.request({
2508
- path: `/orgs/${organizationId}/usage/collections`,
2509
- method: "GET",
2510
- secure: true,
2511
- format: "json",
2512
- ...params
2513
- }),
2514
- getSpacesUsageForOrganizationById: (organizationId, params = {}) => this.request({
2515
- path: `/orgs/${organizationId}/usage/spaces`,
2516
- method: "GET",
2517
- secure: true,
2518
- format: "json",
2519
- ...params
2520
- }),
2521
- getSitesUsageForOrganizationById: (organizationId, params = {}) => this.request({
2522
- path: `/orgs/${organizationId}/usage/sites`,
2523
- method: "GET",
2524
- secure: true,
2525
- format: "json",
2526
- ...params
2527
- }),
2528
- getTeamsUsageForOrganizationById: (organizationId, params = {}) => this.request({
2529
- path: `/orgs/${organizationId}/usage/teams`,
2530
- method: "GET",
2531
- secure: true,
2532
- format: "json",
2533
- ...params
2534
- }),
2535
- getMembersUsageForOrganizationById: (organizationId, params = {}) => this.request({
2536
- path: `/orgs/${organizationId}/usage/members`,
2537
- method: "GET",
2538
- secure: true,
2539
- format: "json",
2540
- ...params
2541
- }),
2542
- getTeamMembersUsageForOrganizationById: (organizationId, params = {}) => this.request({
2543
- path: `/orgs/${organizationId}/usage/team-members`,
2544
- method: "GET",
2545
- secure: true,
2546
- format: "json",
2547
- ...params
2548
- }),
2549
- listCaptures: (organizationId, query, params = {}) => this.request({
2550
- path: `/orgs/${organizationId}/captures`,
2551
- method: "GET",
2552
- query,
2553
- secure: true,
2554
- format: "json",
2555
- ...params
2556
- }),
2557
- startCapture: (organizationId, data, params = {}) => this.request({
2558
- path: `/orgs/${organizationId}/captures`,
2559
- method: "POST",
2560
- body: data,
2561
- secure: true,
2562
- type: "application/json" /* Json */,
2563
- format: "json",
2564
- ...params
2565
- }),
2566
- getCapture: (organizationId, captureId, query, params = {}) => this.request({
2567
- path: `/orgs/${organizationId}/captures/${captureId}`,
2568
- method: "GET",
2569
- query,
2570
- secure: true,
2571
- format: "json",
2572
- ...params
2573
- }),
2574
- addEventsToCapture: (organizationId, captureId, data, params = {}) => this.request({
2575
- path: `/orgs/${organizationId}/captures/${captureId}/events`,
2576
- method: "POST",
2577
- body: data,
2578
- secure: true,
2579
- type: "application/json" /* Json */,
2580
- ...params
2581
- }),
2582
- stopCapture: (organizationId, captureId, data, query, params = {}) => this.request({
2583
- path: `/orgs/${organizationId}/captures/${captureId}/stop`,
2584
- method: "POST",
2585
- query,
2586
- body: data,
2587
- secure: true,
2588
- type: "application/json" /* Json */,
2589
- format: "json",
2590
- ...params
2591
- }),
2592
- listSnippets: (organizationId, query, params = {}) => this.request({
2593
- path: `/orgs/${organizationId}/snippets`,
2594
- method: "GET",
2595
- query,
2596
- secure: true,
2597
- format: "json",
2598
- ...params
2599
- }),
2600
- createSnippet: (organizationId, data, params = {}) => this.request({
2601
- path: `/orgs/${organizationId}/snippets`,
2602
- method: "POST",
2603
- body: data,
2604
- secure: true,
2605
- type: "application/json" /* Json */,
2606
- format: "json",
2607
- ...params
2608
- }),
2609
- getSnippet: (organizationId, snippetId, params = {}) => this.request({
2610
- path: `/orgs/${organizationId}/snippets/${snippetId}`,
2611
- method: "GET",
2612
- secure: true,
2613
- format: "json",
2614
- ...params
2615
- }),
2616
- deleteSnippet: (organizationId, snippetId, params = {}) => this.request({
2617
- path: `/orgs/${organizationId}/snippets/${snippetId}`,
2618
- method: "DELETE",
2619
- secure: true,
2620
- ...params
2621
- }),
2622
- updateSnippet: (organizationId, snippetId, data, params = {}) => this.request({
2623
- path: `/orgs/${organizationId}/snippets/${snippetId}`,
2624
- method: "PUT",
2625
- body: data,
2626
- secure: true,
2627
- type: "application/json" /* Json */,
2628
- format: "json",
2629
- ...params
2630
- }),
2631
- moveSnippet: (organizationId, snippetId, data, params = {}) => this.request({
2632
- path: `/orgs/${organizationId}/snippets/${snippetId}/move`,
2633
- method: "POST",
2634
- body: data,
2635
- secure: true,
2636
- type: "application/json" /* Json */,
2637
- format: "json",
2638
- ...params
2639
- }),
2640
- getSnippetSuggestedLocations: (organizationId, snippetId, query, params = {}) => this.request({
2641
- path: `/orgs/${organizationId}/snippets/${snippetId}/move`,
2642
- method: "GET",
2643
- query,
2644
- secure: true,
2645
- format: "json",
2646
- ...params
2647
- }),
2648
- listSyncedBlocks: (organizationId, query, params = {}) => this.request({
2649
- path: `/orgs/${organizationId}/synced-blocks`,
2650
- method: "GET",
2651
- query,
2652
- secure: true,
2653
- format: "json",
2654
- ...params
2655
- }),
2656
- createSyncedBlock: (organizationId, data, params = {}) => this.request({
2657
- path: `/orgs/${organizationId}/synced-blocks`,
2658
- method: "POST",
2659
- body: data,
2660
- secure: true,
2661
- type: "application/json" /* Json */,
2662
- format: "json",
2663
- ...params
2664
- }),
2665
- getSyncedBlock: (organizationId, syncedBlockId, params = {}) => this.request({
2666
- path: `/orgs/${organizationId}/synced-blocks/${syncedBlockId}`,
2667
- method: "GET",
2668
- secure: true,
2669
- format: "json",
2670
- ...params
2671
- }),
2672
- updateSyncedBlock: (organizationId, syncedBlockId, data, params = {}) => this.request({
2673
- path: `/orgs/${organizationId}/synced-blocks/${syncedBlockId}`,
2674
- method: "PUT",
2675
- body: data,
2676
- secure: true,
2677
- type: "application/json" /* Json */,
2678
- ...params
2679
- }),
2680
- getSyncedBlockContent: (organizationId, syncedBlockId, params = {}) => this.request({
2681
- path: `/orgs/${organizationId}/synced-blocks/${syncedBlockId}/content`,
2682
- method: "GET",
2683
- secure: true,
2684
- format: "json",
2685
- ...params
2686
- }),
2687
- getSyncedBlockBacklinks: (organizationId, syncedBlockId, query, params = {}) => this.request({
2688
- path: `/orgs/${organizationId}/synced-blocks/${syncedBlockId}/backlinks`,
2689
- method: "GET",
2690
- query,
2691
- secure: true,
2692
- format: "json",
2693
- ...params
2694
- }),
2695
- listSyncedBlockSpaces: (organizationId, syncedBlockId, query, params = {}) => this.request({
2696
- path: `/orgs/${organizationId}/synced-blocks/${syncedBlockId}/usage/spaces`,
2697
- method: "GET",
2698
- query,
2699
- secure: true,
2700
- format: "json",
2701
- ...params
2702
- }),
2703
- askInOrganization: (organizationId, data, query, params = {}) => this.request({
2704
- path: `/orgs/${organizationId}/ask`,
2705
- method: "POST",
2706
- query,
2707
- body: data,
2708
- secure: true,
2709
- type: "application/json" /* Json */,
2710
- format: "json",
2711
- ...params
2712
- }),
2713
- getRecommendedQuestionsInOrganization: (organizationId, params = {}) => this.request({
2714
- path: `/orgs/${organizationId}/ask/questions`,
2715
- method: "GET",
2716
- secure: true,
2717
- format: "json",
2718
- ...params
2719
- }),
2720
- streamRecommendedQuestionsInOrganization: (organizationId, params = {}) => this.streamRequest({
2721
- path: `/orgs/${organizationId}/ask/questions/stream`,
2722
- method: "GET",
2723
- secure: true,
2724
- ...params
2725
- }),
2726
- streamAskInOrganization: (organizationId, query, params = {}) => this.streamRequest({
2727
- path: `/orgs/${organizationId}/ask/stream`,
2728
- method: "GET",
2729
- query,
2730
- secure: true,
2731
- ...params
2732
- }),
2733
- listSites: (organizationId, query, params = {}) => this.request({
2734
- path: `/orgs/${organizationId}/sites`,
2735
- method: "GET",
2736
- query,
2737
- secure: true,
2738
- format: "json",
2739
- ...params
2740
- }),
2741
- createSite: (organizationId, data, params = {}) => this.request({
2742
- path: `/orgs/${organizationId}/sites`,
2743
- method: "POST",
2744
- body: data,
2745
- secure: true,
2746
- type: "application/json" /* Json */,
2747
- format: "json",
2748
- ...params
2749
- }),
2750
- previewSitePublishCheckout: (organizationId, query, params = {}) => this.request({
2751
- path: `/orgs/${organizationId}/sites/publishing/checkout`,
2752
- method: "GET",
2753
- query,
2754
- secure: true,
2755
- format: "json",
2756
- ...params
2757
- }),
2758
- getSiteById: (organizationId, siteId, params = {}) => this.request({
2759
- path: `/orgs/${organizationId}/sites/${siteId}`,
2760
- method: "GET",
2761
- secure: true,
2762
- format: "json",
2763
- ...params
2764
- }),
2765
- updateSiteById: (organizationId, siteId, data, params = {}) => this.request({
2766
- path: `/orgs/${organizationId}/sites/${siteId}`,
2767
- method: "PATCH",
2768
- body: data,
2769
- secure: true,
2770
- type: "application/json" /* Json */,
2771
- format: "json",
2772
- ...params
2773
- }),
2774
- deleteSiteById: (organizationId, siteId, params = {}) => this.request({
2775
- path: `/orgs/${organizationId}/sites/${siteId}`,
2776
- method: "DELETE",
2777
- secure: true,
2778
- ...params
2779
- }),
2780
- publishSite: (organizationId, siteId, params = {}) => this.request({
2781
- path: `/orgs/${organizationId}/sites/${siteId}/publish`,
2782
- method: "POST",
2783
- secure: true,
2784
- format: "json",
2785
- ...params
2786
- }),
2787
- unpublishSite: (organizationId, siteId, params = {}) => this.request({
2788
- path: `/orgs/${organizationId}/sites/${siteId}/unpublish`,
2789
- method: "POST",
2790
- secure: true,
2791
- format: "json",
2792
- ...params
2793
- }),
2794
- listSiteShareLinks: (organizationId, siteId, query, params = {}) => this.request({
2795
- path: `/orgs/${organizationId}/sites/${siteId}/share-links`,
2796
- method: "GET",
2797
- query,
2798
- secure: true,
2799
- format: "json",
2800
- ...params
2801
- }),
2802
- createSiteShareLink: (organizationId, siteId, data, params = {}) => this.request({
2803
- path: `/orgs/${organizationId}/sites/${siteId}/share-links`,
2804
- method: "POST",
2805
- body: data,
2806
- secure: true,
2807
- type: "application/json" /* Json */,
2808
- format: "json",
2809
- ...params
2810
- }),
2811
- updateSiteShareLinkById: (organizationId, siteId, shareLinkId, data, params = {}) => this.request({
2812
- path: `/orgs/${organizationId}/sites/${siteId}/share-links/${shareLinkId}`,
2813
- method: "PATCH",
2814
- body: data,
2815
- secure: true,
2816
- type: "application/json" /* Json */,
2817
- format: "json",
2818
- ...params
2819
- }),
2820
- deleteSiteShareLinkById: (organizationId, siteId, shareLinkId, params = {}) => this.request({
2821
- path: `/orgs/${organizationId}/sites/${siteId}/share-links/${shareLinkId}`,
2822
- method: "DELETE",
2823
- secure: true,
2824
- ...params
2825
- }),
2826
- updateSitePlan: (organizationId, siteId, data, query, params = {}) => this.request({
2827
- path: `/orgs/${organizationId}/sites/${siteId}/plan`,
2828
- method: "POST",
2829
- query,
2830
- body: data,
2831
- secure: true,
2832
- type: "application/json" /* Json */,
2833
- format: "json",
2834
- ...params
2835
- }),
2836
- previewSitePlanUpdate: (organizationId, siteId, query, params = {}) => this.request({
2837
- path: `/orgs/${organizationId}/sites/${siteId}/plan`,
2838
- method: "GET",
2839
- query,
2840
- secure: true,
2841
- format: "json",
2842
- ...params
2843
- }),
2844
- getSitePublishingAuthById: (organizationId, siteId, params = {}) => this.request({
2845
- path: `/orgs/${organizationId}/sites/${siteId}/publishing/auth`,
2846
- method: "GET",
2847
- secure: true,
2848
- format: "json",
2849
- ...params
2850
- }),
2851
- updateSitePublishingAuthById: (organizationId, siteId, data, params = {}) => this.request({
2852
- path: `/orgs/${organizationId}/sites/${siteId}/publishing/auth`,
2853
- method: "PATCH",
2854
- body: data,
2855
- secure: true,
2856
- type: "application/json" /* Json */,
2857
- format: "json",
2858
- ...params
2859
- }),
2860
- regenerateSitePublishingAuthById: (organizationId, siteId, params = {}) => this.request({
2861
- path: `/orgs/${organizationId}/sites/${siteId}/publishing/auth/regenerate`,
2862
- method: "POST",
2863
- secure: true,
2864
- format: "json",
2865
- ...params
2866
- }),
2867
- getSitePublishingPreviewById: (organizationId, siteId, query, params = {}) => this.request({
2868
- path: `/orgs/${organizationId}/sites/${siteId}/publishing/preview`,
2869
- method: "GET",
2870
- query,
2871
- secure: true,
2872
- format: "json",
2873
- ...params
2874
- }),
2875
- getSiteCustomizationById: (organizationId, siteId, query, params = {}) => this.request({
2876
- path: `/orgs/${organizationId}/sites/${siteId}/customization`,
2877
- method: "GET",
2878
- query,
2879
- secure: true,
2880
- format: "json",
2881
- ...params
2882
- }),
2883
- updateSiteCustomizationById: (organizationId, siteId, data, params = {}) => this.request({
2884
- path: `/orgs/${organizationId}/sites/${siteId}/customization`,
2885
- method: "PUT",
2886
- body: data,
2887
- secure: true,
2888
- type: "application/json" /* Json */,
2889
- format: "json",
2890
- ...params
2891
- }),
2892
- getSiteRawCustomizationById: (organizationId, siteId, params = {}) => this.request({
2893
- path: `/orgs/${organizationId}/sites/${siteId}/customization/raw`,
2894
- method: "GET",
2895
- secure: true,
2896
- format: "json",
2897
- ...params
2898
- }),
2899
- listSiteIntegrationScripts: (organizationId, siteId, params = {}) => this.request({
2900
- path: `/orgs/${organizationId}/sites/${siteId}/integration-scripts`,
2901
- method: "GET",
2902
- secure: true,
2903
- format: "json",
2904
- ...params
2905
- }),
2906
- listSiteIntegrations: (organizationId, siteId, query, params = {}) => this.request({
2907
- path: `/orgs/${organizationId}/sites/${siteId}/integrations`,
2908
- method: "GET",
2909
- query,
2910
- secure: true,
2911
- format: "json",
2912
- ...params
2913
- }),
2914
- addSpaceToSite: (organizationId, siteId, data, params = {}) => this.request({
2915
- path: `/orgs/${organizationId}/sites/${siteId}/site-spaces`,
2916
- method: "POST",
2917
- body: data,
2918
- secure: true,
2919
- type: "application/json" /* Json */,
2920
- format: "json",
2921
- ...params
2922
- }),
2923
- listSiteSpaces: (organizationId, siteId, query, params = {}) => this.request({
2924
- path: `/orgs/${organizationId}/sites/${siteId}/site-spaces`,
2925
- method: "GET",
2926
- query,
2927
- secure: true,
2928
- format: "json",
2929
- ...params
2930
- }),
2931
- searchSiteContent: (organizationId, siteId, data, query, params = {}) => this.request({
2932
- path: `/orgs/${organizationId}/sites/${siteId}/search`,
2933
- method: "POST",
2934
- query,
2935
- body: data,
2936
- secure: true,
2937
- type: "application/json" /* Json */,
2938
- format: "json",
2939
- ...params
2940
- }),
2941
- updateSiteSpaceById: (organizationId, siteId, siteSpaceId, data, params = {}) => this.request({
2942
- path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}`,
2943
- method: "PATCH",
2944
- body: data,
2945
- secure: true,
2946
- type: "application/json" /* Json */,
2947
- format: "json",
2948
- ...params
2949
- }),
2950
- deleteSiteSpaceById: (organizationId, siteId, siteSpaceId, params = {}) => this.request({
2951
- path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}`,
2952
- method: "DELETE",
2953
- secure: true,
2954
- ...params
2955
- }),
2956
- getSiteSpaceCustomizationById: (organizationId, siteId, siteSpaceId, query, params = {}) => this.request({
2957
- path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}/customization`,
2958
- method: "GET",
2959
- query,
2960
- secure: true,
2961
- format: "json",
2962
- ...params
2963
- }),
2964
- overrideSiteSpaceCustomizationById: (organizationId, siteId, siteSpaceId, data, params = {}) => this.request({
2965
- path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}/customization`,
2966
- method: "PATCH",
2967
- body: data,
2968
- secure: true,
2969
- type: "application/json" /* Json */,
2970
- format: "json",
2971
- ...params
2972
- }),
2973
- getSiteSpaceRawCustomizationById: (organizationId, siteId, siteSpaceId, params = {}) => this.request({
2974
- path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}/customization/raw`,
2975
- method: "GET",
2976
- secure: true,
2977
- format: "json",
2978
- ...params
2979
- }),
2980
- getContentAnalyticsForSiteSpaceById: (organizationId, siteId, siteSpaceId, params = {}) => this.request({
2981
- path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}/insights/content`,
2982
- method: "GET",
2983
- secure: true,
2984
- format: "json",
2985
- ...params
2986
- }),
2987
- createSitesPageFeedback: (organizationId, siteId, siteSpaceId, pageId, visitorId, data, params = {}) => this.request({
2988
- path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}/insights/pages/${pageId}/feedbacks/${visitorId}`,
2989
- method: "PUT",
2990
- body: data,
2991
- secure: true,
2992
- type: "application/json" /* Json */,
2993
- format: "json",
2994
- ...params
2995
- }),
2996
- moveSiteSpace: (organizationId, siteId, siteSpaceId, data, params = {}) => this.request({
2997
- path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}/move`,
2998
- method: "POST",
2999
- body: data,
3000
- secure: true,
3001
- type: "application/json" /* Json */,
3002
- format: "json",
3003
- ...params
3004
- }),
3005
- listPermissionsAggregateInSite: (organizationId, siteId, query, params = {}) => this.request({
3006
- path: `/orgs/${organizationId}/sites/${siteId}/permissions/aggregate`,
3007
- method: "GET",
3008
- query,
3009
- secure: true,
3010
- format: "json",
3011
- ...params
3012
- }),
3013
- trackViewInSiteById: (organizationId, siteId, data, params = {}) => this.request({
3014
- path: `/orgs/${organizationId}/sites/${siteId}/insights/track_view`,
3015
- method: "POST",
3016
- body: data,
3017
- secure: true,
3018
- type: "application/json" /* Json */,
3019
- ...params
3020
- }),
3021
- updateSiteAdsById: (organizationId, siteId, data, params = {}) => this.request({
3022
- path: `/orgs/${organizationId}/sites/${siteId}/ads`,
3023
- method: "POST",
3024
- body: data,
3025
- secure: true,
3026
- type: "application/json" /* Json */,
3027
- ...params
3028
- }),
3029
- getSiteAdsStatsById: (organizationId, siteId, params = {}) => this.request({
3030
- path: `/orgs/${organizationId}/sites/${siteId}/ads/stats`,
3031
- method: "POST",
3032
- secure: true,
3033
- format: "json",
3034
- ...params
3035
- })
3036
- };
3037
- this.customHostnames = {
3038
- getCustomHostname: (hostname, params = {}) => this.request({
3039
- path: `/custom-hostnames/${hostname}`,
3040
- method: "GET",
3041
- secure: true,
3042
- format: "json",
3043
- ...params
3044
- }),
3045
- setupCustomHostname: (hostname, data, params = {}) => this.request({
3046
- path: `/custom-hostnames/${hostname}`,
3047
- method: "POST",
3048
- body: data,
3049
- secure: true,
3050
- type: "application/json" /* Json */,
3051
- format: "json",
3052
- ...params
3053
- }),
3054
- dnsRevalidateCustomHostname: (hostname, params = {}) => this.request({
3055
- path: `/custom-hostnames/${hostname}`,
3056
- method: "PATCH",
3057
- secure: true,
3058
- ...params
3059
- }),
3060
- removeCustomHostname: (hostname, params = {}) => this.request({
3061
- path: `/custom-hostnames/${hostname}`,
3062
- method: "DELETE",
3063
- secure: true,
3064
- ...params
3065
- }),
3066
- testCustomHostname: (hostname, data, params = {}) => this.request({
3067
- path: `/custom-hostnames/${hostname}/test`,
3068
- method: "POST",
3069
- body: data,
3070
- secure: true,
3071
- type: "application/json" /* Json */,
3072
- ...params
3073
- })
3074
- };
3075
- this.ads = {
3076
- adsListSites: (query, params = {}) => this.request({
3077
- path: `/ads/sites`,
3078
- method: "GET",
3079
- query,
3080
- secure: true,
3081
- format: "json",
3082
- ...params
3083
- }),
3084
- adsUpdateSite: (siteId, data, params = {}) => this.request({
3085
- path: `/ads/sites/${siteId}`,
3086
- method: "PATCH",
3087
- body: data,
3088
- secure: true,
3089
- type: "application/json" /* Json */,
3090
- ...params
3091
- })
3092
- };
3093
- this.internal = {
3094
- generateHiveAccessToken: (data, params = {}) => this.request({
3095
- path: `/internal/hive/token`,
3096
- method: "POST",
3097
- body: data,
3098
- secure: true,
3099
- type: "application/json" /* Json */,
3100
- format: "json",
3101
- ...params
3102
- })
3103
- };
3104
- this.urls = {
3105
- getContentByUrl: (query, params = {}) => this.request({
3106
- path: `/urls/content`,
3107
- method: "GET",
3108
- query,
3109
- secure: true,
3110
- format: "json",
3111
- ...params
3112
- }),
3113
- getEmbedByUrl: (query, params = {}) => this.request({
3114
- path: `/urls/embed`,
3115
- method: "GET",
3116
- query,
3117
- secure: true,
3118
- format: "json",
3119
- ...params
3120
- }),
3121
- getPublishedContentByUrl: (query, params = {}) => this.request({
3122
- path: `/urls/published`,
3123
- method: "GET",
3124
- query,
3125
- secure: true,
3126
- format: "json",
3127
- ...params
3128
- })
3129
- };
3130
- }
916
+ }),
917
+ askQueryWithGet: (query, params = {}) => this.request({
918
+ path: `/search/ask`,
919
+ method: "GET",
920
+ query,
921
+ secure: true,
922
+ format: "json",
923
+ ...params
924
+ }),
925
+ askQuery: (data, query, params = {}) => this.request({
926
+ path: `/search/ask`,
927
+ method: "POST",
928
+ query,
929
+ body: data,
930
+ secure: true,
931
+ type: "application/json" /* Json */,
932
+ format: "json",
933
+ ...params
934
+ }),
935
+ getRecommendedQuestions: (data, params = {}) => this.request({
936
+ path: `/search/questions`,
937
+ method: "POST",
938
+ body: data,
939
+ secure: true,
940
+ type: "application/json" /* Json */,
941
+ format: "json",
942
+ ...params
943
+ })
944
+ };
945
+ user = {
946
+ getAuthenticatedUser: (params = {}) => this.request({
947
+ path: `/user`,
948
+ method: "GET",
949
+ secure: true,
950
+ format: "json",
951
+ ...params
952
+ })
953
+ };
954
+ users = {
955
+ getUserById: (userId, params = {}) => this.request({
956
+ path: `/users/${userId}`,
957
+ method: "GET",
958
+ secure: true,
959
+ format: "json",
960
+ ...params
961
+ })
962
+ };
963
+ spaces = {
964
+ getSpaceById: (spaceId, query, params = {}) => this.request({
965
+ path: `/spaces/${spaceId}`,
966
+ method: "GET",
967
+ query,
968
+ secure: true,
969
+ format: "json",
970
+ ...params
971
+ }),
972
+ updateSpaceById: (spaceId, data, params = {}) => this.request({
973
+ path: `/spaces/${spaceId}`,
974
+ method: "PATCH",
975
+ body: data,
976
+ secure: true,
977
+ type: "application/json" /* Json */,
978
+ format: "json",
979
+ ...params
980
+ }),
981
+ deleteSpaceById: (spaceId, params = {}) => this.request({
982
+ path: `/spaces/${spaceId}`,
983
+ method: "DELETE",
984
+ secure: true,
985
+ ...params
986
+ }),
987
+ duplicateSpace: (spaceId, params = {}) => this.request({
988
+ path: `/spaces/${spaceId}/duplicate`,
989
+ method: "POST",
990
+ secure: true,
991
+ format: "json",
992
+ ...params
993
+ }),
994
+ restoreSpace: (spaceId, params = {}) => this.request({
995
+ path: `/spaces/${spaceId}/restore`,
996
+ method: "POST",
997
+ secure: true,
998
+ format: "json",
999
+ ...params
1000
+ }),
1001
+ moveSpace: (spaceId, data, params = {}) => this.request({
1002
+ path: `/spaces/${spaceId}/move`,
1003
+ method: "POST",
1004
+ body: data,
1005
+ secure: true,
1006
+ type: "application/json" /* Json */,
1007
+ format: "json",
1008
+ ...params
1009
+ }),
1010
+ transferSpace: (spaceId, data, params = {}) => this.request({
1011
+ path: `/spaces/${spaceId}/transfer`,
1012
+ method: "POST",
1013
+ body: data,
1014
+ secure: true,
1015
+ type: "application/json" /* Json */,
1016
+ format: "json",
1017
+ ...params
1018
+ }),
1019
+ getEmbedByUrlInSpace: (spaceId, query, params = {}) => this.request({
1020
+ path: `/spaces/${spaceId}/embed`,
1021
+ method: "GET",
1022
+ query,
1023
+ secure: true,
1024
+ format: "json",
1025
+ ...params
1026
+ }),
1027
+ searchSpaceContent: (spaceId, query, params = {}) => this.request({
1028
+ path: `/spaces/${spaceId}/search`,
1029
+ method: "GET",
1030
+ query,
1031
+ secure: true,
1032
+ format: "json",
1033
+ ...params
1034
+ }),
1035
+ askQueryInSpaceWithGet: (spaceId, query, params = {}) => this.request({
1036
+ path: `/spaces/${spaceId}/search/ask`,
1037
+ method: "GET",
1038
+ query,
1039
+ secure: true,
1040
+ format: "json",
1041
+ ...params
1042
+ }),
1043
+ askQueryInSpace: (spaceId, data, query, params = {}) => this.request({
1044
+ path: `/spaces/${spaceId}/search/ask`,
1045
+ method: "POST",
1046
+ query,
1047
+ body: data,
1048
+ secure: true,
1049
+ type: "application/json" /* Json */,
1050
+ format: "json",
1051
+ ...params
1052
+ }),
1053
+ streamAskInSpace: (spaceId, query, params = {}) => this.streamRequest({
1054
+ path: `/spaces/${spaceId}/search/ask/stream`,
1055
+ method: "GET",
1056
+ query,
1057
+ secure: true,
1058
+ ...params
1059
+ }),
1060
+ getRecommendedQuestionsInSpace: (spaceId, params = {}) => this.request({
1061
+ path: `/spaces/${spaceId}/search/questions`,
1062
+ method: "GET",
1063
+ secure: true,
1064
+ format: "json",
1065
+ ...params
1066
+ }),
1067
+ streamRecommendedQuestionsInSpace: (spaceId, params = {}) => this.streamRequest({
1068
+ path: `/spaces/${spaceId}/search/questions/stream`,
1069
+ method: "GET",
1070
+ secure: true,
1071
+ ...params
1072
+ }),
1073
+ importGitRepository: (spaceId, data, params = {}) => this.request({
1074
+ path: `/spaces/${spaceId}/git/import`,
1075
+ method: "POST",
1076
+ body: data,
1077
+ secure: true,
1078
+ type: "application/json" /* Json */,
1079
+ ...params
1080
+ }),
1081
+ exportToGitRepository: (spaceId, data, params = {}) => this.request({
1082
+ path: `/spaces/${spaceId}/git/export`,
1083
+ method: "POST",
1084
+ body: data,
1085
+ secure: true,
1086
+ type: "application/json" /* Json */,
1087
+ ...params
1088
+ }),
1089
+ syncGitRepository: (spaceId, data, params = {}) => this.request({
1090
+ path: `/spaces/${spaceId}/git/sync`,
1091
+ method: "POST",
1092
+ body: data,
1093
+ secure: true,
1094
+ type: "application/json" /* Json */,
1095
+ ...params
1096
+ }),
1097
+ getSpaceGitInfo: (spaceId, params = {}) => this.request({
1098
+ path: `/spaces/${spaceId}/git/info`,
1099
+ method: "GET",
1100
+ secure: true,
1101
+ format: "json",
1102
+ ...params
1103
+ }),
1104
+ getContentAnalyticsForSpaceById: (spaceId, params = {}) => this.request({
1105
+ path: `/spaces/${spaceId}/insights/content`,
1106
+ method: "GET",
1107
+ secure: true,
1108
+ format: "json",
1109
+ ...params
1110
+ }),
1111
+ getSearchAnalyticsForSpaceById: (spaceId, query, params = {}) => this.request({
1112
+ path: `/spaces/${spaceId}/insights/search`,
1113
+ method: "GET",
1114
+ query,
1115
+ secure: true,
1116
+ format: "json",
1117
+ ...params
1118
+ }),
1119
+ getTrafficAnalyticsForSpaceById: (spaceId, query, params = {}) => this.request({
1120
+ path: `/spaces/${spaceId}/insights/traffic`,
1121
+ method: "GET",
1122
+ query,
1123
+ secure: true,
1124
+ format: "json",
1125
+ ...params
1126
+ }),
1127
+ trackViewInSpaceById: (spaceId, data, params = {}) => this.request({
1128
+ path: `/spaces/${spaceId}/insights/track_view`,
1129
+ method: "POST",
1130
+ body: data,
1131
+ secure: true,
1132
+ type: "application/json" /* Json */,
1133
+ ...params
1134
+ }),
1135
+ inviteToSpace: (spaceId, data, params = {}) => this.request({
1136
+ path: `/spaces/${spaceId}/permissions`,
1137
+ method: "POST",
1138
+ body: data,
1139
+ secure: true,
1140
+ type: "application/json" /* Json */,
1141
+ ...params
1142
+ }),
1143
+ removeTeamFromSpace: (spaceId, teamId, params = {}) => this.request({
1144
+ path: `/spaces/${spaceId}/permissions/teams/${teamId}`,
1145
+ method: "DELETE",
1146
+ secure: true,
1147
+ ...params
1148
+ }),
1149
+ getCurrentRevision: (spaceId, query, params = {}) => this.request({
1150
+ path: `/spaces/${spaceId}/content`,
1151
+ method: "GET",
1152
+ query,
1153
+ secure: true,
1154
+ format: "json",
1155
+ ...params
1156
+ }),
1157
+ importContent: (spaceId, data, params = {}) => this.request({
1158
+ path: `/spaces/${spaceId}/content/import`,
1159
+ method: "POST",
1160
+ body: data,
1161
+ secure: true,
1162
+ type: "application/json" /* Json */,
1163
+ format: "json",
1164
+ ...params
1165
+ }),
1166
+ listPages: (spaceId, query, params = {}) => this.request({
1167
+ path: `/spaces/${spaceId}/content/pages`,
1168
+ method: "GET",
1169
+ query,
1170
+ secure: true,
1171
+ format: "json",
1172
+ ...params
1173
+ }),
1174
+ listFiles: (spaceId, query, params = {}) => this.request({
1175
+ path: `/spaces/${spaceId}/content/files`,
1176
+ method: "GET",
1177
+ query,
1178
+ secure: true,
1179
+ format: "json",
1180
+ ...params
1181
+ }),
1182
+ getFileById: (spaceId, fileId, query, params = {}) => this.request({
1183
+ path: `/spaces/${spaceId}/content/files/${fileId}`,
1184
+ method: "GET",
1185
+ query,
1186
+ secure: true,
1187
+ format: "json",
1188
+ ...params
1189
+ }),
1190
+ listSpaceFileBacklinks: (spaceId, fileId, query, params = {}) => this.request({
1191
+ path: `/spaces/${spaceId}/content/files/${fileId}/backlinks`,
1192
+ method: "GET",
1193
+ query,
1194
+ secure: true,
1195
+ format: "json",
1196
+ ...params
1197
+ }),
1198
+ getPageById: (spaceId, pageId, query, params = {}) => this.request({
1199
+ path: `/spaces/${spaceId}/content/page/${pageId}`,
1200
+ method: "GET",
1201
+ query,
1202
+ secure: true,
1203
+ format: "json",
1204
+ ...params
1205
+ }),
1206
+ listPageLinksInSpace: (spaceId, pageId, query, params = {}) => this.request({
1207
+ path: `/spaces/${spaceId}/content/page/${pageId}/links`,
1208
+ method: "GET",
1209
+ query,
1210
+ secure: true,
1211
+ format: "json",
1212
+ ...params
1213
+ }),
1214
+ listSpacePageBacklinks: (spaceId, pageId, query, params = {}) => this.request({
1215
+ path: `/spaces/${spaceId}/content/page/${pageId}/backlinks`,
1216
+ method: "GET",
1217
+ query,
1218
+ secure: true,
1219
+ format: "json",
1220
+ ...params
1221
+ }),
1222
+ importContentInPageById: (spaceId, pageId, data, params = {}) => this.request({
1223
+ path: `/spaces/${spaceId}/content/page/${pageId}/import`,
1224
+ method: "POST",
1225
+ body: data,
1226
+ secure: true,
1227
+ type: "application/json" /* Json */,
1228
+ format: "json",
1229
+ ...params
1230
+ }),
1231
+ getPageByPath: (spaceId, pagePath, query, params = {}) => this.request({
1232
+ path: `/spaces/${spaceId}/content/path/${pagePath}`,
1233
+ method: "GET",
1234
+ query,
1235
+ secure: true,
1236
+ format: "json",
1237
+ ...params
1238
+ }),
1239
+ getDocumentById: (spaceId, documentId, query, params = {}) => this.request({
1240
+ path: `/spaces/${spaceId}/documents/${documentId}`,
1241
+ method: "GET",
1242
+ query,
1243
+ secure: true,
1244
+ format: "json",
1245
+ ...params
1246
+ }),
1247
+ createChangeRequest: (spaceId, data, params = {}) => this.request({
1248
+ path: `/spaces/${spaceId}/change-requests`,
1249
+ method: "POST",
1250
+ body: data,
1251
+ secure: true,
1252
+ type: "application/json" /* Json */,
1253
+ format: "json",
1254
+ ...params
1255
+ }),
1256
+ listChangeRequestsForSpace: (spaceId, query, params = {}) => this.request({
1257
+ path: `/spaces/${spaceId}/change-requests`,
1258
+ method: "GET",
1259
+ query,
1260
+ secure: true,
1261
+ format: "json",
1262
+ ...params
1263
+ }),
1264
+ getChangeRequestById: (spaceId, changeRequestId, params = {}) => this.request({
1265
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}`,
1266
+ method: "GET",
1267
+ secure: true,
1268
+ format: "json",
1269
+ ...params
1270
+ }),
1271
+ updateChangeRequestById: (spaceId, changeRequestId, data, params = {}) => this.request({
1272
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}`,
1273
+ method: "PATCH",
1274
+ body: data,
1275
+ secure: true,
1276
+ type: "application/json" /* Json */,
1277
+ format: "json",
1278
+ ...params
1279
+ }),
1280
+ mergeChangeRequest: (spaceId, changeRequestId, params = {}) => this.request({
1281
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/merge`,
1282
+ method: "POST",
1283
+ secure: true,
1284
+ format: "json",
1285
+ ...params
1286
+ }),
1287
+ updateChangeRequest: (spaceId, changeRequestId, params = {}) => this.request({
1288
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/update`,
1289
+ method: "POST",
1290
+ secure: true,
1291
+ format: "json",
1292
+ ...params
1293
+ }),
1294
+ getReviewsByChangeRequestId: (spaceId, changeRequestId, query, params = {}) => this.request({
1295
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/reviews`,
1296
+ method: "GET",
1297
+ query,
1298
+ secure: true,
1299
+ format: "json",
1300
+ ...params
1301
+ }),
1302
+ submitChangeRequestReview: (spaceId, changeRequestId, data, params = {}) => this.request({
1303
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/reviews`,
1304
+ method: "POST",
1305
+ body: data,
1306
+ secure: true,
1307
+ type: "application/json" /* Json */,
1308
+ format: "json",
1309
+ ...params
1310
+ }),
1311
+ getRequestedReviewersByChangeRequestId: (spaceId, changeRequestId, query, params = {}) => this.request({
1312
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/requested-reviewers`,
1313
+ method: "GET",
1314
+ query,
1315
+ secure: true,
1316
+ format: "json",
1317
+ ...params
1318
+ }),
1319
+ requestReviewersForChangeRequest: (spaceId, changeRequestId, data, params = {}) => this.request({
1320
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/requested-reviewers`,
1321
+ method: "POST",
1322
+ body: data,
1323
+ secure: true,
1324
+ type: "application/json" /* Json */,
1325
+ format: "json",
1326
+ ...params
1327
+ }),
1328
+ listChangeRequestLinks: (spaceId, changeRequestId, query, params = {}) => this.request({
1329
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/links`,
1330
+ method: "GET",
1331
+ query,
1332
+ secure: true,
1333
+ format: "json",
1334
+ ...params
1335
+ }),
1336
+ listCommentsInChangeRequest: (spaceId, changeRequestId, query, params = {}) => this.request({
1337
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments`,
1338
+ method: "GET",
1339
+ query,
1340
+ secure: true,
1341
+ format: "json",
1342
+ ...params
1343
+ }),
1344
+ postCommentInChangeRequest: (spaceId, changeRequestId, data, params = {}) => this.request({
1345
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments`,
1346
+ method: "POST",
1347
+ body: data,
1348
+ secure: true,
1349
+ type: "application/json" /* Json */,
1350
+ format: "json",
1351
+ ...params
1352
+ }),
1353
+ getCommentInChangeRequest: (spaceId, changeRequestId, commentId, query, params = {}) => this.request({
1354
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments/${commentId}`,
1355
+ method: "GET",
1356
+ query,
1357
+ secure: true,
1358
+ format: "json",
1359
+ ...params
1360
+ }),
1361
+ deleteCommentInChangeRequest: (spaceId, changeRequestId, commentId, params = {}) => this.request({
1362
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments/${commentId}`,
1363
+ method: "DELETE",
1364
+ secure: true,
1365
+ ...params
1366
+ }),
1367
+ updateCommentInChangeRequest: (spaceId, changeRequestId, commentId, data, params = {}) => this.request({
1368
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments/${commentId}`,
1369
+ method: "PUT",
1370
+ body: data,
1371
+ secure: true,
1372
+ type: "application/json" /* Json */,
1373
+ format: "json",
1374
+ ...params
1375
+ }),
1376
+ listCommentRepliesInChangeRequest: (spaceId, changeRequestId, commentId, query, params = {}) => this.request({
1377
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments/${commentId}/replies`,
1378
+ method: "GET",
1379
+ query,
1380
+ secure: true,
1381
+ format: "json",
1382
+ ...params
1383
+ }),
1384
+ postCommentReplyInChangeRequest: (spaceId, changeRequestId, commentId, data, query, params = {}) => this.request({
1385
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments/${commentId}/replies`,
1386
+ method: "POST",
1387
+ query,
1388
+ body: data,
1389
+ secure: true,
1390
+ type: "application/json" /* Json */,
1391
+ format: "json",
1392
+ ...params
1393
+ }),
1394
+ getCommentReplyInChangeRequest: (spaceId, changeRequestId, commentId, commentReplyId, query, params = {}) => this.request({
1395
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments/${commentId}/replies/${commentReplyId}`,
1396
+ method: "GET",
1397
+ query,
1398
+ secure: true,
1399
+ format: "json",
1400
+ ...params
1401
+ }),
1402
+ updateCommentReplyInChangeRequest: (spaceId, changeRequestId, commentId, commentReplyId, data, params = {}) => this.request({
1403
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments/${commentId}/replies/${commentReplyId}`,
1404
+ method: "PUT",
1405
+ body: data,
1406
+ secure: true,
1407
+ type: "application/json" /* Json */,
1408
+ format: "json",
1409
+ ...params
1410
+ }),
1411
+ deleteCommentReplyInChangeRequest: (spaceId, changeRequestId, commentId, commentReplyId, params = {}) => this.request({
1412
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/comments/${commentId}/replies/${commentReplyId}`,
1413
+ method: "DELETE",
1414
+ secure: true,
1415
+ ...params
1416
+ }),
1417
+ getContributorsByChangeRequestId: (spaceId, changeRequestId, params = {}) => this.request({
1418
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/contributors`,
1419
+ method: "GET",
1420
+ secure: true,
1421
+ format: "json",
1422
+ ...params
1423
+ }),
1424
+ getRevisionOfChangeRequestById: (spaceId, changeRequestId, query, params = {}) => this.request({
1425
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/content`,
1426
+ method: "GET",
1427
+ query,
1428
+ secure: true,
1429
+ format: "json",
1430
+ ...params
1431
+ }),
1432
+ importContentInChangeRequest: (spaceId, changeRequestId, data, params = {}) => this.request({
1433
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/content/import`,
1434
+ method: "POST",
1435
+ body: data,
1436
+ secure: true,
1437
+ type: "application/json" /* Json */,
1438
+ format: "json",
1439
+ ...params
1440
+ }),
1441
+ listPagesInChangeRequest: (spaceId, changeRequestId, query, params = {}) => this.request({
1442
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/content/pages`,
1443
+ method: "GET",
1444
+ query,
1445
+ secure: true,
1446
+ format: "json",
1447
+ ...params
1448
+ }),
1449
+ listFilesInChangeRequestById: (spaceId, changeRequestId, query, params = {}) => this.request({
1450
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/content/files`,
1451
+ method: "GET",
1452
+ query,
1453
+ secure: true,
1454
+ format: "json",
1455
+ ...params
1456
+ }),
1457
+ getFileInChangeRequestById: (spaceId, changeRequestId, fileId, query, params = {}) => this.request({
1458
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/content/files/${fileId}`,
1459
+ method: "GET",
1460
+ query,
1461
+ secure: true,
1462
+ format: "json",
1463
+ ...params
1464
+ }),
1465
+ listChangeRequestFileBacklinks: (spaceId, changeRequestId, fileId, query, params = {}) => this.request({
1466
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/content/files/${fileId}/backlinks`,
1467
+ method: "GET",
1468
+ query,
1469
+ secure: true,
1470
+ format: "json",
1471
+ ...params
1472
+ }),
1473
+ getPageInChangeRequestById: (spaceId, changeRequestId, pageId, query, params = {}) => this.request({
1474
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/content/page/${pageId}`,
1475
+ method: "GET",
1476
+ query,
1477
+ secure: true,
1478
+ format: "json",
1479
+ ...params
1480
+ }),
1481
+ listPageLinksInChangeRequest: (spaceId, changeRequestId, pageId, query, params = {}) => this.request({
1482
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/content/page/${pageId}/links`,
1483
+ method: "GET",
1484
+ query,
1485
+ secure: true,
1486
+ format: "json",
1487
+ ...params
1488
+ }),
1489
+ listChangeRequestPageBacklinks: (spaceId, changeRequestId, pageId, query, params = {}) => this.request({
1490
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/content/page/${pageId}/backlinks`,
1491
+ method: "GET",
1492
+ query,
1493
+ secure: true,
1494
+ format: "json",
1495
+ ...params
1496
+ }),
1497
+ importContentInChangeRequestPageById: (spaceId, changeRequestId, pageId, data, params = {}) => this.request({
1498
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/content/page/${pageId}/import`,
1499
+ method: "POST",
1500
+ body: data,
1501
+ secure: true,
1502
+ type: "application/json" /* Json */,
1503
+ format: "json",
1504
+ ...params
1505
+ }),
1506
+ getPageInChangeRequestByPath: (spaceId, changeRequestId, pagePath, query, params = {}) => this.request({
1507
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/content/path/${pagePath}`,
1508
+ method: "GET",
1509
+ query,
1510
+ secure: true,
1511
+ format: "json",
1512
+ ...params
1513
+ }),
1514
+ touchContentInChangeRequest: (spaceId, changeRequestId, data, params = {}) => this.request({
1515
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/touched-content`,
1516
+ method: "POST",
1517
+ body: data,
1518
+ secure: true,
1519
+ type: "application/json" /* Json */,
1520
+ format: "json",
1521
+ ...params
1522
+ }),
1523
+ getChangeRequestPdf: (spaceId, changeRequestId, query, params = {}) => this.request({
1524
+ path: `/spaces/${spaceId}/change-requests/${changeRequestId}/pdf`,
1525
+ method: "GET",
1526
+ query,
1527
+ secure: true,
1528
+ format: "json",
1529
+ ...params
1530
+ }),
1531
+ getRevisionById: (spaceId, revisionId, query, params = {}) => this.request({
1532
+ path: `/spaces/${spaceId}/revisions/${revisionId}`,
1533
+ method: "GET",
1534
+ query,
1535
+ secure: true,
1536
+ format: "json",
1537
+ ...params
1538
+ }),
1539
+ getRevisionSemanticChanges: (spaceId, revisionId, query, params = {}) => this.request({
1540
+ path: `/spaces/${spaceId}/revisions/${revisionId}/changes`,
1541
+ method: "GET",
1542
+ query,
1543
+ secure: true,
1544
+ format: "json",
1545
+ ...params
1546
+ }),
1547
+ listPagesInRevisionById: (spaceId, revisionId, query, params = {}) => this.request({
1548
+ path: `/spaces/${spaceId}/revisions/${revisionId}/pages`,
1549
+ method: "GET",
1550
+ query,
1551
+ secure: true,
1552
+ format: "json",
1553
+ ...params
1554
+ }),
1555
+ listFilesInRevisionById: (spaceId, revisionId, query, params = {}) => this.request({
1556
+ path: `/spaces/${spaceId}/revisions/${revisionId}/files`,
1557
+ method: "GET",
1558
+ query,
1559
+ secure: true,
1560
+ format: "json",
1561
+ ...params
1562
+ }),
1563
+ getFileInRevisionById: (spaceId, revisionId, fileId, query, params = {}) => this.request({
1564
+ path: `/spaces/${spaceId}/revisions/${revisionId}/files/${fileId}`,
1565
+ method: "GET",
1566
+ query,
1567
+ secure: true,
1568
+ format: "json",
1569
+ ...params
1570
+ }),
1571
+ getPageInRevisionById: (spaceId, revisionId, pageId, query, params = {}) => this.request({
1572
+ path: `/spaces/${spaceId}/revisions/${revisionId}/page/${pageId}`,
1573
+ method: "GET",
1574
+ query,
1575
+ secure: true,
1576
+ format: "json",
1577
+ ...params
1578
+ }),
1579
+ getPageInRevisionByPath: (spaceId, revisionId, pagePath, query, params = {}) => this.request({
1580
+ path: `/spaces/${spaceId}/revisions/${revisionId}/path/${pagePath}`,
1581
+ method: "GET",
1582
+ query,
1583
+ secure: true,
1584
+ format: "json",
1585
+ ...params
1586
+ }),
1587
+ listCommentsInSpace: (spaceId, query, params = {}) => this.request({
1588
+ path: `/spaces/${spaceId}/comments`,
1589
+ method: "GET",
1590
+ query,
1591
+ secure: true,
1592
+ format: "json",
1593
+ ...params
1594
+ }),
1595
+ postCommentInSpace: (spaceId, data, params = {}) => this.request({
1596
+ path: `/spaces/${spaceId}/comments`,
1597
+ method: "POST",
1598
+ body: data,
1599
+ secure: true,
1600
+ type: "application/json" /* Json */,
1601
+ format: "json",
1602
+ ...params
1603
+ }),
1604
+ getCommentInSpace: (spaceId, commentId, query, params = {}) => this.request({
1605
+ path: `/spaces/${spaceId}/comments/${commentId}`,
1606
+ method: "GET",
1607
+ query,
1608
+ secure: true,
1609
+ format: "json",
1610
+ ...params
1611
+ }),
1612
+ deleteCommentInSpace: (spaceId, commentId, params = {}) => this.request({
1613
+ path: `/spaces/${spaceId}/comments/${commentId}`,
1614
+ method: "DELETE",
1615
+ secure: true,
1616
+ ...params
1617
+ }),
1618
+ updateCommentInSpace: (spaceId, commentId, data, params = {}) => this.request({
1619
+ path: `/spaces/${spaceId}/comments/${commentId}`,
1620
+ method: "PUT",
1621
+ body: data,
1622
+ secure: true,
1623
+ type: "application/json" /* Json */,
1624
+ format: "json",
1625
+ ...params
1626
+ }),
1627
+ listCommentRepliesInSpace: (spaceId, commentId, query, params = {}) => this.request({
1628
+ path: `/spaces/${spaceId}/comments/${commentId}/replies`,
1629
+ method: "GET",
1630
+ query,
1631
+ secure: true,
1632
+ format: "json",
1633
+ ...params
1634
+ }),
1635
+ postCommentReplyInSpace: (spaceId, commentId, data, params = {}) => this.request({
1636
+ path: `/spaces/${spaceId}/comments/${commentId}/replies`,
1637
+ method: "POST",
1638
+ body: data,
1639
+ secure: true,
1640
+ type: "application/json" /* Json */,
1641
+ format: "json",
1642
+ ...params
1643
+ }),
1644
+ getCommentReplyInSpace: (spaceId, commentId, commentReplyId, query, params = {}) => this.request({
1645
+ path: `/spaces/${spaceId}/comments/${commentId}/replies/${commentReplyId}`,
1646
+ method: "GET",
1647
+ query,
1648
+ secure: true,
1649
+ format: "json",
1650
+ ...params
1651
+ }),
1652
+ updateCommentReplyInSpace: (spaceId, commentId, commentReplyId, data, params = {}) => this.request({
1653
+ path: `/spaces/${spaceId}/comments/${commentId}/replies/${commentReplyId}`,
1654
+ method: "PUT",
1655
+ body: data,
1656
+ secure: true,
1657
+ type: "application/json" /* Json */,
1658
+ format: "json",
1659
+ ...params
1660
+ }),
1661
+ deleteCommentReplyInSpace: (spaceId, commentId, commentReplyId, params = {}) => this.request({
1662
+ path: `/spaces/${spaceId}/comments/${commentId}/replies/${commentReplyId}`,
1663
+ method: "DELETE",
1664
+ secure: true,
1665
+ ...params
1666
+ }),
1667
+ listPermissionsAggregateInSpace: (spaceId, query, params = {}) => this.request({
1668
+ path: `/spaces/${spaceId}/permissions/aggregate`,
1669
+ method: "GET",
1670
+ query,
1671
+ secure: true,
1672
+ format: "json",
1673
+ ...params
1674
+ }),
1675
+ getSpacePublishingCustomizationById: (spaceId, params = {}) => this.request({
1676
+ path: `/spaces/${spaceId}/publishing/customization`,
1677
+ method: "GET",
1678
+ secure: true,
1679
+ format: "json",
1680
+ ...params
1681
+ }),
1682
+ updateSpacePublishingCustomizationById: (spaceId, data, params = {}) => this.request({
1683
+ path: `/spaces/${spaceId}/publishing/customization`,
1684
+ method: "PUT",
1685
+ body: data,
1686
+ secure: true,
1687
+ type: "application/json" /* Json */,
1688
+ format: "json",
1689
+ ...params
1690
+ }),
1691
+ listSpaceIntegrations: (spaceId, query, params = {}) => this.request({
1692
+ path: `/spaces/${spaceId}/integrations`,
1693
+ method: "GET",
1694
+ query,
1695
+ secure: true,
1696
+ format: "json",
1697
+ ...params
1698
+ }),
1699
+ listSpaceIntegrationsBlocks: (spaceId, params = {}) => this.request({
1700
+ path: `/spaces/${spaceId}/integration-blocks`,
1701
+ method: "GET",
1702
+ secure: true,
1703
+ format: "json",
1704
+ ...params
1705
+ }),
1706
+ listSpaceIntegrationScripts: (spaceId, params = {}) => this.request({
1707
+ path: `/spaces/${spaceId}/integration-scripts`,
1708
+ method: "GET",
1709
+ secure: true,
1710
+ format: "json",
1711
+ ...params
1712
+ }),
1713
+ getSpaceCustomFields: (spaceId, params = {}) => this.request({
1714
+ path: `/spaces/${spaceId}/custom-fields`,
1715
+ method: "GET",
1716
+ secure: true,
1717
+ format: "json",
1718
+ ...params
1719
+ }),
1720
+ updateSpaceCustomFields: (spaceId, data, params = {}) => this.request({
1721
+ path: `/spaces/${spaceId}/custom-fields`,
1722
+ method: "PATCH",
1723
+ body: data,
1724
+ secure: true,
1725
+ type: "application/json" /* Json */,
1726
+ ...params
1727
+ }),
1728
+ getPageFeedback: (spaceId, pageId, visitorId, params = {}) => this.request({
1729
+ path: `/spaces/${spaceId}/pages/${pageId}/feedbacks/${visitorId}`,
1730
+ method: "GET",
1731
+ secure: true,
1732
+ format: "json",
1733
+ ...params
1734
+ }),
1735
+ createPageFeedback: (spaceId, pageId, visitorId, data, params = {}) => this.request({
1736
+ path: `/spaces/${spaceId}/pages/${pageId}/feedbacks/${visitorId}`,
1737
+ method: "PUT",
1738
+ body: data,
1739
+ secure: true,
1740
+ type: "application/json" /* Json */,
1741
+ format: "json",
1742
+ ...params
1743
+ }),
1744
+ getSpacePdf: (spaceId, query, params = {}) => this.request({
1745
+ path: `/spaces/${spaceId}/pdf`,
1746
+ method: "GET",
1747
+ query,
1748
+ secure: true,
1749
+ format: "json",
1750
+ ...params
1751
+ }),
1752
+ createSpaceShareLink: (spaceId, data, params = {}) => this.request({
1753
+ path: `/spaces/${spaceId}/share-links`,
1754
+ method: "POST",
1755
+ body: data,
1756
+ secure: true,
1757
+ type: "application/json" /* Json */,
1758
+ format: "json",
1759
+ ...params
1760
+ }),
1761
+ updateSpaceShareLinkById: (spaceId, shareLinkId, data, params = {}) => this.request({
1762
+ path: `/spaces/${spaceId}/share-links/${shareLinkId}`,
1763
+ method: "PATCH",
1764
+ body: data,
1765
+ secure: true,
1766
+ type: "application/json" /* Json */,
1767
+ format: "json",
1768
+ ...params
1769
+ }),
1770
+ deleteSpaceShareLinkById: (spaceId, shareLinkId, params = {}) => this.request({
1771
+ path: `/spaces/${spaceId}/share-links/${shareLinkId}`,
1772
+ method: "DELETE",
1773
+ secure: true,
1774
+ ...params
1775
+ }),
1776
+ listSpaceLinks: (spaceId, query, params = {}) => this.request({
1777
+ path: `/spaces/${spaceId}/links`,
1778
+ method: "GET",
1779
+ query,
1780
+ secure: true,
1781
+ format: "json",
1782
+ ...params
1783
+ })
1784
+ };
1785
+ collections = {
1786
+ getCollectionById: (collectionId, params = {}) => this.request({
1787
+ path: `/collections/${collectionId}`,
1788
+ method: "GET",
1789
+ secure: true,
1790
+ format: "json",
1791
+ ...params
1792
+ }),
1793
+ updateCollectionById: (collectionId, data, params = {}) => this.request({
1794
+ path: `/collections/${collectionId}`,
1795
+ method: "PATCH",
1796
+ body: data,
1797
+ secure: true,
1798
+ type: "application/json" /* Json */,
1799
+ format: "json",
1800
+ ...params
1801
+ }),
1802
+ deleteCollectionById: (collectionId, params = {}) => this.request({
1803
+ path: `/collections/${collectionId}`,
1804
+ method: "DELETE",
1805
+ secure: true,
1806
+ ...params
1807
+ }),
1808
+ listSpacesInCollectionById: (collectionId, query, params = {}) => this.request({
1809
+ path: `/collections/${collectionId}/spaces`,
1810
+ method: "GET",
1811
+ query,
1812
+ secure: true,
1813
+ format: "json",
1814
+ ...params
1815
+ }),
1816
+ moveCollection: (collectionId, data, params = {}) => this.request({
1817
+ path: `/collections/${collectionId}/move`,
1818
+ method: "POST",
1819
+ body: data,
1820
+ secure: true,
1821
+ type: "application/json" /* Json */,
1822
+ format: "json",
1823
+ ...params
1824
+ }),
1825
+ transferCollection: (collectionId, data, params = {}) => this.request({
1826
+ path: `/collections/${collectionId}/transfer`,
1827
+ method: "POST",
1828
+ body: data,
1829
+ secure: true,
1830
+ type: "application/json" /* Json */,
1831
+ format: "json",
1832
+ ...params
1833
+ }),
1834
+ listPermissionsAggregateInCollection: (collectionId, query, params = {}) => this.request({
1835
+ path: `/collections/${collectionId}/permissions/aggregate`,
1836
+ method: "GET",
1837
+ query,
1838
+ secure: true,
1839
+ format: "json",
1840
+ ...params
1841
+ }),
1842
+ getCollectionPublishingCustomizationById: (collectionId, params = {}) => this.request({
1843
+ path: `/collections/${collectionId}/publishing/customization`,
1844
+ method: "GET",
1845
+ secure: true,
1846
+ format: "json",
1847
+ ...params
1848
+ }),
1849
+ updateCollectionPublishingCustomizationById: (collectionId, data, params = {}) => this.request({
1850
+ path: `/collections/${collectionId}/publishing/customization`,
1851
+ method: "PUT",
1852
+ body: data,
1853
+ secure: true,
1854
+ type: "application/json" /* Json */,
1855
+ format: "json",
1856
+ ...params
1857
+ }),
1858
+ createCollectionShareLink: (collectionId, data, params = {}) => this.request({
1859
+ path: `/collections/${collectionId}/share-links`,
1860
+ method: "POST",
1861
+ body: data,
1862
+ secure: true,
1863
+ type: "application/json" /* Json */,
1864
+ format: "json",
1865
+ ...params
1866
+ }),
1867
+ updateCollectionShareLinkById: (collectionId, shareLinkId, data, params = {}) => this.request({
1868
+ path: `/collections/${collectionId}/share-links/${shareLinkId}`,
1869
+ method: "PATCH",
1870
+ body: data,
1871
+ secure: true,
1872
+ type: "application/json" /* Json */,
1873
+ format: "json",
1874
+ ...params
1875
+ }),
1876
+ deleteCollectionShareLinkById: (collectionId, shareLinkId, params = {}) => this.request({
1877
+ path: `/collections/${collectionId}/share-links/${shareLinkId}`,
1878
+ method: "DELETE",
1879
+ secure: true,
1880
+ ...params
1881
+ })
1882
+ };
1883
+ integrations = {
1884
+ listIntegrations: (query, params = {}) => this.request({
1885
+ path: `/integrations`,
1886
+ method: "GET",
1887
+ query,
1888
+ secure: true,
1889
+ format: "json",
1890
+ ...params
1891
+ }),
1892
+ getIntegrationByName: (integrationName, params = {}) => this.request({
1893
+ path: `/integrations/${integrationName}`,
1894
+ method: "GET",
1895
+ secure: true,
1896
+ format: "json",
1897
+ ...params
1898
+ }),
1899
+ publishIntegration: (integrationName, data, params = {}) => this.request({
1900
+ path: `/integrations/${integrationName}`,
1901
+ method: "POST",
1902
+ body: data,
1903
+ secure: true,
1904
+ type: "application/json" /* Json */,
1905
+ format: "json",
1906
+ ...params
1907
+ }),
1908
+ unpublishIntegration: (integrationName, params = {}) => this.request({
1909
+ path: `/integrations/${integrationName}`,
1910
+ method: "DELETE",
1911
+ secure: true,
1912
+ ...params
1913
+ }),
1914
+ listIntegrationInstallations: (integrationName, query, params = {}) => this.request({
1915
+ path: `/integrations/${integrationName}/installations`,
1916
+ method: "GET",
1917
+ query,
1918
+ secure: true,
1919
+ format: "json",
1920
+ ...params
1921
+ }),
1922
+ installIntegration: (integrationName, data, params = {}) => this.request({
1923
+ path: `/integrations/${integrationName}/installations`,
1924
+ method: "POST",
1925
+ body: data,
1926
+ secure: true,
1927
+ type: "application/json" /* Json */,
1928
+ format: "json",
1929
+ ...params
1930
+ }),
1931
+ listIntegrationEvents: (integrationName, query, params = {}) => this.request({
1932
+ path: `/integrations/${integrationName}/events`,
1933
+ method: "GET",
1934
+ query,
1935
+ secure: true,
1936
+ format: "json",
1937
+ ...params
1938
+ }),
1939
+ getIntegrationEvent: (integrationName, eventId, params = {}) => this.request({
1940
+ path: `/integrations/${integrationName}/events/${eventId}`,
1941
+ method: "GET",
1942
+ secure: true,
1943
+ format: "json",
1944
+ ...params
1945
+ }),
1946
+ listIntegrationSpaceInstallations: (integrationName, query, params = {}) => this.request({
1947
+ path: `/integrations/${integrationName}/spaces`,
1948
+ method: "GET",
1949
+ query,
1950
+ secure: true,
1951
+ format: "json",
1952
+ ...params
1953
+ }),
1954
+ setIntegrationDevelopmentMode: (integrationName, data, params = {}) => this.request({
1955
+ path: `/integrations/${integrationName}/dev`,
1956
+ method: "PUT",
1957
+ body: data,
1958
+ secure: true,
1959
+ type: "application/json" /* Json */,
1960
+ ...params
1961
+ }),
1962
+ disableIntegrationDevelopmentMode: (integrationName, params = {}) => this.request({
1963
+ path: `/integrations/${integrationName}/dev`,
1964
+ method: "DELETE",
1965
+ secure: true,
1966
+ ...params
1967
+ }),
1968
+ renderIntegrationUiWithGet: (integrationName, query, params = {}) => this.request({
1969
+ path: `/integrations/${integrationName}/render`,
1970
+ method: "GET",
1971
+ query,
1972
+ secure: true,
1973
+ format: "json",
1974
+ ...params
1975
+ }),
1976
+ renderIntegrationUiWithPost: (integrationName, data, params = {}) => this.request({
1977
+ path: `/integrations/${integrationName}/render`,
1978
+ method: "POST",
1979
+ body: data,
1980
+ secure: true,
1981
+ type: "application/json" /* Json */,
1982
+ format: "json",
1983
+ ...params
1984
+ }),
1985
+ queueIntegrationTask: (integrationName, data, params = {}) => this.request({
1986
+ path: `/integrations/${integrationName}/tasks`,
1987
+ method: "POST",
1988
+ body: data,
1989
+ secure: true,
1990
+ type: "application/json" /* Json */,
1991
+ ...params
1992
+ }),
1993
+ getIntegrationInstallationById: (integrationName, installationId, params = {}) => this.request({
1994
+ path: `/integrations/${integrationName}/installations/${installationId}`,
1995
+ method: "GET",
1996
+ secure: true,
1997
+ format: "json",
1998
+ ...params
1999
+ }),
2000
+ updateIntegrationInstallation: (integrationName, installationId, data, params = {}) => this.request({
2001
+ path: `/integrations/${integrationName}/installations/${installationId}`,
2002
+ method: "PATCH",
2003
+ body: data,
2004
+ secure: true,
2005
+ type: "application/json" /* Json */,
2006
+ format: "json",
2007
+ ...params
2008
+ }),
2009
+ uninstallIntegration: (integrationName, installationId, params = {}) => this.request({
2010
+ path: `/integrations/${integrationName}/installations/${installationId}`,
2011
+ method: "DELETE",
2012
+ secure: true,
2013
+ ...params
2014
+ }),
2015
+ createIntegrationInstallationToken: (integrationName, installationId, params = {}) => this.request({
2016
+ path: `/integrations/${integrationName}/installations/${installationId}/tokens`,
2017
+ method: "POST",
2018
+ secure: true,
2019
+ format: "json",
2020
+ ...params
2021
+ }),
2022
+ listIntegrationInstallationSpaces: (integrationName, installationId, query, params = {}) => this.request({
2023
+ path: `/integrations/${integrationName}/installations/${installationId}/spaces`,
2024
+ method: "GET",
2025
+ query,
2026
+ secure: true,
2027
+ format: "json",
2028
+ ...params
2029
+ }),
2030
+ installIntegrationOnSpace: (integrationName, installationId, data, params = {}) => this.request({
2031
+ path: `/integrations/${integrationName}/installations/${installationId}/spaces`,
2032
+ method: "POST",
2033
+ body: data,
2034
+ secure: true,
2035
+ type: "application/json" /* Json */,
2036
+ format: "json",
2037
+ ...params
2038
+ }),
2039
+ getIntegrationSpaceInstallation: (integrationName, installationId, spaceId, params = {}) => this.request({
2040
+ path: `/integrations/${integrationName}/installations/${installationId}/spaces/${spaceId}`,
2041
+ method: "GET",
2042
+ secure: true,
2043
+ format: "json",
2044
+ ...params
2045
+ }),
2046
+ updateIntegrationSpaceInstallation: (integrationName, installationId, spaceId, data, params = {}) => this.request({
2047
+ path: `/integrations/${integrationName}/installations/${installationId}/spaces/${spaceId}`,
2048
+ method: "PATCH",
2049
+ body: data,
2050
+ secure: true,
2051
+ type: "application/json" /* Json */,
2052
+ format: "json",
2053
+ ...params
2054
+ }),
2055
+ uninstallIntegrationFromSpace: (integrationName, installationId, spaceId, params = {}) => this.request({
2056
+ path: `/integrations/${integrationName}/installations/${installationId}/spaces/${spaceId}`,
2057
+ method: "DELETE",
2058
+ secure: true,
2059
+ ...params
2060
+ }),
2061
+ listIntegrationInstallationSites: (integrationName, installationId, query, params = {}) => this.request({
2062
+ path: `/integrations/${integrationName}/installations/${installationId}/sites`,
2063
+ method: "GET",
2064
+ query,
2065
+ secure: true,
2066
+ format: "json",
2067
+ ...params
2068
+ }),
2069
+ installIntegrationOnSite: (integrationName, installationId, data, params = {}) => this.request({
2070
+ path: `/integrations/${integrationName}/installations/${installationId}/sites`,
2071
+ method: "POST",
2072
+ body: data,
2073
+ secure: true,
2074
+ type: "application/json" /* Json */,
2075
+ format: "json",
2076
+ ...params
2077
+ }),
2078
+ getIntegrationSiteInstallation: (integrationName, installationId, siteId, params = {}) => this.request({
2079
+ path: `/integrations/${integrationName}/installations/${installationId}/sites/${siteId}`,
2080
+ method: "GET",
2081
+ secure: true,
2082
+ format: "json",
2083
+ ...params
2084
+ }),
2085
+ updateIntegrationSiteInstallation: (integrationName, installationId, siteId, data, params = {}) => this.request({
2086
+ path: `/integrations/${integrationName}/installations/${installationId}/sites/${siteId}`,
2087
+ method: "PATCH",
2088
+ body: data,
2089
+ secure: true,
2090
+ type: "application/json" /* Json */,
2091
+ format: "json",
2092
+ ...params
2093
+ }),
2094
+ uninstallIntegrationFromSite: (integrationName, installationId, siteId, params = {}) => this.request({
2095
+ path: `/integrations/${integrationName}/installations/${installationId}/sites/${siteId}`,
2096
+ method: "DELETE",
2097
+ secure: true,
2098
+ ...params
2099
+ })
2100
+ };
2101
+ orgs = {
2102
+ listOrganizationsForAuthenticatedUser: (query, params = {}) => this.request({
2103
+ path: `/orgs`,
2104
+ method: "GET",
2105
+ query,
2106
+ secure: true,
2107
+ format: "json",
2108
+ ...params
2109
+ }),
2110
+ createOrganization: (data, params = {}) => this.request({
2111
+ path: `/orgs`,
2112
+ method: "POST",
2113
+ body: data,
2114
+ secure: true,
2115
+ type: "application/json" /* Json */,
2116
+ format: "json",
2117
+ ...params
2118
+ }),
2119
+ getOrganizationById: (organizationId, params = {}) => this.request({
2120
+ path: `/orgs/${organizationId}`,
2121
+ method: "GET",
2122
+ secure: true,
2123
+ format: "json",
2124
+ ...params
2125
+ }),
2126
+ deleteOrganizationById: (organizationId, params = {}) => this.request({
2127
+ path: `/orgs/${organizationId}`,
2128
+ method: "DELETE",
2129
+ secure: true,
2130
+ ...params
2131
+ }),
2132
+ updateOrganizationById: (organizationId, data, params = {}) => this.request({
2133
+ path: `/orgs/${organizationId}`,
2134
+ method: "PATCH",
2135
+ body: data,
2136
+ secure: true,
2137
+ type: "application/json" /* Json */,
2138
+ format: "json",
2139
+ ...params
2140
+ }),
2141
+ listMembersInOrganizationById: (organizationId, query, params = {}) => this.request({
2142
+ path: `/orgs/${organizationId}/members`,
2143
+ method: "GET",
2144
+ query,
2145
+ secure: true,
2146
+ format: "json",
2147
+ ...params
2148
+ }),
2149
+ getMemberInOrganizationById: (organizationId, userId, params = {}) => this.request({
2150
+ path: `/orgs/${organizationId}/members/${userId}`,
2151
+ method: "GET",
2152
+ secure: true,
2153
+ format: "json",
2154
+ ...params
2155
+ }),
2156
+ updateMemberInOrganizationById: (organizationId, userId, data, params = {}) => this.request({
2157
+ path: `/orgs/${organizationId}/members/${userId}`,
2158
+ method: "PATCH",
2159
+ body: data,
2160
+ secure: true,
2161
+ type: "application/json" /* Json */,
2162
+ format: "json",
2163
+ ...params
2164
+ }),
2165
+ removeMemberFromOrganizationById: (organizationId, userId, params = {}) => this.request({
2166
+ path: `/orgs/${organizationId}/members/${userId}`,
2167
+ method: "DELETE",
2168
+ secure: true,
2169
+ ...params
2170
+ }),
2171
+ updateOrganizationMemberLastSeenAt: (organizationId, params = {}) => this.request({
2172
+ path: `/orgs/${organizationId}/ping`,
2173
+ method: "POST",
2174
+ secure: true,
2175
+ ...params
2176
+ }),
2177
+ setUserAsSsoMemberForOrganization: (organizationId, userId, params = {}) => this.request({
2178
+ path: `/orgs/${organizationId}/members/${userId}/sso`,
2179
+ method: "POST",
2180
+ secure: true,
2181
+ format: "json",
2182
+ ...params
2183
+ }),
2184
+ listSpacesForOrganizationMember: (organizationId, userId, query, params = {}) => this.request({
2185
+ path: `/orgs/${organizationId}/members/${userId}/spaces`,
2186
+ method: "GET",
2187
+ query,
2188
+ secure: true,
2189
+ format: "json",
2190
+ ...params
2191
+ }),
2192
+ listTeamsForOrganizationMember: (organizationId, userId, query, params = {}) => this.request({
2193
+ path: `/orgs/${organizationId}/members/${userId}/teams`,
2194
+ method: "GET",
2195
+ query,
2196
+ secure: true,
2197
+ format: "json",
2198
+ ...params
2199
+ }),
2200
+ listTeamsInOrganizationById: (organizationId, query, params = {}) => this.request({
2201
+ path: `/orgs/${organizationId}/teams`,
2202
+ method: "GET",
2203
+ query,
2204
+ secure: true,
2205
+ format: "json",
2206
+ ...params
2207
+ }),
2208
+ createOrganizationTeam: (organizationId, data, params = {}) => this.request({
2209
+ path: `/orgs/${organizationId}/teams`,
2210
+ method: "PUT",
2211
+ body: data,
2212
+ secure: true,
2213
+ type: "application/json" /* Json */,
2214
+ format: "json",
2215
+ ...params
2216
+ }),
2217
+ getTeamInOrganizationById: (organizationId, teamId, params = {}) => this.request({
2218
+ path: `/orgs/${organizationId}/teams/${teamId}`,
2219
+ method: "GET",
2220
+ secure: true,
2221
+ format: "json",
2222
+ ...params
2223
+ }),
2224
+ updateTeamInOrganizationById: (organizationId, teamId, data, params = {}) => this.request({
2225
+ path: `/orgs/${organizationId}/teams/${teamId}`,
2226
+ method: "PATCH",
2227
+ body: data,
2228
+ secure: true,
2229
+ type: "application/json" /* Json */,
2230
+ format: "json",
2231
+ ...params
2232
+ }),
2233
+ removeTeamFromOrganizationById: (organizationId, teamId, params = {}) => this.request({
2234
+ path: `/orgs/${organizationId}/teams/${teamId}`,
2235
+ method: "DELETE",
2236
+ secure: true,
2237
+ ...params
2238
+ }),
2239
+ updateMembersInOrganizationTeam: (organizationId, teamId, data, params = {}) => this.request({
2240
+ path: `/orgs/${organizationId}/teams/${teamId}/members`,
2241
+ method: "PUT",
2242
+ body: data,
2243
+ secure: true,
2244
+ type: "application/json" /* Json */,
2245
+ ...params
2246
+ }),
2247
+ listTeamMembersInOrganizationById: (organizationId, teamId, query, params = {}) => this.request({
2248
+ path: `/orgs/${organizationId}/teams/${teamId}/members`,
2249
+ method: "GET",
2250
+ query,
2251
+ secure: true,
2252
+ format: "json",
2253
+ ...params
2254
+ }),
2255
+ addMemberToOrganizationTeamById: (organizationId, teamId, userId, data, params = {}) => this.request({
2256
+ path: `/orgs/${organizationId}/teams/${teamId}/members/${userId}`,
2257
+ method: "PUT",
2258
+ body: data,
2259
+ secure: true,
2260
+ type: "application/json" /* Json */,
2261
+ ...params
2262
+ }),
2263
+ deleteMemberFromOrganizationTeamById: (organizationId, teamId, userId, params = {}) => this.request({
2264
+ path: `/orgs/${organizationId}/teams/${teamId}/members/${userId}`,
2265
+ method: "DELETE",
2266
+ secure: true,
2267
+ ...params
2268
+ }),
2269
+ inviteUsersToOrganization: (organizationId, data, params = {}) => this.request({
2270
+ path: `/orgs/${organizationId}/invites`,
2271
+ method: "POST",
2272
+ body: data,
2273
+ secure: true,
2274
+ type: "application/json" /* Json */,
2275
+ format: "json",
2276
+ ...params
2277
+ }),
2278
+ joinOrganizationWithInvite: (organizationId, inviteId, params = {}) => this.request({
2279
+ path: `/orgs/${organizationId}/invites/${inviteId}`,
2280
+ method: "POST",
2281
+ secure: true,
2282
+ format: "json",
2283
+ ...params
2284
+ }),
2285
+ createOrganizationInvite: (organizationId, data, params = {}) => this.request({
2286
+ path: `/orgs/${organizationId}/link-invites`,
2287
+ method: "POST",
2288
+ body: data,
2289
+ secure: true,
2290
+ type: "application/json" /* Json */,
2291
+ format: "json",
2292
+ ...params
2293
+ }),
2294
+ updateOrganizationInviteById: (organizationId, inviteId, data, params = {}) => this.request({
2295
+ path: `/orgs/${organizationId}/link-invites/${inviteId}`,
2296
+ method: "PATCH",
2297
+ body: data,
2298
+ secure: true,
2299
+ type: "application/json" /* Json */,
2300
+ format: "json",
2301
+ ...params
2302
+ }),
2303
+ deleteOrganizationInviteById: (organizationId, inviteId, params = {}) => this.request({
2304
+ path: `/orgs/${organizationId}/link-invites/${inviteId}`,
2305
+ method: "DELETE",
2306
+ secure: true,
2307
+ ...params
2308
+ }),
2309
+ upgradeOrganizationPlan: (organizationId, data, query, params = {}) => this.request({
2310
+ path: `/orgs/${organizationId}/billing`,
2311
+ method: "POST",
2312
+ query,
2313
+ body: data,
2314
+ secure: true,
2315
+ type: "application/json" /* Json */,
2316
+ format: "json",
2317
+ ...params
2318
+ }),
2319
+ getOrganizationBillingPortal: (organizationId, params = {}) => this.request({
2320
+ path: `/orgs/${organizationId}/billing`,
2321
+ method: "GET",
2322
+ secure: true,
2323
+ format: "json",
2324
+ ...params
2325
+ }),
2326
+ previewBillingInvoice: (organizationId, query, params = {}) => this.request({
2327
+ path: `/orgs/${organizationId}/billing/preview`,
2328
+ method: "GET",
2329
+ query,
2330
+ secure: true,
2331
+ format: "json",
2332
+ ...params
2333
+ }),
2334
+ requestOrganizationUpgrade: (organizationId, params = {}) => this.request({
2335
+ path: `/orgs/${organizationId}/request_upgrade`,
2336
+ method: "POST",
2337
+ secure: true,
2338
+ format: "json",
2339
+ ...params
2340
+ }),
2341
+ searchOrganizationContent: (organizationId, query, params = {}) => this.request({
2342
+ path: `/orgs/${organizationId}/search`,
2343
+ method: "GET",
2344
+ query,
2345
+ secure: true,
2346
+ format: "json",
2347
+ ...params
2348
+ }),
2349
+ listSpacesInOrganizationById: (organizationId, query, params = {}) => this.request({
2350
+ path: `/orgs/${organizationId}/spaces`,
2351
+ method: "GET",
2352
+ query,
2353
+ secure: true,
2354
+ format: "json",
2355
+ ...params
2356
+ }),
2357
+ createSpace: (organizationId, data, params = {}) => this.request({
2358
+ path: `/orgs/${organizationId}/spaces`,
2359
+ method: "POST",
2360
+ body: data,
2361
+ secure: true,
2362
+ type: "application/json" /* Json */,
2363
+ format: "json",
2364
+ ...params
2365
+ }),
2366
+ listSpacesWithGitSyncInOrganizationById: (organizationId, query, params = {}) => this.request({
2367
+ path: `/orgs/${organizationId}/spaces/gitsync`,
2368
+ method: "GET",
2369
+ query,
2370
+ secure: true,
2371
+ format: "json",
2372
+ ...params
2373
+ }),
2374
+ listCollectionsInOrganizationById: (organizationId, query, params = {}) => this.request({
2375
+ path: `/orgs/${organizationId}/collections`,
2376
+ method: "GET",
2377
+ query,
2378
+ secure: true,
2379
+ format: "json",
2380
+ ...params
2381
+ }),
2382
+ createCollection: (organizationId, data, params = {}) => this.request({
2383
+ path: `/orgs/${organizationId}/collections`,
2384
+ method: "POST",
2385
+ body: data,
2386
+ secure: true,
2387
+ type: "application/json" /* Json */,
2388
+ format: "json",
2389
+ ...params
2390
+ }),
2391
+ listOrganizationCustomFields: (organizationId, query, params = {}) => this.request({
2392
+ path: `/orgs/${organizationId}/custom-fields`,
2393
+ method: "GET",
2394
+ query,
2395
+ secure: true,
2396
+ format: "json",
2397
+ ...params
2398
+ }),
2399
+ createOrganizationCustomField: (organizationId, data, params = {}) => this.request({
2400
+ path: `/orgs/${organizationId}/custom-fields`,
2401
+ method: "POST",
2402
+ body: data,
2403
+ secure: true,
2404
+ type: "application/json" /* Json */,
2405
+ format: "json",
2406
+ ...params
2407
+ }),
2408
+ getOrganizationCustomFieldByName: (organizationId, fieldName, params = {}) => this.request({
2409
+ path: `/orgs/${organizationId}/custom-fields/${fieldName}`,
2410
+ method: "GET",
2411
+ secure: true,
2412
+ format: "json",
2413
+ ...params
2414
+ }),
2415
+ updateOrganizationCustomField: (organizationId, fieldName, data, params = {}) => this.request({
2416
+ path: `/orgs/${organizationId}/custom-fields/${fieldName}`,
2417
+ method: "PATCH",
2418
+ body: data,
2419
+ secure: true,
2420
+ type: "application/json" /* Json */,
2421
+ format: "json",
2422
+ ...params
2423
+ }),
2424
+ deleteOrganizationCustomField: (organizationId, fieldName, params = {}) => this.request({
2425
+ path: `/orgs/${organizationId}/custom-fields/${fieldName}`,
2426
+ method: "DELETE",
2427
+ secure: true,
2428
+ ...params
2429
+ }),
2430
+ listOrganizationIntegrations: (organizationId, query, params = {}) => this.request({
2431
+ path: `/orgs/${organizationId}/integrations`,
2432
+ method: "GET",
2433
+ query,
2434
+ secure: true,
2435
+ format: "json",
2436
+ ...params
2437
+ }),
2438
+ getOrganizationIntegrationStatus: (organizationId, integrationName, params = {}) => this.request({
2439
+ path: `/orgs/${organizationId}/integrations/${integrationName}/installation_status`,
2440
+ method: "GET",
2441
+ secure: true,
2442
+ format: "json",
2443
+ ...params
2444
+ }),
2445
+ listOrganizationInstallations: (organizationId, query, params = {}) => this.request({
2446
+ path: `/orgs/${organizationId}/installations`,
2447
+ method: "GET",
2448
+ query,
2449
+ secure: true,
2450
+ format: "json",
2451
+ ...params
2452
+ }),
2453
+ listOrganizationIntegrationsStatus: (organizationId, query, params = {}) => this.request({
2454
+ path: `/orgs/${organizationId}/integrations/installations-status`,
2455
+ method: "GET",
2456
+ query,
2457
+ secure: true,
2458
+ format: "json",
2459
+ ...params
2460
+ }),
2461
+ listOrgExperimentalFeatures: (organizationId, params = {}) => this.request({
2462
+ path: `/orgs/${organizationId}/experiments`,
2463
+ method: "GET",
2464
+ secure: true,
2465
+ format: "json",
2466
+ ...params
2467
+ }),
2468
+ updateOrgExperimentalFeatures: (organizationId, data, params = {}) => this.request({
2469
+ path: `/orgs/${organizationId}/experiments`,
2470
+ method: "POST",
2471
+ body: data,
2472
+ secure: true,
2473
+ type: "application/json" /* Json */,
2474
+ ...params
2475
+ }),
2476
+ listSamlProvidersInOrganizationById: (organizationId, query, params = {}) => this.request({
2477
+ path: `/orgs/${organizationId}/saml`,
2478
+ method: "GET",
2479
+ query,
2480
+ secure: true,
2481
+ format: "json",
2482
+ ...params
2483
+ }),
2484
+ createOrganizationSamlProvider: (organizationId, data, params = {}) => this.request({
2485
+ path: `/orgs/${organizationId}/saml`,
2486
+ method: "POST",
2487
+ body: data,
2488
+ secure: true,
2489
+ type: "application/json" /* Json */,
2490
+ format: "json",
2491
+ ...params
2492
+ }),
2493
+ getOrganizationSamlProviderById: (organizationId, samlProviderId, params = {}) => this.request({
2494
+ path: `/orgs/${organizationId}/saml/${samlProviderId}`,
2495
+ method: "GET",
2496
+ secure: true,
2497
+ format: "json",
2498
+ ...params
2499
+ }),
2500
+ updateOrganizationSamlProvider: (organizationId, samlProviderId, data, params = {}) => this.request({
2501
+ path: `/orgs/${organizationId}/saml/${samlProviderId}`,
2502
+ method: "PATCH",
2503
+ body: data,
2504
+ secure: true,
2505
+ type: "application/json" /* Json */,
2506
+ format: "json",
2507
+ ...params
2508
+ }),
2509
+ deleteOrganizationSamlProvider: (organizationId, samlProviderId, params = {}) => this.request({
2510
+ path: `/orgs/${organizationId}/saml/${samlProviderId}`,
2511
+ method: "DELETE",
2512
+ secure: true,
2513
+ ...params
2514
+ }),
2515
+ getUsageForOrganizationById: (organizationId, params = {}) => this.request({
2516
+ path: `/orgs/${organizationId}/usage`,
2517
+ method: "GET",
2518
+ secure: true,
2519
+ format: "json",
2520
+ ...params
2521
+ }),
2522
+ getCollectionsUsageForOrganizationById: (organizationId, params = {}) => this.request({
2523
+ path: `/orgs/${organizationId}/usage/collections`,
2524
+ method: "GET",
2525
+ secure: true,
2526
+ format: "json",
2527
+ ...params
2528
+ }),
2529
+ getSpacesUsageForOrganizationById: (organizationId, params = {}) => this.request({
2530
+ path: `/orgs/${organizationId}/usage/spaces`,
2531
+ method: "GET",
2532
+ secure: true,
2533
+ format: "json",
2534
+ ...params
2535
+ }),
2536
+ getSitesUsageForOrganizationById: (organizationId, params = {}) => this.request({
2537
+ path: `/orgs/${organizationId}/usage/sites`,
2538
+ method: "GET",
2539
+ secure: true,
2540
+ format: "json",
2541
+ ...params
2542
+ }),
2543
+ getTeamsUsageForOrganizationById: (organizationId, params = {}) => this.request({
2544
+ path: `/orgs/${organizationId}/usage/teams`,
2545
+ method: "GET",
2546
+ secure: true,
2547
+ format: "json",
2548
+ ...params
2549
+ }),
2550
+ getMembersUsageForOrganizationById: (organizationId, params = {}) => this.request({
2551
+ path: `/orgs/${organizationId}/usage/members`,
2552
+ method: "GET",
2553
+ secure: true,
2554
+ format: "json",
2555
+ ...params
2556
+ }),
2557
+ getTeamMembersUsageForOrganizationById: (organizationId, params = {}) => this.request({
2558
+ path: `/orgs/${organizationId}/usage/team-members`,
2559
+ method: "GET",
2560
+ secure: true,
2561
+ format: "json",
2562
+ ...params
2563
+ }),
2564
+ listCaptures: (organizationId, query, params = {}) => this.request({
2565
+ path: `/orgs/${organizationId}/captures`,
2566
+ method: "GET",
2567
+ query,
2568
+ secure: true,
2569
+ format: "json",
2570
+ ...params
2571
+ }),
2572
+ startCapture: (organizationId, data, params = {}) => this.request({
2573
+ path: `/orgs/${organizationId}/captures`,
2574
+ method: "POST",
2575
+ body: data,
2576
+ secure: true,
2577
+ type: "application/json" /* Json */,
2578
+ format: "json",
2579
+ ...params
2580
+ }),
2581
+ getCapture: (organizationId, captureId, query, params = {}) => this.request({
2582
+ path: `/orgs/${organizationId}/captures/${captureId}`,
2583
+ method: "GET",
2584
+ query,
2585
+ secure: true,
2586
+ format: "json",
2587
+ ...params
2588
+ }),
2589
+ addEventsToCapture: (organizationId, captureId, data, params = {}) => this.request({
2590
+ path: `/orgs/${organizationId}/captures/${captureId}/events`,
2591
+ method: "POST",
2592
+ body: data,
2593
+ secure: true,
2594
+ type: "application/json" /* Json */,
2595
+ ...params
2596
+ }),
2597
+ stopCapture: (organizationId, captureId, data, query, params = {}) => this.request({
2598
+ path: `/orgs/${organizationId}/captures/${captureId}/stop`,
2599
+ method: "POST",
2600
+ query,
2601
+ body: data,
2602
+ secure: true,
2603
+ type: "application/json" /* Json */,
2604
+ format: "json",
2605
+ ...params
2606
+ }),
2607
+ listSnippets: (organizationId, query, params = {}) => this.request({
2608
+ path: `/orgs/${organizationId}/snippets`,
2609
+ method: "GET",
2610
+ query,
2611
+ secure: true,
2612
+ format: "json",
2613
+ ...params
2614
+ }),
2615
+ createSnippet: (organizationId, data, params = {}) => this.request({
2616
+ path: `/orgs/${organizationId}/snippets`,
2617
+ method: "POST",
2618
+ body: data,
2619
+ secure: true,
2620
+ type: "application/json" /* Json */,
2621
+ format: "json",
2622
+ ...params
2623
+ }),
2624
+ getSnippet: (organizationId, snippetId, params = {}) => this.request({
2625
+ path: `/orgs/${organizationId}/snippets/${snippetId}`,
2626
+ method: "GET",
2627
+ secure: true,
2628
+ format: "json",
2629
+ ...params
2630
+ }),
2631
+ deleteSnippet: (organizationId, snippetId, params = {}) => this.request({
2632
+ path: `/orgs/${organizationId}/snippets/${snippetId}`,
2633
+ method: "DELETE",
2634
+ secure: true,
2635
+ ...params
2636
+ }),
2637
+ updateSnippet: (organizationId, snippetId, data, params = {}) => this.request({
2638
+ path: `/orgs/${organizationId}/snippets/${snippetId}`,
2639
+ method: "PUT",
2640
+ body: data,
2641
+ secure: true,
2642
+ type: "application/json" /* Json */,
2643
+ format: "json",
2644
+ ...params
2645
+ }),
2646
+ moveSnippet: (organizationId, snippetId, data, params = {}) => this.request({
2647
+ path: `/orgs/${organizationId}/snippets/${snippetId}/move`,
2648
+ method: "POST",
2649
+ body: data,
2650
+ secure: true,
2651
+ type: "application/json" /* Json */,
2652
+ format: "json",
2653
+ ...params
2654
+ }),
2655
+ getSnippetSuggestedLocations: (organizationId, snippetId, query, params = {}) => this.request({
2656
+ path: `/orgs/${organizationId}/snippets/${snippetId}/move`,
2657
+ method: "GET",
2658
+ query,
2659
+ secure: true,
2660
+ format: "json",
2661
+ ...params
2662
+ }),
2663
+ listSyncedBlocks: (organizationId, query, params = {}) => this.request({
2664
+ path: `/orgs/${organizationId}/synced-blocks`,
2665
+ method: "GET",
2666
+ query,
2667
+ secure: true,
2668
+ format: "json",
2669
+ ...params
2670
+ }),
2671
+ createSyncedBlock: (organizationId, data, params = {}) => this.request({
2672
+ path: `/orgs/${organizationId}/synced-blocks`,
2673
+ method: "POST",
2674
+ body: data,
2675
+ secure: true,
2676
+ type: "application/json" /* Json */,
2677
+ format: "json",
2678
+ ...params
2679
+ }),
2680
+ getSyncedBlock: (organizationId, syncedBlockId, params = {}) => this.request({
2681
+ path: `/orgs/${organizationId}/synced-blocks/${syncedBlockId}`,
2682
+ method: "GET",
2683
+ secure: true,
2684
+ format: "json",
2685
+ ...params
2686
+ }),
2687
+ updateSyncedBlock: (organizationId, syncedBlockId, data, params = {}) => this.request({
2688
+ path: `/orgs/${organizationId}/synced-blocks/${syncedBlockId}`,
2689
+ method: "PATCH",
2690
+ body: data,
2691
+ secure: true,
2692
+ type: "application/json" /* Json */,
2693
+ ...params
2694
+ }),
2695
+ deleteSyncedBlock: (organizationId, syncedBlockId, params = {}) => this.request({
2696
+ path: `/orgs/${organizationId}/synced-blocks/${syncedBlockId}`,
2697
+ method: "DELETE",
2698
+ secure: true,
2699
+ ...params
2700
+ }),
2701
+ getSyncedBlockContent: (organizationId, syncedBlockId, params = {}) => this.request({
2702
+ path: `/orgs/${organizationId}/synced-blocks/${syncedBlockId}/content`,
2703
+ method: "GET",
2704
+ secure: true,
2705
+ format: "json",
2706
+ ...params
2707
+ }),
2708
+ listSyncedBlockBacklinks: (organizationId, syncedBlockId, query, params = {}) => this.request({
2709
+ path: `/orgs/${organizationId}/synced-blocks/${syncedBlockId}/backlinks`,
2710
+ method: "GET",
2711
+ query,
2712
+ secure: true,
2713
+ format: "json",
2714
+ ...params
2715
+ }),
2716
+ listSyncedBlockSpaces: (organizationId, syncedBlockId, query, params = {}) => this.request({
2717
+ path: `/orgs/${organizationId}/synced-blocks/${syncedBlockId}/usage/spaces`,
2718
+ method: "GET",
2719
+ query,
2720
+ secure: true,
2721
+ format: "json",
2722
+ ...params
2723
+ }),
2724
+ askInOrganization: (organizationId, data, query, params = {}) => this.request({
2725
+ path: `/orgs/${organizationId}/ask`,
2726
+ method: "POST",
2727
+ query,
2728
+ body: data,
2729
+ secure: true,
2730
+ type: "application/json" /* Json */,
2731
+ format: "json",
2732
+ ...params
2733
+ }),
2734
+ getRecommendedQuestionsInOrganization: (organizationId, params = {}) => this.request({
2735
+ path: `/orgs/${organizationId}/ask/questions`,
2736
+ method: "GET",
2737
+ secure: true,
2738
+ format: "json",
2739
+ ...params
2740
+ }),
2741
+ streamRecommendedQuestionsInOrganization: (organizationId, params = {}) => this.streamRequest({
2742
+ path: `/orgs/${organizationId}/ask/questions/stream`,
2743
+ method: "GET",
2744
+ secure: true,
2745
+ ...params
2746
+ }),
2747
+ streamAskInOrganization: (organizationId, query, params = {}) => this.streamRequest({
2748
+ path: `/orgs/${organizationId}/ask/stream`,
2749
+ method: "GET",
2750
+ query,
2751
+ secure: true,
2752
+ ...params
2753
+ }),
2754
+ listSites: (organizationId, query, params = {}) => this.request({
2755
+ path: `/orgs/${organizationId}/sites`,
2756
+ method: "GET",
2757
+ query,
2758
+ secure: true,
2759
+ format: "json",
2760
+ ...params
2761
+ }),
2762
+ createSite: (organizationId, data, params = {}) => this.request({
2763
+ path: `/orgs/${organizationId}/sites`,
2764
+ method: "POST",
2765
+ body: data,
2766
+ secure: true,
2767
+ type: "application/json" /* Json */,
2768
+ format: "json",
2769
+ ...params
2770
+ }),
2771
+ previewSitePublishCheckout: (organizationId, query, params = {}) => this.request({
2772
+ path: `/orgs/${organizationId}/sites/publishing/checkout`,
2773
+ method: "GET",
2774
+ query,
2775
+ secure: true,
2776
+ format: "json",
2777
+ ...params
2778
+ }),
2779
+ getSiteById: (organizationId, siteId, params = {}) => this.request({
2780
+ path: `/orgs/${organizationId}/sites/${siteId}`,
2781
+ method: "GET",
2782
+ secure: true,
2783
+ format: "json",
2784
+ ...params
2785
+ }),
2786
+ updateSiteById: (organizationId, siteId, data, params = {}) => this.request({
2787
+ path: `/orgs/${organizationId}/sites/${siteId}`,
2788
+ method: "PATCH",
2789
+ body: data,
2790
+ secure: true,
2791
+ type: "application/json" /* Json */,
2792
+ format: "json",
2793
+ ...params
2794
+ }),
2795
+ deleteSiteById: (organizationId, siteId, params = {}) => this.request({
2796
+ path: `/orgs/${organizationId}/sites/${siteId}`,
2797
+ method: "DELETE",
2798
+ secure: true,
2799
+ ...params
2800
+ }),
2801
+ publishSite: (organizationId, siteId, params = {}) => this.request({
2802
+ path: `/orgs/${organizationId}/sites/${siteId}/publish`,
2803
+ method: "POST",
2804
+ secure: true,
2805
+ format: "json",
2806
+ ...params
2807
+ }),
2808
+ unpublishSite: (organizationId, siteId, params = {}) => this.request({
2809
+ path: `/orgs/${organizationId}/sites/${siteId}/unpublish`,
2810
+ method: "POST",
2811
+ secure: true,
2812
+ format: "json",
2813
+ ...params
2814
+ }),
2815
+ listSiteShareLinks: (organizationId, siteId, query, params = {}) => this.request({
2816
+ path: `/orgs/${organizationId}/sites/${siteId}/share-links`,
2817
+ method: "GET",
2818
+ query,
2819
+ secure: true,
2820
+ format: "json",
2821
+ ...params
2822
+ }),
2823
+ createSiteShareLink: (organizationId, siteId, data, params = {}) => this.request({
2824
+ path: `/orgs/${organizationId}/sites/${siteId}/share-links`,
2825
+ method: "POST",
2826
+ body: data,
2827
+ secure: true,
2828
+ type: "application/json" /* Json */,
2829
+ format: "json",
2830
+ ...params
2831
+ }),
2832
+ updateSiteShareLinkById: (organizationId, siteId, shareLinkId, data, params = {}) => this.request({
2833
+ path: `/orgs/${organizationId}/sites/${siteId}/share-links/${shareLinkId}`,
2834
+ method: "PATCH",
2835
+ body: data,
2836
+ secure: true,
2837
+ type: "application/json" /* Json */,
2838
+ format: "json",
2839
+ ...params
2840
+ }),
2841
+ deleteSiteShareLinkById: (organizationId, siteId, shareLinkId, params = {}) => this.request({
2842
+ path: `/orgs/${organizationId}/sites/${siteId}/share-links/${shareLinkId}`,
2843
+ method: "DELETE",
2844
+ secure: true,
2845
+ ...params
2846
+ }),
2847
+ getSiteStructure: (organizationId, siteId, query, params = {}) => this.request({
2848
+ path: `/orgs/${organizationId}/sites/${siteId}/structure`,
2849
+ method: "GET",
2850
+ query,
2851
+ secure: true,
2852
+ format: "json",
2853
+ ...params
2854
+ }),
2855
+ updateSitePlan: (organizationId, siteId, data, query, params = {}) => this.request({
2856
+ path: `/orgs/${organizationId}/sites/${siteId}/plan`,
2857
+ method: "POST",
2858
+ query,
2859
+ body: data,
2860
+ secure: true,
2861
+ type: "application/json" /* Json */,
2862
+ format: "json",
2863
+ ...params
2864
+ }),
2865
+ previewSitePlanUpdate: (organizationId, siteId, query, params = {}) => this.request({
2866
+ path: `/orgs/${organizationId}/sites/${siteId}/plan`,
2867
+ method: "GET",
2868
+ query,
2869
+ secure: true,
2870
+ format: "json",
2871
+ ...params
2872
+ }),
2873
+ getSitePublishingAuthById: (organizationId, siteId, params = {}) => this.request({
2874
+ path: `/orgs/${organizationId}/sites/${siteId}/publishing/auth`,
2875
+ method: "GET",
2876
+ secure: true,
2877
+ format: "json",
2878
+ ...params
2879
+ }),
2880
+ updateSitePublishingAuthById: (organizationId, siteId, data, params = {}) => this.request({
2881
+ path: `/orgs/${organizationId}/sites/${siteId}/publishing/auth`,
2882
+ method: "PATCH",
2883
+ body: data,
2884
+ secure: true,
2885
+ type: "application/json" /* Json */,
2886
+ format: "json",
2887
+ ...params
2888
+ }),
2889
+ regenerateSitePublishingAuthById: (organizationId, siteId, params = {}) => this.request({
2890
+ path: `/orgs/${organizationId}/sites/${siteId}/publishing/auth/regenerate`,
2891
+ method: "POST",
2892
+ secure: true,
2893
+ format: "json",
2894
+ ...params
2895
+ }),
2896
+ getSitePublishingPreviewById: (organizationId, siteId, query, params = {}) => this.request({
2897
+ path: `/orgs/${organizationId}/sites/${siteId}/publishing/preview`,
2898
+ method: "GET",
2899
+ query,
2900
+ secure: true,
2901
+ format: "json",
2902
+ ...params
2903
+ }),
2904
+ getSiteCustomizationById: (organizationId, siteId, query, params = {}) => this.request({
2905
+ path: `/orgs/${organizationId}/sites/${siteId}/customization`,
2906
+ method: "GET",
2907
+ query,
2908
+ secure: true,
2909
+ format: "json",
2910
+ ...params
2911
+ }),
2912
+ updateSiteCustomizationById: (organizationId, siteId, data, params = {}) => this.request({
2913
+ path: `/orgs/${organizationId}/sites/${siteId}/customization`,
2914
+ method: "PUT",
2915
+ body: data,
2916
+ secure: true,
2917
+ type: "application/json" /* Json */,
2918
+ format: "json",
2919
+ ...params
2920
+ }),
2921
+ getSiteRawCustomizationById: (organizationId, siteId, params = {}) => this.request({
2922
+ path: `/orgs/${organizationId}/sites/${siteId}/customization/raw`,
2923
+ method: "GET",
2924
+ secure: true,
2925
+ format: "json",
2926
+ ...params
2927
+ }),
2928
+ listSiteIntegrationScripts: (organizationId, siteId, params = {}) => this.request({
2929
+ path: `/orgs/${organizationId}/sites/${siteId}/integration-scripts`,
2930
+ method: "GET",
2931
+ secure: true,
2932
+ format: "json",
2933
+ ...params
2934
+ }),
2935
+ listSiteIntegrations: (organizationId, siteId, query, params = {}) => this.request({
2936
+ path: `/orgs/${organizationId}/sites/${siteId}/integrations`,
2937
+ method: "GET",
2938
+ query,
2939
+ secure: true,
2940
+ format: "json",
2941
+ ...params
2942
+ }),
2943
+ addSpaceToSite: (organizationId, siteId, data, params = {}) => this.request({
2944
+ path: `/orgs/${organizationId}/sites/${siteId}/site-spaces`,
2945
+ method: "POST",
2946
+ body: data,
2947
+ secure: true,
2948
+ type: "application/json" /* Json */,
2949
+ format: "json",
2950
+ ...params
2951
+ }),
2952
+ listSiteSpaces: (organizationId, siteId, query, params = {}) => this.request({
2953
+ path: `/orgs/${organizationId}/sites/${siteId}/site-spaces`,
2954
+ method: "GET",
2955
+ query,
2956
+ secure: true,
2957
+ format: "json",
2958
+ ...params
2959
+ }),
2960
+ addSectionToSite: (organizationId, siteId, data, params = {}) => this.request({
2961
+ path: `/orgs/${organizationId}/sites/${siteId}/sections`,
2962
+ method: "POST",
2963
+ body: data,
2964
+ secure: true,
2965
+ type: "application/json" /* Json */,
2966
+ format: "json",
2967
+ ...params
2968
+ }),
2969
+ listSiteSections: (organizationId, siteId, query, params = {}) => this.request({
2970
+ path: `/orgs/${organizationId}/sites/${siteId}/sections`,
2971
+ method: "GET",
2972
+ query,
2973
+ secure: true,
2974
+ format: "json",
2975
+ ...params
2976
+ }),
2977
+ updateSiteSectionById: (organizationId, siteId, siteSectionId, data, params = {}) => this.request({
2978
+ path: `/orgs/${organizationId}/sites/${siteId}/sections/${siteSectionId}`,
2979
+ method: "PATCH",
2980
+ body: data,
2981
+ secure: true,
2982
+ type: "application/json" /* Json */,
2983
+ format: "json",
2984
+ ...params
2985
+ }),
2986
+ deleteSiteSectionById: (organizationId, siteId, siteSectionId, params = {}) => this.request({
2987
+ path: `/orgs/${organizationId}/sites/${siteId}/sections/${siteSectionId}`,
2988
+ method: "DELETE",
2989
+ secure: true,
2990
+ ...params
2991
+ }),
2992
+ searchSiteContent: (organizationId, siteId, data, query, params = {}) => this.request({
2993
+ path: `/orgs/${organizationId}/sites/${siteId}/search`,
2994
+ method: "POST",
2995
+ query,
2996
+ body: data,
2997
+ secure: true,
2998
+ type: "application/json" /* Json */,
2999
+ format: "json",
3000
+ ...params
3001
+ }),
3002
+ updateSiteSpaceById: (organizationId, siteId, siteSpaceId, data, params = {}) => this.request({
3003
+ path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}`,
3004
+ method: "PATCH",
3005
+ body: data,
3006
+ secure: true,
3007
+ type: "application/json" /* Json */,
3008
+ format: "json",
3009
+ ...params
3010
+ }),
3011
+ deleteSiteSpaceById: (organizationId, siteId, siteSpaceId, params = {}) => this.request({
3012
+ path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}`,
3013
+ method: "DELETE",
3014
+ secure: true,
3015
+ ...params
3016
+ }),
3017
+ getSiteSpaceCustomizationById: (organizationId, siteId, siteSpaceId, query, params = {}) => this.request({
3018
+ path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}/customization`,
3019
+ method: "GET",
3020
+ query,
3021
+ secure: true,
3022
+ format: "json",
3023
+ ...params
3024
+ }),
3025
+ overrideSiteSpaceCustomizationById: (organizationId, siteId, siteSpaceId, data, params = {}) => this.request({
3026
+ path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}/customization`,
3027
+ method: "PATCH",
3028
+ body: data,
3029
+ secure: true,
3030
+ type: "application/json" /* Json */,
3031
+ format: "json",
3032
+ ...params
3033
+ }),
3034
+ getSiteSpaceRawCustomizationById: (organizationId, siteId, siteSpaceId, params = {}) => this.request({
3035
+ path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}/customization/raw`,
3036
+ method: "GET",
3037
+ secure: true,
3038
+ format: "json",
3039
+ ...params
3040
+ }),
3041
+ getContentAnalyticsForSiteSpaceById: (organizationId, siteId, siteSpaceId, query, params = {}) => this.request({
3042
+ path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}/insights/content`,
3043
+ method: "GET",
3044
+ query,
3045
+ secure: true,
3046
+ format: "json",
3047
+ ...params
3048
+ }),
3049
+ createSitesPageFeedback: (organizationId, siteId, siteSpaceId, pageId, visitorId, data, params = {}) => this.request({
3050
+ path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}/insights/pages/${pageId}/feedbacks/${visitorId}`,
3051
+ method: "PUT",
3052
+ body: data,
3053
+ secure: true,
3054
+ type: "application/json" /* Json */,
3055
+ format: "json",
3056
+ ...params
3057
+ }),
3058
+ moveSiteSpace: (organizationId, siteId, siteSpaceId, data, params = {}) => this.request({
3059
+ path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}/move`,
3060
+ method: "POST",
3061
+ body: data,
3062
+ secure: true,
3063
+ type: "application/json" /* Json */,
3064
+ format: "json",
3065
+ ...params
3066
+ }),
3067
+ listPermissionsAggregateInSite: (organizationId, siteId, query, params = {}) => this.request({
3068
+ path: `/orgs/${organizationId}/sites/${siteId}/permissions/aggregate`,
3069
+ method: "GET",
3070
+ query,
3071
+ secure: true,
3072
+ format: "json",
3073
+ ...params
3074
+ }),
3075
+ trackViewInSiteById: (organizationId, siteId, data, params = {}) => this.request({
3076
+ path: `/orgs/${organizationId}/sites/${siteId}/insights/track_view`,
3077
+ method: "POST",
3078
+ body: data,
3079
+ secure: true,
3080
+ type: "application/json" /* Json */,
3081
+ ...params
3082
+ }),
3083
+ getSearchAnalyticsForSiteById: (organizationId, siteId, query, params = {}) => this.request({
3084
+ path: `/orgs/${organizationId}/sites/${siteId}/insights/search`,
3085
+ method: "GET",
3086
+ query,
3087
+ secure: true,
3088
+ format: "json",
3089
+ ...params
3090
+ }),
3091
+ updateSiteAdsById: (organizationId, siteId, data, params = {}) => this.request({
3092
+ path: `/orgs/${organizationId}/sites/${siteId}/ads`,
3093
+ method: "POST",
3094
+ body: data,
3095
+ secure: true,
3096
+ type: "application/json" /* Json */,
3097
+ ...params
3098
+ }),
3099
+ getSiteAdsStatsById: (organizationId, siteId, params = {}) => this.request({
3100
+ path: `/orgs/${organizationId}/sites/${siteId}/ads/stats`,
3101
+ method: "POST",
3102
+ secure: true,
3103
+ format: "json",
3104
+ ...params
3105
+ })
3106
+ };
3107
+ customHostnames = {
3108
+ getCustomHostname: (hostname, params = {}) => this.request({
3109
+ path: `/custom-hostnames/${hostname}`,
3110
+ method: "GET",
3111
+ secure: true,
3112
+ format: "json",
3113
+ ...params
3114
+ }),
3115
+ setupCustomHostname: (hostname, data, params = {}) => this.request({
3116
+ path: `/custom-hostnames/${hostname}`,
3117
+ method: "POST",
3118
+ body: data,
3119
+ secure: true,
3120
+ type: "application/json" /* Json */,
3121
+ format: "json",
3122
+ ...params
3123
+ }),
3124
+ dnsRevalidateCustomHostname: (hostname, params = {}) => this.request({
3125
+ path: `/custom-hostnames/${hostname}`,
3126
+ method: "PATCH",
3127
+ secure: true,
3128
+ ...params
3129
+ }),
3130
+ removeCustomHostname: (hostname, params = {}) => this.request({
3131
+ path: `/custom-hostnames/${hostname}`,
3132
+ method: "DELETE",
3133
+ secure: true,
3134
+ ...params
3135
+ }),
3136
+ testCustomHostname: (hostname, data, params = {}) => this.request({
3137
+ path: `/custom-hostnames/${hostname}/test`,
3138
+ method: "POST",
3139
+ body: data,
3140
+ secure: true,
3141
+ type: "application/json" /* Json */,
3142
+ ...params
3143
+ })
3144
+ };
3145
+ ads = {
3146
+ adsListSites: (query, params = {}) => this.request({
3147
+ path: `/ads/sites`,
3148
+ method: "GET",
3149
+ query,
3150
+ secure: true,
3151
+ format: "json",
3152
+ ...params
3153
+ }),
3154
+ adsUpdateSite: (siteId, data, params = {}) => this.request({
3155
+ path: `/ads/sites/${siteId}`,
3156
+ method: "PATCH",
3157
+ body: data,
3158
+ secure: true,
3159
+ type: "application/json" /* Json */,
3160
+ ...params
3161
+ })
3162
+ };
3163
+ internal = {
3164
+ generateHiveAccessToken: (data, params = {}) => this.request({
3165
+ path: `/internal/hive/token`,
3166
+ method: "POST",
3167
+ body: data,
3168
+ secure: true,
3169
+ type: "application/json" /* Json */,
3170
+ format: "json",
3171
+ ...params
3172
+ })
3173
+ };
3174
+ urls = {
3175
+ getContentByUrl: (query, params = {}) => this.request({
3176
+ path: `/urls/content`,
3177
+ method: "GET",
3178
+ query,
3179
+ secure: true,
3180
+ format: "json",
3181
+ ...params
3182
+ }),
3183
+ getEmbedByUrl: (query, params = {}) => this.request({
3184
+ path: `/urls/embed`,
3185
+ method: "GET",
3186
+ query,
3187
+ secure: true,
3188
+ format: "json",
3189
+ ...params
3190
+ }),
3191
+ getPublishedContentByUrl: (query, params = {}) => this.request({
3192
+ path: `/urls/published`,
3193
+ method: "GET",
3194
+ query,
3195
+ secure: true,
3196
+ format: "json",
3197
+ ...params
3198
+ })
3199
+ };
3131
3200
  };
3132
3201
 
3133
3202
  // src/GitBookAPIError.ts
3134
3203
  var GitBookAPIError = class extends Error {
3204
+ response;
3205
+ name = "GitBookAPIError";
3206
+ code;
3207
+ errorMessage;
3135
3208
  constructor(errorMessage, response) {
3136
3209
  const message = `GitBook API failed with [${response.status}] ${response.url}: ${errorMessage}`;
3137
3210
  super(message);
3138
- this.name = "GitBookAPIError";
3139
3211
  this.response = response;
3140
3212
  this.code = response.status;
3141
3213
  this.errorMessage = errorMessage;
@@ -3145,6 +3217,9 @@ var GitBookAPIError = class extends Error {
3145
3217
  // src/index.ts
3146
3218
  var GITBOOK_DEFAULT_ENDPOINT = "https://api.gitbook.com";
3147
3219
  var GitBookAPI = class extends Api {
3220
+ endpoint;
3221
+ authToken;
3222
+ userAgent;
3148
3223
  constructor(options = {}) {
3149
3224
  const {
3150
3225
  endpoint = GITBOOK_DEFAULT_ENDPOINT,
@@ -3154,7 +3229,7 @@ var GitBookAPI = class extends Api {
3154
3229
  super({
3155
3230
  baseUrl: `${endpoint}/v1`,
3156
3231
  securityWorker: (securityData) => {
3157
- if (securityData.authToken) {
3232
+ if (securityData && securityData.authToken) {
3158
3233
  return {
3159
3234
  headers: {
3160
3235
  Authorization: `Bearer ${securityData.authToken}`,
@@ -3165,10 +3240,10 @@ var GitBookAPI = class extends Api {
3165
3240
  return {};
3166
3241
  },
3167
3242
  customFetch: async (input, init) => {
3168
- if ("credentials" in init) {
3243
+ if (init && "credentials" in init) {
3169
3244
  delete init.credentials;
3170
3245
  }
3171
- if ("referrerPolicy" in init) {
3246
+ if (init && "referrerPolicy" in init) {
3172
3247
  delete init.referrerPolicy;
3173
3248
  }
3174
3249
  const response = await fetch(input, init);