@gitbook/api 0.162.0 → 0.163.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/client.d.ts +149 -60
- package/dist/constants.d.ts +1 -0
- package/dist/index.cjs +29 -8
- package/dist/index.js +27 -8
- package/package.json +1 -1
- package/spec/openapi.json +431 -130
- package/spec/openapi.yaml +300 -99
package/dist/client.d.ts
CHANGED
|
@@ -4455,6 +4455,7 @@ export interface BillingMeterUsage {
|
|
|
4455
4455
|
}
|
|
4456
4456
|
/** Search result representing a space. */
|
|
4457
4457
|
export interface SearchSpaceResult {
|
|
4458
|
+
type: 'space';
|
|
4458
4459
|
id: string;
|
|
4459
4460
|
title: string;
|
|
4460
4461
|
pages: SearchPageResult[];
|
|
@@ -5771,6 +5772,21 @@ export type SiteSearchScope = {
|
|
|
5771
5772
|
/** Search in all sections and site spaces. This scope is wide and deep. */
|
|
5772
5773
|
mode: 'all';
|
|
5773
5774
|
};
|
|
5775
|
+
/** Search result representing a site context record. */
|
|
5776
|
+
export interface SearchRecordResult {
|
|
5777
|
+
type: 'record';
|
|
5778
|
+
/** The ID of the context record. */
|
|
5779
|
+
id: string;
|
|
5780
|
+
/** The title of the record. */
|
|
5781
|
+
title: string;
|
|
5782
|
+
/** The description of the record. */
|
|
5783
|
+
description?: string;
|
|
5784
|
+
/**
|
|
5785
|
+
* URL of the record in the source system.
|
|
5786
|
+
* @format uri
|
|
5787
|
+
*/
|
|
5788
|
+
url: string;
|
|
5789
|
+
}
|
|
5774
5790
|
export declare enum ContextRecordType {
|
|
5775
5791
|
Ticket = "ticket",
|
|
5776
5792
|
Document = "document"
|
|
@@ -5904,39 +5920,6 @@ export type ContextConnection = {
|
|
|
5904
5920
|
location: string;
|
|
5905
5921
|
};
|
|
5906
5922
|
} & ContextConnectorSetup;
|
|
5907
|
-
export interface ContextTopic {
|
|
5908
|
-
object: 'context-topic';
|
|
5909
|
-
/** The ID of the topic */
|
|
5910
|
-
id: string;
|
|
5911
|
-
/** The label of the topic */
|
|
5912
|
-
label: string;
|
|
5913
|
-
createdAt: Timestamp;
|
|
5914
|
-
updatedAt: Timestamp;
|
|
5915
|
-
/** Name of the icon */
|
|
5916
|
-
icon: Icon;
|
|
5917
|
-
summary: JSONDocument;
|
|
5918
|
-
usageSettings: ContextUsageSettings;
|
|
5919
|
-
/**
|
|
5920
|
-
* The weekly pulse of the records for the past 3 months
|
|
5921
|
-
* @maxItems 13
|
|
5922
|
-
* @minItems 13
|
|
5923
|
-
*/
|
|
5924
|
-
weeklyPulse: number[];
|
|
5925
|
-
connectors: Record<string, number>;
|
|
5926
|
-
/** The stats of the topic */
|
|
5927
|
-
stats: {
|
|
5928
|
-
/** The number of records in the topic */
|
|
5929
|
-
records: number;
|
|
5930
|
-
};
|
|
5931
|
-
/** URLs associated with the topic */
|
|
5932
|
-
urls: {
|
|
5933
|
-
/**
|
|
5934
|
-
* URL of the topic in the API
|
|
5935
|
-
* @format uri
|
|
5936
|
-
*/
|
|
5937
|
-
location: string;
|
|
5938
|
-
};
|
|
5939
|
-
}
|
|
5940
5923
|
/** Aggregated feedback for answers linked to a site question. */
|
|
5941
5924
|
export interface SiteQuestionStatsFeedback {
|
|
5942
5925
|
/** Count of answers with positive feedback. */
|
|
@@ -5964,12 +5947,62 @@ export interface SiteQuestionStats {
|
|
|
5964
5947
|
/** Aggregated answered assessment for answers linked to a site question. */
|
|
5965
5948
|
answered: SiteQuestionStatsAnswered;
|
|
5966
5949
|
}
|
|
5950
|
+
export interface SiteTopic {
|
|
5951
|
+
object: 'context-topic';
|
|
5952
|
+
/** The ID of the topic */
|
|
5953
|
+
id: string;
|
|
5954
|
+
/** The label of the topic */
|
|
5955
|
+
label: string;
|
|
5956
|
+
/** The parent topic when this topic is nested under another one */
|
|
5957
|
+
parent?: {
|
|
5958
|
+
/** The ID of the parent topic */
|
|
5959
|
+
id: string;
|
|
5960
|
+
/** The label of the parent topic */
|
|
5961
|
+
label: string;
|
|
5962
|
+
};
|
|
5963
|
+
createdAt: Timestamp;
|
|
5964
|
+
updatedAt: Timestamp;
|
|
5965
|
+
/** Name of the icon */
|
|
5966
|
+
icon: Icon;
|
|
5967
|
+
summary: JSONDocument;
|
|
5968
|
+
usageSettings: ContextUsageSettings;
|
|
5969
|
+
/**
|
|
5970
|
+
* The weekly pulse of related question answers for the past 3 months
|
|
5971
|
+
* @maxItems 13
|
|
5972
|
+
* @minItems 13
|
|
5973
|
+
*/
|
|
5974
|
+
weeklyPulse: number[];
|
|
5975
|
+
/** The number of pages associated with the topic */
|
|
5976
|
+
pages: number;
|
|
5977
|
+
/** The number of records in the topic */
|
|
5978
|
+
records: number;
|
|
5979
|
+
/** Aggregated stats for answers linked to a site question. */
|
|
5980
|
+
questions: SiteQuestionStats;
|
|
5981
|
+
/** URLs associated with the topic */
|
|
5982
|
+
urls: {
|
|
5983
|
+
/**
|
|
5984
|
+
* URL of the topic in the API
|
|
5985
|
+
* @format uri
|
|
5986
|
+
*/
|
|
5987
|
+
location: string;
|
|
5988
|
+
};
|
|
5989
|
+
}
|
|
5990
|
+
/** Type classification of the user question. */
|
|
5991
|
+
export declare enum SiteQuestionType {
|
|
5992
|
+
Exploring = "exploring",
|
|
5993
|
+
HowTo = "how-to",
|
|
5994
|
+
Troubleshooting = "troubleshooting",
|
|
5995
|
+
Reference = "reference",
|
|
5996
|
+
Unknown = "unknown"
|
|
5997
|
+
}
|
|
5967
5998
|
export interface SiteQuestion {
|
|
5968
5999
|
object: 'site-question';
|
|
5969
6000
|
/** The ID of the site question. */
|
|
5970
6001
|
id: string;
|
|
5971
6002
|
/** Canonical text for the unique site question. */
|
|
5972
6003
|
question: string;
|
|
6004
|
+
/** Type classification of the user question. */
|
|
6005
|
+
type: SiteQuestionType;
|
|
5973
6006
|
createdAt: Timestamp;
|
|
5974
6007
|
/** Aggregated stats for answers linked to a site question. */
|
|
5975
6008
|
stats: SiteQuestionStats;
|
|
@@ -6012,8 +6045,14 @@ export interface SiteQuestionAnswer {
|
|
|
6012
6045
|
object: 'site-question-answer';
|
|
6013
6046
|
/** The ID of the site question answer. */
|
|
6014
6047
|
id: string;
|
|
6015
|
-
|
|
6016
|
-
|
|
6048
|
+
question: {
|
|
6049
|
+
/** The ID of the parent site question. */
|
|
6050
|
+
id: string;
|
|
6051
|
+
/** Type classification of the user question. */
|
|
6052
|
+
type: SiteQuestionType;
|
|
6053
|
+
};
|
|
6054
|
+
/** The IDs of the associated site topics. */
|
|
6055
|
+
topics: string[];
|
|
6017
6056
|
input: {
|
|
6018
6057
|
/** Normalized question text for this answer. */
|
|
6019
6058
|
text?: string;
|
|
@@ -7143,6 +7182,14 @@ export interface SiteRedirect {
|
|
|
7143
7182
|
source: SiteRedirectSourcePath;
|
|
7144
7183
|
destination: SiteRedirectDestination;
|
|
7145
7184
|
}
|
|
7185
|
+
export interface SiteRedirectInputDestinationPath {
|
|
7186
|
+
kind: 'path';
|
|
7187
|
+
/** Unique identifier for the space containing the page referenced by the path. */
|
|
7188
|
+
spaceId: string;
|
|
7189
|
+
/** Path to the page within the space revision to resolve. */
|
|
7190
|
+
path: string;
|
|
7191
|
+
}
|
|
7192
|
+
export type SiteRedirectInputDestination = SiteRedirectDestination | SiteRedirectInputDestinationPath;
|
|
7146
7193
|
/**
|
|
7147
7194
|
* Name of the MCP server
|
|
7148
7195
|
* @minLength 1
|
|
@@ -13478,7 +13525,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
13478
13525
|
*/
|
|
13479
13526
|
limit?: number;
|
|
13480
13527
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
13481
|
-
items: SearchSpaceResult[];
|
|
13528
|
+
items: (SearchSpaceResult | SearchRecordResult)[];
|
|
13482
13529
|
}, any>>;
|
|
13483
13530
|
/**
|
|
13484
13531
|
* @description The response is streamed.
|
|
@@ -13543,6 +13590,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
13543
13590
|
connector?: ContextConnector;
|
|
13544
13591
|
/** Filter context records by connection id. */
|
|
13545
13592
|
connection?: string;
|
|
13593
|
+
/** Filter context records by associated site topic ID. */
|
|
13594
|
+
topic?: string;
|
|
13546
13595
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
13547
13596
|
items: ContextRecord[];
|
|
13548
13597
|
}, any>>;
|
|
@@ -13643,45 +13692,36 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
13643
13692
|
* No description
|
|
13644
13693
|
*
|
|
13645
13694
|
* @tags site-context
|
|
13646
|
-
* @name
|
|
13647
|
-
* @summary List all
|
|
13648
|
-
* @request GET:/orgs/{organizationId}/sites/{siteId}/
|
|
13695
|
+
* @name ListSiteTopics
|
|
13696
|
+
* @summary List all topics
|
|
13697
|
+
* @request GET:/orgs/{organizationId}/sites/{siteId}/topics
|
|
13649
13698
|
* @secure
|
|
13650
13699
|
*/
|
|
13651
|
-
|
|
13652
|
-
|
|
13653
|
-
page?: string;
|
|
13654
|
-
/**
|
|
13655
|
-
* The number of results per page
|
|
13656
|
-
* @min 0
|
|
13657
|
-
* @max 1000
|
|
13658
|
-
*/
|
|
13659
|
-
limit?: number;
|
|
13660
|
-
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
13661
|
-
items: ContextTopic[];
|
|
13700
|
+
listSiteTopics: (organizationId: string, siteId: string, params?: RequestParams) => Promise<HttpResponse<{
|
|
13701
|
+
items: SiteTopic[];
|
|
13662
13702
|
}, any>>;
|
|
13663
13703
|
/**
|
|
13664
13704
|
* No description
|
|
13665
13705
|
*
|
|
13666
13706
|
* @tags site-context
|
|
13667
|
-
* @name
|
|
13668
|
-
* @summary Get a
|
|
13669
|
-
* @request GET:/orgs/{organizationId}/sites/{siteId}/
|
|
13707
|
+
* @name GetSiteTopicById
|
|
13708
|
+
* @summary Get a topic
|
|
13709
|
+
* @request GET:/orgs/{organizationId}/sites/{siteId}/topics/{siteTopicId}
|
|
13670
13710
|
* @secure
|
|
13671
13711
|
*/
|
|
13672
|
-
|
|
13712
|
+
getSiteTopicById: (organizationId: string, siteId: string, siteTopicId: string, params?: RequestParams) => Promise<HttpResponse<SiteTopic, any>>;
|
|
13673
13713
|
/**
|
|
13674
13714
|
* No description
|
|
13675
13715
|
*
|
|
13676
13716
|
* @tags site-context
|
|
13677
|
-
* @name
|
|
13678
|
-
* @summary Update a
|
|
13679
|
-
* @request PATCH:/orgs/{organizationId}/sites/{siteId}/
|
|
13717
|
+
* @name UpdateSiteTopicById
|
|
13718
|
+
* @summary Update a topic
|
|
13719
|
+
* @request PATCH:/orgs/{organizationId}/sites/{siteId}/topics/{siteTopicId}
|
|
13680
13720
|
* @secure
|
|
13681
13721
|
*/
|
|
13682
|
-
|
|
13722
|
+
updateSiteTopicById: (organizationId: string, siteId: string, siteTopicId: string, data: {
|
|
13683
13723
|
usageSettings: ContextUsageSettings;
|
|
13684
|
-
}, params?: RequestParams) => Promise<HttpResponse<
|
|
13724
|
+
}, params?: RequestParams) => Promise<HttpResponse<SiteTopic, any>>;
|
|
13685
13725
|
/**
|
|
13686
13726
|
* No description
|
|
13687
13727
|
*
|
|
@@ -13692,6 +13732,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
13692
13732
|
* @secure
|
|
13693
13733
|
*/
|
|
13694
13734
|
listSiteQuestions: (organizationId: string, siteId: string, query?: {
|
|
13735
|
+
/** Filter questions by question type. */
|
|
13736
|
+
type?: SiteQuestionType;
|
|
13695
13737
|
/** Identifier of the page results to fetch. */
|
|
13696
13738
|
page?: string;
|
|
13697
13739
|
/**
|
|
@@ -13733,6 +13775,10 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
13733
13775
|
confidence?: SiteQuestionAnswerConfidence;
|
|
13734
13776
|
/** Filter answers by question relevance. */
|
|
13735
13777
|
relevance?: SiteQuestionAnswerRelevance;
|
|
13778
|
+
/** Filter answers by question type. */
|
|
13779
|
+
questionType?: SiteQuestionType;
|
|
13780
|
+
/** Filter answers by associated site topic ID. */
|
|
13781
|
+
topic?: string;
|
|
13736
13782
|
/** Filter answers by thread root answer ID. Includes the root answer itself. */
|
|
13737
13783
|
thread?: string;
|
|
13738
13784
|
/** Identifier of the page results to fetch. */
|
|
@@ -14298,8 +14344,51 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
14298
14344
|
createSiteRedirect: (organizationId: string, siteId: string, data: {
|
|
14299
14345
|
/** The source path to redirect from. */
|
|
14300
14346
|
source: SiteRedirectSourcePath;
|
|
14301
|
-
destination:
|
|
14347
|
+
destination: SiteRedirectInputDestination;
|
|
14302
14348
|
}, params?: RequestParams) => Promise<HttpResponse<SiteRedirect, any>>;
|
|
14349
|
+
/**
|
|
14350
|
+
* No description
|
|
14351
|
+
*
|
|
14352
|
+
* @tags site-redirects
|
|
14353
|
+
* @name BulkUpsertSiteRedirects
|
|
14354
|
+
* @summary Create or update site redirects in bulk
|
|
14355
|
+
* @request PUT:/orgs/{organizationId}/sites/{siteId}/redirects
|
|
14356
|
+
* @secure
|
|
14357
|
+
*/
|
|
14358
|
+
bulkUpsertSiteRedirects: (organizationId: string, siteId: string, data: {
|
|
14359
|
+
/**
|
|
14360
|
+
* @maxItems 500
|
|
14361
|
+
* @minItems 1
|
|
14362
|
+
*/
|
|
14363
|
+
redirects: {
|
|
14364
|
+
/** The source path to redirect from. */
|
|
14365
|
+
source: SiteRedirectSourcePath;
|
|
14366
|
+
destination: SiteRedirectInputDestination;
|
|
14367
|
+
}[];
|
|
14368
|
+
}, params?: RequestParams) => Promise<HttpResponse<{
|
|
14369
|
+
results: ({
|
|
14370
|
+
/** The redirect was created. */
|
|
14371
|
+
status: "created";
|
|
14372
|
+
/** The source path to redirect from. */
|
|
14373
|
+
source: SiteRedirectSourcePath;
|
|
14374
|
+
/** The ID of the created redirect. */
|
|
14375
|
+
id: string;
|
|
14376
|
+
} | {
|
|
14377
|
+
/** The redirect was updated. */
|
|
14378
|
+
status: "updated";
|
|
14379
|
+
/** The source path to redirect from. */
|
|
14380
|
+
source: SiteRedirectSourcePath;
|
|
14381
|
+
/** The ID of the updated redirect. */
|
|
14382
|
+
id: string;
|
|
14383
|
+
} | {
|
|
14384
|
+
/** There was an error processing the redirect. */
|
|
14385
|
+
status: "error";
|
|
14386
|
+
/** The source path to redirect from. */
|
|
14387
|
+
source: SiteRedirectSourcePath;
|
|
14388
|
+
/** The error message. */
|
|
14389
|
+
error: string;
|
|
14390
|
+
})[];
|
|
14391
|
+
}, any>>;
|
|
14303
14392
|
/**
|
|
14304
14393
|
* No description
|
|
14305
14394
|
*
|
package/dist/constants.d.ts
CHANGED
|
@@ -141,6 +141,7 @@ export declare const CONTEXT_RECORD_DESCRIPTION_MAX_LENGTH = 512;
|
|
|
141
141
|
export declare const CONTEXT_CONNECTION_LABEL_MAX_LENGTH = 128;
|
|
142
142
|
export declare const CONTEXT_CONNECTION_LABEL_MIN_LENGTH = 0;
|
|
143
143
|
export declare const CONTEXT_CONNECTION_STATUS_ENUM: ["pending", "syncing", "succeeded", "failed"];
|
|
144
|
+
export declare const SITE_QUESTION_TYPE_ENUM: ["exploring", "how-to", "troubleshooting", "reference", "unknown"];
|
|
144
145
|
export declare const SITE_QUESTION_ANSWER_RESOLUTION_ENUM: ["no", "partially", "yes"];
|
|
145
146
|
export declare const SITE_QUESTION_ANSWER_CONFIDENCE_ENUM: ["low", "medium", "high"];
|
|
146
147
|
export declare const SITE_QUESTION_ANSWER_RELEVANCE_ENUM: ["relevant", "spam", "off-topic", "unclear"];
|
package/dist/index.cjs
CHANGED
|
@@ -407,6 +407,7 @@ __export(src_exports, {
|
|
|
407
407
|
SITE_QUESTION_ANSWER_RELEVANCE_ENUM: () => SITE_QUESTION_ANSWER_RELEVANCE_ENUM,
|
|
408
408
|
SITE_QUESTION_ANSWER_RESOLUTION_ENUM: () => SITE_QUESTION_ANSWER_RESOLUTION_ENUM,
|
|
409
409
|
SITE_QUESTION_ANSWER_SOURCE_TYPE_ENUM: () => SITE_QUESTION_ANSWER_SOURCE_TYPE_ENUM,
|
|
410
|
+
SITE_QUESTION_TYPE_ENUM: () => SITE_QUESTION_TYPE_ENUM,
|
|
410
411
|
SITE_REDIRECT_SOURCE_PATH_MAX_LENGTH: () => SITE_REDIRECT_SOURCE_PATH_MAX_LENGTH,
|
|
411
412
|
SITE_REDIRECT_SOURCE_PATH_PATTERN: () => SITE_REDIRECT_SOURCE_PATH_PATTERN,
|
|
412
413
|
SITE_SECTION_DESCRIPTION_MAX_LENGTH: () => SITE_SECTION_DESCRIPTION_MAX_LENGTH,
|
|
@@ -452,6 +453,7 @@ __export(src_exports, {
|
|
|
452
453
|
SiteQuestionAnswerRelevance: () => SiteQuestionAnswerRelevance,
|
|
453
454
|
SiteQuestionAnswerResolution: () => SiteQuestionAnswerResolution,
|
|
454
455
|
SiteQuestionAnswerSourceType: () => SiteQuestionAnswerSourceType,
|
|
456
|
+
SiteQuestionType: () => SiteQuestionType,
|
|
455
457
|
SiteSocialAccountPlatform: () => SiteSocialAccountPlatform,
|
|
456
458
|
SiteType: () => SiteType,
|
|
457
459
|
SiteVisibility: () => SiteVisibility,
|
|
@@ -473,7 +475,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
473
475
|
|
|
474
476
|
// package.json
|
|
475
477
|
var name = "@gitbook/api";
|
|
476
|
-
var version = "0.
|
|
478
|
+
var version = "0.163.0";
|
|
477
479
|
|
|
478
480
|
// src/client.ts
|
|
479
481
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -1216,6 +1218,14 @@ var ContextConnectionStatus = /* @__PURE__ */ ((ContextConnectionStatus2) => {
|
|
|
1216
1218
|
ContextConnectionStatus2["Failed"] = "failed";
|
|
1217
1219
|
return ContextConnectionStatus2;
|
|
1218
1220
|
})(ContextConnectionStatus || {});
|
|
1221
|
+
var SiteQuestionType = /* @__PURE__ */ ((SiteQuestionType2) => {
|
|
1222
|
+
SiteQuestionType2["Exploring"] = "exploring";
|
|
1223
|
+
SiteQuestionType2["HowTo"] = "how-to";
|
|
1224
|
+
SiteQuestionType2["Troubleshooting"] = "troubleshooting";
|
|
1225
|
+
SiteQuestionType2["Reference"] = "reference";
|
|
1226
|
+
SiteQuestionType2["Unknown"] = "unknown";
|
|
1227
|
+
return SiteQuestionType2;
|
|
1228
|
+
})(SiteQuestionType || {});
|
|
1219
1229
|
var SiteQuestionAnswerResolution = /* @__PURE__ */ ((SiteQuestionAnswerResolution2) => {
|
|
1220
1230
|
SiteQuestionAnswerResolution2["No"] = "no";
|
|
1221
1231
|
SiteQuestionAnswerResolution2["Partially"] = "partially";
|
|
@@ -3885,23 +3895,22 @@ var Api = class extends HttpClient {
|
|
|
3885
3895
|
secure: true,
|
|
3886
3896
|
...params
|
|
3887
3897
|
}),
|
|
3888
|
-
|
|
3889
|
-
path: `/orgs/${organizationId}/sites/${siteId}/
|
|
3898
|
+
listSiteTopics: (organizationId, siteId, params = {}) => this.request({
|
|
3899
|
+
path: `/orgs/${organizationId}/sites/${siteId}/topics`,
|
|
3890
3900
|
method: "GET",
|
|
3891
|
-
query,
|
|
3892
3901
|
secure: true,
|
|
3893
3902
|
format: "json",
|
|
3894
3903
|
...params
|
|
3895
3904
|
}),
|
|
3896
|
-
|
|
3897
|
-
path: `/orgs/${organizationId}/sites/${siteId}/
|
|
3905
|
+
getSiteTopicById: (organizationId, siteId, siteTopicId, params = {}) => this.request({
|
|
3906
|
+
path: `/orgs/${organizationId}/sites/${siteId}/topics/${siteTopicId}`,
|
|
3898
3907
|
method: "GET",
|
|
3899
3908
|
secure: true,
|
|
3900
3909
|
format: "json",
|
|
3901
3910
|
...params
|
|
3902
3911
|
}),
|
|
3903
|
-
|
|
3904
|
-
path: `/orgs/${organizationId}/sites/${siteId}/
|
|
3912
|
+
updateSiteTopicById: (organizationId, siteId, siteTopicId, data, params = {}) => this.request({
|
|
3913
|
+
path: `/orgs/${organizationId}/sites/${siteId}/topics/${siteTopicId}`,
|
|
3905
3914
|
method: "PATCH",
|
|
3906
3915
|
body: data,
|
|
3907
3916
|
secure: true,
|
|
@@ -4121,6 +4130,15 @@ var Api = class extends HttpClient {
|
|
|
4121
4130
|
format: "json",
|
|
4122
4131
|
...params
|
|
4123
4132
|
}),
|
|
4133
|
+
bulkUpsertSiteRedirects: (organizationId, siteId, data, params = {}) => this.request({
|
|
4134
|
+
path: `/orgs/${organizationId}/sites/${siteId}/redirects`,
|
|
4135
|
+
method: "PUT",
|
|
4136
|
+
body: data,
|
|
4137
|
+
secure: true,
|
|
4138
|
+
type: "application/json" /* Json */,
|
|
4139
|
+
format: "json",
|
|
4140
|
+
...params
|
|
4141
|
+
}),
|
|
4124
4142
|
listSiteRedirects: (organizationId, siteId, query, params = {}) => this.request({
|
|
4125
4143
|
path: `/orgs/${organizationId}/sites/${siteId}/redirects`,
|
|
4126
4144
|
method: "GET",
|
|
@@ -4463,6 +4481,7 @@ var CONTEXT_RECORD_DESCRIPTION_MAX_LENGTH = 512;
|
|
|
4463
4481
|
var CONTEXT_CONNECTION_LABEL_MAX_LENGTH = 128;
|
|
4464
4482
|
var CONTEXT_CONNECTION_LABEL_MIN_LENGTH = 0;
|
|
4465
4483
|
var CONTEXT_CONNECTION_STATUS_ENUM = ["pending", "syncing", "succeeded", "failed"];
|
|
4484
|
+
var SITE_QUESTION_TYPE_ENUM = ["exploring", "how-to", "troubleshooting", "reference", "unknown"];
|
|
4466
4485
|
var SITE_QUESTION_ANSWER_RESOLUTION_ENUM = ["no", "partially", "yes"];
|
|
4467
4486
|
var SITE_QUESTION_ANSWER_CONFIDENCE_ENUM = ["low", "medium", "high"];
|
|
4468
4487
|
var SITE_QUESTION_ANSWER_RELEVANCE_ENUM = ["relevant", "spam", "off-topic", "unclear"];
|
|
@@ -4799,6 +4818,7 @@ var GitBookAPI = class extends Api {
|
|
|
4799
4818
|
SITE_QUESTION_ANSWER_RELEVANCE_ENUM,
|
|
4800
4819
|
SITE_QUESTION_ANSWER_RESOLUTION_ENUM,
|
|
4801
4820
|
SITE_QUESTION_ANSWER_SOURCE_TYPE_ENUM,
|
|
4821
|
+
SITE_QUESTION_TYPE_ENUM,
|
|
4802
4822
|
SITE_REDIRECT_SOURCE_PATH_MAX_LENGTH,
|
|
4803
4823
|
SITE_REDIRECT_SOURCE_PATH_PATTERN,
|
|
4804
4824
|
SITE_SECTION_DESCRIPTION_MAX_LENGTH,
|
|
@@ -4844,6 +4864,7 @@ var GitBookAPI = class extends Api {
|
|
|
4844
4864
|
SiteQuestionAnswerRelevance,
|
|
4845
4865
|
SiteQuestionAnswerResolution,
|
|
4846
4866
|
SiteQuestionAnswerSourceType,
|
|
4867
|
+
SiteQuestionType,
|
|
4847
4868
|
SiteSocialAccountPlatform,
|
|
4848
4869
|
SiteType,
|
|
4849
4870
|
SiteVisibility,
|
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.163.0";
|
|
176
176
|
|
|
177
177
|
// src/client.ts
|
|
178
178
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -915,6 +915,14 @@ var ContextConnectionStatus = /* @__PURE__ */ ((ContextConnectionStatus2) => {
|
|
|
915
915
|
ContextConnectionStatus2["Failed"] = "failed";
|
|
916
916
|
return ContextConnectionStatus2;
|
|
917
917
|
})(ContextConnectionStatus || {});
|
|
918
|
+
var SiteQuestionType = /* @__PURE__ */ ((SiteQuestionType2) => {
|
|
919
|
+
SiteQuestionType2["Exploring"] = "exploring";
|
|
920
|
+
SiteQuestionType2["HowTo"] = "how-to";
|
|
921
|
+
SiteQuestionType2["Troubleshooting"] = "troubleshooting";
|
|
922
|
+
SiteQuestionType2["Reference"] = "reference";
|
|
923
|
+
SiteQuestionType2["Unknown"] = "unknown";
|
|
924
|
+
return SiteQuestionType2;
|
|
925
|
+
})(SiteQuestionType || {});
|
|
918
926
|
var SiteQuestionAnswerResolution = /* @__PURE__ */ ((SiteQuestionAnswerResolution2) => {
|
|
919
927
|
SiteQuestionAnswerResolution2["No"] = "no";
|
|
920
928
|
SiteQuestionAnswerResolution2["Partially"] = "partially";
|
|
@@ -3584,23 +3592,22 @@ var Api = class extends HttpClient {
|
|
|
3584
3592
|
secure: true,
|
|
3585
3593
|
...params
|
|
3586
3594
|
}),
|
|
3587
|
-
|
|
3588
|
-
path: `/orgs/${organizationId}/sites/${siteId}/
|
|
3595
|
+
listSiteTopics: (organizationId, siteId, params = {}) => this.request({
|
|
3596
|
+
path: `/orgs/${organizationId}/sites/${siteId}/topics`,
|
|
3589
3597
|
method: "GET",
|
|
3590
|
-
query,
|
|
3591
3598
|
secure: true,
|
|
3592
3599
|
format: "json",
|
|
3593
3600
|
...params
|
|
3594
3601
|
}),
|
|
3595
|
-
|
|
3596
|
-
path: `/orgs/${organizationId}/sites/${siteId}/
|
|
3602
|
+
getSiteTopicById: (organizationId, siteId, siteTopicId, params = {}) => this.request({
|
|
3603
|
+
path: `/orgs/${organizationId}/sites/${siteId}/topics/${siteTopicId}`,
|
|
3597
3604
|
method: "GET",
|
|
3598
3605
|
secure: true,
|
|
3599
3606
|
format: "json",
|
|
3600
3607
|
...params
|
|
3601
3608
|
}),
|
|
3602
|
-
|
|
3603
|
-
path: `/orgs/${organizationId}/sites/${siteId}/
|
|
3609
|
+
updateSiteTopicById: (organizationId, siteId, siteTopicId, data, params = {}) => this.request({
|
|
3610
|
+
path: `/orgs/${organizationId}/sites/${siteId}/topics/${siteTopicId}`,
|
|
3604
3611
|
method: "PATCH",
|
|
3605
3612
|
body: data,
|
|
3606
3613
|
secure: true,
|
|
@@ -3820,6 +3827,15 @@ var Api = class extends HttpClient {
|
|
|
3820
3827
|
format: "json",
|
|
3821
3828
|
...params
|
|
3822
3829
|
}),
|
|
3830
|
+
bulkUpsertSiteRedirects: (organizationId, siteId, data, params = {}) => this.request({
|
|
3831
|
+
path: `/orgs/${organizationId}/sites/${siteId}/redirects`,
|
|
3832
|
+
method: "PUT",
|
|
3833
|
+
body: data,
|
|
3834
|
+
secure: true,
|
|
3835
|
+
type: "application/json" /* Json */,
|
|
3836
|
+
format: "json",
|
|
3837
|
+
...params
|
|
3838
|
+
}),
|
|
3823
3839
|
listSiteRedirects: (organizationId, siteId, query, params = {}) => this.request({
|
|
3824
3840
|
path: `/orgs/${organizationId}/sites/${siteId}/redirects`,
|
|
3825
3841
|
method: "GET",
|
|
@@ -4162,6 +4178,7 @@ var CONTEXT_RECORD_DESCRIPTION_MAX_LENGTH = 512;
|
|
|
4162
4178
|
var CONTEXT_CONNECTION_LABEL_MAX_LENGTH = 128;
|
|
4163
4179
|
var CONTEXT_CONNECTION_LABEL_MIN_LENGTH = 0;
|
|
4164
4180
|
var CONTEXT_CONNECTION_STATUS_ENUM = ["pending", "syncing", "succeeded", "failed"];
|
|
4181
|
+
var SITE_QUESTION_TYPE_ENUM = ["exploring", "how-to", "troubleshooting", "reference", "unknown"];
|
|
4165
4182
|
var SITE_QUESTION_ANSWER_RESOLUTION_ENUM = ["no", "partially", "yes"];
|
|
4166
4183
|
var SITE_QUESTION_ANSWER_CONFIDENCE_ENUM = ["low", "medium", "high"];
|
|
4167
4184
|
var SITE_QUESTION_ANSWER_RELEVANCE_ENUM = ["relevant", "spam", "off-topic", "unclear"];
|
|
@@ -4497,6 +4514,7 @@ export {
|
|
|
4497
4514
|
SITE_QUESTION_ANSWER_RELEVANCE_ENUM,
|
|
4498
4515
|
SITE_QUESTION_ANSWER_RESOLUTION_ENUM,
|
|
4499
4516
|
SITE_QUESTION_ANSWER_SOURCE_TYPE_ENUM,
|
|
4517
|
+
SITE_QUESTION_TYPE_ENUM,
|
|
4500
4518
|
SITE_REDIRECT_SOURCE_PATH_MAX_LENGTH,
|
|
4501
4519
|
SITE_REDIRECT_SOURCE_PATH_PATTERN,
|
|
4502
4520
|
SITE_SECTION_DESCRIPTION_MAX_LENGTH,
|
|
@@ -4542,6 +4560,7 @@ export {
|
|
|
4542
4560
|
SiteQuestionAnswerRelevance,
|
|
4543
4561
|
SiteQuestionAnswerResolution,
|
|
4544
4562
|
SiteQuestionAnswerSourceType,
|
|
4563
|
+
SiteQuestionType,
|
|
4545
4564
|
SiteSocialAccountPlatform,
|
|
4546
4565
|
SiteType,
|
|
4547
4566
|
SiteVisibility,
|