@gitbook/api 0.63.0 → 0.65.0

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