@gitbook/api 0.38.0 → 0.40.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 +122 -20
- package/dist/index.cjs +24 -8
- package/dist/index.js +23 -8
- package/package.json +1 -1
- package/spec/openapi.json +398 -50
- package/spec/openapi.yaml +239 -32
package/dist/client.d.ts
CHANGED
|
@@ -503,6 +503,28 @@ export declare type PublishedContentLookup = {
|
|
|
503
503
|
/** Short-lived API token to fetch content related to the space in the context of the URL. */
|
|
504
504
|
apiToken: string;
|
|
505
505
|
};
|
|
506
|
+
export declare type PublishedSiteContentLookup = {
|
|
507
|
+
/** Type of target for the redirect */
|
|
508
|
+
target: 'application' | 'content' | 'external';
|
|
509
|
+
redirect: URL;
|
|
510
|
+
} | {
|
|
511
|
+
/** ID of the site matching. */
|
|
512
|
+
site: string;
|
|
513
|
+
/** ID of the site-space matching. */
|
|
514
|
+
siteSpace: string;
|
|
515
|
+
/** ID of the space matching. */
|
|
516
|
+
space: string;
|
|
517
|
+
/** Identifier of the change request being previewed in this URL. */
|
|
518
|
+
changeRequest?: string;
|
|
519
|
+
/** Identifier of the revision being previewed in this URL. */
|
|
520
|
+
revision?: string;
|
|
521
|
+
/** Path of the content relative to the space */
|
|
522
|
+
pathname: string;
|
|
523
|
+
/** Prefix of the path in the URL dedicated to the space */
|
|
524
|
+
basePath: string;
|
|
525
|
+
/** Short-lived API token to fetch content related to the space in the context of the URL. */
|
|
526
|
+
apiToken: string;
|
|
527
|
+
};
|
|
506
528
|
export interface SpacePointer {
|
|
507
529
|
type: 'space';
|
|
508
530
|
/** Unique identifier for the space */
|
|
@@ -1076,7 +1098,6 @@ export interface ContentRefSnippet {
|
|
|
1076
1098
|
export interface ContentRefSyncedBlock {
|
|
1077
1099
|
kind: 'synced-block';
|
|
1078
1100
|
syncedBlock: string;
|
|
1079
|
-
organization: string;
|
|
1080
1101
|
}
|
|
1081
1102
|
/** An absolute reference to content in GitBook. */
|
|
1082
1103
|
export declare type ContentLocation = ContentLocationFile | ContentLocationURL | ContentLocationPage | ContentLocationUser | ContentLocationCollection | ContentLocationSpace | ContentLocationSnippet | ContentLocationSyncedBlock;
|
|
@@ -1089,6 +1110,7 @@ export interface ContentLocationFile {
|
|
|
1089
1110
|
organization: Organization;
|
|
1090
1111
|
space: Space;
|
|
1091
1112
|
changeRequest?: ChangeRequest;
|
|
1113
|
+
revision?: Revision;
|
|
1092
1114
|
file: RevisionFile;
|
|
1093
1115
|
}
|
|
1094
1116
|
export interface ContentLocationPage {
|
|
@@ -1097,7 +1119,11 @@ export interface ContentLocationPage {
|
|
|
1097
1119
|
page: RevisionPage;
|
|
1098
1120
|
space: Space;
|
|
1099
1121
|
changeRequest?: ChangeRequest;
|
|
1122
|
+
revision?: Revision;
|
|
1123
|
+
/** The anchor within the page. */
|
|
1100
1124
|
anchor?: string;
|
|
1125
|
+
/** The node id within the page. */
|
|
1126
|
+
node?: string;
|
|
1101
1127
|
}
|
|
1102
1128
|
export interface ContentLocationUser {
|
|
1103
1129
|
kind: 'user';
|
|
@@ -1722,7 +1748,7 @@ export interface OrganizationTeamMember {
|
|
|
1722
1748
|
team: TeamMember;
|
|
1723
1749
|
}
|
|
1724
1750
|
/** The default content for the organization */
|
|
1725
|
-
export declare type OrganizationDefaultContent = SpacePointer | CollectionPointer;
|
|
1751
|
+
export declare type OrganizationDefaultContent = SpacePointer | CollectionPointer | SitePointer;
|
|
1726
1752
|
export declare type OrganizationInvite = {
|
|
1727
1753
|
/** Type of Object, always equals to "invite" */
|
|
1728
1754
|
object: 'invite';
|
|
@@ -1998,8 +2024,6 @@ export interface SyncedBlock {
|
|
|
1998
2024
|
/** URL of the synced block in the API */
|
|
1999
2025
|
location: URL;
|
|
2000
2026
|
};
|
|
2001
|
-
document: JSONDocument;
|
|
2002
|
-
files?: RevisionFile[];
|
|
2003
2027
|
}
|
|
2004
2028
|
/** Content audit relation */
|
|
2005
2029
|
export interface ContentAuditRelation {
|
|
@@ -2548,6 +2572,7 @@ export declare enum IntegrationScope {
|
|
|
2548
2572
|
SpaceScriptCookies = "space:script:cookies",
|
|
2549
2573
|
SpaceGitSync = "space:git:sync",
|
|
2550
2574
|
SpaceVisitorAuth = "space:visitor:auth",
|
|
2575
|
+
SiteScriptInject = "site:script:inject",
|
|
2551
2576
|
SiteVisitorAuth = "site:visitor:auth"
|
|
2552
2577
|
}
|
|
2553
2578
|
/** A search string to filter integrations by name */
|
|
@@ -2621,6 +2646,11 @@ export declare enum IntegrationInstallationSpaceSelection {
|
|
|
2621
2646
|
All = "all",
|
|
2622
2647
|
Selected = "selected"
|
|
2623
2648
|
}
|
|
2649
|
+
/** Describe whether all sites have been selected or there's a selection involved */
|
|
2650
|
+
export declare enum IntegrationInstallationSiteSelection {
|
|
2651
|
+
All = "all",
|
|
2652
|
+
Selected = "selected"
|
|
2653
|
+
}
|
|
2624
2654
|
export declare enum IntegrationCategory {
|
|
2625
2655
|
Analytics = "analytics",
|
|
2626
2656
|
Captures = "captures",
|
|
@@ -2633,6 +2663,7 @@ export declare enum IntegrationCategory {
|
|
|
2633
2663
|
export interface IntegrationConfigurations {
|
|
2634
2664
|
account?: IntegrationConfiguration;
|
|
2635
2665
|
space?: IntegrationConfiguration;
|
|
2666
|
+
site?: IntegrationConfiguration;
|
|
2636
2667
|
}
|
|
2637
2668
|
export declare type IntegrationConfiguration = IntegrationConfigurationSchema | IntegrationConfigurationComponent;
|
|
2638
2669
|
/** Schema for a configuration */
|
|
@@ -2777,6 +2808,8 @@ export interface IntegrationEnvironment {
|
|
|
2777
2808
|
installation?: IntegrationInstallation;
|
|
2778
2809
|
/** Installation of an integration at a space level */
|
|
2779
2810
|
spaceInstallation?: IntegrationSpaceInstallation;
|
|
2811
|
+
/** Installation of an integration at a site level */
|
|
2812
|
+
siteInstallation?: IntegrationSiteInstallation;
|
|
2780
2813
|
/** Secrets stored on the integration and passed at runtime. */
|
|
2781
2814
|
secrets: IntegrationSecrets;
|
|
2782
2815
|
/**
|
|
@@ -2791,6 +2824,8 @@ export interface IntegrationEnvironment {
|
|
|
2791
2824
|
installation?: string;
|
|
2792
2825
|
/** Secret that can be used to verify the authenticity of incoming HTTP requests to the space installation. */
|
|
2793
2826
|
spaceInstallation?: string;
|
|
2827
|
+
/** Secret that can be used to verify the authenticity of incoming HTTP requests to the site installation. */
|
|
2828
|
+
siteInstallation?: string;
|
|
2794
2829
|
};
|
|
2795
2830
|
/** URL of the HTTP API */
|
|
2796
2831
|
apiEndpoint: string;
|
|
@@ -2972,7 +3007,23 @@ export declare type EntityPropertySchema = {
|
|
|
2972
3007
|
};
|
|
2973
3008
|
});
|
|
2974
3009
|
/** Any event that can be received from GitBook. */
|
|
2975
|
-
export declare type Event = InstallationSetupEvent | SpaceInstallationSetupEvent | SpaceInstallationDeletedEvent |
|
|
3010
|
+
export declare type Event = InstallationSetupEvent | SpaceInstallationSetupEvent | SpaceInstallationDeletedEvent | (SiteEvent & {
|
|
3011
|
+
type: 'site_installation_setup';
|
|
3012
|
+
status: IntegrationInstallationStatus;
|
|
3013
|
+
/** The state of the site installation before it was updated. */
|
|
3014
|
+
previous?: {
|
|
3015
|
+
status: IntegrationInstallationStatus;
|
|
3016
|
+
/** The previous configuration of the site installation. */
|
|
3017
|
+
configuration?: object;
|
|
3018
|
+
};
|
|
3019
|
+
}) | (SiteEvent & {
|
|
3020
|
+
type: 'site_installation_deleted';
|
|
3021
|
+
/** The state of the site installation before it was deleted. */
|
|
3022
|
+
previous: {
|
|
3023
|
+
/** The previous configuration of the site installation. */
|
|
3024
|
+
configuration?: object;
|
|
3025
|
+
};
|
|
3026
|
+
}) | SiteViewEvent | SpaceContentUpdatedEvent | SpaceGitSyncCompletedEvent | SpaceGitSyncStartedEvent | SpaceVisibilityUpdatedEvent | FetchEvent | FetchPublishedScriptEvent | FetchVisitorAuthenticationEvent | UIRenderEvent;
|
|
2976
3027
|
/** Common properties for all events. */
|
|
2977
3028
|
export interface BaseEvent {
|
|
2978
3029
|
/** Unique identifier for the event. */
|
|
@@ -2990,6 +3041,11 @@ export declare type SpaceEvent = InstallationEvent & {
|
|
|
2990
3041
|
/** ID of the space */
|
|
2991
3042
|
spaceId: string;
|
|
2992
3043
|
};
|
|
3044
|
+
/** Common properties for all events related to a specific site. */
|
|
3045
|
+
export declare type SiteEvent = InstallationEvent & {
|
|
3046
|
+
/** ID of the site */
|
|
3047
|
+
siteId: string;
|
|
3048
|
+
};
|
|
2993
3049
|
/** Event received when integration has been installed or updated. */
|
|
2994
3050
|
export declare type InstallationSetupEvent = InstallationEvent & {
|
|
2995
3051
|
type: 'installation_setup';
|
|
@@ -3021,8 +3077,9 @@ export declare type SpaceInstallationDeletedEvent = SpaceEvent & {
|
|
|
3021
3077
|
configuration?: object;
|
|
3022
3078
|
};
|
|
3023
3079
|
};
|
|
3080
|
+
export declare type SpaceViewEvent = SiteViewEvent;
|
|
3024
3081
|
/** Event received when a page has been visited. */
|
|
3025
|
-
export declare type
|
|
3082
|
+
export declare type SiteViewEvent = SpaceEvent & {
|
|
3026
3083
|
type: 'space_view';
|
|
3027
3084
|
/** Unique identifier of the visited page. */
|
|
3028
3085
|
pageId?: string;
|
|
@@ -3100,6 +3157,8 @@ export interface FetchRequest {
|
|
|
3100
3157
|
export declare type FetchEvent = BaseEvent & {
|
|
3101
3158
|
/** The space ID, if requests are specific to a single space */
|
|
3102
3159
|
spaceId?: string;
|
|
3160
|
+
/** The site ID, if requests are specific to a single site */
|
|
3161
|
+
siteId?: string;
|
|
3103
3162
|
/** The installation ID, if requests are specific to a single installation */
|
|
3104
3163
|
installationId?: string;
|
|
3105
3164
|
auth?: {
|
|
@@ -3110,16 +3169,16 @@ export declare type FetchEvent = BaseEvent & {
|
|
|
3110
3169
|
request: FetchRequest;
|
|
3111
3170
|
};
|
|
3112
3171
|
/** Common properties for all events related to fetching a published script from an installation */
|
|
3113
|
-
export declare type FetchPublishedScriptEvent = SpaceEvent & {
|
|
3172
|
+
export declare type FetchPublishedScriptEvent = (SpaceEvent | SiteEvent) & {
|
|
3114
3173
|
type: 'fetch_published_script';
|
|
3115
3174
|
};
|
|
3116
3175
|
/** Common properties for all events related to visitor authentication from an installation */
|
|
3117
|
-
export declare type FetchVisitorAuthenticationEvent = SpaceEvent & {
|
|
3176
|
+
export declare type FetchVisitorAuthenticationEvent = (SpaceEvent | SiteEvent) & {
|
|
3118
3177
|
type: 'fetch_visitor_authentication';
|
|
3119
3178
|
location?: string;
|
|
3120
3179
|
};
|
|
3121
3180
|
/** Event generated when rendering a UI */
|
|
3122
|
-
export declare type UIRenderEvent = (SpaceEvent | InstallationEvent) & {
|
|
3181
|
+
export declare type UIRenderEvent = (SpaceEvent | SiteEvent | InstallationEvent) & {
|
|
3123
3182
|
auth?: {
|
|
3124
3183
|
/** The user's ID. */
|
|
3125
3184
|
userId: string;
|
|
@@ -4774,16 +4833,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
4774
4833
|
* @secure
|
|
4775
4834
|
*/
|
|
4776
4835
|
deleteSpaceById: (spaceId: string, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
4777
|
-
/**
|
|
4778
|
-
* No description
|
|
4779
|
-
*
|
|
4780
|
-
* @tags hive
|
|
4781
|
-
* @name GenerateSpaceHiveReadAccessToken
|
|
4782
|
-
* @summary Returns a token to authenticate with Hive to read content from a given space.
|
|
4783
|
-
* @request POST:/spaces/{spaceId}/hive/token
|
|
4784
|
-
* @secure
|
|
4785
|
-
*/
|
|
4786
|
-
generateSpaceHiveReadAccessToken: (spaceId: string, params?: RequestParams) => Promise<HttpResponse<HiveAccessToken, Error>>;
|
|
4787
4836
|
/**
|
|
4788
4837
|
* No description
|
|
4789
4838
|
*
|
|
@@ -5235,6 +5284,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5235
5284
|
updateChangeRequestById: (spaceId: string, changeRequestId: string, data: {
|
|
5236
5285
|
/** Subject of the change request */
|
|
5237
5286
|
subject?: ChangeRequestSubject;
|
|
5287
|
+
status?: 'draft' | 'open' | 'archived';
|
|
5238
5288
|
}, params?: RequestParams) => Promise<HttpResponse<ChangeRequest, Error>>;
|
|
5239
5289
|
/**
|
|
5240
5290
|
* No description
|
|
@@ -8190,6 +8240,19 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8190
8240
|
/** A new title for the Synced Block. */
|
|
8191
8241
|
title?: string;
|
|
8192
8242
|
}, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
8243
|
+
/**
|
|
8244
|
+
* No description
|
|
8245
|
+
*
|
|
8246
|
+
* @tags organizations
|
|
8247
|
+
* @name GetSyncedBlockContent
|
|
8248
|
+
* @summary Get a synced block content
|
|
8249
|
+
* @request GET:/orgs/{organizationId}/synced-blocks/{syncedBlockId}/content
|
|
8250
|
+
* @secure
|
|
8251
|
+
*/
|
|
8252
|
+
getSyncedBlockContent: (organizationId: string, syncedBlockId: string, params?: RequestParams) => Promise<HttpResponse<{
|
|
8253
|
+
document: JSONDocument;
|
|
8254
|
+
files: RevisionFile[];
|
|
8255
|
+
}, Error>>;
|
|
8193
8256
|
/**
|
|
8194
8257
|
* No description
|
|
8195
8258
|
*
|
|
@@ -8649,6 +8712,43 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8649
8712
|
message: string;
|
|
8650
8713
|
};
|
|
8651
8714
|
}>>;
|
|
8715
|
+
/**
|
|
8716
|
+
* No description
|
|
8717
|
+
*
|
|
8718
|
+
* @tags permissions, sites
|
|
8719
|
+
* @name ListPermissionsAggregateInSite
|
|
8720
|
+
* @summary List permissions for all users of a site.
|
|
8721
|
+
* @request GET:/orgs/{organizationId}/sites/{siteId}/permissions/aggregate
|
|
8722
|
+
* @secure
|
|
8723
|
+
*/
|
|
8724
|
+
listPermissionsAggregateInSite: (organizationId: string, siteId: string, query?: {
|
|
8725
|
+
/** Identifier of the page results to fetch. */
|
|
8726
|
+
page?: string;
|
|
8727
|
+
/**
|
|
8728
|
+
* The number of results per page
|
|
8729
|
+
* @min 0
|
|
8730
|
+
* @max 1000
|
|
8731
|
+
*/
|
|
8732
|
+
limit?: number;
|
|
8733
|
+
/** If defined, only members with this role will be returned. */
|
|
8734
|
+
role?: MemberRole;
|
|
8735
|
+
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
8736
|
+
items: {
|
|
8737
|
+
/**
|
|
8738
|
+
* "The role of a member in an organization.
|
|
8739
|
+
* "admin": Can administrate the content: create, delete spaces, ...
|
|
8740
|
+
* "create": Can create content.
|
|
8741
|
+
* "review": Can review content.
|
|
8742
|
+
* "edit": Can edit the content (live or change requests).
|
|
8743
|
+
* "comment": Can access the content and its discussions.
|
|
8744
|
+
* "read": Can access the content, but cannot update it in any way.
|
|
8745
|
+
*/
|
|
8746
|
+
permission: MemberRole;
|
|
8747
|
+
user: User;
|
|
8748
|
+
/** The content or organization that enforced this permission level. */
|
|
8749
|
+
origin: SpacePointer;
|
|
8750
|
+
}[];
|
|
8751
|
+
}, Error>>;
|
|
8652
8752
|
/**
|
|
8653
8753
|
* No description
|
|
8654
8754
|
*
|
|
@@ -8865,7 +8965,9 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8865
8965
|
* @secure
|
|
8866
8966
|
*/
|
|
8867
8967
|
generateHiveAccessToken: (data?: {
|
|
8968
|
+
/** @deprecated */
|
|
8868
8969
|
spaces?: string[];
|
|
8970
|
+
contentIds?: string[];
|
|
8869
8971
|
}, params?: RequestParams) => Promise<HttpResponse<HiveAccessToken, Error>>;
|
|
8870
8972
|
};
|
|
8871
8973
|
urls: {
|
|
@@ -8915,7 +9017,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8915
9017
|
url: URL;
|
|
8916
9018
|
/** JWT token generated for a visitor auth session */
|
|
8917
9019
|
visitorAuthToken?: string;
|
|
8918
|
-
}, params?: RequestParams) => Promise<HttpResponse<PublishedContentLookup, Error | {
|
|
9020
|
+
}, params?: RequestParams) => Promise<HttpResponse<PublishedContentLookup | PublishedSiteContentLookup, Error | {
|
|
8919
9021
|
error: {
|
|
8920
9022
|
/** @format int32 */
|
|
8921
9023
|
code: 404;
|
package/dist/index.cjs
CHANGED
|
@@ -212,6 +212,7 @@ __export(src_exports, {
|
|
|
212
212
|
HttpClient: () => HttpClient,
|
|
213
213
|
ImportContentSource: () => ImportContentSource,
|
|
214
214
|
IntegrationCategory: () => IntegrationCategory,
|
|
215
|
+
IntegrationInstallationSiteSelection: () => IntegrationInstallationSiteSelection,
|
|
215
216
|
IntegrationInstallationSpaceSelection: () => IntegrationInstallationSpaceSelection,
|
|
216
217
|
IntegrationInstallationStatus: () => IntegrationInstallationStatus,
|
|
217
218
|
IntegrationScope: () => IntegrationScope,
|
|
@@ -238,7 +239,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
238
239
|
|
|
239
240
|
// package.json
|
|
240
241
|
var name = "@gitbook/api";
|
|
241
|
-
var version = "0.
|
|
242
|
+
var version = "0.40.0";
|
|
242
243
|
|
|
243
244
|
// src/client.ts
|
|
244
245
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -514,6 +515,7 @@ var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
|
|
|
514
515
|
IntegrationScope2["SpaceScriptCookies"] = "space:script:cookies";
|
|
515
516
|
IntegrationScope2["SpaceGitSync"] = "space:git:sync";
|
|
516
517
|
IntegrationScope2["SpaceVisitorAuth"] = "space:visitor:auth";
|
|
518
|
+
IntegrationScope2["SiteScriptInject"] = "site:script:inject";
|
|
517
519
|
IntegrationScope2["SiteVisitorAuth"] = "site:visitor:auth";
|
|
518
520
|
return IntegrationScope2;
|
|
519
521
|
})(IntegrationScope || {});
|
|
@@ -522,6 +524,11 @@ var IntegrationInstallationSpaceSelection = /* @__PURE__ */ ((IntegrationInstall
|
|
|
522
524
|
IntegrationInstallationSpaceSelection2["Selected"] = "selected";
|
|
523
525
|
return IntegrationInstallationSpaceSelection2;
|
|
524
526
|
})(IntegrationInstallationSpaceSelection || {});
|
|
527
|
+
var IntegrationInstallationSiteSelection = /* @__PURE__ */ ((IntegrationInstallationSiteSelection2) => {
|
|
528
|
+
IntegrationInstallationSiteSelection2["All"] = "all";
|
|
529
|
+
IntegrationInstallationSiteSelection2["Selected"] = "selected";
|
|
530
|
+
return IntegrationInstallationSiteSelection2;
|
|
531
|
+
})(IntegrationInstallationSiteSelection || {});
|
|
525
532
|
var IntegrationCategory = /* @__PURE__ */ ((IntegrationCategory2) => {
|
|
526
533
|
IntegrationCategory2["Analytics"] = "analytics";
|
|
527
534
|
IntegrationCategory2["Captures"] = "captures";
|
|
@@ -1020,13 +1027,6 @@ var Api = class extends HttpClient {
|
|
|
1020
1027
|
secure: true,
|
|
1021
1028
|
...params
|
|
1022
1029
|
}),
|
|
1023
|
-
generateSpaceHiveReadAccessToken: (spaceId, params = {}) => this.request({
|
|
1024
|
-
path: `/spaces/${spaceId}/hive/token`,
|
|
1025
|
-
method: "POST",
|
|
1026
|
-
secure: true,
|
|
1027
|
-
format: "json",
|
|
1028
|
-
...params
|
|
1029
|
-
}),
|
|
1030
1030
|
duplicateSpace: (spaceId, params = {}) => this.request({
|
|
1031
1031
|
path: `/spaces/${spaceId}/duplicate`,
|
|
1032
1032
|
method: "POST",
|
|
@@ -2708,6 +2708,13 @@ var Api = class extends HttpClient {
|
|
|
2708
2708
|
type: "application/json" /* Json */,
|
|
2709
2709
|
...params
|
|
2710
2710
|
}),
|
|
2711
|
+
getSyncedBlockContent: (organizationId, syncedBlockId, params = {}) => this.request({
|
|
2712
|
+
path: `/orgs/${organizationId}/synced-blocks/${syncedBlockId}/content`,
|
|
2713
|
+
method: "GET",
|
|
2714
|
+
secure: true,
|
|
2715
|
+
format: "json",
|
|
2716
|
+
...params
|
|
2717
|
+
}),
|
|
2711
2718
|
getSyncedBlockBacklinks: (organizationId, syncedBlockId, query, params = {}) => this.request({
|
|
2712
2719
|
path: `/orgs/${organizationId}/synced-blocks/${syncedBlockId}/backlinks`,
|
|
2713
2720
|
method: "GET",
|
|
@@ -2929,6 +2936,14 @@ var Api = class extends HttpClient {
|
|
|
2929
2936
|
format: "json",
|
|
2930
2937
|
...params
|
|
2931
2938
|
}),
|
|
2939
|
+
listPermissionsAggregateInSite: (organizationId, siteId, query, params = {}) => this.request({
|
|
2940
|
+
path: `/orgs/${organizationId}/sites/${siteId}/permissions/aggregate`,
|
|
2941
|
+
method: "GET",
|
|
2942
|
+
query,
|
|
2943
|
+
secure: true,
|
|
2944
|
+
format: "json",
|
|
2945
|
+
...params
|
|
2946
|
+
}),
|
|
2932
2947
|
listSeatsInOrganizationById: (organizationId, params = {}) => this.request({
|
|
2933
2948
|
path: `/orgs/${organizationId}/seats`,
|
|
2934
2949
|
method: "GET",
|
|
@@ -3173,6 +3188,7 @@ var GitBookAPI = class extends Api {
|
|
|
3173
3188
|
HttpClient,
|
|
3174
3189
|
ImportContentSource,
|
|
3175
3190
|
IntegrationCategory,
|
|
3191
|
+
IntegrationInstallationSiteSelection,
|
|
3176
3192
|
IntegrationInstallationSpaceSelection,
|
|
3177
3193
|
IntegrationInstallationStatus,
|
|
3178
3194
|
IntegrationScope,
|
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.40.0";
|
|
176
176
|
|
|
177
177
|
// src/client.ts
|
|
178
178
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -448,6 +448,7 @@ var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
|
|
|
448
448
|
IntegrationScope2["SpaceScriptCookies"] = "space:script:cookies";
|
|
449
449
|
IntegrationScope2["SpaceGitSync"] = "space:git:sync";
|
|
450
450
|
IntegrationScope2["SpaceVisitorAuth"] = "space:visitor:auth";
|
|
451
|
+
IntegrationScope2["SiteScriptInject"] = "site:script:inject";
|
|
451
452
|
IntegrationScope2["SiteVisitorAuth"] = "site:visitor:auth";
|
|
452
453
|
return IntegrationScope2;
|
|
453
454
|
})(IntegrationScope || {});
|
|
@@ -456,6 +457,11 @@ var IntegrationInstallationSpaceSelection = /* @__PURE__ */ ((IntegrationInstall
|
|
|
456
457
|
IntegrationInstallationSpaceSelection2["Selected"] = "selected";
|
|
457
458
|
return IntegrationInstallationSpaceSelection2;
|
|
458
459
|
})(IntegrationInstallationSpaceSelection || {});
|
|
460
|
+
var IntegrationInstallationSiteSelection = /* @__PURE__ */ ((IntegrationInstallationSiteSelection2) => {
|
|
461
|
+
IntegrationInstallationSiteSelection2["All"] = "all";
|
|
462
|
+
IntegrationInstallationSiteSelection2["Selected"] = "selected";
|
|
463
|
+
return IntegrationInstallationSiteSelection2;
|
|
464
|
+
})(IntegrationInstallationSiteSelection || {});
|
|
459
465
|
var IntegrationCategory = /* @__PURE__ */ ((IntegrationCategory2) => {
|
|
460
466
|
IntegrationCategory2["Analytics"] = "analytics";
|
|
461
467
|
IntegrationCategory2["Captures"] = "captures";
|
|
@@ -954,13 +960,6 @@ var Api = class extends HttpClient {
|
|
|
954
960
|
secure: true,
|
|
955
961
|
...params
|
|
956
962
|
}),
|
|
957
|
-
generateSpaceHiveReadAccessToken: (spaceId, params = {}) => this.request({
|
|
958
|
-
path: `/spaces/${spaceId}/hive/token`,
|
|
959
|
-
method: "POST",
|
|
960
|
-
secure: true,
|
|
961
|
-
format: "json",
|
|
962
|
-
...params
|
|
963
|
-
}),
|
|
964
963
|
duplicateSpace: (spaceId, params = {}) => this.request({
|
|
965
964
|
path: `/spaces/${spaceId}/duplicate`,
|
|
966
965
|
method: "POST",
|
|
@@ -2642,6 +2641,13 @@ var Api = class extends HttpClient {
|
|
|
2642
2641
|
type: "application/json" /* Json */,
|
|
2643
2642
|
...params
|
|
2644
2643
|
}),
|
|
2644
|
+
getSyncedBlockContent: (organizationId, syncedBlockId, params = {}) => this.request({
|
|
2645
|
+
path: `/orgs/${organizationId}/synced-blocks/${syncedBlockId}/content`,
|
|
2646
|
+
method: "GET",
|
|
2647
|
+
secure: true,
|
|
2648
|
+
format: "json",
|
|
2649
|
+
...params
|
|
2650
|
+
}),
|
|
2645
2651
|
getSyncedBlockBacklinks: (organizationId, syncedBlockId, query, params = {}) => this.request({
|
|
2646
2652
|
path: `/orgs/${organizationId}/synced-blocks/${syncedBlockId}/backlinks`,
|
|
2647
2653
|
method: "GET",
|
|
@@ -2863,6 +2869,14 @@ var Api = class extends HttpClient {
|
|
|
2863
2869
|
format: "json",
|
|
2864
2870
|
...params
|
|
2865
2871
|
}),
|
|
2872
|
+
listPermissionsAggregateInSite: (organizationId, siteId, query, params = {}) => this.request({
|
|
2873
|
+
path: `/orgs/${organizationId}/sites/${siteId}/permissions/aggregate`,
|
|
2874
|
+
method: "GET",
|
|
2875
|
+
query,
|
|
2876
|
+
secure: true,
|
|
2877
|
+
format: "json",
|
|
2878
|
+
...params
|
|
2879
|
+
}),
|
|
2866
2880
|
listSeatsInOrganizationById: (organizationId, params = {}) => this.request({
|
|
2867
2881
|
path: `/orgs/${organizationId}/seats`,
|
|
2868
2882
|
method: "GET",
|
|
@@ -3106,6 +3120,7 @@ export {
|
|
|
3106
3120
|
HttpClient,
|
|
3107
3121
|
ImportContentSource,
|
|
3108
3122
|
IntegrationCategory,
|
|
3123
|
+
IntegrationInstallationSiteSelection,
|
|
3109
3124
|
IntegrationInstallationSpaceSelection,
|
|
3110
3125
|
IntegrationInstallationStatus,
|
|
3111
3126
|
IntegrationScope,
|