@gitbook/api 0.66.0 → 0.67.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 +144 -41
- package/dist/index.cjs +28 -8
- package/dist/index.js +28 -8
- package/package.json +1 -1
- package/spec/openapi.json +487 -155
- package/spec/openapi.yaml +316 -113
package/dist/client.d.ts
CHANGED
|
@@ -530,7 +530,7 @@ export type ContentKitDefaultAction = {
|
|
|
530
530
|
action: '@ui.modal.close';
|
|
531
531
|
returnValue: PlainObject;
|
|
532
532
|
} | {
|
|
533
|
-
action: '@ui.
|
|
533
|
+
action: '@ui.complete';
|
|
534
534
|
returnValue: PlainObject;
|
|
535
535
|
} | {
|
|
536
536
|
action: '@ui.url.open';
|
|
@@ -2277,7 +2277,29 @@ export interface RevisionSemanticChangeCustomFieldsEdited {
|
|
|
2277
2277
|
type: 'custom_fields_edited';
|
|
2278
2278
|
customFields: ChangeAttributeCustomFields;
|
|
2279
2279
|
}
|
|
2280
|
-
export
|
|
2280
|
+
export interface ChangedRevisionReusableContent {
|
|
2281
|
+
id: string;
|
|
2282
|
+
title: string;
|
|
2283
|
+
document?: string;
|
|
2284
|
+
}
|
|
2285
|
+
export interface RevisionSemanticChangeReusableContentCreated {
|
|
2286
|
+
type: 'reusable_content_created';
|
|
2287
|
+
reusableContent: ChangedRevisionReusableContent;
|
|
2288
|
+
}
|
|
2289
|
+
export interface RevisionSemanticChangeReusableContentDeleted {
|
|
2290
|
+
type: 'reusable_content_deleted';
|
|
2291
|
+
reusableContent: ChangedRevisionReusableContent;
|
|
2292
|
+
}
|
|
2293
|
+
export interface RevisionReusableContentChangeAttributes {
|
|
2294
|
+
title?: ChangeAttributeString;
|
|
2295
|
+
document?: ChangeAttributeString;
|
|
2296
|
+
}
|
|
2297
|
+
export interface RevisionSemanticChangeReusableContentEdited {
|
|
2298
|
+
type: 'reusable_content_edited';
|
|
2299
|
+
reusableContent: ChangedRevisionReusableContent;
|
|
2300
|
+
attributes: RevisionReusableContentChangeAttributes;
|
|
2301
|
+
}
|
|
2302
|
+
export type RevisionSemanticChange = RevisionSemanticChangePageCreated | RevisionSemanticChangePageEdited | RevisionSemanticChangePageDeleted | RevisionSemanticChangePageMoved | RevisionSemanticChangeFileCreated | RevisionSemanticChangeFileEdited | RevisionSemanticChangeFileDeleted | RevisionSemanticChangeCustomFieldsEdited | RevisionSemanticChangeReusableContentCreated | RevisionSemanticChangeReusableContentDeleted | RevisionSemanticChangeReusableContentEdited;
|
|
2281
2303
|
export interface RevisionSemanticChanges {
|
|
2282
2304
|
changes: RevisionSemanticChange[];
|
|
2283
2305
|
/** How many changes were omitted because above the result limit */
|
|
@@ -2896,6 +2918,8 @@ export type ContentKitContextConfigurationContentSource = ContentKitContextBase
|
|
|
2896
2918
|
type: 'configuration_contentsource';
|
|
2897
2919
|
/** ID of the organization the content source installation configuration is in. */
|
|
2898
2920
|
organizationId: string;
|
|
2921
|
+
/** Optional ID of the space the content source installation configuration is in. */
|
|
2922
|
+
spaceId?: string;
|
|
2899
2923
|
};
|
|
2900
2924
|
/** Context while rendering in a document. */
|
|
2901
2925
|
export type ContentKitContextDocument = ContentKitContextBase & {
|
|
@@ -3492,6 +3516,37 @@ export interface InviteUsersToOrganization {
|
|
|
3492
3516
|
/** If true, invites the user as an SSO user of the organization. Defaults to false. */
|
|
3493
3517
|
sso?: boolean;
|
|
3494
3518
|
}
|
|
3519
|
+
/** An invite link to a specific collection in an organization */
|
|
3520
|
+
export interface InviteLinkToCollection {
|
|
3521
|
+
/** Type of Object, always equals to "invite" */
|
|
3522
|
+
object: 'invite';
|
|
3523
|
+
/** Unique identifier for the invite link to the collection */
|
|
3524
|
+
id: string;
|
|
3525
|
+
/** The level of the member in the target collection */
|
|
3526
|
+
level: MemberRoleOrGuest;
|
|
3527
|
+
/** The collection the member has been invited to */
|
|
3528
|
+
collection: Collection;
|
|
3529
|
+
}
|
|
3530
|
+
/** An invite link to a specific space in an organization */
|
|
3531
|
+
export interface InviteLinkToSpace {
|
|
3532
|
+
/** Type of Object, always equals to "invite" */
|
|
3533
|
+
object: 'invite';
|
|
3534
|
+
/** Unique identifier for the invite link to the space */
|
|
3535
|
+
id: string;
|
|
3536
|
+
/** The level of the member in the target space */
|
|
3537
|
+
level: MemberRoleOrGuest;
|
|
3538
|
+
/** The space the member has been invited to */
|
|
3539
|
+
space: Space;
|
|
3540
|
+
}
|
|
3541
|
+
/** An invite link to an organization */
|
|
3542
|
+
export interface InviteLinkToOrganization {
|
|
3543
|
+
/** Type of Object, always equals to "invite" */
|
|
3544
|
+
object: 'invite';
|
|
3545
|
+
/** Unique identifier for the invite link to the organization */
|
|
3546
|
+
id: string;
|
|
3547
|
+
/** The role of the member in the organization */
|
|
3548
|
+
role: MemberRoleOrGuest;
|
|
3549
|
+
}
|
|
3495
3550
|
export interface CreateInviteToOrganization {
|
|
3496
3551
|
/** The role of the member in the organization */
|
|
3497
3552
|
role: MemberRoleOrGuest;
|
|
@@ -3509,28 +3564,8 @@ export interface CreateInviteToCollection {
|
|
|
3509
3564
|
collection: string;
|
|
3510
3565
|
}
|
|
3511
3566
|
export type CreateOrganizationInvite = CreateInviteToOrganization | CreateInviteToSpace | CreateInviteToCollection;
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
role: MemberRoleOrGuest;
|
|
3515
|
-
}
|
|
3516
|
-
export interface InviteToSpace {
|
|
3517
|
-
/** The level of the member in the target space */
|
|
3518
|
-
level: MemberRoleOrGuest;
|
|
3519
|
-
/** The space the member has been invited to */
|
|
3520
|
-
space: Space;
|
|
3521
|
-
}
|
|
3522
|
-
export interface InviteToCollection {
|
|
3523
|
-
/** The level of the member in the target collection */
|
|
3524
|
-
level: MemberRoleOrGuest;
|
|
3525
|
-
/** The collection the member has been invited to */
|
|
3526
|
-
collection: Collection;
|
|
3527
|
-
}
|
|
3528
|
-
export type OrganizationInvite = {
|
|
3529
|
-
/** Type of Object, always equals to "invite" */
|
|
3530
|
-
object: 'invite';
|
|
3531
|
-
/** Unique identifier for the organization invite */
|
|
3532
|
-
id: string;
|
|
3533
|
-
} & (InviteToOrganization | InviteToSpace | InviteToCollection);
|
|
3567
|
+
/** An invite link created in an organization */
|
|
3568
|
+
export type OrganizationInviteLink = InviteLinkToOrganization | InviteLinkToSpace | InviteLinkToCollection;
|
|
3534
3569
|
export interface BillingPortal {
|
|
3535
3570
|
/** URL to the billing portal for an organization */
|
|
3536
3571
|
url: string;
|
|
@@ -4436,13 +4471,12 @@ export type BackOfficeSite = Site & {
|
|
|
4436
4471
|
/** ID of the organization owning this site */
|
|
4437
4472
|
organization: string;
|
|
4438
4473
|
};
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
target: 'application' | 'content' | 'external';
|
|
4442
|
-
redirect: URL;
|
|
4443
|
-
} | {
|
|
4474
|
+
/** Site Content */
|
|
4475
|
+
export interface PublishedSiteContent {
|
|
4444
4476
|
/** ID of the site matching. */
|
|
4445
4477
|
site: string;
|
|
4478
|
+
/** ID of the site-section matching. */
|
|
4479
|
+
siteSection?: string;
|
|
4446
4480
|
/** ID of the site-space matching. */
|
|
4447
4481
|
siteSpace: string;
|
|
4448
4482
|
/** ID of the space matching. */
|
|
@@ -4463,7 +4497,12 @@ export type PublishedSiteContentLookup = {
|
|
|
4463
4497
|
shareKey?: string;
|
|
4464
4498
|
/** Whether the resolved site URL is complete and at it's terminal point, meaning no more site path segments can be further expected before any page path segments. */
|
|
4465
4499
|
complete: boolean;
|
|
4466
|
-
}
|
|
4500
|
+
}
|
|
4501
|
+
export type PublishedSiteContentLookup = {
|
|
4502
|
+
/** Type of target for the redirect */
|
|
4503
|
+
target: 'application' | 'content' | 'external';
|
|
4504
|
+
redirect: URL;
|
|
4505
|
+
} | PublishedSiteContent;
|
|
4467
4506
|
export interface UpdateContentPublishingAuth {
|
|
4468
4507
|
/**
|
|
4469
4508
|
* A fallback URL that will be used if authentication fails.
|
|
@@ -4739,6 +4778,10 @@ export interface OrganizationInfoChannel {
|
|
|
4739
4778
|
channel: 'organization';
|
|
4740
4779
|
organization: string;
|
|
4741
4780
|
}
|
|
4781
|
+
export interface OrganizationInviteLinksChannel {
|
|
4782
|
+
channel: 'organization-link-invites';
|
|
4783
|
+
organization: string;
|
|
4784
|
+
}
|
|
4742
4785
|
export interface OrganizationMembersChannel {
|
|
4743
4786
|
channel: 'organization-members';
|
|
4744
4787
|
organization: string;
|
|
@@ -4924,7 +4967,7 @@ export interface CustomHostnameChannel {
|
|
|
4924
4967
|
customHostname: string;
|
|
4925
4968
|
}
|
|
4926
4969
|
/** Channel to subscribe to for API updates. */
|
|
4927
|
-
export type SubscriptionChannel = SpaceInfoChannel | SpaceGitInfoChannel | SpacePublishingAuthChannel | SpacePublishingCustomizationChannel | SpaceCustomFieldsChannel | SpaceBrokenLinksChannel | BackofficeUserInfoChannel | SpaceIntegrationsChannel | OrganizationCustomFieldsChannel | UserAPITokensChannel | UserOrganizationsChannel | UserProfileChannel | ChangeRequestChannel | ChangeRequestsChannel | ChangeRequestReviewsChannel | ChangeRequestBrokenLinksChannel | CollectionChannel | CollectionPublishingCustomizationChannel | OrganizationInfoChannel | OrganizationMembersChannel | OrganizationMemberChannel | OrganizationSAMLChannel | OrganizationTeamsChannel | OrganizationTeamChannel | OrganizationTeamMembersChannel | OrganizationTeamMemberChannel | OrganizationSpacesChannel | OrganizationCollectionsChannel | OrganizationCapturesChannel | OrganizationIntegrationsChannel | OrganizationInstallationsChannel | OrganizationSitesChannel | OrganizationExperimentalFeaturesChannel | OrganizationSyncedBlocksChannel | OrganizationSyncedBlockChannel | CommentsChannel | CommentInfoChannel | CommentReplyInfoChannel | CommentRepliesChannel | IntegrationChannel | IntegrationInstallationChannel | IntegrationSpaceInstallationChannel | IntegrationSpaceInstallationsChannel | IntegrationSiteInstallationChannel | IntegrationSiteInstallationsChannel | SiteChannel | SiteCustomizationChannel | SiteIntegrationsChannel | SiteSpaceChannel | SiteSpaceCustomizationChannel | SiteSpacesChannel | SitePublishingAuthChannel | SiteShareLinksChannel | SiteShareLinkChannel | SiteSectionsChannel | SiteSectionChannel | CustomHostnameChannel;
|
|
4970
|
+
export type SubscriptionChannel = SpaceInfoChannel | SpaceGitInfoChannel | SpacePublishingAuthChannel | SpacePublishingCustomizationChannel | SpaceCustomFieldsChannel | SpaceBrokenLinksChannel | BackofficeUserInfoChannel | SpaceIntegrationsChannel | OrganizationCustomFieldsChannel | UserAPITokensChannel | UserOrganizationsChannel | UserProfileChannel | ChangeRequestChannel | ChangeRequestsChannel | ChangeRequestReviewsChannel | ChangeRequestBrokenLinksChannel | CollectionChannel | CollectionPublishingCustomizationChannel | OrganizationInfoChannel | OrganizationInviteLinksChannel | OrganizationMembersChannel | OrganizationMemberChannel | OrganizationSAMLChannel | OrganizationTeamsChannel | OrganizationTeamChannel | OrganizationTeamMembersChannel | OrganizationTeamMemberChannel | OrganizationSpacesChannel | OrganizationCollectionsChannel | OrganizationCapturesChannel | OrganizationIntegrationsChannel | OrganizationInstallationsChannel | OrganizationSitesChannel | OrganizationExperimentalFeaturesChannel | OrganizationSyncedBlocksChannel | OrganizationSyncedBlockChannel | CommentsChannel | CommentInfoChannel | CommentReplyInfoChannel | CommentRepliesChannel | IntegrationChannel | IntegrationInstallationChannel | IntegrationSpaceInstallationChannel | IntegrationSpaceInstallationsChannel | IntegrationSiteInstallationChannel | IntegrationSiteInstallationsChannel | SiteChannel | SiteCustomizationChannel | SiteIntegrationsChannel | SiteSpaceChannel | SiteSpaceCustomizationChannel | SiteSpacesChannel | SitePublishingAuthChannel | SiteShareLinksChannel | SiteShareLinkChannel | SiteSectionsChannel | SiteSectionChannel | CustomHostnameChannel;
|
|
4928
4971
|
/** The status of ads on the site */
|
|
4929
4972
|
export declare enum SiteAdsStatus {
|
|
4930
4973
|
Pending = "pending",
|
|
@@ -5743,18 +5786,34 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5743
5786
|
/**
|
|
5744
5787
|
* No description
|
|
5745
5788
|
*
|
|
5746
|
-
* @name
|
|
5789
|
+
* @name GetComputedDocument
|
|
5747
5790
|
* @summary Get the document for a page in a computed content.
|
|
5748
|
-
* @request
|
|
5791
|
+
* @request GET:/spaces/{spaceId}/content/computed/document
|
|
5749
5792
|
* @secure
|
|
5750
5793
|
*/
|
|
5751
|
-
|
|
5752
|
-
/** Parameters for a computed content */
|
|
5753
|
-
source: ComputedContentSource;
|
|
5754
|
-
}, query?: {
|
|
5794
|
+
getComputedDocument: (spaceId: string, query: {
|
|
5755
5795
|
/** Output format for the content. */
|
|
5756
5796
|
format?: "document" | "markdown";
|
|
5797
|
+
/** LZ-string compressed JSON request */
|
|
5798
|
+
request: string;
|
|
5757
5799
|
}, params?: RequestParams) => Promise<HttpResponse<Document, Error>>;
|
|
5800
|
+
/**
|
|
5801
|
+
* No description
|
|
5802
|
+
*
|
|
5803
|
+
* @name GetComputedPage
|
|
5804
|
+
* @summary Get the computed pages for a page in a computed content.
|
|
5805
|
+
* @request GET:/spaces/{spaceId}/content/computed/page
|
|
5806
|
+
* @secure
|
|
5807
|
+
*/
|
|
5808
|
+
getComputedPage: (spaceId: string, query: {
|
|
5809
|
+
/** Output format for the content. */
|
|
5810
|
+
format?: "document" | "markdown";
|
|
5811
|
+
/** LZ-string compressed JSON request */
|
|
5812
|
+
request: string;
|
|
5813
|
+
}, params?: RequestParams) => Promise<HttpResponse<{
|
|
5814
|
+
pages: RevisionPage[];
|
|
5815
|
+
files: RevisionFile[];
|
|
5816
|
+
}, Error>>;
|
|
5758
5817
|
/**
|
|
5759
5818
|
* No description
|
|
5760
5819
|
*
|
|
@@ -8040,6 +8099,52 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8040
8099
|
* @secure
|
|
8041
8100
|
*/
|
|
8042
8101
|
joinOrganizationWithInvite: (organizationId: string, inviteId: string, params?: RequestParams) => Promise<HttpResponse<object, Error>>;
|
|
8102
|
+
/**
|
|
8103
|
+
* No description
|
|
8104
|
+
*
|
|
8105
|
+
* @tags organizations
|
|
8106
|
+
* @name ListOrganizationContentInviteLinks
|
|
8107
|
+
* @summary List invite links to content in an organization
|
|
8108
|
+
* @request GET:/orgs/{organizationId}/content-link-invites
|
|
8109
|
+
* @secure
|
|
8110
|
+
*/
|
|
8111
|
+
listOrganizationContentInviteLinks: (organizationId: string, query?: {
|
|
8112
|
+
/** Identifier of the page results to fetch. */
|
|
8113
|
+
page?: string;
|
|
8114
|
+
/**
|
|
8115
|
+
* The number of results per page
|
|
8116
|
+
* @min 0
|
|
8117
|
+
* @max 1000
|
|
8118
|
+
*/
|
|
8119
|
+
limit?: number;
|
|
8120
|
+
/** If specified, only return invite links that provide specific permissions on the given space. */
|
|
8121
|
+
space?: string;
|
|
8122
|
+
/** If specified, only return invite links that provide permissions on the given collection. */
|
|
8123
|
+
collection?: string;
|
|
8124
|
+
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
8125
|
+
items: (InviteLinkToCollection | InviteLinkToSpace)[];
|
|
8126
|
+
}, Error>>;
|
|
8127
|
+
/**
|
|
8128
|
+
* No description
|
|
8129
|
+
*
|
|
8130
|
+
* @tags organizations
|
|
8131
|
+
* @name ListOrganizationInviteLinks
|
|
8132
|
+
* @summary List invite links to an organization
|
|
8133
|
+
* @request GET:/orgs/{organizationId}/link-invites
|
|
8134
|
+
* @secure
|
|
8135
|
+
*/
|
|
8136
|
+
listOrganizationInviteLinks: (organizationId: string, query?: {
|
|
8137
|
+
/** Identifier of the page results to fetch. */
|
|
8138
|
+
page?: string;
|
|
8139
|
+
/**
|
|
8140
|
+
* The number of results per page
|
|
8141
|
+
* @min 0
|
|
8142
|
+
* @max 1000
|
|
8143
|
+
*/
|
|
8144
|
+
limit?: number;
|
|
8145
|
+
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
8146
|
+
items: InviteLinkToOrganization[];
|
|
8147
|
+
}, Error>>;
|
|
8043
8148
|
/**
|
|
8044
8149
|
* No description
|
|
8045
8150
|
*
|
|
@@ -8049,7 +8154,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8049
8154
|
* @request POST:/orgs/{organizationId}/link-invites
|
|
8050
8155
|
* @secure
|
|
8051
8156
|
*/
|
|
8052
|
-
createOrganizationInvite: (organizationId: string, data: CreateOrganizationInvite, params?: RequestParams) => Promise<HttpResponse<
|
|
8157
|
+
createOrganizationInvite: (organizationId: string, data: CreateOrganizationInvite, params?: RequestParams) => Promise<HttpResponse<OrganizationInviteLink, Error>>;
|
|
8053
8158
|
/**
|
|
8054
8159
|
* No description
|
|
8055
8160
|
*
|
|
@@ -8065,7 +8170,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8065
8170
|
} | {
|
|
8066
8171
|
/** The role of a member in an organization, null for guests */
|
|
8067
8172
|
level: MemberRoleOrGuest;
|
|
8068
|
-
}, params?: RequestParams) => Promise<HttpResponse<
|
|
8173
|
+
}, params?: RequestParams) => Promise<HttpResponse<OrganizationInviteLink, Error>>;
|
|
8069
8174
|
/**
|
|
8070
8175
|
* No description
|
|
8071
8176
|
*
|
|
@@ -8172,8 +8277,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8172
8277
|
* @max 1000
|
|
8173
8278
|
*/
|
|
8174
8279
|
limit?: number;
|
|
8175
|
-
/** If defined, only content with this visibility will be returned. */
|
|
8176
|
-
visibility?: ContentVisibility;
|
|
8177
8280
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
8178
8281
|
items: Space[];
|
|
8179
8282
|
}, Error>>;
|
package/dist/index.cjs
CHANGED
|
@@ -242,7 +242,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
242
242
|
|
|
243
243
|
// package.json
|
|
244
244
|
var name = "@gitbook/api";
|
|
245
|
-
var version = "0.
|
|
245
|
+
var version = "0.67.0";
|
|
246
246
|
|
|
247
247
|
// src/client.ts
|
|
248
248
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -805,9 +805,7 @@ var HttpClient = class {
|
|
|
805
805
|
};
|
|
806
806
|
encodeQueryParam(key, value) {
|
|
807
807
|
const encodedKey = encodeURIComponent(key);
|
|
808
|
-
return `${encodedKey}=${encodeURIComponent(
|
|
809
|
-
typeof value === "number" ? value : `${value}`
|
|
810
|
-
)}`;
|
|
808
|
+
return `${encodedKey}=${encodeURIComponent(typeof value === "number" ? value : `${value}`)}`;
|
|
811
809
|
}
|
|
812
810
|
addQueryParam(query, key) {
|
|
813
811
|
return this.encodeQueryParam(key, query[key]);
|
|
@@ -1315,13 +1313,19 @@ var Api = class extends HttpClient {
|
|
|
1315
1313
|
format: "json",
|
|
1316
1314
|
...params
|
|
1317
1315
|
}),
|
|
1318
|
-
|
|
1316
|
+
getComputedDocument: (spaceId, query, params = {}) => this.request({
|
|
1319
1317
|
path: `/spaces/${spaceId}/content/computed/document`,
|
|
1320
|
-
method: "
|
|
1318
|
+
method: "GET",
|
|
1319
|
+
query,
|
|
1320
|
+
secure: true,
|
|
1321
|
+
format: "json",
|
|
1322
|
+
...params
|
|
1323
|
+
}),
|
|
1324
|
+
getComputedPage: (spaceId, query, params = {}) => this.request({
|
|
1325
|
+
path: `/spaces/${spaceId}/content/computed/page`,
|
|
1326
|
+
method: "GET",
|
|
1321
1327
|
query,
|
|
1322
|
-
body: data,
|
|
1323
1328
|
secure: true,
|
|
1324
|
-
type: "application/json" /* Json */,
|
|
1325
1329
|
format: "json",
|
|
1326
1330
|
...params
|
|
1327
1331
|
}),
|
|
@@ -2378,6 +2382,22 @@ var Api = class extends HttpClient {
|
|
|
2378
2382
|
format: "json",
|
|
2379
2383
|
...params
|
|
2380
2384
|
}),
|
|
2385
|
+
listOrganizationContentInviteLinks: (organizationId, query, params = {}) => this.request({
|
|
2386
|
+
path: `/orgs/${organizationId}/content-link-invites`,
|
|
2387
|
+
method: "GET",
|
|
2388
|
+
query,
|
|
2389
|
+
secure: true,
|
|
2390
|
+
format: "json",
|
|
2391
|
+
...params
|
|
2392
|
+
}),
|
|
2393
|
+
listOrganizationInviteLinks: (organizationId, query, params = {}) => this.request({
|
|
2394
|
+
path: `/orgs/${organizationId}/link-invites`,
|
|
2395
|
+
method: "GET",
|
|
2396
|
+
query,
|
|
2397
|
+
secure: true,
|
|
2398
|
+
format: "json",
|
|
2399
|
+
...params
|
|
2400
|
+
}),
|
|
2381
2401
|
createOrganizationInvite: (organizationId, data, params = {}) => this.request({
|
|
2382
2402
|
path: `/orgs/${organizationId}/link-invites`,
|
|
2383
2403
|
method: "POST",
|
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.67.0";
|
|
176
176
|
|
|
177
177
|
// src/client.ts
|
|
178
178
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -735,9 +735,7 @@ var HttpClient = class {
|
|
|
735
735
|
};
|
|
736
736
|
encodeQueryParam(key, value) {
|
|
737
737
|
const encodedKey = encodeURIComponent(key);
|
|
738
|
-
return `${encodedKey}=${encodeURIComponent(
|
|
739
|
-
typeof value === "number" ? value : `${value}`
|
|
740
|
-
)}`;
|
|
738
|
+
return `${encodedKey}=${encodeURIComponent(typeof value === "number" ? value : `${value}`)}`;
|
|
741
739
|
}
|
|
742
740
|
addQueryParam(query, key) {
|
|
743
741
|
return this.encodeQueryParam(key, query[key]);
|
|
@@ -1245,13 +1243,19 @@ var Api = class extends HttpClient {
|
|
|
1245
1243
|
format: "json",
|
|
1246
1244
|
...params
|
|
1247
1245
|
}),
|
|
1248
|
-
|
|
1246
|
+
getComputedDocument: (spaceId, query, params = {}) => this.request({
|
|
1249
1247
|
path: `/spaces/${spaceId}/content/computed/document`,
|
|
1250
|
-
method: "
|
|
1248
|
+
method: "GET",
|
|
1249
|
+
query,
|
|
1250
|
+
secure: true,
|
|
1251
|
+
format: "json",
|
|
1252
|
+
...params
|
|
1253
|
+
}),
|
|
1254
|
+
getComputedPage: (spaceId, query, params = {}) => this.request({
|
|
1255
|
+
path: `/spaces/${spaceId}/content/computed/page`,
|
|
1256
|
+
method: "GET",
|
|
1251
1257
|
query,
|
|
1252
|
-
body: data,
|
|
1253
1258
|
secure: true,
|
|
1254
|
-
type: "application/json" /* Json */,
|
|
1255
1259
|
format: "json",
|
|
1256
1260
|
...params
|
|
1257
1261
|
}),
|
|
@@ -2308,6 +2312,22 @@ var Api = class extends HttpClient {
|
|
|
2308
2312
|
format: "json",
|
|
2309
2313
|
...params
|
|
2310
2314
|
}),
|
|
2315
|
+
listOrganizationContentInviteLinks: (organizationId, query, params = {}) => this.request({
|
|
2316
|
+
path: `/orgs/${organizationId}/content-link-invites`,
|
|
2317
|
+
method: "GET",
|
|
2318
|
+
query,
|
|
2319
|
+
secure: true,
|
|
2320
|
+
format: "json",
|
|
2321
|
+
...params
|
|
2322
|
+
}),
|
|
2323
|
+
listOrganizationInviteLinks: (organizationId, query, params = {}) => this.request({
|
|
2324
|
+
path: `/orgs/${organizationId}/link-invites`,
|
|
2325
|
+
method: "GET",
|
|
2326
|
+
query,
|
|
2327
|
+
secure: true,
|
|
2328
|
+
format: "json",
|
|
2329
|
+
...params
|
|
2330
|
+
}),
|
|
2311
2331
|
createOrganizationInvite: (organizationId, data, params = {}) => this.request({
|
|
2312
2332
|
path: `/orgs/${organizationId}/link-invites`,
|
|
2313
2333
|
method: "POST",
|