@gitbook/api 0.55.0 → 0.57.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 +12 -238
- package/dist/index.cjs +1 -54
- package/dist/index.js +1 -54
- package/package.json +1 -1
- package/spec/openapi.json +1576 -2397
- package/spec/openapi.yaml +21 -511
package/dist/client.d.ts
CHANGED
|
@@ -634,28 +634,14 @@ export interface JSONDocument {
|
|
|
634
634
|
export declare type Document = MarkdownDocument | {
|
|
635
635
|
document: JSONDocument;
|
|
636
636
|
} | object;
|
|
637
|
-
/**
|
|
638
|
-
* Type of an entity
|
|
639
|
-
* @minLength 1
|
|
640
|
-
* @maxLength 64
|
|
641
|
-
*/
|
|
642
|
-
export declare type EntityType = string;
|
|
643
637
|
export declare type SearchAIAnswerSource = {
|
|
644
|
-
type: 'page' | '
|
|
638
|
+
type: 'page' | 'capture';
|
|
645
639
|
} & ({
|
|
646
640
|
type: 'page';
|
|
647
641
|
page: string;
|
|
648
642
|
revision: string;
|
|
649
643
|
space: string;
|
|
650
644
|
sections: string[];
|
|
651
|
-
} | {
|
|
652
|
-
type: 'entity';
|
|
653
|
-
/** ID of the entity */
|
|
654
|
-
entityId: string;
|
|
655
|
-
/** Type of an entity */
|
|
656
|
-
entityType: EntityType;
|
|
657
|
-
/** The name of the integration that manages this entity. If undefined, this entity is not managed by an integration. */
|
|
658
|
-
integration?: string;
|
|
659
645
|
} | {
|
|
660
646
|
type: 'capture';
|
|
661
647
|
/** ID of the capture */
|
|
@@ -1221,6 +1207,8 @@ export declare type RevisionPageGroup = RevisionPageBase & {
|
|
|
1221
1207
|
slug: string;
|
|
1222
1208
|
/** Complete path to access the page in the revision. */
|
|
1223
1209
|
path: string;
|
|
1210
|
+
/** If true, the page is not displayed in the navigation, while still being accessible. */
|
|
1211
|
+
hidden?: boolean;
|
|
1224
1212
|
pages: (RevisionPageDocument | RevisionPageLink)[];
|
|
1225
1213
|
};
|
|
1226
1214
|
export declare type RevisionPage = RevisionPageDocument | RevisionPageGroup | RevisionPageLink;
|
|
@@ -1581,7 +1569,6 @@ export declare enum IntegrationVisibility {
|
|
|
1581
1569
|
Unlisted = "unlisted"
|
|
1582
1570
|
}
|
|
1583
1571
|
export declare enum IntegrationScope {
|
|
1584
|
-
EntitiesWrite = "entities:write",
|
|
1585
1572
|
SnippetsRead = "snippets:read",
|
|
1586
1573
|
CaptureWrite = "capture:write",
|
|
1587
1574
|
SpaceViewsRead = "space:views:read",
|
|
@@ -2480,59 +2467,6 @@ export declare type CustomizationCollectionSettings = CustomizationSettings & {
|
|
|
2480
2467
|
};
|
|
2481
2468
|
/** Secrets stored on the integration and passed at runtime. */
|
|
2482
2469
|
export declare type IntegrationSecrets = Record<string, string>;
|
|
2483
|
-
/** @maxLength 50 */
|
|
2484
|
-
export declare type EntitySchemaTitle = string;
|
|
2485
|
-
export declare type EntityPropertySchema = {
|
|
2486
|
-
/** Name of the property in the object */
|
|
2487
|
-
name: string;
|
|
2488
|
-
/** Title displayed to the users */
|
|
2489
|
-
title: string;
|
|
2490
|
-
/** Description of the property */
|
|
2491
|
-
description?: string;
|
|
2492
|
-
/** If true, the property is no longer required and not taken into consideration */
|
|
2493
|
-
deprecated?: boolean;
|
|
2494
|
-
} & ({
|
|
2495
|
-
type: 'text';
|
|
2496
|
-
role?: 'title';
|
|
2497
|
-
} | {
|
|
2498
|
-
type: 'longtext';
|
|
2499
|
-
role?: 'body';
|
|
2500
|
-
} | {
|
|
2501
|
-
type: 'url';
|
|
2502
|
-
role?: 'target' | 'icon';
|
|
2503
|
-
} | {
|
|
2504
|
-
type: 'number';
|
|
2505
|
-
} | {
|
|
2506
|
-
type: 'boolean';
|
|
2507
|
-
} | {
|
|
2508
|
-
type: 'enum';
|
|
2509
|
-
values: {
|
|
2510
|
-
label: string;
|
|
2511
|
-
value: string;
|
|
2512
|
-
}[];
|
|
2513
|
-
} | {
|
|
2514
|
-
type: 'date';
|
|
2515
|
-
} | {
|
|
2516
|
-
type: 'user';
|
|
2517
|
-
} | {
|
|
2518
|
-
type: 'relation';
|
|
2519
|
-
entity: {
|
|
2520
|
-
/** Type of an entity */
|
|
2521
|
-
type: EntityType;
|
|
2522
|
-
};
|
|
2523
|
-
});
|
|
2524
|
-
/** Schema for a type of entities */
|
|
2525
|
-
export interface EntityRawSchema {
|
|
2526
|
-
/** Type of an entity */
|
|
2527
|
-
type: EntityType;
|
|
2528
|
-
/** Title of the entity type */
|
|
2529
|
-
title: {
|
|
2530
|
-
singular: EntitySchemaTitle;
|
|
2531
|
-
plural: EntitySchemaTitle;
|
|
2532
|
-
};
|
|
2533
|
-
/** Ordered list of all properties stored in entities. */
|
|
2534
|
-
properties: EntityPropertySchema[];
|
|
2535
|
-
}
|
|
2536
2470
|
export interface PublishIntegration {
|
|
2537
2471
|
/**
|
|
2538
2472
|
* Base64 content of the icon
|
|
@@ -2570,8 +2504,6 @@ export interface PublishIntegration {
|
|
|
2570
2504
|
* headers when processing the script fetch event and the blocks fetch events.
|
|
2571
2505
|
*/
|
|
2572
2506
|
contentSecurityPolicy?: IntegrationContentSecurityPolicy;
|
|
2573
|
-
/** @maxItems 100 */
|
|
2574
|
-
entities?: EntityRawSchema[];
|
|
2575
2507
|
}
|
|
2576
2508
|
export declare enum IntegrationInstallationStatus {
|
|
2577
2509
|
Active = "active",
|
|
@@ -3591,55 +3523,6 @@ export interface OrganizationUsage {
|
|
|
3591
3523
|
/** Team members usage metrics of an organization */
|
|
3592
3524
|
teamMembers: OrganizationUsageTeamMembers;
|
|
3593
3525
|
}
|
|
3594
|
-
export declare type EntitySchema = EntityRawSchema & {
|
|
3595
|
-
/** Count of entities created in this schema. */
|
|
3596
|
-
entities: number;
|
|
3597
|
-
/** Integration managing this schema. */
|
|
3598
|
-
integration?: Integration;
|
|
3599
|
-
/** URLs associated with the object */
|
|
3600
|
-
urls: {
|
|
3601
|
-
/**
|
|
3602
|
-
* URL of the entity schema in the API
|
|
3603
|
-
* @format uri
|
|
3604
|
-
*/
|
|
3605
|
-
location: string;
|
|
3606
|
-
};
|
|
3607
|
-
};
|
|
3608
|
-
/**
|
|
3609
|
-
* Unique ID of the entity in the context of the integration's entity type
|
|
3610
|
-
* @minLength 1
|
|
3611
|
-
* @maxLength 256
|
|
3612
|
-
*/
|
|
3613
|
-
export declare type EntityId = string;
|
|
3614
|
-
/** Entity to create or update in an integration's installation. */
|
|
3615
|
-
export interface UpsertEntity {
|
|
3616
|
-
/** Unique ID of the entity in the context of the integration's entity type */
|
|
3617
|
-
entityId: EntityId;
|
|
3618
|
-
/** Map of values stored as properties on the entity */
|
|
3619
|
-
properties: Record<string, string | number | boolean | {
|
|
3620
|
-
entityId: string;
|
|
3621
|
-
}>;
|
|
3622
|
-
}
|
|
3623
|
-
/** Entity created and managed by an integration, representing an external element. */
|
|
3624
|
-
export declare type Entity = UpsertEntity & {
|
|
3625
|
-
/** Unique ID for the entity in GitBook */
|
|
3626
|
-
id: string;
|
|
3627
|
-
/**
|
|
3628
|
-
* Type of an entity. Deprecated, use entityType.
|
|
3629
|
-
* @deprecated
|
|
3630
|
-
*/
|
|
3631
|
-
type: EntityType;
|
|
3632
|
-
/** Type of an entity */
|
|
3633
|
-
entityType: EntityType;
|
|
3634
|
-
/** URLs associated with the object */
|
|
3635
|
-
urls: {
|
|
3636
|
-
/**
|
|
3637
|
-
* URL of the entity in the API
|
|
3638
|
-
* @format uri
|
|
3639
|
-
*/
|
|
3640
|
-
location: string;
|
|
3641
|
-
};
|
|
3642
|
-
};
|
|
3643
3526
|
/**
|
|
3644
3527
|
* Optional title describing the capture
|
|
3645
3528
|
* @maxLength 100
|
|
@@ -3991,6 +3874,7 @@ export interface SiteSpace {
|
|
|
3991
3874
|
/** Path to the space on the site */
|
|
3992
3875
|
path: SiteSpacePath;
|
|
3993
3876
|
space: Space;
|
|
3877
|
+
title: string;
|
|
3994
3878
|
/** Whether this is the default space for the site */
|
|
3995
3879
|
default?: boolean;
|
|
3996
3880
|
/** Whether the space has advanced customization feature enabled */
|
|
@@ -4507,10 +4391,6 @@ export interface SpacePublishingCustomizationChannel {
|
|
|
4507
4391
|
channel: 'space-publishing-customization';
|
|
4508
4392
|
space: string;
|
|
4509
4393
|
}
|
|
4510
|
-
export interface SpaceEntitiesChannel {
|
|
4511
|
-
channel: 'space-entities';
|
|
4512
|
-
space: string;
|
|
4513
|
-
}
|
|
4514
4394
|
export interface SpaceCustomFieldsChannel {
|
|
4515
4395
|
channel: 'space-customfields';
|
|
4516
4396
|
space: string;
|
|
@@ -4613,17 +4493,6 @@ export interface OrganizationCollectionsChannel {
|
|
|
4613
4493
|
channel: 'organization-collections';
|
|
4614
4494
|
organization: string;
|
|
4615
4495
|
}
|
|
4616
|
-
/** Subscription channel for entities in an organization. */
|
|
4617
|
-
export interface OrganizationEntitiesChannel {
|
|
4618
|
-
channel: 'organization-entities';
|
|
4619
|
-
organization: string;
|
|
4620
|
-
entityType: string;
|
|
4621
|
-
}
|
|
4622
|
-
/** Subscription channel for all entity schemas in an organization. */
|
|
4623
|
-
export interface OrganizationSchemasChannel {
|
|
4624
|
-
channel: 'organization-schemas';
|
|
4625
|
-
organization: string;
|
|
4626
|
-
}
|
|
4627
4496
|
export interface OrganizationCapturesChannel {
|
|
4628
4497
|
channel: 'organization-captures';
|
|
4629
4498
|
organization: string;
|
|
@@ -4755,7 +4624,7 @@ export interface CustomHostnameChannel {
|
|
|
4755
4624
|
customHostname: string;
|
|
4756
4625
|
}
|
|
4757
4626
|
/** Channel to subscribe to for API updates. */
|
|
4758
|
-
export declare type SubscriptionChannel = SpaceInfoChannel | SpaceGitInfoChannel | SpacePublishingAuthChannel | SpacePublishingCustomizationChannel |
|
|
4627
|
+
export declare type SubscriptionChannel = SpaceInfoChannel | SpaceGitInfoChannel | SpacePublishingAuthChannel | SpacePublishingCustomizationChannel | SpaceCustomFieldsChannel | SpaceBrokenLinksChannel | BackofficeUserInfoChannel | SpaceIntegrationsChannel | OrganizationCustomFieldsChannel | UserAPITokensChannel | UserOrganizationsChannel | UserProfileChannel | ChangeRequestChannel | ChangeRequestsChannel | ChangeRequestReviewsChannel | ChangeRequestBrokenLinksChannel | CollectionChannel | CollectionPublishingCustomizationChannel | OrganizationInfoChannel | OrganizationMembersChannel | OrganizationMemberChannel | OrganizationTeamsChannel | OrganizationTeamChannel | OrganizationTeamMembersChannel | OrganizationTeamMemberChannel | OrganizationSpacesChannel | OrganizationCollectionsChannel | OrganizationCapturesChannel | OrganizationContentAuditsChannel | OrganizationIntegrationsChannel | OrganizationInstallationsChannel | OrganizationSitesChannel | OrganizationExperimentalFeaturesChannel | OrganizationSyncedBlockChannel | CommentsChannel | CommentInfoChannel | CommentReplyInfoChannel | CommentRepliesChannel | IntegrationChannel | IntegrationInstallationChannel | IntegrationSpaceInstallationChannel | IntegrationSpaceInstallationsChannel | IntegrationSiteInstallationChannel | IntegrationSiteInstallationsChannel | SiteChannel | SiteCustomizationChannel | SiteIntegrationsChannel | SiteSpaceChannel | SiteSpaceCustomizationChannel | SiteSpacesChannel | SitePublishingAuthChannel | SiteShareLinksChannel | SiteShareLinkChannel | CustomHostnameChannel;
|
|
4759
4628
|
export interface Seat {
|
|
4760
4629
|
object: 'seat';
|
|
4761
4630
|
/** The unique ID of the organization */
|
|
@@ -8197,105 +8066,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8197
8066
|
/** Team members usage metrics of an organization */
|
|
8198
8067
|
teamMembers: OrganizationUsageTeamMembers;
|
|
8199
8068
|
}, Error>>;
|
|
8200
|
-
/**
|
|
8201
|
-
* No description
|
|
8202
|
-
*
|
|
8203
|
-
* @tags organizations
|
|
8204
|
-
* @name ListEntitySchemas
|
|
8205
|
-
* @summary List the entity schemas in an organization.
|
|
8206
|
-
* @request GET:/orgs/{organizationId}/schemas
|
|
8207
|
-
* @secure
|
|
8208
|
-
*/
|
|
8209
|
-
listEntitySchemas: (organizationId: string, query?: {
|
|
8210
|
-
/** Identifier of the page results to fetch. */
|
|
8211
|
-
page?: string;
|
|
8212
|
-
/**
|
|
8213
|
-
* The number of results per page
|
|
8214
|
-
* @min 0
|
|
8215
|
-
* @max 1000
|
|
8216
|
-
*/
|
|
8217
|
-
limit?: number;
|
|
8218
|
-
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
8219
|
-
items: EntitySchema[];
|
|
8220
|
-
}, Error>>;
|
|
8221
|
-
/**
|
|
8222
|
-
* No description
|
|
8223
|
-
*
|
|
8224
|
-
* @tags organizations
|
|
8225
|
-
* @name GetEntitySchema
|
|
8226
|
-
* @summary Get an entity schema by its type.
|
|
8227
|
-
* @request GET:/orgs/{organizationId}/schemas/{entityType}
|
|
8228
|
-
* @secure
|
|
8229
|
-
*/
|
|
8230
|
-
getEntitySchema: (organizationId: string, entityType: EntityType, params?: RequestParams) => Promise<HttpResponse<EntitySchema, Error>>;
|
|
8231
|
-
/**
|
|
8232
|
-
* No description
|
|
8233
|
-
*
|
|
8234
|
-
* @tags organizations
|
|
8235
|
-
* @name SetEntitySchema
|
|
8236
|
-
* @summary Create or update an entity schema.
|
|
8237
|
-
* @request PUT:/orgs/{organizationId}/schemas/{entityType}
|
|
8238
|
-
* @secure
|
|
8239
|
-
*/
|
|
8240
|
-
setEntitySchema: (organizationId: string, entityType: EntityType, data: EntityRawSchema, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
8241
|
-
/**
|
|
8242
|
-
* No description
|
|
8243
|
-
*
|
|
8244
|
-
* @tags organizations
|
|
8245
|
-
* @name DeleteEntitySchema
|
|
8246
|
-
* @summary Delete an entity schema.
|
|
8247
|
-
* @request DELETE:/orgs/{organizationId}/schemas/{entityType}
|
|
8248
|
-
* @secure
|
|
8249
|
-
*/
|
|
8250
|
-
deleteEntitySchema: (organizationId: string, entityType: EntityType, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
8251
|
-
/**
|
|
8252
|
-
* No description
|
|
8253
|
-
*
|
|
8254
|
-
* @tags organizations
|
|
8255
|
-
* @name ListSchemaEntities
|
|
8256
|
-
* @summary List entities in an organization for a given type.
|
|
8257
|
-
* @request GET:/orgs/{organizationId}/schemas/{entityType}/entities
|
|
8258
|
-
* @secure
|
|
8259
|
-
*/
|
|
8260
|
-
listSchemaEntities: (organizationId: string, entityType: EntityType, query?: {
|
|
8261
|
-
/** Identifier of the page results to fetch. */
|
|
8262
|
-
page?: string;
|
|
8263
|
-
/**
|
|
8264
|
-
* The number of results per page
|
|
8265
|
-
* @min 0
|
|
8266
|
-
* @max 1000
|
|
8267
|
-
*/
|
|
8268
|
-
limit?: number;
|
|
8269
|
-
/** Query to filter entities with, ex: a == 'something' && b >= 10 */
|
|
8270
|
-
query?: string;
|
|
8271
|
-
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
8272
|
-
items: Entity[];
|
|
8273
|
-
}, Error>>;
|
|
8274
|
-
/**
|
|
8275
|
-
* No description
|
|
8276
|
-
*
|
|
8277
|
-
* @tags organizations
|
|
8278
|
-
* @name UpsertSchemaEntities
|
|
8279
|
-
* @summary Update/Create/Delete entities in a schema.
|
|
8280
|
-
* @request PUT:/orgs/{organizationId}/schemas/{entityType}/entities
|
|
8281
|
-
* @secure
|
|
8282
|
-
*/
|
|
8283
|
-
upsertSchemaEntities: (organizationId: string, entityType: EntityType, data: {
|
|
8284
|
-
/** If true, all entities not listed in the requests will be deleted */
|
|
8285
|
-
delete?: boolean | EntityId[];
|
|
8286
|
-
/** Array of entities to create/update. */
|
|
8287
|
-
entities?: UpsertEntity[];
|
|
8288
|
-
}, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
8289
|
-
/**
|
|
8290
|
-
* No description
|
|
8291
|
-
*
|
|
8292
|
-
* @tags organizations
|
|
8293
|
-
* @name GetEntity
|
|
8294
|
-
* @summary Get an entity using its ID.
|
|
8295
|
-
* @request GET:/orgs/{organizationId}/schemas/{entityType}/entities/{entityId}
|
|
8296
|
-
* @secure
|
|
8297
|
-
*/
|
|
8298
|
-
getEntity: (organizationId: string, entityType: EntityType, entityId: EntityId, params?: RequestParams) => Promise<HttpResponse<Entity, Error>>;
|
|
8299
8069
|
/**
|
|
8300
8070
|
* @description List captures in an organization, newest first.
|
|
8301
8071
|
*
|
|
@@ -8907,6 +8677,12 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8907
8677
|
/** The app screen URL to bring the user back to after a canceled checkout. */
|
|
8908
8678
|
cancelReturnURL?: string;
|
|
8909
8679
|
}, params?: RequestParams) => Promise<HttpResponse<{
|
|
8680
|
+
/** User must checkout to complete the update. */
|
|
8681
|
+
type: 'checkout';
|
|
8682
|
+
/** Stripe payment session ID */
|
|
8683
|
+
sessionId: string;
|
|
8684
|
+
} | {
|
|
8685
|
+
/** User needs to go through the legacy update flow. */
|
|
8910
8686
|
type: 'legacy-checkout';
|
|
8911
8687
|
/** Stripe payment session ID */
|
|
8912
8688
|
sessionId: string;
|
|
@@ -8929,12 +8705,9 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8929
8705
|
}, params?: RequestParams) => Promise<HttpResponse<{
|
|
8930
8706
|
/** User can go ahead with the update without any billing. */
|
|
8931
8707
|
type: 'update';
|
|
8932
|
-
downgrade?: object;
|
|
8933
8708
|
} | {
|
|
8934
8709
|
/** User must checkout to complete the update. */
|
|
8935
8710
|
type: 'checkout';
|
|
8936
|
-
/** Stripe payment session ID */
|
|
8937
|
-
sessionId: string;
|
|
8938
8711
|
} | {
|
|
8939
8712
|
/** User cannot proceed with the update due to lack of permissions. */
|
|
8940
8713
|
type: 'no-permissions';
|
|
@@ -9185,6 +8958,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
9185
8958
|
*/
|
|
9186
8959
|
searchSiteContent: (organizationId: string, siteId: string, data: {
|
|
9187
8960
|
query: string;
|
|
8961
|
+
/** @minLength 1 */
|
|
9188
8962
|
siteSpaceIds?: string[];
|
|
9189
8963
|
}, query?: {
|
|
9190
8964
|
/** Identifier of the page results to fetch. */
|
package/dist/index.cjs
CHANGED
|
@@ -238,7 +238,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
238
238
|
|
|
239
239
|
// package.json
|
|
240
240
|
var name = "@gitbook/api";
|
|
241
|
-
var version = "0.
|
|
241
|
+
var version = "0.57.0";
|
|
242
242
|
|
|
243
243
|
// src/client.ts
|
|
244
244
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -467,7 +467,6 @@ var IntegrationVisibility = /* @__PURE__ */ ((IntegrationVisibility2) => {
|
|
|
467
467
|
return IntegrationVisibility2;
|
|
468
468
|
})(IntegrationVisibility || {});
|
|
469
469
|
var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
|
|
470
|
-
IntegrationScope2["EntitiesWrite"] = "entities:write";
|
|
471
470
|
IntegrationScope2["SnippetsRead"] = "snippets:read";
|
|
472
471
|
IntegrationScope2["CaptureWrite"] = "capture:write";
|
|
473
472
|
IntegrationScope2["SpaceViewsRead"] = "space:views:read";
|
|
@@ -2570,58 +2569,6 @@ var Api = class extends HttpClient {
|
|
|
2570
2569
|
format: "json",
|
|
2571
2570
|
...params
|
|
2572
2571
|
}),
|
|
2573
|
-
listEntitySchemas: (organizationId, query, params = {}) => this.request({
|
|
2574
|
-
path: `/orgs/${organizationId}/schemas`,
|
|
2575
|
-
method: "GET",
|
|
2576
|
-
query,
|
|
2577
|
-
secure: true,
|
|
2578
|
-
format: "json",
|
|
2579
|
-
...params
|
|
2580
|
-
}),
|
|
2581
|
-
getEntitySchema: (organizationId, entityType, params = {}) => this.request({
|
|
2582
|
-
path: `/orgs/${organizationId}/schemas/${entityType}`,
|
|
2583
|
-
method: "GET",
|
|
2584
|
-
secure: true,
|
|
2585
|
-
format: "json",
|
|
2586
|
-
...params
|
|
2587
|
-
}),
|
|
2588
|
-
setEntitySchema: (organizationId, entityType, data, params = {}) => this.request({
|
|
2589
|
-
path: `/orgs/${organizationId}/schemas/${entityType}`,
|
|
2590
|
-
method: "PUT",
|
|
2591
|
-
body: data,
|
|
2592
|
-
secure: true,
|
|
2593
|
-
type: "application/json" /* Json */,
|
|
2594
|
-
...params
|
|
2595
|
-
}),
|
|
2596
|
-
deleteEntitySchema: (organizationId, entityType, params = {}) => this.request({
|
|
2597
|
-
path: `/orgs/${organizationId}/schemas/${entityType}`,
|
|
2598
|
-
method: "DELETE",
|
|
2599
|
-
secure: true,
|
|
2600
|
-
...params
|
|
2601
|
-
}),
|
|
2602
|
-
listSchemaEntities: (organizationId, entityType, query, params = {}) => this.request({
|
|
2603
|
-
path: `/orgs/${organizationId}/schemas/${entityType}/entities`,
|
|
2604
|
-
method: "GET",
|
|
2605
|
-
query,
|
|
2606
|
-
secure: true,
|
|
2607
|
-
format: "json",
|
|
2608
|
-
...params
|
|
2609
|
-
}),
|
|
2610
|
-
upsertSchemaEntities: (organizationId, entityType, data, params = {}) => this.request({
|
|
2611
|
-
path: `/orgs/${organizationId}/schemas/${entityType}/entities`,
|
|
2612
|
-
method: "PUT",
|
|
2613
|
-
body: data,
|
|
2614
|
-
secure: true,
|
|
2615
|
-
type: "application/json" /* Json */,
|
|
2616
|
-
...params
|
|
2617
|
-
}),
|
|
2618
|
-
getEntity: (organizationId, entityType, entityId, params = {}) => this.request({
|
|
2619
|
-
path: `/orgs/${organizationId}/schemas/${entityType}/entities/${entityId}`,
|
|
2620
|
-
method: "GET",
|
|
2621
|
-
secure: true,
|
|
2622
|
-
format: "json",
|
|
2623
|
-
...params
|
|
2624
|
-
}),
|
|
2625
2572
|
listCaptures: (organizationId, query, params = {}) => this.request({
|
|
2626
2573
|
path: `/orgs/${organizationId}/captures`,
|
|
2627
2574
|
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.57.0";
|
|
176
176
|
|
|
177
177
|
// src/client.ts
|
|
178
178
|
var import_event_iterator = __toESM(require_node(), 1);
|
|
@@ -401,7 +401,6 @@ var IntegrationVisibility = /* @__PURE__ */ ((IntegrationVisibility2) => {
|
|
|
401
401
|
return IntegrationVisibility2;
|
|
402
402
|
})(IntegrationVisibility || {});
|
|
403
403
|
var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
|
|
404
|
-
IntegrationScope2["EntitiesWrite"] = "entities:write";
|
|
405
404
|
IntegrationScope2["SnippetsRead"] = "snippets:read";
|
|
406
405
|
IntegrationScope2["CaptureWrite"] = "capture:write";
|
|
407
406
|
IntegrationScope2["SpaceViewsRead"] = "space:views:read";
|
|
@@ -2504,58 +2503,6 @@ var Api = class extends HttpClient {
|
|
|
2504
2503
|
format: "json",
|
|
2505
2504
|
...params
|
|
2506
2505
|
}),
|
|
2507
|
-
listEntitySchemas: (organizationId, query, params = {}) => this.request({
|
|
2508
|
-
path: `/orgs/${organizationId}/schemas`,
|
|
2509
|
-
method: "GET",
|
|
2510
|
-
query,
|
|
2511
|
-
secure: true,
|
|
2512
|
-
format: "json",
|
|
2513
|
-
...params
|
|
2514
|
-
}),
|
|
2515
|
-
getEntitySchema: (organizationId, entityType, params = {}) => this.request({
|
|
2516
|
-
path: `/orgs/${organizationId}/schemas/${entityType}`,
|
|
2517
|
-
method: "GET",
|
|
2518
|
-
secure: true,
|
|
2519
|
-
format: "json",
|
|
2520
|
-
...params
|
|
2521
|
-
}),
|
|
2522
|
-
setEntitySchema: (organizationId, entityType, data, params = {}) => this.request({
|
|
2523
|
-
path: `/orgs/${organizationId}/schemas/${entityType}`,
|
|
2524
|
-
method: "PUT",
|
|
2525
|
-
body: data,
|
|
2526
|
-
secure: true,
|
|
2527
|
-
type: "application/json" /* Json */,
|
|
2528
|
-
...params
|
|
2529
|
-
}),
|
|
2530
|
-
deleteEntitySchema: (organizationId, entityType, params = {}) => this.request({
|
|
2531
|
-
path: `/orgs/${organizationId}/schemas/${entityType}`,
|
|
2532
|
-
method: "DELETE",
|
|
2533
|
-
secure: true,
|
|
2534
|
-
...params
|
|
2535
|
-
}),
|
|
2536
|
-
listSchemaEntities: (organizationId, entityType, query, params = {}) => this.request({
|
|
2537
|
-
path: `/orgs/${organizationId}/schemas/${entityType}/entities`,
|
|
2538
|
-
method: "GET",
|
|
2539
|
-
query,
|
|
2540
|
-
secure: true,
|
|
2541
|
-
format: "json",
|
|
2542
|
-
...params
|
|
2543
|
-
}),
|
|
2544
|
-
upsertSchemaEntities: (organizationId, entityType, data, params = {}) => this.request({
|
|
2545
|
-
path: `/orgs/${organizationId}/schemas/${entityType}/entities`,
|
|
2546
|
-
method: "PUT",
|
|
2547
|
-
body: data,
|
|
2548
|
-
secure: true,
|
|
2549
|
-
type: "application/json" /* Json */,
|
|
2550
|
-
...params
|
|
2551
|
-
}),
|
|
2552
|
-
getEntity: (organizationId, entityType, entityId, params = {}) => this.request({
|
|
2553
|
-
path: `/orgs/${organizationId}/schemas/${entityType}/entities/${entityId}`,
|
|
2554
|
-
method: "GET",
|
|
2555
|
-
secure: true,
|
|
2556
|
-
format: "json",
|
|
2557
|
-
...params
|
|
2558
|
-
}),
|
|
2559
2506
|
listCaptures: (organizationId, query, params = {}) => this.request({
|
|
2560
2507
|
path: `/orgs/${organizationId}/captures`,
|
|
2561
2508
|
method: "GET",
|