@gitbook/api 0.113.0 → 0.114.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 CHANGED
@@ -1708,8 +1708,11 @@ export interface Organization {
1708
1708
  blocked?: {
1709
1709
  reason: OrganizationBlockReason;
1710
1710
  };
1711
- /** If true, the organization is on the new trial which includes sites and the Pro plan. */
1712
- internal_isOnNewTrial?: boolean;
1711
+ /**
1712
+ * Deprecated. Always true. All organizations are on new trials.
1713
+ * @deprecated
1714
+ */
1715
+ internal_isOnNewTrial?: true;
1713
1716
  internal_billingMigration?: {
1714
1717
  /** When we will upgrade the organization onto new pricing, if they haven't already. */
1715
1718
  deadline?: Timestamp;
@@ -1726,16 +1729,18 @@ export interface Organization {
1726
1729
  admin: boolean;
1727
1730
  /** Is the user a team owner. */
1728
1731
  ownTeam: boolean;
1732
+ /** Can the user create new spaces/collections in the organization. */
1733
+ createContent: boolean;
1734
+ /** Can the user create new OpenAPI specifications. */
1735
+ createOpenAPISpec: boolean;
1729
1736
  /** Can the user view the billing details of the organization. */
1730
- viewBilling?: boolean;
1737
+ viewBilling: boolean;
1731
1738
  /** Can the user list the members of the organization. */
1732
- listMembers?: boolean;
1739
+ listMembers: boolean;
1733
1740
  /** Can the user list the teams in the organization. */
1734
- listTeams?: boolean;
1735
- /** Can the user create new spaces/collections in the organization. */
1736
- createContent: boolean;
1741
+ listTeams: boolean;
1737
1742
  /** Can the user list the integrations in the organization. */
1738
- listIntegrations?: boolean;
1743
+ listIntegrations: boolean;
1739
1744
  };
1740
1745
  }
1741
1746
  export interface ContentLocationRevisionContext {
@@ -2027,6 +2032,17 @@ export type Comment = {
2027
2032
  */
2028
2033
  location: string;
2029
2034
  };
2035
+ /** The set of permissions for the comment */
2036
+ permissions: {
2037
+ /** Can the user view the comment. */
2038
+ view: boolean;
2039
+ /** Can the user edit the comment. */
2040
+ edit: boolean;
2041
+ /** Can the user react or send a reply to the comment. */
2042
+ reply?: boolean;
2043
+ /** Can the user delete the comment. */
2044
+ delete: boolean;
2045
+ };
2030
2046
  } & ({
2031
2047
  /** Status of the comment. */
2032
2048
  status: 'resolved';
@@ -2115,6 +2131,17 @@ export interface CommentReply {
2115
2131
  */
2116
2132
  location: string;
2117
2133
  };
2134
+ /** The set of permissions for the comment reply */
2135
+ permissions: {
2136
+ /** Can the user view the comment reply. */
2137
+ view: boolean;
2138
+ /** Can the user edit the comment reply. */
2139
+ edit: boolean;
2140
+ /** Can the user react or reply to the comment reply. */
2141
+ reply?: boolean;
2142
+ /** Can the user delete the comment reply. */
2143
+ delete: boolean;
2144
+ };
2118
2145
  }
2119
2146
  export interface PostCommentReplySchema {
2120
2147
  /** The content of the comment. */
@@ -2460,6 +2487,8 @@ export declare enum IntegrationScope {
2460
2487
  SiteScriptInject = "site:script:inject",
2461
2488
  SiteScriptCookies = "site:script:cookies",
2462
2489
  SiteVisitorAuth = "site:visitor:auth",
2490
+ SiteAdaptiveRead = "site:adaptive:read",
2491
+ SiteAdaptiveWrite = "site:adaptive:write",
2463
2492
  OpenapiRead = "openapi:read",
2464
2493
  OpenapiWrite = "openapi:write"
2465
2494
  }
@@ -3927,6 +3956,8 @@ export interface InviteLinkToCollection {
3927
3956
  id: string;
3928
3957
  /** The level of the member in the target collection */
3929
3958
  level: MemberRoleOrGuest;
3959
+ /** An invite is redundant if the requesting user already has all necessary permissions. */
3960
+ redundant: boolean;
3930
3961
  /** The collection the member has been invited to */
3931
3962
  collection: Collection;
3932
3963
  }
@@ -3938,6 +3969,8 @@ export interface InviteLinkToSpace {
3938
3969
  id: string;
3939
3970
  /** The level of the member in the target space */
3940
3971
  level: MemberRoleOrGuest;
3972
+ /** An invite is redundant if the requesting user already has all necessary permissions. */
3973
+ redundant: boolean;
3941
3974
  /** The space the member has been invited to */
3942
3975
  space: Space;
3943
3976
  }
@@ -3947,8 +3980,10 @@ export interface InviteLinkToOrganization {
3947
3980
  object: 'invite';
3948
3981
  /** Unique identifier for the invite link to the organization */
3949
3982
  id: string;
3950
- /** The role of the member in the organization */
3983
+ /** The role in the organization the invite link is for */
3951
3984
  role: MemberRoleOrGuest;
3985
+ /** An invite is redundant if the requesting user already has all necessary permissions. */
3986
+ redundant: boolean;
3952
3987
  }
3953
3988
  export interface CreateInviteToOrganization {
3954
3989
  /** The role of the member in the organization */
package/dist/index.cjs CHANGED
@@ -269,7 +269,7 @@ module.exports = __toCommonJS(src_exports);
269
269
 
270
270
  // package.json
271
271
  var name = "@gitbook/api";
272
- var version = "0.113.0";
272
+ var version = "0.114.0";
273
273
 
274
274
  // src/client.ts
275
275
  var import_event_iterator = __toESM(require_node(), 1);
@@ -617,6 +617,8 @@ var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
617
617
  IntegrationScope2["SiteScriptInject"] = "site:script:inject";
618
618
  IntegrationScope2["SiteScriptCookies"] = "site:script:cookies";
619
619
  IntegrationScope2["SiteVisitorAuth"] = "site:visitor:auth";
620
+ IntegrationScope2["SiteAdaptiveRead"] = "site:adaptive:read";
621
+ IntegrationScope2["SiteAdaptiveWrite"] = "site:adaptive:write";
620
622
  IntegrationScope2["OpenapiRead"] = "openapi:read";
621
623
  IntegrationScope2["OpenapiWrite"] = "openapi:write";
622
624
  return IntegrationScope2;
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.113.0";
175
+ var version = "0.114.0";
176
176
 
177
177
  // src/client.ts
178
178
  var import_event_iterator = __toESM(require_node(), 1);
@@ -520,6 +520,8 @@ var IntegrationScope = /* @__PURE__ */ ((IntegrationScope2) => {
520
520
  IntegrationScope2["SiteScriptInject"] = "site:script:inject";
521
521
  IntegrationScope2["SiteScriptCookies"] = "site:script:cookies";
522
522
  IntegrationScope2["SiteVisitorAuth"] = "site:visitor:auth";
523
+ IntegrationScope2["SiteAdaptiveRead"] = "site:adaptive:read";
524
+ IntegrationScope2["SiteAdaptiveWrite"] = "site:adaptive:write";
523
525
  IntegrationScope2["OpenapiRead"] = "openapi:read";
524
526
  IntegrationScope2["OpenapiWrite"] = "openapi:write";
525
527
  return IntegrationScope2;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "main": "./dist/index.cjs",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
7
- "version": "0.113.0",
7
+ "version": "0.114.0",
8
8
  "sideEffects": false,
9
9
  "files": [
10
10
  "README.md",
package/spec/openapi.json CHANGED
@@ -11384,7 +11384,7 @@
11384
11384
  ],
11385
11385
  "security": [
11386
11386
  {
11387
- "user-internal": []
11387
+ "user": []
11388
11388
  }
11389
11389
  ],
11390
11390
  "parameters": [
@@ -22115,7 +22115,11 @@
22115
22115
  },
22116
22116
  "internal_isOnNewTrial": {
22117
22117
  "type": "boolean",
22118
- "description": "If true, the organization is on the new trial which includes sites and the Pro plan."
22118
+ "description": "Deprecated. Always true. All organizations are on new trials.",
22119
+ "deprecated": true,
22120
+ "enum": [
22121
+ true
22122
+ ]
22119
22123
  },
22120
22124
  "internal_billingMigration": {
22121
22125
  "type": "object",
@@ -22150,6 +22154,14 @@
22150
22154
  "type": "boolean",
22151
22155
  "description": "Is the user a team owner."
22152
22156
  },
22157
+ "createContent": {
22158
+ "type": "boolean",
22159
+ "description": "Can the user create new spaces/collections in the organization."
22160
+ },
22161
+ "createOpenAPISpec": {
22162
+ "type": "boolean",
22163
+ "description": "Can the user create new OpenAPI specifications."
22164
+ },
22153
22165
  "viewBilling": {
22154
22166
  "type": "boolean",
22155
22167
  "description": "Can the user view the billing details of the organization."
@@ -22162,10 +22174,6 @@
22162
22174
  "type": "boolean",
22163
22175
  "description": "Can the user list the teams in the organization."
22164
22176
  },
22165
- "createContent": {
22166
- "type": "boolean",
22167
- "description": "Can the user create new spaces/collections in the organization."
22168
- },
22169
22177
  "listIntegrations": {
22170
22178
  "type": "boolean",
22171
22179
  "description": "Can the user list the integrations in the organization."
@@ -22175,7 +22183,12 @@
22175
22183
  "view",
22176
22184
  "admin",
22177
22185
  "ownTeam",
22178
- "createContent"
22186
+ "createContent",
22187
+ "createOpenAPISpec",
22188
+ "viewBilling",
22189
+ "listMembers",
22190
+ "listTeams",
22191
+ "listIntegrations"
22179
22192
  ]
22180
22193
  }
22181
22194
  },
@@ -22987,6 +23000,34 @@
22987
23000
  "required": [
22988
23001
  "location"
22989
23002
  ]
23003
+ },
23004
+ "permissions": {
23005
+ "type": "object",
23006
+ "description": "The set of permissions for the comment",
23007
+ "properties": {
23008
+ "view": {
23009
+ "type": "boolean",
23010
+ "description": "Can the user view the comment."
23011
+ },
23012
+ "edit": {
23013
+ "type": "boolean",
23014
+ "description": "Can the user edit the comment."
23015
+ },
23016
+ "reply": {
23017
+ "type": "boolean",
23018
+ "description": "Can the user react or send a reply to the comment."
23019
+ },
23020
+ "delete": {
23021
+ "type": "boolean",
23022
+ "description": "Can the user delete the comment."
23023
+ }
23024
+ },
23025
+ "required": [
23026
+ "view",
23027
+ "edit",
23028
+ "react",
23029
+ "delete"
23030
+ ]
22990
23031
  }
22991
23032
  },
22992
23033
  "required": [
@@ -22998,7 +23039,8 @@
22998
23039
  "postedAt",
22999
23040
  "reactions",
23000
23041
  "target",
23001
- "urls"
23042
+ "urls",
23043
+ "permissions"
23002
23044
  ]
23003
23045
  },
23004
23046
  {
@@ -23286,6 +23328,34 @@
23286
23328
  "required": [
23287
23329
  "location"
23288
23330
  ]
23331
+ },
23332
+ "permissions": {
23333
+ "type": "object",
23334
+ "description": "The set of permissions for the comment reply",
23335
+ "properties": {
23336
+ "view": {
23337
+ "type": "boolean",
23338
+ "description": "Can the user view the comment reply."
23339
+ },
23340
+ "edit": {
23341
+ "type": "boolean",
23342
+ "description": "Can the user edit the comment reply."
23343
+ },
23344
+ "reply": {
23345
+ "type": "boolean",
23346
+ "description": "Can the user react or reply to the comment reply."
23347
+ },
23348
+ "delete": {
23349
+ "type": "boolean",
23350
+ "description": "Can the user delete the comment reply."
23351
+ }
23352
+ },
23353
+ "required": [
23354
+ "view",
23355
+ "edit",
23356
+ "react",
23357
+ "delete"
23358
+ ]
23289
23359
  }
23290
23360
  },
23291
23361
  "required": [
@@ -23295,7 +23365,8 @@
23295
23365
  "postedBy",
23296
23366
  "postedAt",
23297
23367
  "reactions",
23298
- "urls"
23368
+ "urls",
23369
+ "permissions"
23299
23370
  ]
23300
23371
  },
23301
23372
  "PostCommentReplySchema": {
@@ -24362,6 +24433,8 @@
24362
24433
  "site:script:inject",
24363
24434
  "site:script:cookies",
24364
24435
  "site:visitor:auth",
24436
+ "site:adaptive:read",
24437
+ "site:adaptive:write",
24365
24438
  "openapi:read",
24366
24439
  "openapi:write"
24367
24440
  ]
@@ -28834,6 +28907,10 @@
28834
28907
  "$ref": "#/components/schemas/MemberRoleOrGuest",
28835
28908
  "description": "The level of the member in the target collection"
28836
28909
  },
28910
+ "redundant": {
28911
+ "type": "boolean",
28912
+ "description": "An invite is redundant if the requesting user already has all necessary permissions."
28913
+ },
28837
28914
  "collection": {
28838
28915
  "$ref": "#/components/schemas/Collection",
28839
28916
  "description": "The collection the member has been invited to"
@@ -28844,6 +28921,7 @@
28844
28921
  "id",
28845
28922
  "target",
28846
28923
  "level",
28924
+ "redundant",
28847
28925
  "collection"
28848
28926
  ]
28849
28927
  },
@@ -28866,6 +28944,10 @@
28866
28944
  "$ref": "#/components/schemas/MemberRoleOrGuest",
28867
28945
  "description": "The level of the member in the target space"
28868
28946
  },
28947
+ "redundant": {
28948
+ "type": "boolean",
28949
+ "description": "An invite is redundant if the requesting user already has all necessary permissions."
28950
+ },
28869
28951
  "space": {
28870
28952
  "$ref": "#/components/schemas/Space",
28871
28953
  "description": "The space the member has been invited to"
@@ -28876,6 +28958,7 @@
28876
28958
  "id",
28877
28959
  "target",
28878
28960
  "level",
28961
+ "redundant",
28879
28962
  "space"
28880
28963
  ]
28881
28964
  },
@@ -28896,13 +28979,18 @@
28896
28979
  },
28897
28980
  "role": {
28898
28981
  "$ref": "#/components/schemas/MemberRoleOrGuest",
28899
- "description": "The role of the member in the organization"
28982
+ "description": "The role in the organization the invite link is for"
28983
+ },
28984
+ "redundant": {
28985
+ "type": "boolean",
28986
+ "description": "An invite is redundant if the requesting user already has all necessary permissions."
28900
28987
  }
28901
28988
  },
28902
28989
  "required": [
28903
28990
  "object",
28904
28991
  "id",
28905
- "role"
28992
+ "role",
28993
+ "redundant"
28906
28994
  ]
28907
28995
  },
28908
28996
  "CreateInviteToOrganization": {
package/spec/openapi.yaml CHANGED
@@ -6470,7 +6470,7 @@ paths:
6470
6470
  tags:
6471
6471
  - sites
6472
6472
  security:
6473
- - user-internal: []
6473
+ - user: []
6474
6474
  parameters:
6475
6475
  - $ref: "#/components/parameters/organizationId"
6476
6476
  - $ref: "#/components/parameters/siteId"
@@ -13117,7 +13117,10 @@ components:
13117
13117
  - reason
13118
13118
  internal_isOnNewTrial:
13119
13119
  type: boolean
13120
- description: If true, the organization is on the new trial which includes sites and the Pro plan.
13120
+ description: Deprecated. Always true. All organizations are on new trials.
13121
+ deprecated: true
13122
+ enum:
13123
+ - true
13121
13124
  internal_billingMigration:
13122
13125
  type: object
13123
13126
  properties:
@@ -13143,6 +13146,12 @@ components:
13143
13146
  ownTeam:
13144
13147
  type: boolean
13145
13148
  description: Is the user a team owner.
13149
+ createContent:
13150
+ type: boolean
13151
+ description: Can the user create new spaces/collections in the organization.
13152
+ createOpenAPISpec:
13153
+ type: boolean
13154
+ description: Can the user create new OpenAPI specifications.
13146
13155
  viewBilling:
13147
13156
  type: boolean
13148
13157
  description: Can the user view the billing details of the organization.
@@ -13152,9 +13161,6 @@ components:
13152
13161
  listTeams:
13153
13162
  type: boolean
13154
13163
  description: Can the user list the teams in the organization.
13155
- createContent:
13156
- type: boolean
13157
- description: Can the user create new spaces/collections in the organization.
13158
13164
  listIntegrations:
13159
13165
  type: boolean
13160
13166
  description: Can the user list the integrations in the organization.
@@ -13163,6 +13169,11 @@ components:
13163
13169
  - admin
13164
13170
  - ownTeam
13165
13171
  - createContent
13172
+ - createOpenAPISpec
13173
+ - viewBilling
13174
+ - listMembers
13175
+ - listTeams
13176
+ - listIntegrations
13166
13177
  required:
13167
13178
  - object
13168
13179
  - id
@@ -13724,6 +13735,27 @@ components:
13724
13735
  format: uri
13725
13736
  required:
13726
13737
  - location
13738
+ permissions:
13739
+ type: object
13740
+ description: The set of permissions for the comment
13741
+ properties:
13742
+ view:
13743
+ type: boolean
13744
+ description: Can the user view the comment.
13745
+ edit:
13746
+ type: boolean
13747
+ description: Can the user edit the comment.
13748
+ reply:
13749
+ type: boolean
13750
+ description: Can the user react or send a reply to the comment.
13751
+ delete:
13752
+ type: boolean
13753
+ description: Can the user delete the comment.
13754
+ required:
13755
+ - view
13756
+ - edit
13757
+ - react
13758
+ - delete
13727
13759
  required:
13728
13760
  - object
13729
13761
  - id
@@ -13734,6 +13766,7 @@ components:
13734
13766
  - reactions
13735
13767
  - target
13736
13768
  - urls
13769
+ - permissions
13737
13770
  - oneOf:
13738
13771
  - type: object
13739
13772
  title: Resolved
@@ -13928,6 +13961,27 @@ components:
13928
13961
  format: uri
13929
13962
  required:
13930
13963
  - location
13964
+ permissions:
13965
+ type: object
13966
+ description: The set of permissions for the comment reply
13967
+ properties:
13968
+ view:
13969
+ type: boolean
13970
+ description: Can the user view the comment reply.
13971
+ edit:
13972
+ type: boolean
13973
+ description: Can the user edit the comment reply.
13974
+ reply:
13975
+ type: boolean
13976
+ description: Can the user react or reply to the comment reply.
13977
+ delete:
13978
+ type: boolean
13979
+ description: Can the user delete the comment reply.
13980
+ required:
13981
+ - view
13982
+ - edit
13983
+ - react
13984
+ - delete
13931
13985
  required:
13932
13986
  - object
13933
13987
  - id
@@ -13936,6 +13990,7 @@ components:
13936
13990
  - postedAt
13937
13991
  - reactions
13938
13992
  - urls
13993
+ - permissions
13939
13994
  PostCommentReplySchema:
13940
13995
  type: object
13941
13996
  properties:
@@ -14644,6 +14699,8 @@ components:
14644
14699
  - site:script:inject
14645
14700
  - site:script:cookies
14646
14701
  - site:visitor:auth
14702
+ - site:adaptive:read
14703
+ - site:adaptive:write
14647
14704
  - openapi:read
14648
14705
  - openapi:write
14649
14706
  IntegrationScopes:
@@ -17573,6 +17630,9 @@ components:
17573
17630
  level:
17574
17631
  $ref: "#/components/schemas/MemberRoleOrGuest"
17575
17632
  description: The level of the member in the target collection
17633
+ redundant:
17634
+ type: boolean
17635
+ description: An invite is redundant if the requesting user already has all necessary permissions.
17576
17636
  collection:
17577
17637
  $ref: "#/components/schemas/Collection"
17578
17638
  description: The collection the member has been invited to
@@ -17581,6 +17641,7 @@ components:
17581
17641
  - id
17582
17642
  - target
17583
17643
  - level
17644
+ - redundant
17584
17645
  - collection
17585
17646
  InviteLinkToSpace:
17586
17647
  type: object
@@ -17597,6 +17658,9 @@ components:
17597
17658
  level:
17598
17659
  $ref: "#/components/schemas/MemberRoleOrGuest"
17599
17660
  description: The level of the member in the target space
17661
+ redundant:
17662
+ type: boolean
17663
+ description: An invite is redundant if the requesting user already has all necessary permissions.
17600
17664
  space:
17601
17665
  $ref: "#/components/schemas/Space"
17602
17666
  description: The space the member has been invited to
@@ -17605,6 +17669,7 @@ components:
17605
17669
  - id
17606
17670
  - target
17607
17671
  - level
17672
+ - redundant
17608
17673
  - space
17609
17674
  InviteLinkToOrganization:
17610
17675
  type: object
@@ -17620,11 +17685,15 @@ components:
17620
17685
  description: Unique identifier for the invite link to the organization
17621
17686
  role:
17622
17687
  $ref: "#/components/schemas/MemberRoleOrGuest"
17623
- description: The role of the member in the organization
17688
+ description: The role in the organization the invite link is for
17689
+ redundant:
17690
+ type: boolean
17691
+ description: An invite is redundant if the requesting user already has all necessary permissions.
17624
17692
  required:
17625
17693
  - object
17626
17694
  - id
17627
17695
  - role
17696
+ - redundant
17628
17697
  CreateInviteToOrganization:
17629
17698
  type: object
17630
17699
  properties: