@gitbook/api 0.131.0 → 0.132.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 +26 -4
- package/dist/index.cjs +10 -1
- package/dist/index.js +10 -1
- package/package.json +1 -1
- package/spec/openapi.json +66 -6
- package/spec/openapi.yaml +38 -4
package/dist/client.d.ts
CHANGED
|
@@ -1703,7 +1703,8 @@ export declare enum BillingProduct {
|
|
|
1703
1703
|
Community2024 = "community_2024",
|
|
1704
1704
|
Free = "free",
|
|
1705
1705
|
Plus = "plus",
|
|
1706
|
-
Pro = "pro"
|
|
1706
|
+
Pro = "pro",
|
|
1707
|
+
Internal = "internal"
|
|
1707
1708
|
}
|
|
1708
1709
|
/** Interval for a billing subscription */
|
|
1709
1710
|
export declare enum BillingInterval {
|
|
@@ -1740,6 +1741,9 @@ export interface OrganizationPricing {
|
|
|
1740
1741
|
ultimate: OrganizationPricePair;
|
|
1741
1742
|
};
|
|
1742
1743
|
}
|
|
1744
|
+
export interface BillingMeterAddon {
|
|
1745
|
+
enabled: boolean;
|
|
1746
|
+
}
|
|
1743
1747
|
export interface OrganizationBilling {
|
|
1744
1748
|
/** Interval for a billing subscription */
|
|
1745
1749
|
interval: BillingInterval;
|
|
@@ -1750,6 +1754,8 @@ export interface OrganizationBilling {
|
|
|
1750
1754
|
isScheduledToCancel: boolean;
|
|
1751
1755
|
/** Pricing information for the organization */
|
|
1752
1756
|
pricing: OrganizationPricing;
|
|
1757
|
+
/** Configuration for the usage-based addons */
|
|
1758
|
+
usageAddons: Record<string, BillingMeterAddon>;
|
|
1753
1759
|
}
|
|
1754
1760
|
/** - notapplicable, no trial can be started for this organization. - none, no trial has been started yet. - active, trial is active. - ended, the trial has ended and the user has choosen to stay on the free plan or has upgraded to a paid plan. - expired, the trial has ended but the user hasn't deciced yet what to do. */
|
|
1755
1761
|
export declare enum BillingTrialStatus {
|
|
@@ -4136,10 +4142,10 @@ export declare enum BillingMeter {
|
|
|
4136
4142
|
export interface BillingMeterUsage {
|
|
4137
4143
|
/** Total usage for the current billing period */
|
|
4138
4144
|
total: number;
|
|
4139
|
-
/**
|
|
4140
|
-
|
|
4145
|
+
/** Usage entries for the period */
|
|
4146
|
+
entries: {
|
|
4141
4147
|
date: Timestamp;
|
|
4142
|
-
/** Usage value for the
|
|
4148
|
+
/** Usage value for the date */
|
|
4143
4149
|
value: number;
|
|
4144
4150
|
}[];
|
|
4145
4151
|
}
|
|
@@ -8843,6 +8849,22 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8843
8849
|
*/
|
|
8844
8850
|
computed?: boolean;
|
|
8845
8851
|
}, params?: RequestParams) => Promise<HttpResponse<RevisionReusableContent, any>>;
|
|
8852
|
+
/**
|
|
8853
|
+
* No description
|
|
8854
|
+
*
|
|
8855
|
+
* @tags space-content
|
|
8856
|
+
* @name GetReusableContentDocumentInRevisionById
|
|
8857
|
+
* @summary Get the document of a reusable content in a revision
|
|
8858
|
+
* @request GET:/spaces/{spaceId}/revisions/{revisionId}/reusable-contents/{reusableContentId}/document
|
|
8859
|
+
* @secure
|
|
8860
|
+
*/
|
|
8861
|
+
getReusableContentDocumentInRevisionById: (spaceId: string, revisionId: string, reusableContentId: string, query?: {
|
|
8862
|
+
/**
|
|
8863
|
+
* If `true` is passed, the document will be evaluated
|
|
8864
|
+
* @default false
|
|
8865
|
+
*/
|
|
8866
|
+
evaluated?: boolean;
|
|
8867
|
+
}, params?: RequestParams) => Promise<HttpResponse<JSONDocument, any>>;
|
|
8846
8868
|
/**
|
|
8847
8869
|
* No description
|
|
8848
8870
|
*
|
package/dist/index.cjs
CHANGED
|
@@ -279,7 +279,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
279
279
|
|
|
280
280
|
// package.json
|
|
281
281
|
var name = "@gitbook/api";
|
|
282
|
-
var version = "0.
|
|
282
|
+
var version = "0.132.0";
|
|
283
283
|
|
|
284
284
|
// src/client.ts
|
|
285
285
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -515,6 +515,7 @@ var BillingProduct = /* @__PURE__ */ ((BillingProduct2) => {
|
|
|
515
515
|
BillingProduct2["Free"] = "free";
|
|
516
516
|
BillingProduct2["Plus"] = "plus";
|
|
517
517
|
BillingProduct2["Pro"] = "pro";
|
|
518
|
+
BillingProduct2["Internal"] = "internal";
|
|
518
519
|
return BillingProduct2;
|
|
519
520
|
})(BillingProduct || {});
|
|
520
521
|
var BillingInterval = /* @__PURE__ */ ((BillingInterval2) => {
|
|
@@ -2001,6 +2002,14 @@ var Api = class extends HttpClient {
|
|
|
2001
2002
|
format: "json",
|
|
2002
2003
|
...params
|
|
2003
2004
|
}),
|
|
2005
|
+
getReusableContentDocumentInRevisionById: (spaceId, revisionId, reusableContentId, query, params = {}) => this.request({
|
|
2006
|
+
path: `/spaces/${spaceId}/revisions/${revisionId}/reusable-contents/${reusableContentId}/document`,
|
|
2007
|
+
method: "GET",
|
|
2008
|
+
query,
|
|
2009
|
+
secure: true,
|
|
2010
|
+
format: "json",
|
|
2011
|
+
...params
|
|
2012
|
+
}),
|
|
2004
2013
|
listCommentsInSpace: (spaceId, query, params = {}) => this.request({
|
|
2005
2014
|
path: `/spaces/${spaceId}/comments`,
|
|
2006
2015
|
method: "GET",
|
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.132.0";
|
|
176
176
|
|
|
177
177
|
// src/client.ts
|
|
178
178
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -408,6 +408,7 @@ var BillingProduct = /* @__PURE__ */ ((BillingProduct2) => {
|
|
|
408
408
|
BillingProduct2["Free"] = "free";
|
|
409
409
|
BillingProduct2["Plus"] = "plus";
|
|
410
410
|
BillingProduct2["Pro"] = "pro";
|
|
411
|
+
BillingProduct2["Internal"] = "internal";
|
|
411
412
|
return BillingProduct2;
|
|
412
413
|
})(BillingProduct || {});
|
|
413
414
|
var BillingInterval = /* @__PURE__ */ ((BillingInterval2) => {
|
|
@@ -1894,6 +1895,14 @@ var Api = class extends HttpClient {
|
|
|
1894
1895
|
format: "json",
|
|
1895
1896
|
...params
|
|
1896
1897
|
}),
|
|
1898
|
+
getReusableContentDocumentInRevisionById: (spaceId, revisionId, reusableContentId, query, params = {}) => this.request({
|
|
1899
|
+
path: `/spaces/${spaceId}/revisions/${revisionId}/reusable-contents/${reusableContentId}/document`,
|
|
1900
|
+
method: "GET",
|
|
1901
|
+
query,
|
|
1902
|
+
secure: true,
|
|
1903
|
+
format: "json",
|
|
1904
|
+
...params
|
|
1905
|
+
}),
|
|
1897
1906
|
listCommentsInSpace: (spaceId, query, params = {}) => this.request({
|
|
1898
1907
|
path: `/spaces/${spaceId}/comments`,
|
|
1899
1908
|
method: "GET",
|
package/package.json
CHANGED
package/spec/openapi.json
CHANGED
|
@@ -4732,6 +4732,46 @@
|
|
|
4732
4732
|
}
|
|
4733
4733
|
}
|
|
4734
4734
|
},
|
|
4735
|
+
"/spaces/{spaceId}/revisions/{revisionId}/reusable-contents/{reusableContentId}/document": {
|
|
4736
|
+
"get": {
|
|
4737
|
+
"operationId": "getReusableContentDocumentInRevisionById",
|
|
4738
|
+
"summary": "Get the document of a reusable content in a revision",
|
|
4739
|
+
"tags": [
|
|
4740
|
+
"space-content"
|
|
4741
|
+
],
|
|
4742
|
+
"security": [
|
|
4743
|
+
{
|
|
4744
|
+
"user": []
|
|
4745
|
+
}
|
|
4746
|
+
],
|
|
4747
|
+
"parameters": [
|
|
4748
|
+
{
|
|
4749
|
+
"$ref": "#/components/parameters/spaceId"
|
|
4750
|
+
},
|
|
4751
|
+
{
|
|
4752
|
+
"$ref": "#/components/parameters/revisionId"
|
|
4753
|
+
},
|
|
4754
|
+
{
|
|
4755
|
+
"$ref": "#/components/parameters/reusableContentId"
|
|
4756
|
+
},
|
|
4757
|
+
{
|
|
4758
|
+
"$ref": "#/components/parameters/documentEvaluated"
|
|
4759
|
+
}
|
|
4760
|
+
],
|
|
4761
|
+
"responses": {
|
|
4762
|
+
"200": {
|
|
4763
|
+
"description": "OK",
|
|
4764
|
+
"content": {
|
|
4765
|
+
"application/json": {
|
|
4766
|
+
"schema": {
|
|
4767
|
+
"$ref": "#/components/schemas/JSONDocument"
|
|
4768
|
+
}
|
|
4769
|
+
}
|
|
4770
|
+
}
|
|
4771
|
+
}
|
|
4772
|
+
}
|
|
4773
|
+
}
|
|
4774
|
+
},
|
|
4735
4775
|
"/spaces/{spaceId}/comments": {
|
|
4736
4776
|
"get": {
|
|
4737
4777
|
"operationId": "listCommentsInSpace",
|
|
@@ -23539,7 +23579,8 @@
|
|
|
23539
23579
|
"community_2024",
|
|
23540
23580
|
"free",
|
|
23541
23581
|
"plus",
|
|
23542
|
-
"pro"
|
|
23582
|
+
"pro",
|
|
23583
|
+
"internal"
|
|
23543
23584
|
]
|
|
23544
23585
|
},
|
|
23545
23586
|
"BillingInterval": {
|
|
@@ -23614,6 +23655,17 @@
|
|
|
23614
23655
|
"sites"
|
|
23615
23656
|
]
|
|
23616
23657
|
},
|
|
23658
|
+
"BillingMeterAddon": {
|
|
23659
|
+
"type": "object",
|
|
23660
|
+
"properties": {
|
|
23661
|
+
"enabled": {
|
|
23662
|
+
"type": "boolean"
|
|
23663
|
+
}
|
|
23664
|
+
},
|
|
23665
|
+
"required": [
|
|
23666
|
+
"enabled"
|
|
23667
|
+
]
|
|
23668
|
+
},
|
|
23617
23669
|
"OrganizationBilling": {
|
|
23618
23670
|
"type": "object",
|
|
23619
23671
|
"properties": {
|
|
@@ -23635,6 +23687,13 @@
|
|
|
23635
23687
|
"pricing": {
|
|
23636
23688
|
"description": "Pricing information for the organization",
|
|
23637
23689
|
"$ref": "#/components/schemas/OrganizationPricing"
|
|
23690
|
+
},
|
|
23691
|
+
"usageAddons": {
|
|
23692
|
+
"description": "Configuration for the usage-based addons",
|
|
23693
|
+
"type": "object",
|
|
23694
|
+
"additionalProperties": {
|
|
23695
|
+
"$ref": "#/components/schemas/BillingMeterAddon"
|
|
23696
|
+
}
|
|
23638
23697
|
}
|
|
23639
23698
|
},
|
|
23640
23699
|
"required": [
|
|
@@ -23642,7 +23701,8 @@
|
|
|
23642
23701
|
"endDate",
|
|
23643
23702
|
"hasPaymentFailed",
|
|
23644
23703
|
"isScheduledToCancel",
|
|
23645
|
-
"pricing"
|
|
23704
|
+
"pricing",
|
|
23705
|
+
"usageAddons"
|
|
23646
23706
|
]
|
|
23647
23707
|
},
|
|
23648
23708
|
"BillingTrialStatus": {
|
|
@@ -30704,8 +30764,8 @@
|
|
|
30704
30764
|
"description": "Total usage for the current billing period",
|
|
30705
30765
|
"type": "number"
|
|
30706
30766
|
},
|
|
30707
|
-
"
|
|
30708
|
-
"description": "
|
|
30767
|
+
"entries": {
|
|
30768
|
+
"description": "Usage entries for the period",
|
|
30709
30769
|
"type": "array",
|
|
30710
30770
|
"items": {
|
|
30711
30771
|
"type": "object",
|
|
@@ -30715,7 +30775,7 @@
|
|
|
30715
30775
|
},
|
|
30716
30776
|
"value": {
|
|
30717
30777
|
"type": "number",
|
|
30718
|
-
"description": "Usage value for the
|
|
30778
|
+
"description": "Usage value for the date"
|
|
30719
30779
|
}
|
|
30720
30780
|
},
|
|
30721
30781
|
"required": [
|
|
@@ -30727,7 +30787,7 @@
|
|
|
30727
30787
|
},
|
|
30728
30788
|
"required": [
|
|
30729
30789
|
"total",
|
|
30730
|
-
"
|
|
30790
|
+
"entries"
|
|
30731
30791
|
]
|
|
30732
30792
|
},
|
|
30733
30793
|
"SearchSpaceResult": {
|
package/spec/openapi.yaml
CHANGED
|
@@ -2791,6 +2791,26 @@ paths:
|
|
|
2791
2791
|
application/json:
|
|
2792
2792
|
schema:
|
|
2793
2793
|
$ref: "#/components/schemas/RevisionReusableContent"
|
|
2794
|
+
"/spaces/{spaceId}/revisions/{revisionId}/reusable-contents/{reusableContentId}/document":
|
|
2795
|
+
get:
|
|
2796
|
+
operationId: getReusableContentDocumentInRevisionById
|
|
2797
|
+
summary: Get the document of a reusable content in a revision
|
|
2798
|
+
tags:
|
|
2799
|
+
- space-content
|
|
2800
|
+
security:
|
|
2801
|
+
- user: []
|
|
2802
|
+
parameters:
|
|
2803
|
+
- $ref: "#/components/parameters/spaceId"
|
|
2804
|
+
- $ref: "#/components/parameters/revisionId"
|
|
2805
|
+
- $ref: "#/components/parameters/reusableContentId"
|
|
2806
|
+
- $ref: "#/components/parameters/documentEvaluated"
|
|
2807
|
+
responses:
|
|
2808
|
+
"200":
|
|
2809
|
+
description: OK
|
|
2810
|
+
content:
|
|
2811
|
+
application/json:
|
|
2812
|
+
schema:
|
|
2813
|
+
$ref: "#/components/schemas/JSONDocument"
|
|
2794
2814
|
"/spaces/{spaceId}/comments":
|
|
2795
2815
|
get:
|
|
2796
2816
|
operationId: listCommentsInSpace
|
|
@@ -13937,6 +13957,7 @@ components:
|
|
|
13937
13957
|
- free
|
|
13938
13958
|
- plus
|
|
13939
13959
|
- pro
|
|
13960
|
+
- internal
|
|
13940
13961
|
BillingInterval:
|
|
13941
13962
|
type: string
|
|
13942
13963
|
description: Interval for a billing subscription
|
|
@@ -13989,6 +14010,13 @@ components:
|
|
|
13989
14010
|
required:
|
|
13990
14011
|
- members
|
|
13991
14012
|
- sites
|
|
14013
|
+
BillingMeterAddon:
|
|
14014
|
+
type: object
|
|
14015
|
+
properties:
|
|
14016
|
+
enabled:
|
|
14017
|
+
type: boolean
|
|
14018
|
+
required:
|
|
14019
|
+
- enabled
|
|
13992
14020
|
OrganizationBilling:
|
|
13993
14021
|
type: object
|
|
13994
14022
|
properties:
|
|
@@ -14006,12 +14034,18 @@ components:
|
|
|
14006
14034
|
pricing:
|
|
14007
14035
|
description: Pricing information for the organization
|
|
14008
14036
|
$ref: "#/components/schemas/OrganizationPricing"
|
|
14037
|
+
usageAddons:
|
|
14038
|
+
description: Configuration for the usage-based addons
|
|
14039
|
+
type: object
|
|
14040
|
+
additionalProperties:
|
|
14041
|
+
$ref: "#/components/schemas/BillingMeterAddon"
|
|
14009
14042
|
required:
|
|
14010
14043
|
- interval
|
|
14011
14044
|
- endDate
|
|
14012
14045
|
- hasPaymentFailed
|
|
14013
14046
|
- isScheduledToCancel
|
|
14014
14047
|
- pricing
|
|
14048
|
+
- usageAddons
|
|
14015
14049
|
BillingTrialStatus:
|
|
14016
14050
|
type: string
|
|
14017
14051
|
description: |
|
|
@@ -18720,8 +18754,8 @@ components:
|
|
|
18720
18754
|
total:
|
|
18721
18755
|
description: Total usage for the current billing period
|
|
18722
18756
|
type: number
|
|
18723
|
-
|
|
18724
|
-
description:
|
|
18757
|
+
entries:
|
|
18758
|
+
description: Usage entries for the period
|
|
18725
18759
|
type: array
|
|
18726
18760
|
items:
|
|
18727
18761
|
type: object
|
|
@@ -18730,13 +18764,13 @@ components:
|
|
|
18730
18764
|
$ref: "#/components/schemas/Timestamp"
|
|
18731
18765
|
value:
|
|
18732
18766
|
type: number
|
|
18733
|
-
description: Usage value for the
|
|
18767
|
+
description: Usage value for the date
|
|
18734
18768
|
required:
|
|
18735
18769
|
- date
|
|
18736
18770
|
- value
|
|
18737
18771
|
required:
|
|
18738
18772
|
- total
|
|
18739
|
-
-
|
|
18773
|
+
- entries
|
|
18740
18774
|
SearchSpaceResult:
|
|
18741
18775
|
type: object
|
|
18742
18776
|
description: Search result representing a space.
|