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