@gitbook/api 0.8.0 → 0.10.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 +139 -85
- package/dist/index.cjs +43 -16
- package/dist/index.js +41 -15
- package/package.json +1 -1
- package/spec/openapi.json +388 -164
- package/spec/openapi.yaml +277 -133
package/dist/client.d.ts
CHANGED
|
@@ -79,7 +79,7 @@ export interface RequestPublishIntegration {
|
|
|
79
79
|
/** Content of the script to use */
|
|
80
80
|
script: string;
|
|
81
81
|
/** The ID or subdomain of the organization under which the integration should be published */
|
|
82
|
-
organization
|
|
82
|
+
organization: string;
|
|
83
83
|
/** Secrets stored on the integration and passed at runtime. */
|
|
84
84
|
secrets?: IntegrationSecrets;
|
|
85
85
|
/**
|
|
@@ -264,6 +264,28 @@ export interface User {
|
|
|
264
264
|
email?: string;
|
|
265
265
|
/** URL of the user's profile picture */
|
|
266
266
|
photoURL?: string;
|
|
267
|
+
/** URLs associated with the object */
|
|
268
|
+
urls: {
|
|
269
|
+
location?: string;
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
export interface UserPreferences {
|
|
273
|
+
/** Type of Object, always equals to "user-preferences" */
|
|
274
|
+
object: 'user-preferences';
|
|
275
|
+
/** Preferred theme for the application */
|
|
276
|
+
theme: UserPreferencesTheme;
|
|
277
|
+
/** URLs associated with the object */
|
|
278
|
+
urls: {
|
|
279
|
+
location?: string;
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
/**
|
|
283
|
+
* Preferred theme for the application
|
|
284
|
+
*/
|
|
285
|
+
export declare enum UserPreferencesTheme {
|
|
286
|
+
Light = "light",
|
|
287
|
+
Dark = "dark",
|
|
288
|
+
Default = "default"
|
|
267
289
|
}
|
|
268
290
|
/**
|
|
269
291
|
* The API token details, excluding the token itself.
|
|
@@ -282,9 +304,6 @@ export interface UserAPIToken {
|
|
|
282
304
|
export declare type UserAPITokenExtended = UserAPIToken & {
|
|
283
305
|
token: string;
|
|
284
306
|
};
|
|
285
|
-
export interface UserTarget {
|
|
286
|
-
user: string;
|
|
287
|
-
}
|
|
288
307
|
export interface Team {
|
|
289
308
|
/** Type of Object, always equals to "team" */
|
|
290
309
|
object: 'team';
|
|
@@ -436,11 +455,7 @@ export interface Space {
|
|
|
436
455
|
public?: string;
|
|
437
456
|
};
|
|
438
457
|
/** ID of the organization owning this space */
|
|
439
|
-
organization
|
|
440
|
-
/** ID of the user owning this space */
|
|
441
|
-
user?: string;
|
|
442
|
-
/** If the space is part of the private content of a user, the property is equal to the ID of the user owning it */
|
|
443
|
-
private?: string;
|
|
458
|
+
organization: string;
|
|
444
459
|
/** ID of the parent collection. */
|
|
445
460
|
parent?: string;
|
|
446
461
|
}
|
|
@@ -759,18 +774,16 @@ export declare enum TeamMemberRole {
|
|
|
759
774
|
Admin = "admin",
|
|
760
775
|
Participant = "participant"
|
|
761
776
|
}
|
|
762
|
-
export interface
|
|
763
|
-
/**
|
|
764
|
-
object: 'recording';
|
|
765
|
-
/** Unique identifier for the recording */
|
|
777
|
+
export interface Capture {
|
|
778
|
+
/** Unique identifier for the capture */
|
|
766
779
|
id: string;
|
|
767
|
-
/** Optional title describing the
|
|
768
|
-
title:
|
|
769
|
-
context:
|
|
770
|
-
/** ID in the original source of the
|
|
780
|
+
/** Optional title describing the capture */
|
|
781
|
+
title: CaptureTitle;
|
|
782
|
+
context: CaptureContext;
|
|
783
|
+
/** ID in the original source of the capture. */
|
|
771
784
|
externalId?: string;
|
|
772
785
|
/**
|
|
773
|
-
* URL of the source from which the
|
|
786
|
+
* URL of the source from which the capture originated
|
|
774
787
|
* @format uri
|
|
775
788
|
*/
|
|
776
789
|
externalURL?: string;
|
|
@@ -784,30 +797,22 @@ export interface Recording {
|
|
|
784
797
|
speech?: number;
|
|
785
798
|
'thread.message'?: number;
|
|
786
799
|
};
|
|
800
|
+
/** An array of contributors to the capture. The first contributor is the one who triggered the capture (either a user or an integration). */
|
|
787
801
|
contributors: (Integration | User)[];
|
|
788
|
-
/** Output document for the
|
|
789
|
-
output?:
|
|
802
|
+
/** Output document for the capture. Is not set when capture is not finished. */
|
|
803
|
+
output?: Document;
|
|
790
804
|
/** URLs associated with the object */
|
|
791
805
|
urls: {
|
|
792
806
|
location: string;
|
|
793
807
|
};
|
|
794
808
|
}
|
|
795
809
|
/**
|
|
796
|
-
* Optional title describing the
|
|
810
|
+
* Optional title describing the capture
|
|
797
811
|
*/
|
|
798
|
-
export declare type
|
|
799
|
-
export
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
* @format uri
|
|
803
|
-
*/
|
|
804
|
-
url: string;
|
|
805
|
-
space: Space;
|
|
806
|
-
page: RevisionPageDocument;
|
|
807
|
-
}
|
|
808
|
-
export declare type RecordingEvent = RecordingTerminalCommandEvent | RecordingSpeechEvent | RecordingThreadMessageEvent | RecordingFileAddedEvent | RecordingFileChangedEvent | RecordingFileRemovedEvent;
|
|
809
|
-
export declare type RecordingContext = 'meeting' | 'thread' | 'walkthrough';
|
|
810
|
-
export interface BaseRecordingEvent {
|
|
812
|
+
export declare type CaptureTitle = string;
|
|
813
|
+
export declare type CaptureEvent = CaptureTerminalCommandEvent | CaptureSpeechEvent | CaptureThreadMessageEvent | CaptureFileAddedEvent | CaptureFileChangedEvent | CaptureFileRemovedEvent;
|
|
814
|
+
export declare type CaptureContext = 'meeting' | 'thread' | 'walkthrough';
|
|
815
|
+
export interface BaseCaptureEvent {
|
|
811
816
|
/** The type of event */
|
|
812
817
|
type: string;
|
|
813
818
|
/**
|
|
@@ -817,39 +822,39 @@ export interface BaseRecordingEvent {
|
|
|
817
822
|
timestamp: string;
|
|
818
823
|
/** Optionally, provide the source of the event. GitBook may use this to improve the generated content. */
|
|
819
824
|
source?: string;
|
|
820
|
-
/** Optionally, provide the actor of the event, in the context of multiple people contributing to the
|
|
825
|
+
/** Optionally, provide the actor of the event, in the context of multiple people contributing to the capture. */
|
|
821
826
|
actor?: {
|
|
822
827
|
name: string;
|
|
823
828
|
};
|
|
824
829
|
}
|
|
825
|
-
export declare type
|
|
830
|
+
export declare type CaptureSpeechEvent = BaseCaptureEvent & {
|
|
826
831
|
type: 'speech';
|
|
827
832
|
} & ({
|
|
828
833
|
audio: string;
|
|
829
834
|
} | {
|
|
830
835
|
transcript: string;
|
|
831
836
|
});
|
|
832
|
-
export declare type
|
|
837
|
+
export declare type CaptureTerminalCommandEvent = BaseCaptureEvent & {
|
|
833
838
|
type: 'terminal.command';
|
|
834
839
|
command: string;
|
|
835
840
|
stdout: string;
|
|
836
841
|
};
|
|
837
|
-
export declare type
|
|
842
|
+
export declare type CaptureThreadMessageEvent = BaseCaptureEvent & {
|
|
838
843
|
type: 'thread.message';
|
|
839
844
|
isFirst?: boolean;
|
|
840
845
|
text: string;
|
|
841
846
|
};
|
|
842
|
-
export declare type
|
|
847
|
+
export declare type CaptureFileAddedEvent = BaseCaptureEvent & {
|
|
843
848
|
type: 'file.added';
|
|
844
849
|
filename: string;
|
|
845
850
|
fileSnapshot: string;
|
|
846
851
|
};
|
|
847
|
-
export declare type
|
|
852
|
+
export declare type CaptureFileChangedEvent = BaseCaptureEvent & {
|
|
848
853
|
type: 'file.changed';
|
|
849
854
|
filename: string;
|
|
850
855
|
fileDiff: string;
|
|
851
856
|
};
|
|
852
|
-
export declare type
|
|
857
|
+
export declare type CaptureFileRemovedEvent = BaseCaptureEvent & {
|
|
853
858
|
type: 'file.removed';
|
|
854
859
|
filename: string;
|
|
855
860
|
fileSnapshot: string;
|
|
@@ -1022,6 +1027,9 @@ export interface SearchAIQuery {
|
|
|
1022
1027
|
export interface SearchAIAnswer {
|
|
1023
1028
|
text: string;
|
|
1024
1029
|
followupQuestions: string[];
|
|
1030
|
+
/** The sources used to generate the answer. */
|
|
1031
|
+
sources: SearchAIAnswerSource[];
|
|
1032
|
+
/** The pages used to generate the answer. Deprecated - use sources instead. */
|
|
1025
1033
|
pages: {
|
|
1026
1034
|
page: string;
|
|
1027
1035
|
revision: string;
|
|
@@ -1029,6 +1037,23 @@ export interface SearchAIAnswer {
|
|
|
1029
1037
|
sections: string[];
|
|
1030
1038
|
}[];
|
|
1031
1039
|
}
|
|
1040
|
+
export declare type SearchAIAnswerSource = {
|
|
1041
|
+
type: 'page' | 'entity' | 'capture';
|
|
1042
|
+
} & ({
|
|
1043
|
+
type: 'page';
|
|
1044
|
+
page: string;
|
|
1045
|
+
revision: string;
|
|
1046
|
+
space: string;
|
|
1047
|
+
sections: string[];
|
|
1048
|
+
} | {
|
|
1049
|
+
type: 'entity';
|
|
1050
|
+
id: string;
|
|
1051
|
+
integration?: string;
|
|
1052
|
+
} | {
|
|
1053
|
+
type: 'capture';
|
|
1054
|
+
id: string;
|
|
1055
|
+
source: string;
|
|
1056
|
+
});
|
|
1032
1057
|
/**
|
|
1033
1058
|
* Questions recommended by the AI for the given content.
|
|
1034
1059
|
*/
|
|
@@ -1178,7 +1203,7 @@ export declare type IntegrationSummary = string;
|
|
|
1178
1203
|
export declare type IntegrationScopes = IntegrationScope[];
|
|
1179
1204
|
export declare enum IntegrationScope {
|
|
1180
1205
|
EntitiesWrite = "entities:write",
|
|
1181
|
-
|
|
1206
|
+
CaptureWrite = "capture:write",
|
|
1182
1207
|
SpaceViewsRead = "space:views:read",
|
|
1183
1208
|
SpaceContentRead = "space:content:read",
|
|
1184
1209
|
SpaceContentWrite = "space:content:write",
|
|
@@ -1373,7 +1398,7 @@ export interface IntegrationEnvironment {
|
|
|
1373
1398
|
installation?: string;
|
|
1374
1399
|
};
|
|
1375
1400
|
}
|
|
1376
|
-
export declare type IntegrationInstallationTarget =
|
|
1401
|
+
export declare type IntegrationInstallationTarget = OrganizationTarget;
|
|
1377
1402
|
/**
|
|
1378
1403
|
* Configuration of the integration at the account level
|
|
1379
1404
|
*/
|
|
@@ -2154,7 +2179,7 @@ export interface ContentKitInput {
|
|
|
2154
2179
|
/** Text label displayed next to the input. */
|
|
2155
2180
|
label: string;
|
|
2156
2181
|
hint?: string | ContentKitInlineElement;
|
|
2157
|
-
element: ContentKitTextInput | ContentKitSelect | ContentKitSwitch | ContentKitRadio | ContentKitCheckbox | ContentKitButton;
|
|
2182
|
+
element: ContentKitTextInput | ContentKitSelect | ContentKitSwitch | ContentKitRadio | ContentKitCheckbox | ContentKitButton | ContentKitCodeBlock;
|
|
2158
2183
|
}
|
|
2159
2184
|
/**
|
|
2160
2185
|
* An individual option in a select element
|
|
@@ -2261,7 +2286,7 @@ export interface ContentKitURL {
|
|
|
2261
2286
|
/**
|
|
2262
2287
|
* Channel to subscribe to for API updates.
|
|
2263
2288
|
*/
|
|
2264
|
-
export declare type SubscriptionChannel = SpaceInfoChannel | SpaceGitInfoChannel | SpacePublishingAuthChannel | SpaceRelationsChannel | SpaceEntitiesChannel | SpaceCustomFieldsChannel | BackofficeUserInfoChannel | SpaceIntegrationsChannel | OrganizationCustomFieldsChannel | OrganizationEnvironmentsChannel | UserAPITokensChannel | ChangeRequestReviewsChannel | OrganizationMembersChannel | OrganizationMemberChannel | OrganizationTeamsChannel | OrganizationTeamChannel | OrganizationTeamMembersChannel | OrganizationTeamMemberChannel | OrganizationSpaceRelationsChannel | OrganizationSpacesChannel | OrganizationEntitiesChannel | OrganizationSchemasChannel |
|
|
2289
|
+
export declare type SubscriptionChannel = SpaceInfoChannel | SpaceGitInfoChannel | SpacePublishingAuthChannel | SpaceRelationsChannel | SpaceEntitiesChannel | SpaceCustomFieldsChannel | BackofficeUserInfoChannel | SpaceIntegrationsChannel | OrganizationCustomFieldsChannel | OrganizationEnvironmentsChannel | UserAPITokensChannel | UserPreferencesChannel | UserProfileChannel | ChangeRequestReviewsChannel | OrganizationMembersChannel | OrganizationMemberChannel | OrganizationTeamsChannel | OrganizationTeamChannel | OrganizationTeamMembersChannel | OrganizationTeamMemberChannel | OrganizationSpaceRelationsChannel | OrganizationSpacesChannel | OrganizationEntitiesChannel | OrganizationSchemasChannel | OrganizationCapturesChannel | {
|
|
2265
2290
|
channel: 'space-comments';
|
|
2266
2291
|
space: string;
|
|
2267
2292
|
changeRequest?: string;
|
|
@@ -2318,6 +2343,14 @@ export interface UserAPITokensChannel {
|
|
|
2318
2343
|
channel: 'user-api-tokens';
|
|
2319
2344
|
user: string;
|
|
2320
2345
|
}
|
|
2346
|
+
export interface UserPreferencesChannel {
|
|
2347
|
+
channel: 'user-preferences';
|
|
2348
|
+
user: string;
|
|
2349
|
+
}
|
|
2350
|
+
export interface UserProfileChannel {
|
|
2351
|
+
channel: 'user-profile';
|
|
2352
|
+
user: string;
|
|
2353
|
+
}
|
|
2321
2354
|
export interface ChangeRequestReviewsChannel {
|
|
2322
2355
|
channel: 'space-change-request-reviews';
|
|
2323
2356
|
space: string;
|
|
@@ -2389,8 +2422,8 @@ export interface OrganizationEnvironmentsChannel {
|
|
|
2389
2422
|
channel: 'organization-environments';
|
|
2390
2423
|
organization: string;
|
|
2391
2424
|
}
|
|
2392
|
-
export interface
|
|
2393
|
-
channel: 'organization-
|
|
2425
|
+
export interface OrganizationCapturesChannel {
|
|
2426
|
+
channel: 'organization-captures';
|
|
2394
2427
|
organization: string;
|
|
2395
2428
|
}
|
|
2396
2429
|
/**
|
|
@@ -2626,20 +2659,27 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
2626
2659
|
*/
|
|
2627
2660
|
getAuthenticatedUser: (params?: RequestParams) => Promise<HttpResponse<User, Error>>;
|
|
2628
2661
|
/**
|
|
2629
|
-
* @description
|
|
2662
|
+
* @description Returns the preferences for the user associated with the authentication provided in the request's authorization header.
|
|
2630
2663
|
*
|
|
2631
2664
|
* @tags users
|
|
2632
|
-
* @name
|
|
2633
|
-
* @summary
|
|
2634
|
-
* @request GET:/user/
|
|
2665
|
+
* @name GetPreferencesForAuthenticatedUser
|
|
2666
|
+
* @summary Get the preferences for the currently authenticated user
|
|
2667
|
+
* @request GET:/user/preferences
|
|
2635
2668
|
* @secure
|
|
2636
2669
|
*/
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2670
|
+
getPreferencesForAuthenticatedUser: (params?: RequestParams) => Promise<HttpResponse<UserPreferences, Error>>;
|
|
2671
|
+
/**
|
|
2672
|
+
* No description
|
|
2673
|
+
*
|
|
2674
|
+
* @tags users
|
|
2675
|
+
* @name UpdatePreferencesForAuthenticatedUser
|
|
2676
|
+
* @summary Update the preferences for the currently authenticated user
|
|
2677
|
+
* @request PATCH:/user/preferences
|
|
2678
|
+
* @secure
|
|
2679
|
+
*/
|
|
2680
|
+
updatePreferencesForAuthenticatedUser: (data: {
|
|
2681
|
+
theme: UserPreferencesTheme;
|
|
2682
|
+
}, params?: RequestParams) => Promise<HttpResponse<UserPreferences, Error>>;
|
|
2643
2683
|
};
|
|
2644
2684
|
users: {
|
|
2645
2685
|
/**
|
|
@@ -4588,72 +4628,86 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
4588
4628
|
*/
|
|
4589
4629
|
getEntity: (organizationId: string, entityType: EntityType, entityId: EntityId, params?: RequestParams) => Promise<HttpResponse<Entity, Error>>;
|
|
4590
4630
|
/**
|
|
4591
|
-
* @description List
|
|
4631
|
+
* @description List captures in an organization.
|
|
4592
4632
|
*
|
|
4593
4633
|
* @tags organizations
|
|
4594
|
-
* @name
|
|
4595
|
-
* @summary List
|
|
4596
|
-
* @request GET:/orgs/{organizationId}/
|
|
4634
|
+
* @name ListCaptures
|
|
4635
|
+
* @summary List captures
|
|
4636
|
+
* @request GET:/orgs/{organizationId}/captures
|
|
4597
4637
|
* @secure
|
|
4598
4638
|
*/
|
|
4599
|
-
|
|
4639
|
+
listCaptures: (organizationId: string, query?: {
|
|
4640
|
+
format?: 'document' | 'markdown';
|
|
4600
4641
|
page?: string;
|
|
4601
4642
|
limit?: number;
|
|
4602
4643
|
}, params?: RequestParams) => Promise<HttpResponse<List & {
|
|
4603
|
-
items:
|
|
4644
|
+
items: Capture[];
|
|
4604
4645
|
}, Error>>;
|
|
4605
4646
|
/**
|
|
4606
4647
|
* No description
|
|
4607
4648
|
*
|
|
4608
4649
|
* @tags organizations
|
|
4609
|
-
* @name
|
|
4610
|
-
* @summary Start a
|
|
4611
|
-
* @request POST:/orgs/{organizationId}/
|
|
4650
|
+
* @name StartCapture
|
|
4651
|
+
* @summary Start a capture
|
|
4652
|
+
* @request POST:/orgs/{organizationId}/captures
|
|
4612
4653
|
* @secure
|
|
4613
4654
|
*/
|
|
4614
|
-
|
|
4615
|
-
title?:
|
|
4616
|
-
context:
|
|
4655
|
+
startCapture: (organizationId: string, data: {
|
|
4656
|
+
title?: CaptureTitle;
|
|
4657
|
+
context: CaptureContext;
|
|
4617
4658
|
externalId?: string;
|
|
4618
4659
|
externalURL?: string;
|
|
4619
|
-
}, params?: RequestParams) => Promise<HttpResponse<
|
|
4660
|
+
}, params?: RequestParams) => Promise<HttpResponse<Capture, Error>>;
|
|
4620
4661
|
/**
|
|
4621
4662
|
* No description
|
|
4622
4663
|
*
|
|
4623
4664
|
* @tags organizations
|
|
4624
|
-
* @name
|
|
4625
|
-
* @summary Get a
|
|
4626
|
-
* @request GET:/orgs/{organizationId}/
|
|
4665
|
+
* @name GetCapture
|
|
4666
|
+
* @summary Get a capture by its ID
|
|
4667
|
+
* @request GET:/orgs/{organizationId}/captures/{captureId}
|
|
4627
4668
|
* @secure
|
|
4628
4669
|
*/
|
|
4629
|
-
|
|
4670
|
+
getCapture: (organizationId: string, captureId: string, query?: {
|
|
4671
|
+
format?: 'document' | 'markdown';
|
|
4672
|
+
}, params?: RequestParams) => Promise<HttpResponse<Capture, Error>>;
|
|
4630
4673
|
/**
|
|
4631
4674
|
* No description
|
|
4632
4675
|
*
|
|
4633
4676
|
* @tags organizations
|
|
4634
|
-
* @name
|
|
4635
|
-
* @summary Add events to a running
|
|
4636
|
-
* @request POST:/orgs/{organizationId}/
|
|
4677
|
+
* @name AddEventsToCapture
|
|
4678
|
+
* @summary Add events to a running capture
|
|
4679
|
+
* @request POST:/orgs/{organizationId}/captures/{captureId}/events
|
|
4637
4680
|
* @secure
|
|
4638
4681
|
*/
|
|
4639
|
-
|
|
4640
|
-
events:
|
|
4682
|
+
addEventsToCapture: (organizationId: string, captureId: string, data: {
|
|
4683
|
+
events: CaptureEvent[];
|
|
4641
4684
|
}, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
|
|
4642
4685
|
/**
|
|
4643
4686
|
* No description
|
|
4644
4687
|
*
|
|
4645
4688
|
* @tags organizations
|
|
4646
|
-
* @name
|
|
4647
|
-
* @summary Stop a
|
|
4648
|
-
* @request POST:/orgs/{organizationId}/
|
|
4689
|
+
* @name StopCapture
|
|
4690
|
+
* @summary Stop a capture
|
|
4691
|
+
* @request POST:/orgs/{organizationId}/captures/{captureId}/stop
|
|
4649
4692
|
* @secure
|
|
4650
4693
|
*/
|
|
4651
|
-
|
|
4652
|
-
|
|
4694
|
+
stopCapture: (organizationId: string, captureId: string, data: object, query?: {
|
|
4695
|
+
format?: 'document' | 'markdown';
|
|
4653
4696
|
}, params?: RequestParams) => Promise<HttpResponse<{
|
|
4654
|
-
|
|
4697
|
+
capture: Capture;
|
|
4655
4698
|
followupQuestions?: string[];
|
|
4656
4699
|
}, Error>>;
|
|
4700
|
+
/**
|
|
4701
|
+
* No description
|
|
4702
|
+
*
|
|
4703
|
+
* @name AskInOrganization
|
|
4704
|
+
* @summary Ask a question.
|
|
4705
|
+
* @request POST:/orgs/{organizationId}/ask
|
|
4706
|
+
* @secure
|
|
4707
|
+
*/
|
|
4708
|
+
askInOrganization: (organizationId: string, data: SearchAIQuery, params?: RequestParams) => Promise<HttpResponse<{
|
|
4709
|
+
answer?: SearchAIAnswer;
|
|
4710
|
+
}, Error>>;
|
|
4657
4711
|
};
|
|
4658
4712
|
internal: {
|
|
4659
4713
|
/**
|
package/dist/index.cjs
CHANGED
|
@@ -51,11 +51,18 @@ __export(src_exports, {
|
|
|
51
51
|
PurgeCDNCacheContextType: () => PurgeCDNCacheContextType,
|
|
52
52
|
SpaceRelationType: () => SpaceRelationType,
|
|
53
53
|
SpaceType: () => SpaceType,
|
|
54
|
-
TeamMemberRole: () => TeamMemberRole
|
|
54
|
+
TeamMemberRole: () => TeamMemberRole,
|
|
55
|
+
UserPreferencesTheme: () => UserPreferencesTheme
|
|
55
56
|
});
|
|
56
57
|
module.exports = __toCommonJS(src_exports);
|
|
57
58
|
|
|
58
59
|
// src/client.ts
|
|
60
|
+
var UserPreferencesTheme = /* @__PURE__ */ ((UserPreferencesTheme2) => {
|
|
61
|
+
UserPreferencesTheme2["Light"] = "light";
|
|
62
|
+
UserPreferencesTheme2["Dark"] = "dark";
|
|
63
|
+
UserPreferencesTheme2["Default"] = "default";
|
|
64
|
+
return UserPreferencesTheme2;
|
|
65
|
+
})(UserPreferencesTheme || {});
|
|
59
66
|
var ContentVisibility = /* @__PURE__ */ ((ContentVisibility2) => {
|
|
60
67
|
ContentVisibility2["Public"] = "public";
|
|
61
68
|
ContentVisibility2["Unlisted"] = "unlisted";
|
|
@@ -163,7 +170,7 @@ var AnalyticsTrafficInterval = /* @__PURE__ */ ((AnalyticsTrafficInterval2) => {
|
|
|
163
170
|
})(AnalyticsTrafficInterval || {});
|
|
164
171
|
var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
|
|
165
172
|
IntegrationScope2["EntitiesWrite"] = "entities:write";
|
|
166
|
-
IntegrationScope2["
|
|
173
|
+
IntegrationScope2["CaptureWrite"] = "capture:write";
|
|
167
174
|
IntegrationScope2["SpaceViewsRead"] = "space:views:read";
|
|
168
175
|
IntegrationScope2["SpaceContentRead"] = "space:content:read";
|
|
169
176
|
IntegrationScope2["SpaceContentWrite"] = "space:content:write";
|
|
@@ -475,13 +482,21 @@ var Api = class extends HttpClient {
|
|
|
475
482
|
format: "json",
|
|
476
483
|
...params
|
|
477
484
|
}),
|
|
478
|
-
|
|
479
|
-
path: `/user/
|
|
485
|
+
getPreferencesForAuthenticatedUser: (params = {}) => this.request({
|
|
486
|
+
path: `/user/preferences`,
|
|
480
487
|
method: "GET",
|
|
481
|
-
query,
|
|
482
488
|
secure: true,
|
|
483
489
|
format: "json",
|
|
484
490
|
...params
|
|
491
|
+
}),
|
|
492
|
+
updatePreferencesForAuthenticatedUser: (data, params = {}) => this.request({
|
|
493
|
+
path: `/user/preferences`,
|
|
494
|
+
method: "PATCH",
|
|
495
|
+
body: data,
|
|
496
|
+
secure: true,
|
|
497
|
+
type: "application/json" /* Json */,
|
|
498
|
+
format: "json",
|
|
499
|
+
...params
|
|
485
500
|
})
|
|
486
501
|
};
|
|
487
502
|
this.users = {
|
|
@@ -1681,16 +1696,16 @@ var Api = class extends HttpClient {
|
|
|
1681
1696
|
format: "json",
|
|
1682
1697
|
...params
|
|
1683
1698
|
}),
|
|
1684
|
-
|
|
1685
|
-
path: `/orgs/${organizationId}/
|
|
1699
|
+
listCaptures: (organizationId, query, params = {}) => this.request({
|
|
1700
|
+
path: `/orgs/${organizationId}/captures`,
|
|
1686
1701
|
method: "GET",
|
|
1687
1702
|
query,
|
|
1688
1703
|
secure: true,
|
|
1689
1704
|
format: "json",
|
|
1690
1705
|
...params
|
|
1691
1706
|
}),
|
|
1692
|
-
|
|
1693
|
-
path: `/orgs/${organizationId}/
|
|
1707
|
+
startCapture: (organizationId, data, params = {}) => this.request({
|
|
1708
|
+
path: `/orgs/${organizationId}/captures`,
|
|
1694
1709
|
method: "POST",
|
|
1695
1710
|
body: data,
|
|
1696
1711
|
secure: true,
|
|
@@ -1698,23 +1713,34 @@ var Api = class extends HttpClient {
|
|
|
1698
1713
|
format: "json",
|
|
1699
1714
|
...params
|
|
1700
1715
|
}),
|
|
1701
|
-
|
|
1702
|
-
path: `/orgs/${organizationId}/
|
|
1716
|
+
getCapture: (organizationId, captureId, query, params = {}) => this.request({
|
|
1717
|
+
path: `/orgs/${organizationId}/captures/${captureId}`,
|
|
1703
1718
|
method: "GET",
|
|
1719
|
+
query,
|
|
1704
1720
|
secure: true,
|
|
1705
1721
|
format: "json",
|
|
1706
1722
|
...params
|
|
1707
1723
|
}),
|
|
1708
|
-
|
|
1709
|
-
path: `/orgs/${organizationId}/
|
|
1724
|
+
addEventsToCapture: (organizationId, captureId, data, params = {}) => this.request({
|
|
1725
|
+
path: `/orgs/${organizationId}/captures/${captureId}/events`,
|
|
1710
1726
|
method: "POST",
|
|
1711
1727
|
body: data,
|
|
1712
1728
|
secure: true,
|
|
1713
1729
|
type: "application/json" /* Json */,
|
|
1714
1730
|
...params
|
|
1715
1731
|
}),
|
|
1716
|
-
|
|
1717
|
-
path: `/orgs/${organizationId}/
|
|
1732
|
+
stopCapture: (organizationId, captureId, data, query, params = {}) => this.request({
|
|
1733
|
+
path: `/orgs/${organizationId}/captures/${captureId}/stop`,
|
|
1734
|
+
method: "POST",
|
|
1735
|
+
query,
|
|
1736
|
+
body: data,
|
|
1737
|
+
secure: true,
|
|
1738
|
+
type: "application/json" /* Json */,
|
|
1739
|
+
format: "json",
|
|
1740
|
+
...params
|
|
1741
|
+
}),
|
|
1742
|
+
askInOrganization: (organizationId, data, params = {}) => this.request({
|
|
1743
|
+
path: `/orgs/${organizationId}/ask`,
|
|
1718
1744
|
method: "POST",
|
|
1719
1745
|
body: data,
|
|
1720
1746
|
secure: true,
|
|
@@ -1837,5 +1863,6 @@ var GitBookAPI = class extends Api {
|
|
|
1837
1863
|
PurgeCDNCacheContextType,
|
|
1838
1864
|
SpaceRelationType,
|
|
1839
1865
|
SpaceType,
|
|
1840
|
-
TeamMemberRole
|
|
1866
|
+
TeamMemberRole,
|
|
1867
|
+
UserPreferencesTheme
|
|
1841
1868
|
});
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
// src/client.ts
|
|
2
|
+
var UserPreferencesTheme = /* @__PURE__ */ ((UserPreferencesTheme2) => {
|
|
3
|
+
UserPreferencesTheme2["Light"] = "light";
|
|
4
|
+
UserPreferencesTheme2["Dark"] = "dark";
|
|
5
|
+
UserPreferencesTheme2["Default"] = "default";
|
|
6
|
+
return UserPreferencesTheme2;
|
|
7
|
+
})(UserPreferencesTheme || {});
|
|
2
8
|
var ContentVisibility = /* @__PURE__ */ ((ContentVisibility2) => {
|
|
3
9
|
ContentVisibility2["Public"] = "public";
|
|
4
10
|
ContentVisibility2["Unlisted"] = "unlisted";
|
|
@@ -106,7 +112,7 @@ var AnalyticsTrafficInterval = /* @__PURE__ */ ((AnalyticsTrafficInterval2) => {
|
|
|
106
112
|
})(AnalyticsTrafficInterval || {});
|
|
107
113
|
var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
|
|
108
114
|
IntegrationScope2["EntitiesWrite"] = "entities:write";
|
|
109
|
-
IntegrationScope2["
|
|
115
|
+
IntegrationScope2["CaptureWrite"] = "capture:write";
|
|
110
116
|
IntegrationScope2["SpaceViewsRead"] = "space:views:read";
|
|
111
117
|
IntegrationScope2["SpaceContentRead"] = "space:content:read";
|
|
112
118
|
IntegrationScope2["SpaceContentWrite"] = "space:content:write";
|
|
@@ -418,13 +424,21 @@ var Api = class extends HttpClient {
|
|
|
418
424
|
format: "json",
|
|
419
425
|
...params
|
|
420
426
|
}),
|
|
421
|
-
|
|
422
|
-
path: `/user/
|
|
427
|
+
getPreferencesForAuthenticatedUser: (params = {}) => this.request({
|
|
428
|
+
path: `/user/preferences`,
|
|
423
429
|
method: "GET",
|
|
424
|
-
query,
|
|
425
430
|
secure: true,
|
|
426
431
|
format: "json",
|
|
427
432
|
...params
|
|
433
|
+
}),
|
|
434
|
+
updatePreferencesForAuthenticatedUser: (data, params = {}) => this.request({
|
|
435
|
+
path: `/user/preferences`,
|
|
436
|
+
method: "PATCH",
|
|
437
|
+
body: data,
|
|
438
|
+
secure: true,
|
|
439
|
+
type: "application/json" /* Json */,
|
|
440
|
+
format: "json",
|
|
441
|
+
...params
|
|
428
442
|
})
|
|
429
443
|
};
|
|
430
444
|
this.users = {
|
|
@@ -1624,16 +1638,16 @@ var Api = class extends HttpClient {
|
|
|
1624
1638
|
format: "json",
|
|
1625
1639
|
...params
|
|
1626
1640
|
}),
|
|
1627
|
-
|
|
1628
|
-
path: `/orgs/${organizationId}/
|
|
1641
|
+
listCaptures: (organizationId, query, params = {}) => this.request({
|
|
1642
|
+
path: `/orgs/${organizationId}/captures`,
|
|
1629
1643
|
method: "GET",
|
|
1630
1644
|
query,
|
|
1631
1645
|
secure: true,
|
|
1632
1646
|
format: "json",
|
|
1633
1647
|
...params
|
|
1634
1648
|
}),
|
|
1635
|
-
|
|
1636
|
-
path: `/orgs/${organizationId}/
|
|
1649
|
+
startCapture: (organizationId, data, params = {}) => this.request({
|
|
1650
|
+
path: `/orgs/${organizationId}/captures`,
|
|
1637
1651
|
method: "POST",
|
|
1638
1652
|
body: data,
|
|
1639
1653
|
secure: true,
|
|
@@ -1641,23 +1655,34 @@ var Api = class extends HttpClient {
|
|
|
1641
1655
|
format: "json",
|
|
1642
1656
|
...params
|
|
1643
1657
|
}),
|
|
1644
|
-
|
|
1645
|
-
path: `/orgs/${organizationId}/
|
|
1658
|
+
getCapture: (organizationId, captureId, query, params = {}) => this.request({
|
|
1659
|
+
path: `/orgs/${organizationId}/captures/${captureId}`,
|
|
1646
1660
|
method: "GET",
|
|
1661
|
+
query,
|
|
1647
1662
|
secure: true,
|
|
1648
1663
|
format: "json",
|
|
1649
1664
|
...params
|
|
1650
1665
|
}),
|
|
1651
|
-
|
|
1652
|
-
path: `/orgs/${organizationId}/
|
|
1666
|
+
addEventsToCapture: (organizationId, captureId, data, params = {}) => this.request({
|
|
1667
|
+
path: `/orgs/${organizationId}/captures/${captureId}/events`,
|
|
1653
1668
|
method: "POST",
|
|
1654
1669
|
body: data,
|
|
1655
1670
|
secure: true,
|
|
1656
1671
|
type: "application/json" /* Json */,
|
|
1657
1672
|
...params
|
|
1658
1673
|
}),
|
|
1659
|
-
|
|
1660
|
-
path: `/orgs/${organizationId}/
|
|
1674
|
+
stopCapture: (organizationId, captureId, data, query, params = {}) => this.request({
|
|
1675
|
+
path: `/orgs/${organizationId}/captures/${captureId}/stop`,
|
|
1676
|
+
method: "POST",
|
|
1677
|
+
query,
|
|
1678
|
+
body: data,
|
|
1679
|
+
secure: true,
|
|
1680
|
+
type: "application/json" /* Json */,
|
|
1681
|
+
format: "json",
|
|
1682
|
+
...params
|
|
1683
|
+
}),
|
|
1684
|
+
askInOrganization: (organizationId, data, params = {}) => this.request({
|
|
1685
|
+
path: `/orgs/${organizationId}/ask`,
|
|
1661
1686
|
method: "POST",
|
|
1662
1687
|
body: data,
|
|
1663
1688
|
secure: true,
|
|
@@ -1779,5 +1804,6 @@ export {
|
|
|
1779
1804
|
PurgeCDNCacheContextType,
|
|
1780
1805
|
SpaceRelationType,
|
|
1781
1806
|
SpaceType,
|
|
1782
|
-
TeamMemberRole
|
|
1807
|
+
TeamMemberRole,
|
|
1808
|
+
UserPreferencesTheme
|
|
1783
1809
|
};
|