@gitbook/api 0.116.0 → 0.117.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.d.ts +420 -52
- package/dist/index.cjs +84 -9
- package/dist/index.js +82 -9
- package/package.json +1 -1
- package/spec/openapi.json +1194 -196
- package/spec/openapi.yaml +766 -108
package/dist/index.cjs
CHANGED
|
@@ -218,6 +218,7 @@ __export(src_exports, {
|
|
|
218
218
|
GITBOOK_DEFAULT_ENDPOINT: () => GITBOOK_DEFAULT_ENDPOINT,
|
|
219
219
|
GitBookAPI: () => GitBookAPI,
|
|
220
220
|
GitBookAPIError: () => GitBookAPIError,
|
|
221
|
+
GitBookUsers: () => GitBookUsers,
|
|
221
222
|
GitSyncOperationDirection: () => GitSyncOperationDirection,
|
|
222
223
|
GitSyncOperationStage: () => GitSyncOperationStage,
|
|
223
224
|
GitSyncOperationState: () => GitSyncOperationState,
|
|
@@ -246,6 +247,7 @@ __export(src_exports, {
|
|
|
246
247
|
SAMLProviderStatus: () => SAMLProviderStatus,
|
|
247
248
|
SiteAdsStatus: () => SiteAdsStatus,
|
|
248
249
|
SiteAdsTopic: () => SiteAdsTopic,
|
|
250
|
+
SiteAgentsContext: () => SiteAgentsContext,
|
|
249
251
|
SiteCustomizationFeature: () => SiteCustomizationFeature,
|
|
250
252
|
SiteInsightsAdPlacement: () => SiteInsightsAdPlacement,
|
|
251
253
|
SiteInsightsEventType: () => SiteInsightsEventType,
|
|
@@ -268,7 +270,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
268
270
|
|
|
269
271
|
// package.json
|
|
270
272
|
var name = "@gitbook/api";
|
|
271
|
-
var version = "0.
|
|
273
|
+
var version = "0.117.1";
|
|
272
274
|
|
|
273
275
|
// src/client.ts
|
|
274
276
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -595,6 +597,7 @@ var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
|
|
|
595
597
|
IntegrationScope2["SiteAdaptiveWrite"] = "site:adaptive:write";
|
|
596
598
|
IntegrationScope2["OpenapiRead"] = "openapi:read";
|
|
597
599
|
IntegrationScope2["OpenapiWrite"] = "openapi:write";
|
|
600
|
+
IntegrationScope2["ConversationsIngest"] = "conversations:ingest";
|
|
598
601
|
return IntegrationScope2;
|
|
599
602
|
})(IntegrationScope || {});
|
|
600
603
|
var IntegrationCategory = /* @__PURE__ */ ((IntegrationCategory2) => {
|
|
@@ -653,6 +656,11 @@ var SiteAdsTopic = /* @__PURE__ */ ((SiteAdsTopic2) => {
|
|
|
653
656
|
SiteAdsTopic2["Crypto"] = "crypto";
|
|
654
657
|
return SiteAdsTopic2;
|
|
655
658
|
})(SiteAdsTopic || {});
|
|
659
|
+
var SiteAgentsContext = /* @__PURE__ */ ((SiteAgentsContext2) => {
|
|
660
|
+
SiteAgentsContext2["Excluded"] = "excluded";
|
|
661
|
+
SiteAgentsContext2["Included"] = "included";
|
|
662
|
+
return SiteAgentsContext2;
|
|
663
|
+
})(SiteAgentsContext || {});
|
|
656
664
|
var SiteCustomizationFeature = /* @__PURE__ */ ((SiteCustomizationFeature2) => {
|
|
657
665
|
SiteCustomizationFeature2["HeaderLogo"] = "header-logo";
|
|
658
666
|
SiteCustomizationFeature2["ThemePreset"] = "theme-preset";
|
|
@@ -703,6 +711,13 @@ var SAMLProviderStatus = /* @__PURE__ */ ((SAMLProviderStatus2) => {
|
|
|
703
711
|
SAMLProviderStatus2["Pending"] = "pending";
|
|
704
712
|
return SAMLProviderStatus2;
|
|
705
713
|
})(SAMLProviderStatus || {});
|
|
714
|
+
var AgentTaskStatus = /* @__PURE__ */ ((AgentTaskStatus2) => {
|
|
715
|
+
AgentTaskStatus2["Backlog"] = "backlog";
|
|
716
|
+
AgentTaskStatus2["Started"] = "started";
|
|
717
|
+
AgentTaskStatus2["Completed"] = "completed";
|
|
718
|
+
AgentTaskStatus2["Canceled"] = "canceled";
|
|
719
|
+
return AgentTaskStatus2;
|
|
720
|
+
})(AgentTaskStatus || {});
|
|
706
721
|
var StorageUploadKind = /* @__PURE__ */ ((StorageUploadKind2) => {
|
|
707
722
|
StorageUploadKind2["CustomizationFont"] = "customization_font";
|
|
708
723
|
return StorageUploadKind2;
|
|
@@ -950,6 +965,10 @@ var CloudflareHostnameTLSValidationMethod = /* @__PURE__ */ ((CloudflareHostname
|
|
|
950
965
|
CloudflareHostnameTLSValidationMethod2["Email"] = "email";
|
|
951
966
|
return CloudflareHostnameTLSValidationMethod2;
|
|
952
967
|
})(CloudflareHostnameTLSValidationMethod || {});
|
|
968
|
+
var GitBookUsers = /* @__PURE__ */ ((GitBookUsers2) => {
|
|
969
|
+
GitBookUsers2["GitbookAgent"] = "gitbook:agent";
|
|
970
|
+
return GitBookUsers2;
|
|
971
|
+
})(GitBookUsers || {});
|
|
953
972
|
var RevisionSemanticChangeType = /* @__PURE__ */ ((RevisionSemanticChangeType2) => {
|
|
954
973
|
RevisionSemanticChangeType2["PageCreated"] = "page_created";
|
|
955
974
|
RevisionSemanticChangeType2["PageEdited"] = "page_edited";
|
|
@@ -1000,14 +1019,6 @@ var AgentStatus = /* @__PURE__ */ ((AgentStatus2) => {
|
|
|
1000
1019
|
AgentStatus2["Errored"] = "errored";
|
|
1001
1020
|
return AgentStatus2;
|
|
1002
1021
|
})(AgentStatus || {});
|
|
1003
|
-
var AgentTaskStatus = /* @__PURE__ */ ((AgentTaskStatus2) => {
|
|
1004
|
-
AgentTaskStatus2["Backlog"] = "backlog";
|
|
1005
|
-
AgentTaskStatus2["InProgress"] = "in-progress";
|
|
1006
|
-
AgentTaskStatus2["InReview"] = "in-review";
|
|
1007
|
-
AgentTaskStatus2["Done"] = "done";
|
|
1008
|
-
AgentTaskStatus2["Rejected"] = "rejected";
|
|
1009
|
-
return AgentTaskStatus2;
|
|
1010
|
-
})(AgentTaskStatus || {});
|
|
1011
1022
|
var ContentType = /* @__PURE__ */ ((ContentType2) => {
|
|
1012
1023
|
ContentType2["Json"] = "application/json";
|
|
1013
1024
|
ContentType2["FormData"] = "multipart/form-data";
|
|
@@ -2846,6 +2857,68 @@ var Api = class extends HttpClient {
|
|
|
2846
2857
|
format: "json",
|
|
2847
2858
|
...params
|
|
2848
2859
|
}),
|
|
2860
|
+
listConversationsIssuesClusters: (organizationId, query, params = {}) => this.request({
|
|
2861
|
+
path: `/orgs/${organizationId}/conversations-clusters`,
|
|
2862
|
+
method: "GET",
|
|
2863
|
+
query,
|
|
2864
|
+
secure: true,
|
|
2865
|
+
format: "json",
|
|
2866
|
+
...params
|
|
2867
|
+
}),
|
|
2868
|
+
getConversationsIssuesCluster: (organizationId, clusterId, params = {}) => this.request({
|
|
2869
|
+
path: `/orgs/${organizationId}/conversations-clusters/${clusterId}`,
|
|
2870
|
+
method: "GET",
|
|
2871
|
+
secure: true,
|
|
2872
|
+
format: "json",
|
|
2873
|
+
...params
|
|
2874
|
+
}),
|
|
2875
|
+
listConversationsIssuesInCluster: (organizationId, clusterId, query, params = {}) => this.request({
|
|
2876
|
+
path: `/orgs/${organizationId}/conversations-clusters/${clusterId}/issues`,
|
|
2877
|
+
method: "GET",
|
|
2878
|
+
query,
|
|
2879
|
+
secure: true,
|
|
2880
|
+
format: "json",
|
|
2881
|
+
...params
|
|
2882
|
+
}),
|
|
2883
|
+
ingestConversation: (organizationId, data, params = {}) => this.request({
|
|
2884
|
+
path: `/orgs/${organizationId}/conversations`,
|
|
2885
|
+
method: "POST",
|
|
2886
|
+
body: data,
|
|
2887
|
+
secure: true,
|
|
2888
|
+
type: "application/json" /* Json */,
|
|
2889
|
+
...params
|
|
2890
|
+
}),
|
|
2891
|
+
getAgentSetupState: (organizationId, params = {}) => this.request({
|
|
2892
|
+
path: `/orgs/${organizationId}/agents-setup`,
|
|
2893
|
+
method: "GET",
|
|
2894
|
+
secure: true,
|
|
2895
|
+
format: "json",
|
|
2896
|
+
...params
|
|
2897
|
+
}),
|
|
2898
|
+
listAgentTasks: (organizationId, query, params = {}) => this.request({
|
|
2899
|
+
path: `/orgs/${organizationId}/agent-tasks`,
|
|
2900
|
+
method: "GET",
|
|
2901
|
+
query,
|
|
2902
|
+
secure: true,
|
|
2903
|
+
format: "json",
|
|
2904
|
+
...params
|
|
2905
|
+
}),
|
|
2906
|
+
getAgentTask: (organizationId, agentTaskId, params = {}) => this.request({
|
|
2907
|
+
path: `/orgs/${organizationId}/agent-tasks/${agentTaskId}`,
|
|
2908
|
+
method: "GET",
|
|
2909
|
+
secure: true,
|
|
2910
|
+
format: "json",
|
|
2911
|
+
...params
|
|
2912
|
+
}),
|
|
2913
|
+
updateAgentTask: (organizationId, agentTaskId, data, params = {}) => this.request({
|
|
2914
|
+
path: `/orgs/${organizationId}/agent-tasks/${agentTaskId}`,
|
|
2915
|
+
method: "PATCH",
|
|
2916
|
+
body: data,
|
|
2917
|
+
secure: true,
|
|
2918
|
+
type: "application/json" /* Json */,
|
|
2919
|
+
format: "json",
|
|
2920
|
+
...params
|
|
2921
|
+
}),
|
|
2849
2922
|
listTranslationSettings: (organizationId, query, params = {}) => this.request({
|
|
2850
2923
|
path: `/orgs/${organizationId}/translations`,
|
|
2851
2924
|
method: "GET",
|
|
@@ -3634,6 +3707,7 @@ var GitBookAPI = class extends Api {
|
|
|
3634
3707
|
GITBOOK_DEFAULT_ENDPOINT,
|
|
3635
3708
|
GitBookAPI,
|
|
3636
3709
|
GitBookAPIError,
|
|
3710
|
+
GitBookUsers,
|
|
3637
3711
|
GitSyncOperationDirection,
|
|
3638
3712
|
GitSyncOperationStage,
|
|
3639
3713
|
GitSyncOperationState,
|
|
@@ -3662,6 +3736,7 @@ var GitBookAPI = class extends Api {
|
|
|
3662
3736
|
SAMLProviderStatus,
|
|
3663
3737
|
SiteAdsStatus,
|
|
3664
3738
|
SiteAdsTopic,
|
|
3739
|
+
SiteAgentsContext,
|
|
3665
3740
|
SiteCustomizationFeature,
|
|
3666
3741
|
SiteInsightsAdPlacement,
|
|
3667
3742
|
SiteInsightsEventType,
|
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.117.1";
|
|
176
176
|
|
|
177
177
|
// src/client.ts
|
|
178
178
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -499,6 +499,7 @@ var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
|
|
|
499
499
|
IntegrationScope2["SiteAdaptiveWrite"] = "site:adaptive:write";
|
|
500
500
|
IntegrationScope2["OpenapiRead"] = "openapi:read";
|
|
501
501
|
IntegrationScope2["OpenapiWrite"] = "openapi:write";
|
|
502
|
+
IntegrationScope2["ConversationsIngest"] = "conversations:ingest";
|
|
502
503
|
return IntegrationScope2;
|
|
503
504
|
})(IntegrationScope || {});
|
|
504
505
|
var IntegrationCategory = /* @__PURE__ */ ((IntegrationCategory2) => {
|
|
@@ -557,6 +558,11 @@ var SiteAdsTopic = /* @__PURE__ */ ((SiteAdsTopic2) => {
|
|
|
557
558
|
SiteAdsTopic2["Crypto"] = "crypto";
|
|
558
559
|
return SiteAdsTopic2;
|
|
559
560
|
})(SiteAdsTopic || {});
|
|
561
|
+
var SiteAgentsContext = /* @__PURE__ */ ((SiteAgentsContext2) => {
|
|
562
|
+
SiteAgentsContext2["Excluded"] = "excluded";
|
|
563
|
+
SiteAgentsContext2["Included"] = "included";
|
|
564
|
+
return SiteAgentsContext2;
|
|
565
|
+
})(SiteAgentsContext || {});
|
|
560
566
|
var SiteCustomizationFeature = /* @__PURE__ */ ((SiteCustomizationFeature2) => {
|
|
561
567
|
SiteCustomizationFeature2["HeaderLogo"] = "header-logo";
|
|
562
568
|
SiteCustomizationFeature2["ThemePreset"] = "theme-preset";
|
|
@@ -607,6 +613,13 @@ var SAMLProviderStatus = /* @__PURE__ */ ((SAMLProviderStatus2) => {
|
|
|
607
613
|
SAMLProviderStatus2["Pending"] = "pending";
|
|
608
614
|
return SAMLProviderStatus2;
|
|
609
615
|
})(SAMLProviderStatus || {});
|
|
616
|
+
var AgentTaskStatus = /* @__PURE__ */ ((AgentTaskStatus2) => {
|
|
617
|
+
AgentTaskStatus2["Backlog"] = "backlog";
|
|
618
|
+
AgentTaskStatus2["Started"] = "started";
|
|
619
|
+
AgentTaskStatus2["Completed"] = "completed";
|
|
620
|
+
AgentTaskStatus2["Canceled"] = "canceled";
|
|
621
|
+
return AgentTaskStatus2;
|
|
622
|
+
})(AgentTaskStatus || {});
|
|
610
623
|
var StorageUploadKind = /* @__PURE__ */ ((StorageUploadKind2) => {
|
|
611
624
|
StorageUploadKind2["CustomizationFont"] = "customization_font";
|
|
612
625
|
return StorageUploadKind2;
|
|
@@ -854,6 +867,10 @@ var CloudflareHostnameTLSValidationMethod = /* @__PURE__ */ ((CloudflareHostname
|
|
|
854
867
|
CloudflareHostnameTLSValidationMethod2["Email"] = "email";
|
|
855
868
|
return CloudflareHostnameTLSValidationMethod2;
|
|
856
869
|
})(CloudflareHostnameTLSValidationMethod || {});
|
|
870
|
+
var GitBookUsers = /* @__PURE__ */ ((GitBookUsers2) => {
|
|
871
|
+
GitBookUsers2["GitbookAgent"] = "gitbook:agent";
|
|
872
|
+
return GitBookUsers2;
|
|
873
|
+
})(GitBookUsers || {});
|
|
857
874
|
var RevisionSemanticChangeType = /* @__PURE__ */ ((RevisionSemanticChangeType2) => {
|
|
858
875
|
RevisionSemanticChangeType2["PageCreated"] = "page_created";
|
|
859
876
|
RevisionSemanticChangeType2["PageEdited"] = "page_edited";
|
|
@@ -904,14 +921,6 @@ var AgentStatus = /* @__PURE__ */ ((AgentStatus2) => {
|
|
|
904
921
|
AgentStatus2["Errored"] = "errored";
|
|
905
922
|
return AgentStatus2;
|
|
906
923
|
})(AgentStatus || {});
|
|
907
|
-
var AgentTaskStatus = /* @__PURE__ */ ((AgentTaskStatus2) => {
|
|
908
|
-
AgentTaskStatus2["Backlog"] = "backlog";
|
|
909
|
-
AgentTaskStatus2["InProgress"] = "in-progress";
|
|
910
|
-
AgentTaskStatus2["InReview"] = "in-review";
|
|
911
|
-
AgentTaskStatus2["Done"] = "done";
|
|
912
|
-
AgentTaskStatus2["Rejected"] = "rejected";
|
|
913
|
-
return AgentTaskStatus2;
|
|
914
|
-
})(AgentTaskStatus || {});
|
|
915
924
|
var ContentType = /* @__PURE__ */ ((ContentType2) => {
|
|
916
925
|
ContentType2["Json"] = "application/json";
|
|
917
926
|
ContentType2["FormData"] = "multipart/form-data";
|
|
@@ -2750,6 +2759,68 @@ var Api = class extends HttpClient {
|
|
|
2750
2759
|
format: "json",
|
|
2751
2760
|
...params
|
|
2752
2761
|
}),
|
|
2762
|
+
listConversationsIssuesClusters: (organizationId, query, params = {}) => this.request({
|
|
2763
|
+
path: `/orgs/${organizationId}/conversations-clusters`,
|
|
2764
|
+
method: "GET",
|
|
2765
|
+
query,
|
|
2766
|
+
secure: true,
|
|
2767
|
+
format: "json",
|
|
2768
|
+
...params
|
|
2769
|
+
}),
|
|
2770
|
+
getConversationsIssuesCluster: (organizationId, clusterId, params = {}) => this.request({
|
|
2771
|
+
path: `/orgs/${organizationId}/conversations-clusters/${clusterId}`,
|
|
2772
|
+
method: "GET",
|
|
2773
|
+
secure: true,
|
|
2774
|
+
format: "json",
|
|
2775
|
+
...params
|
|
2776
|
+
}),
|
|
2777
|
+
listConversationsIssuesInCluster: (organizationId, clusterId, query, params = {}) => this.request({
|
|
2778
|
+
path: `/orgs/${organizationId}/conversations-clusters/${clusterId}/issues`,
|
|
2779
|
+
method: "GET",
|
|
2780
|
+
query,
|
|
2781
|
+
secure: true,
|
|
2782
|
+
format: "json",
|
|
2783
|
+
...params
|
|
2784
|
+
}),
|
|
2785
|
+
ingestConversation: (organizationId, data, params = {}) => this.request({
|
|
2786
|
+
path: `/orgs/${organizationId}/conversations`,
|
|
2787
|
+
method: "POST",
|
|
2788
|
+
body: data,
|
|
2789
|
+
secure: true,
|
|
2790
|
+
type: "application/json" /* Json */,
|
|
2791
|
+
...params
|
|
2792
|
+
}),
|
|
2793
|
+
getAgentSetupState: (organizationId, params = {}) => this.request({
|
|
2794
|
+
path: `/orgs/${organizationId}/agents-setup`,
|
|
2795
|
+
method: "GET",
|
|
2796
|
+
secure: true,
|
|
2797
|
+
format: "json",
|
|
2798
|
+
...params
|
|
2799
|
+
}),
|
|
2800
|
+
listAgentTasks: (organizationId, query, params = {}) => this.request({
|
|
2801
|
+
path: `/orgs/${organizationId}/agent-tasks`,
|
|
2802
|
+
method: "GET",
|
|
2803
|
+
query,
|
|
2804
|
+
secure: true,
|
|
2805
|
+
format: "json",
|
|
2806
|
+
...params
|
|
2807
|
+
}),
|
|
2808
|
+
getAgentTask: (organizationId, agentTaskId, params = {}) => this.request({
|
|
2809
|
+
path: `/orgs/${organizationId}/agent-tasks/${agentTaskId}`,
|
|
2810
|
+
method: "GET",
|
|
2811
|
+
secure: true,
|
|
2812
|
+
format: "json",
|
|
2813
|
+
...params
|
|
2814
|
+
}),
|
|
2815
|
+
updateAgentTask: (organizationId, agentTaskId, data, params = {}) => this.request({
|
|
2816
|
+
path: `/orgs/${organizationId}/agent-tasks/${agentTaskId}`,
|
|
2817
|
+
method: "PATCH",
|
|
2818
|
+
body: data,
|
|
2819
|
+
secure: true,
|
|
2820
|
+
type: "application/json" /* Json */,
|
|
2821
|
+
format: "json",
|
|
2822
|
+
...params
|
|
2823
|
+
}),
|
|
2753
2824
|
listTranslationSettings: (organizationId, query, params = {}) => this.request({
|
|
2754
2825
|
path: `/orgs/${organizationId}/translations`,
|
|
2755
2826
|
method: "GET",
|
|
@@ -3537,6 +3608,7 @@ export {
|
|
|
3537
3608
|
GITBOOK_DEFAULT_ENDPOINT,
|
|
3538
3609
|
GitBookAPI,
|
|
3539
3610
|
GitBookAPIError,
|
|
3611
|
+
GitBookUsers,
|
|
3540
3612
|
GitSyncOperationDirection,
|
|
3541
3613
|
GitSyncOperationStage,
|
|
3542
3614
|
GitSyncOperationState,
|
|
@@ -3565,6 +3637,7 @@ export {
|
|
|
3565
3637
|
SAMLProviderStatus,
|
|
3566
3638
|
SiteAdsStatus,
|
|
3567
3639
|
SiteAdsTopic,
|
|
3640
|
+
SiteAgentsContext,
|
|
3568
3641
|
SiteCustomizationFeature,
|
|
3569
3642
|
SiteInsightsAdPlacement,
|
|
3570
3643
|
SiteInsightsEventType,
|