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