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