@gitbook/api 0.33.0 → 0.35.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/GitBookAPIError.d.ts +4 -0
- package/dist/client.d.ts +578 -68
- package/dist/index.cjs +108 -3
- package/dist/index.js +106 -3
- package/package.json +1 -1
- package/spec/openapi.json +1753 -217
- package/spec/openapi.yaml +1099 -104
package/dist/index.cjs
CHANGED
|
@@ -192,6 +192,7 @@ __export(src_exports, {
|
|
|
192
192
|
ContentAuditRelationStatus: () => ContentAuditRelationStatus,
|
|
193
193
|
ContentAuditRelationType: () => ContentAuditRelationType,
|
|
194
194
|
ContentKitIcon: () => ContentKitIcon,
|
|
195
|
+
ContentReferenceStatus: () => ContentReferenceStatus,
|
|
195
196
|
ContentType: () => ContentType,
|
|
196
197
|
ContentVisibility: () => ContentVisibility,
|
|
197
198
|
CustomFieldType: () => CustomFieldType,
|
|
@@ -223,6 +224,7 @@ __export(src_exports, {
|
|
|
223
224
|
RevisionPageLayoutPreset: () => RevisionPageLayoutPreset,
|
|
224
225
|
RevisionPageType: () => RevisionPageType,
|
|
225
226
|
RevisionSemanticChangeType: () => RevisionSemanticChangeType,
|
|
227
|
+
SiteVisibility: () => SiteVisibility,
|
|
226
228
|
SpaceBlockReason: () => SpaceBlockReason,
|
|
227
229
|
SpaceEditMode: () => SpaceEditMode,
|
|
228
230
|
TeamMemberRole: () => TeamMemberRole
|
|
@@ -231,7 +233,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
231
233
|
|
|
232
234
|
// package.json
|
|
233
235
|
var name = "@gitbook/api";
|
|
234
|
-
var version = "0.
|
|
236
|
+
var version = "0.35.0";
|
|
235
237
|
|
|
236
238
|
// src/client.ts
|
|
237
239
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -464,6 +466,11 @@ var ContentAuditRelationStatus = /* @__PURE__ */ ((ContentAuditRelationStatus2)
|
|
|
464
466
|
ContentAuditRelationStatus2["Rejected"] = "rejected";
|
|
465
467
|
return ContentAuditRelationStatus2;
|
|
466
468
|
})(ContentAuditRelationStatus || {});
|
|
469
|
+
var ContentReferenceStatus = /* @__PURE__ */ ((ContentReferenceStatus2) => {
|
|
470
|
+
ContentReferenceStatus2["Broken"] = "broken";
|
|
471
|
+
ContentReferenceStatus2["InApp"] = "in-app";
|
|
472
|
+
return ContentReferenceStatus2;
|
|
473
|
+
})(ContentReferenceStatus || {});
|
|
467
474
|
var ChangeRequestStatus = /* @__PURE__ */ ((ChangeRequestStatus2) => {
|
|
468
475
|
ChangeRequestStatus2["Draft"] = "draft";
|
|
469
476
|
ChangeRequestStatus2["Open"] = "open";
|
|
@@ -501,6 +508,7 @@ var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
|
|
|
501
508
|
IntegrationScope2["SpaceScriptCookies"] = "space:script:cookies";
|
|
502
509
|
IntegrationScope2["SpaceGitSync"] = "space:git:sync";
|
|
503
510
|
IntegrationScope2["SpaceVisitorAuth"] = "space:visitor:auth";
|
|
511
|
+
IntegrationScope2["SiteVisitorAuth"] = "site:visitor:auth";
|
|
504
512
|
return IntegrationScope2;
|
|
505
513
|
})(IntegrationScope || {});
|
|
506
514
|
var IntegrationInstallationSpaceSelection = /* @__PURE__ */ ((IntegrationInstallationSpaceSelection2) => {
|
|
@@ -678,6 +686,14 @@ var PageFeedbackRating = /* @__PURE__ */ ((PageFeedbackRating2) => {
|
|
|
678
686
|
PageFeedbackRating2["Good"] = "good";
|
|
679
687
|
return PageFeedbackRating2;
|
|
680
688
|
})(PageFeedbackRating || {});
|
|
689
|
+
var SiteVisibility = /* @__PURE__ */ ((SiteVisibility2) => {
|
|
690
|
+
SiteVisibility2["Public"] = "public";
|
|
691
|
+
SiteVisibility2["Unlisted"] = "unlisted";
|
|
692
|
+
SiteVisibility2["ShareLink"] = "share-link";
|
|
693
|
+
SiteVisibility2["VisitorAuth"] = "visitor-auth";
|
|
694
|
+
SiteVisibility2["Unpublished"] = "unpublished";
|
|
695
|
+
return SiteVisibility2;
|
|
696
|
+
})(SiteVisibility || {});
|
|
681
697
|
var ContentType = /* @__PURE__ */ ((ContentType2) => {
|
|
682
698
|
ContentType2["Json"] = "application/json";
|
|
683
699
|
ContentType2["FormData"] = "multipart/form-data";
|
|
@@ -1042,6 +1058,12 @@ var Api = class extends HttpClient {
|
|
|
1042
1058
|
format: "json",
|
|
1043
1059
|
...params
|
|
1044
1060
|
}),
|
|
1061
|
+
streamRecommendedQuestionsInSpace: (spaceId, params = {}) => this.streamRequest({
|
|
1062
|
+
path: `/spaces/${spaceId}/search/questions/stream`,
|
|
1063
|
+
method: "GET",
|
|
1064
|
+
secure: true,
|
|
1065
|
+
...params
|
|
1066
|
+
}),
|
|
1045
1067
|
importGitRepository: (spaceId, data, params = {}) => this.request({
|
|
1046
1068
|
path: `/spaces/${spaceId}/git/import`,
|
|
1047
1069
|
method: "POST",
|
|
@@ -1058,6 +1080,14 @@ var Api = class extends HttpClient {
|
|
|
1058
1080
|
type: "application/json" /* Json */,
|
|
1059
1081
|
...params
|
|
1060
1082
|
}),
|
|
1083
|
+
syncGitRepository: (spaceId, data, params = {}) => this.request({
|
|
1084
|
+
path: `/spaces/${spaceId}/git/sync`,
|
|
1085
|
+
method: "POST",
|
|
1086
|
+
body: data,
|
|
1087
|
+
secure: true,
|
|
1088
|
+
type: "application/json" /* Json */,
|
|
1089
|
+
...params
|
|
1090
|
+
}),
|
|
1061
1091
|
getSpaceGitInfo: (spaceId, params = {}) => this.request({
|
|
1062
1092
|
path: `/spaces/${spaceId}/git/info`,
|
|
1063
1093
|
method: "GET",
|
|
@@ -1399,6 +1429,15 @@ var Api = class extends HttpClient {
|
|
|
1399
1429
|
format: "json",
|
|
1400
1430
|
...params
|
|
1401
1431
|
}),
|
|
1432
|
+
touchContentInChangeRequest: (spaceId, changeRequestId, data, params = {}) => this.request({
|
|
1433
|
+
path: `/spaces/${spaceId}/change-requests/${changeRequestId}/touched-content`,
|
|
1434
|
+
method: "POST",
|
|
1435
|
+
body: data,
|
|
1436
|
+
secure: true,
|
|
1437
|
+
type: "application/json" /* Json */,
|
|
1438
|
+
format: "json",
|
|
1439
|
+
...params
|
|
1440
|
+
}),
|
|
1402
1441
|
getRevisionById: (spaceId, revisionId, params = {}) => this.request({
|
|
1403
1442
|
path: `/spaces/${spaceId}/revisions/${revisionId}`,
|
|
1404
1443
|
method: "GET",
|
|
@@ -1572,6 +1611,21 @@ var Api = class extends HttpClient {
|
|
|
1572
1611
|
format: "json",
|
|
1573
1612
|
...params
|
|
1574
1613
|
}),
|
|
1614
|
+
getSpacePublishingPreviewById: (spaceId, params = {}) => this.request({
|
|
1615
|
+
path: `/spaces/${spaceId}/publishing/preview`,
|
|
1616
|
+
method: "GET",
|
|
1617
|
+
secure: true,
|
|
1618
|
+
format: "json",
|
|
1619
|
+
...params
|
|
1620
|
+
}),
|
|
1621
|
+
listSpaceIntegrations: (spaceId, query, params = {}) => this.request({
|
|
1622
|
+
path: `/spaces/${spaceId}/integrations`,
|
|
1623
|
+
method: "GET",
|
|
1624
|
+
query,
|
|
1625
|
+
secure: true,
|
|
1626
|
+
format: "json",
|
|
1627
|
+
...params
|
|
1628
|
+
}),
|
|
1575
1629
|
listSpaceIntegrationsBlocks: (spaceId, params = {}) => this.request({
|
|
1576
1630
|
path: `/spaces/${spaceId}/integration-blocks`,
|
|
1577
1631
|
method: "GET",
|
|
@@ -2127,8 +2181,17 @@ var Api = class extends HttpClient {
|
|
|
2127
2181
|
format: "json",
|
|
2128
2182
|
...params
|
|
2129
2183
|
}),
|
|
2184
|
+
createOrganizationInvite: (organizationId, data, params = {}) => this.request({
|
|
2185
|
+
path: `/orgs/${organizationId}/link-invites`,
|
|
2186
|
+
method: "POST",
|
|
2187
|
+
body: data,
|
|
2188
|
+
secure: true,
|
|
2189
|
+
type: "application/json" /* Json */,
|
|
2190
|
+
format: "json",
|
|
2191
|
+
...params
|
|
2192
|
+
}),
|
|
2130
2193
|
updateOrganizationInviteById: (organizationId, inviteId, data, params = {}) => this.request({
|
|
2131
|
-
path: `/orgs/${organizationId}/invites/${inviteId}`,
|
|
2194
|
+
path: `/orgs/${organizationId}/link-invites/${inviteId}`,
|
|
2132
2195
|
method: "PATCH",
|
|
2133
2196
|
body: data,
|
|
2134
2197
|
secure: true,
|
|
@@ -2137,7 +2200,7 @@ var Api = class extends HttpClient {
|
|
|
2137
2200
|
...params
|
|
2138
2201
|
}),
|
|
2139
2202
|
deleteOrganizationInviteById: (organizationId, inviteId, params = {}) => this.request({
|
|
2140
|
-
path: `/orgs/${organizationId}/invites/${inviteId}`,
|
|
2203
|
+
path: `/orgs/${organizationId}/link-invites/${inviteId}`,
|
|
2141
2204
|
method: "DELETE",
|
|
2142
2205
|
secure: true,
|
|
2143
2206
|
...params
|
|
@@ -2452,6 +2515,22 @@ var Api = class extends HttpClient {
|
|
|
2452
2515
|
format: "json",
|
|
2453
2516
|
...params
|
|
2454
2517
|
}),
|
|
2518
|
+
createSyncedBlock: (organizationId, data, params = {}) => this.request({
|
|
2519
|
+
path: `/orgs/${organizationId}/synced-blocks`,
|
|
2520
|
+
method: "POST",
|
|
2521
|
+
body: data,
|
|
2522
|
+
secure: true,
|
|
2523
|
+
type: "application/json" /* Json */,
|
|
2524
|
+
format: "json",
|
|
2525
|
+
...params
|
|
2526
|
+
}),
|
|
2527
|
+
getSyncedBlock: (organizationId, syncedBlockId, params = {}) => this.request({
|
|
2528
|
+
path: `/orgs/${organizationId}/synced-blocks/${syncedBlockId}`,
|
|
2529
|
+
method: "GET",
|
|
2530
|
+
secure: true,
|
|
2531
|
+
format: "json",
|
|
2532
|
+
...params
|
|
2533
|
+
}),
|
|
2455
2534
|
askInOrganization: (organizationId, data, query, params = {}) => this.request({
|
|
2456
2535
|
path: `/orgs/${organizationId}/ask`,
|
|
2457
2536
|
method: "POST",
|
|
@@ -2469,6 +2548,12 @@ var Api = class extends HttpClient {
|
|
|
2469
2548
|
format: "json",
|
|
2470
2549
|
...params
|
|
2471
2550
|
}),
|
|
2551
|
+
streamRecommendedQuestionsInOrganization: (organizationId, params = {}) => this.streamRequest({
|
|
2552
|
+
path: `/orgs/${organizationId}/ask/questions/stream`,
|
|
2553
|
+
method: "GET",
|
|
2554
|
+
secure: true,
|
|
2555
|
+
...params
|
|
2556
|
+
}),
|
|
2472
2557
|
streamAskInOrganization: (organizationId, query, params = {}) => this.streamRequest({
|
|
2473
2558
|
path: `/orgs/${organizationId}/ask/stream`,
|
|
2474
2559
|
method: "GET",
|
|
@@ -2507,6 +2592,23 @@ var Api = class extends HttpClient {
|
|
|
2507
2592
|
secure: true,
|
|
2508
2593
|
format: "json",
|
|
2509
2594
|
...params
|
|
2595
|
+
}),
|
|
2596
|
+
listSites: (organizationId, query, params = {}) => this.request({
|
|
2597
|
+
path: `/orgs/${organizationId}/sites`,
|
|
2598
|
+
method: "GET",
|
|
2599
|
+
query,
|
|
2600
|
+
secure: true,
|
|
2601
|
+
format: "json",
|
|
2602
|
+
...params
|
|
2603
|
+
}),
|
|
2604
|
+
createSite: (organizationId, data, params = {}) => this.request({
|
|
2605
|
+
path: `/orgs/${organizationId}/sites`,
|
|
2606
|
+
method: "POST",
|
|
2607
|
+
body: data,
|
|
2608
|
+
secure: true,
|
|
2609
|
+
type: "application/json" /* Json */,
|
|
2610
|
+
format: "json",
|
|
2611
|
+
...params
|
|
2510
2612
|
})
|
|
2511
2613
|
};
|
|
2512
2614
|
this.internal = {
|
|
@@ -2557,6 +2659,7 @@ var GitBookAPIError = class extends Error {
|
|
|
2557
2659
|
this.name = "GitBookAPIError";
|
|
2558
2660
|
this.response = response;
|
|
2559
2661
|
this.code = response.status;
|
|
2662
|
+
this.errorMessage = errorMessage;
|
|
2560
2663
|
}
|
|
2561
2664
|
};
|
|
2562
2665
|
|
|
@@ -2635,6 +2738,7 @@ var GitBookAPI = class extends Api {
|
|
|
2635
2738
|
ContentAuditRelationStatus,
|
|
2636
2739
|
ContentAuditRelationType,
|
|
2637
2740
|
ContentKitIcon,
|
|
2741
|
+
ContentReferenceStatus,
|
|
2638
2742
|
ContentType,
|
|
2639
2743
|
ContentVisibility,
|
|
2640
2744
|
CustomFieldType,
|
|
@@ -2666,6 +2770,7 @@ var GitBookAPI = class extends Api {
|
|
|
2666
2770
|
RevisionPageLayoutPreset,
|
|
2667
2771
|
RevisionPageType,
|
|
2668
2772
|
RevisionSemanticChangeType,
|
|
2773
|
+
SiteVisibility,
|
|
2669
2774
|
SpaceBlockReason,
|
|
2670
2775
|
SpaceEditMode,
|
|
2671
2776
|
TeamMemberRole
|
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.
|
|
175
|
+
var version = "0.35.0";
|
|
176
176
|
|
|
177
177
|
// src/client.ts
|
|
178
178
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -405,6 +405,11 @@ var ContentAuditRelationStatus = /* @__PURE__ */ ((ContentAuditRelationStatus2)
|
|
|
405
405
|
ContentAuditRelationStatus2["Rejected"] = "rejected";
|
|
406
406
|
return ContentAuditRelationStatus2;
|
|
407
407
|
})(ContentAuditRelationStatus || {});
|
|
408
|
+
var ContentReferenceStatus = /* @__PURE__ */ ((ContentReferenceStatus2) => {
|
|
409
|
+
ContentReferenceStatus2["Broken"] = "broken";
|
|
410
|
+
ContentReferenceStatus2["InApp"] = "in-app";
|
|
411
|
+
return ContentReferenceStatus2;
|
|
412
|
+
})(ContentReferenceStatus || {});
|
|
408
413
|
var ChangeRequestStatus = /* @__PURE__ */ ((ChangeRequestStatus2) => {
|
|
409
414
|
ChangeRequestStatus2["Draft"] = "draft";
|
|
410
415
|
ChangeRequestStatus2["Open"] = "open";
|
|
@@ -442,6 +447,7 @@ var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
|
|
|
442
447
|
IntegrationScope2["SpaceScriptCookies"] = "space:script:cookies";
|
|
443
448
|
IntegrationScope2["SpaceGitSync"] = "space:git:sync";
|
|
444
449
|
IntegrationScope2["SpaceVisitorAuth"] = "space:visitor:auth";
|
|
450
|
+
IntegrationScope2["SiteVisitorAuth"] = "site:visitor:auth";
|
|
445
451
|
return IntegrationScope2;
|
|
446
452
|
})(IntegrationScope || {});
|
|
447
453
|
var IntegrationInstallationSpaceSelection = /* @__PURE__ */ ((IntegrationInstallationSpaceSelection2) => {
|
|
@@ -619,6 +625,14 @@ var PageFeedbackRating = /* @__PURE__ */ ((PageFeedbackRating2) => {
|
|
|
619
625
|
PageFeedbackRating2["Good"] = "good";
|
|
620
626
|
return PageFeedbackRating2;
|
|
621
627
|
})(PageFeedbackRating || {});
|
|
628
|
+
var SiteVisibility = /* @__PURE__ */ ((SiteVisibility2) => {
|
|
629
|
+
SiteVisibility2["Public"] = "public";
|
|
630
|
+
SiteVisibility2["Unlisted"] = "unlisted";
|
|
631
|
+
SiteVisibility2["ShareLink"] = "share-link";
|
|
632
|
+
SiteVisibility2["VisitorAuth"] = "visitor-auth";
|
|
633
|
+
SiteVisibility2["Unpublished"] = "unpublished";
|
|
634
|
+
return SiteVisibility2;
|
|
635
|
+
})(SiteVisibility || {});
|
|
622
636
|
var ContentType = /* @__PURE__ */ ((ContentType2) => {
|
|
623
637
|
ContentType2["Json"] = "application/json";
|
|
624
638
|
ContentType2["FormData"] = "multipart/form-data";
|
|
@@ -983,6 +997,12 @@ var Api = class extends HttpClient {
|
|
|
983
997
|
format: "json",
|
|
984
998
|
...params
|
|
985
999
|
}),
|
|
1000
|
+
streamRecommendedQuestionsInSpace: (spaceId, params = {}) => this.streamRequest({
|
|
1001
|
+
path: `/spaces/${spaceId}/search/questions/stream`,
|
|
1002
|
+
method: "GET",
|
|
1003
|
+
secure: true,
|
|
1004
|
+
...params
|
|
1005
|
+
}),
|
|
986
1006
|
importGitRepository: (spaceId, data, params = {}) => this.request({
|
|
987
1007
|
path: `/spaces/${spaceId}/git/import`,
|
|
988
1008
|
method: "POST",
|
|
@@ -999,6 +1019,14 @@ var Api = class extends HttpClient {
|
|
|
999
1019
|
type: "application/json" /* Json */,
|
|
1000
1020
|
...params
|
|
1001
1021
|
}),
|
|
1022
|
+
syncGitRepository: (spaceId, data, params = {}) => this.request({
|
|
1023
|
+
path: `/spaces/${spaceId}/git/sync`,
|
|
1024
|
+
method: "POST",
|
|
1025
|
+
body: data,
|
|
1026
|
+
secure: true,
|
|
1027
|
+
type: "application/json" /* Json */,
|
|
1028
|
+
...params
|
|
1029
|
+
}),
|
|
1002
1030
|
getSpaceGitInfo: (spaceId, params = {}) => this.request({
|
|
1003
1031
|
path: `/spaces/${spaceId}/git/info`,
|
|
1004
1032
|
method: "GET",
|
|
@@ -1340,6 +1368,15 @@ var Api = class extends HttpClient {
|
|
|
1340
1368
|
format: "json",
|
|
1341
1369
|
...params
|
|
1342
1370
|
}),
|
|
1371
|
+
touchContentInChangeRequest: (spaceId, changeRequestId, data, params = {}) => this.request({
|
|
1372
|
+
path: `/spaces/${spaceId}/change-requests/${changeRequestId}/touched-content`,
|
|
1373
|
+
method: "POST",
|
|
1374
|
+
body: data,
|
|
1375
|
+
secure: true,
|
|
1376
|
+
type: "application/json" /* Json */,
|
|
1377
|
+
format: "json",
|
|
1378
|
+
...params
|
|
1379
|
+
}),
|
|
1343
1380
|
getRevisionById: (spaceId, revisionId, params = {}) => this.request({
|
|
1344
1381
|
path: `/spaces/${spaceId}/revisions/${revisionId}`,
|
|
1345
1382
|
method: "GET",
|
|
@@ -1513,6 +1550,21 @@ var Api = class extends HttpClient {
|
|
|
1513
1550
|
format: "json",
|
|
1514
1551
|
...params
|
|
1515
1552
|
}),
|
|
1553
|
+
getSpacePublishingPreviewById: (spaceId, params = {}) => this.request({
|
|
1554
|
+
path: `/spaces/${spaceId}/publishing/preview`,
|
|
1555
|
+
method: "GET",
|
|
1556
|
+
secure: true,
|
|
1557
|
+
format: "json",
|
|
1558
|
+
...params
|
|
1559
|
+
}),
|
|
1560
|
+
listSpaceIntegrations: (spaceId, query, params = {}) => this.request({
|
|
1561
|
+
path: `/spaces/${spaceId}/integrations`,
|
|
1562
|
+
method: "GET",
|
|
1563
|
+
query,
|
|
1564
|
+
secure: true,
|
|
1565
|
+
format: "json",
|
|
1566
|
+
...params
|
|
1567
|
+
}),
|
|
1516
1568
|
listSpaceIntegrationsBlocks: (spaceId, params = {}) => this.request({
|
|
1517
1569
|
path: `/spaces/${spaceId}/integration-blocks`,
|
|
1518
1570
|
method: "GET",
|
|
@@ -2068,8 +2120,17 @@ var Api = class extends HttpClient {
|
|
|
2068
2120
|
format: "json",
|
|
2069
2121
|
...params
|
|
2070
2122
|
}),
|
|
2123
|
+
createOrganizationInvite: (organizationId, data, params = {}) => this.request({
|
|
2124
|
+
path: `/orgs/${organizationId}/link-invites`,
|
|
2125
|
+
method: "POST",
|
|
2126
|
+
body: data,
|
|
2127
|
+
secure: true,
|
|
2128
|
+
type: "application/json" /* Json */,
|
|
2129
|
+
format: "json",
|
|
2130
|
+
...params
|
|
2131
|
+
}),
|
|
2071
2132
|
updateOrganizationInviteById: (organizationId, inviteId, data, params = {}) => this.request({
|
|
2072
|
-
path: `/orgs/${organizationId}/invites/${inviteId}`,
|
|
2133
|
+
path: `/orgs/${organizationId}/link-invites/${inviteId}`,
|
|
2073
2134
|
method: "PATCH",
|
|
2074
2135
|
body: data,
|
|
2075
2136
|
secure: true,
|
|
@@ -2078,7 +2139,7 @@ var Api = class extends HttpClient {
|
|
|
2078
2139
|
...params
|
|
2079
2140
|
}),
|
|
2080
2141
|
deleteOrganizationInviteById: (organizationId, inviteId, params = {}) => this.request({
|
|
2081
|
-
path: `/orgs/${organizationId}/invites/${inviteId}`,
|
|
2142
|
+
path: `/orgs/${organizationId}/link-invites/${inviteId}`,
|
|
2082
2143
|
method: "DELETE",
|
|
2083
2144
|
secure: true,
|
|
2084
2145
|
...params
|
|
@@ -2393,6 +2454,22 @@ var Api = class extends HttpClient {
|
|
|
2393
2454
|
format: "json",
|
|
2394
2455
|
...params
|
|
2395
2456
|
}),
|
|
2457
|
+
createSyncedBlock: (organizationId, data, params = {}) => this.request({
|
|
2458
|
+
path: `/orgs/${organizationId}/synced-blocks`,
|
|
2459
|
+
method: "POST",
|
|
2460
|
+
body: data,
|
|
2461
|
+
secure: true,
|
|
2462
|
+
type: "application/json" /* Json */,
|
|
2463
|
+
format: "json",
|
|
2464
|
+
...params
|
|
2465
|
+
}),
|
|
2466
|
+
getSyncedBlock: (organizationId, syncedBlockId, params = {}) => this.request({
|
|
2467
|
+
path: `/orgs/${organizationId}/synced-blocks/${syncedBlockId}`,
|
|
2468
|
+
method: "GET",
|
|
2469
|
+
secure: true,
|
|
2470
|
+
format: "json",
|
|
2471
|
+
...params
|
|
2472
|
+
}),
|
|
2396
2473
|
askInOrganization: (organizationId, data, query, params = {}) => this.request({
|
|
2397
2474
|
path: `/orgs/${organizationId}/ask`,
|
|
2398
2475
|
method: "POST",
|
|
@@ -2410,6 +2487,12 @@ var Api = class extends HttpClient {
|
|
|
2410
2487
|
format: "json",
|
|
2411
2488
|
...params
|
|
2412
2489
|
}),
|
|
2490
|
+
streamRecommendedQuestionsInOrganization: (organizationId, params = {}) => this.streamRequest({
|
|
2491
|
+
path: `/orgs/${organizationId}/ask/questions/stream`,
|
|
2492
|
+
method: "GET",
|
|
2493
|
+
secure: true,
|
|
2494
|
+
...params
|
|
2495
|
+
}),
|
|
2413
2496
|
streamAskInOrganization: (organizationId, query, params = {}) => this.streamRequest({
|
|
2414
2497
|
path: `/orgs/${organizationId}/ask/stream`,
|
|
2415
2498
|
method: "GET",
|
|
@@ -2448,6 +2531,23 @@ var Api = class extends HttpClient {
|
|
|
2448
2531
|
secure: true,
|
|
2449
2532
|
format: "json",
|
|
2450
2533
|
...params
|
|
2534
|
+
}),
|
|
2535
|
+
listSites: (organizationId, query, params = {}) => this.request({
|
|
2536
|
+
path: `/orgs/${organizationId}/sites`,
|
|
2537
|
+
method: "GET",
|
|
2538
|
+
query,
|
|
2539
|
+
secure: true,
|
|
2540
|
+
format: "json",
|
|
2541
|
+
...params
|
|
2542
|
+
}),
|
|
2543
|
+
createSite: (organizationId, data, params = {}) => this.request({
|
|
2544
|
+
path: `/orgs/${organizationId}/sites`,
|
|
2545
|
+
method: "POST",
|
|
2546
|
+
body: data,
|
|
2547
|
+
secure: true,
|
|
2548
|
+
type: "application/json" /* Json */,
|
|
2549
|
+
format: "json",
|
|
2550
|
+
...params
|
|
2451
2551
|
})
|
|
2452
2552
|
};
|
|
2453
2553
|
this.internal = {
|
|
@@ -2498,6 +2598,7 @@ var GitBookAPIError = class extends Error {
|
|
|
2498
2598
|
this.name = "GitBookAPIError";
|
|
2499
2599
|
this.response = response;
|
|
2500
2600
|
this.code = response.status;
|
|
2601
|
+
this.errorMessage = errorMessage;
|
|
2501
2602
|
}
|
|
2502
2603
|
};
|
|
2503
2604
|
|
|
@@ -2575,6 +2676,7 @@ export {
|
|
|
2575
2676
|
ContentAuditRelationStatus,
|
|
2576
2677
|
ContentAuditRelationType,
|
|
2577
2678
|
ContentKitIcon,
|
|
2679
|
+
ContentReferenceStatus,
|
|
2578
2680
|
ContentType,
|
|
2579
2681
|
ContentVisibility,
|
|
2580
2682
|
CustomFieldType,
|
|
@@ -2606,6 +2708,7 @@ export {
|
|
|
2606
2708
|
RevisionPageLayoutPreset,
|
|
2607
2709
|
RevisionPageType,
|
|
2608
2710
|
RevisionSemanticChangeType,
|
|
2711
|
+
SiteVisibility,
|
|
2609
2712
|
SpaceBlockReason,
|
|
2610
2713
|
SpaceEditMode,
|
|
2611
2714
|
TeamMemberRole
|