@gitbook/api 0.87.0 → 0.88.1

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
@@ -71,6 +71,10 @@ export interface DocumentMarkCode {
71
71
  object: 'mark';
72
72
  type: 'code';
73
73
  }
74
+ export interface DocumentMarkKeyboard {
75
+ object: 'mark';
76
+ type: 'keyboard';
77
+ }
74
78
  export interface DocumentMarkStrikethrough {
75
79
  object: 'mark';
76
80
  type: 'strikethrough';
@@ -83,7 +87,7 @@ export interface DocumentMarkColor {
83
87
  background: 'default' | 'green' | 'blue' | 'red' | 'orange' | 'yellow' | 'purple';
84
88
  };
85
89
  }
86
- export type DocumentTextMark = DocumentMarkBold | DocumentMarkItalic | DocumentMarkCode | DocumentMarkStrikethrough | DocumentMarkColor;
90
+ export type DocumentTextMark = DocumentMarkBold | DocumentMarkItalic | DocumentMarkCode | DocumentMarkKeyboard | DocumentMarkStrikethrough | DocumentMarkColor;
87
91
  export interface DocumentTextLeaf {
88
92
  object: 'leaf';
89
93
  text: string;
@@ -3595,6 +3599,8 @@ export type SiteAds = {
3595
3599
  topic: SiteAdsTopic;
3596
3600
  } | {
3597
3601
  status: 'rejected';
3602
+ /** Reason for the rejection */
3603
+ reason?: string;
3598
3604
  } | {
3599
3605
  status: 'live' | 'disabled';
3600
3606
  /** Topic of the content */
@@ -3679,6 +3685,11 @@ export type SiteSectionTitle = string;
3679
3685
  * @maxLength 100
3680
3686
  */
3681
3687
  export type SiteSectionPath = string;
3688
+ /**
3689
+ * @minLength 1
3690
+ * @maxLength 1024
3691
+ */
3692
+ export type Condition = string;
3682
3693
  /**
3683
3694
  * Path to the space on the site
3684
3695
  * @minLength 1
@@ -3698,6 +3709,8 @@ export interface SiteSpace {
3698
3709
  title: string;
3699
3710
  /** Whether this is the default space for the site */
3700
3711
  default?: boolean;
3712
+ /** Conditional expression used to evaluate whether the site space should be shown to the site's visitor. */
3713
+ condition?: Condition;
3701
3714
  /** Whether the space has advanced customization feature enabled */
3702
3715
  hasAdvancedCustomizationFeature?: boolean;
3703
3716
  /** URLs associated with the object */
@@ -3720,6 +3733,8 @@ export interface SiteSection {
3720
3733
  default?: boolean;
3721
3734
  /** Path to the section on the site */
3722
3735
  path: SiteSectionPath;
3736
+ /** Conditional expression used to evaluate whether the site section should be shown to the site's visitor. */
3737
+ condition?: Condition;
3723
3738
  siteSpaces: SiteSpace[];
3724
3739
  /** URLs associated with the object */
3725
3740
  urls: {
@@ -3968,13 +3983,6 @@ export interface CreateSpace {
3968
3983
  /** ID of a parent collection */
3969
3984
  parent?: string;
3970
3985
  }
3971
- export interface OrganizationExperimentalFeature {
3972
- id: string;
3973
- title: string;
3974
- description: string;
3975
- enabled: boolean;
3976
- stage: 'alpha' | 'beta';
3977
- }
3978
3986
  /**
3979
3987
  * @minLength 1
3980
3988
  * @maxLength 30
@@ -4438,6 +4446,10 @@ export type SiteSearchScope = {
4438
4446
  /** Search in all sections and site spaces. This scope is wide and deep. */
4439
4447
  mode: 'all';
4440
4448
  };
4449
+ export type SiteSpaceCustomizationSettings = SiteCustomizationSettings & {
4450
+ /** Indicates whether the site customization settings have been overridden. */
4451
+ hasOverrides: boolean;
4452
+ };
4441
4453
  export interface SiteSectionPointer {
4442
4454
  type: 'site-section';
4443
4455
  /** Unique identifier for the site section */
@@ -5597,10 +5609,6 @@ export interface OrganizationSitesChannel {
5597
5609
  channel: 'organization-sites';
5598
5610
  organization: string;
5599
5611
  }
5600
- export interface OrganizationExperimentalFeaturesChannel {
5601
- channel: 'organization-experimental-features';
5602
- organization: string;
5603
- }
5604
5612
  /** Channel for messages everytime a space is indexed by the AI in an organization */
5605
5613
  export interface OrganizationAIIndexationChannel {
5606
5614
  channel: 'organization-ai-indexation';
@@ -5729,7 +5737,7 @@ export interface GitSyncOperationChannel {
5729
5737
  space: string;
5730
5738
  }
5731
5739
  /** Channel to subscribe to for realtime updates. */
5732
- export type SubscriptionChannel = SpaceInfoChannel | SpaceContentChannel | SpaceGitInfoChannel | SpacePublishingAuthChannel | SpacePublishingCustomizationChannel | SpaceCustomFieldsChannel | SpaceContentRefsChannel | SpaceIntegrationsChannel | OrganizationCustomFieldsChannel | UserAPITokensChannel | UserOrganizationsChannel | UserProfileChannel | ChangeRequestChannel | ChangeRequestsChannel | ChangeRequestReviewsChannel | ChangeRequestContentRefsChannel | CollectionChannel | CollectionPublishingCustomizationChannel | OrganizationInfoChannel | OrganizationInviteLinksChannel | OrganizationMembersChannel | OrganizationMemberChannel | OrganizationSAMLChannel | OrganizationTeamsChannel | OrganizationTeamChannel | OrganizationTeamMembersChannel | OrganizationTeamMemberChannel | OrganizationSpacesChannel | OrganizationCollectionsChannel | OrganizationCapturesChannel | OrganizationIntegrationsChannel | OrganizationInstallationsChannel | OrganizationSitesChannel | OrganizationExperimentalFeaturesChannel | OrganizationAIIndexationChannel | SpaceCommentsChannel | ChangeRequestCommentsChannel | CommentInfoChannel | CommentReplyInfoChannel | CommentRepliesChannel | IntegrationChannel | IntegrationInstallationChannel | IntegrationSpaceInstallationChannel | IntegrationSpaceInstallationsChannel | IntegrationSiteInstallationChannel | IntegrationSiteInstallationsChannel | PublishedContentSiteChannel | SiteRedirectsChannel | SiteChannel | SiteCustomizationChannel | SiteIntegrationsChannel | SiteSpaceChannel | SiteSpaceCustomizationChannel | SiteStructureChannel | SitePublishingAuthChannel | SiteShareLinksChannel | SiteShareLinkChannel | SiteSectionChannel | CustomHostnameChannel | GitSyncSettingsChannel | GitSyncOperationChannel;
5740
+ export type SubscriptionChannel = SpaceInfoChannel | SpaceContentChannel | SpaceGitInfoChannel | SpacePublishingAuthChannel | SpacePublishingCustomizationChannel | SpaceCustomFieldsChannel | SpaceContentRefsChannel | SpaceIntegrationsChannel | OrganizationCustomFieldsChannel | UserAPITokensChannel | UserOrganizationsChannel | UserProfileChannel | ChangeRequestChannel | ChangeRequestsChannel | ChangeRequestReviewsChannel | ChangeRequestContentRefsChannel | CollectionChannel | CollectionPublishingCustomizationChannel | OrganizationInfoChannel | OrganizationInviteLinksChannel | OrganizationMembersChannel | OrganizationMemberChannel | OrganizationSAMLChannel | OrganizationTeamsChannel | OrganizationTeamChannel | OrganizationTeamMembersChannel | OrganizationTeamMemberChannel | OrganizationSpacesChannel | OrganizationCollectionsChannel | OrganizationCapturesChannel | OrganizationIntegrationsChannel | OrganizationInstallationsChannel | OrganizationSitesChannel | OrganizationAIIndexationChannel | SpaceCommentsChannel | ChangeRequestCommentsChannel | CommentInfoChannel | CommentReplyInfoChannel | CommentRepliesChannel | IntegrationChannel | IntegrationInstallationChannel | IntegrationSpaceInstallationChannel | IntegrationSpaceInstallationsChannel | IntegrationSiteInstallationChannel | IntegrationSiteInstallationsChannel | PublishedContentSiteChannel | SiteRedirectsChannel | SiteChannel | SiteCustomizationChannel | SiteIntegrationsChannel | SiteSpaceChannel | SiteSpaceCustomizationChannel | SiteStructureChannel | SitePublishingAuthChannel | SiteShareLinksChannel | SiteShareLinkChannel | SiteSectionChannel | CustomHostnameChannel | GitSyncSettingsChannel | GitSyncOperationChannel;
5733
5741
  export interface GitSyncOperationChannelData {
5734
5742
  channel: 'space-gitsync-operation';
5735
5743
  data: GitSyncOperation;
@@ -9322,26 +9330,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
9322
9330
  integration: Integration;
9323
9331
  }[];
9324
9332
  }, Error>>;
9325
- /**
9326
- * No description
9327
- *
9328
- * @tags organizations
9329
- * @name ListOrgExperimentalFeatures
9330
- * @summary List experiemental features for the given organization.
9331
- * @request GET:/orgs/{organizationId}/experiments
9332
- * @secure
9333
- */
9334
- listOrgExperimentalFeatures: (organizationId: string, params?: RequestParams) => Promise<HttpResponse<OrganizationExperimentalFeature[], Error>>;
9335
- /**
9336
- * No description
9337
- *
9338
- * @tags organizations
9339
- * @name UpdateOrgExperimentalFeatures
9340
- * @summary Toggle on or off experimental features.
9341
- * @request POST:/orgs/{organizationId}/experiments
9342
- * @secure
9343
- */
9344
- updateOrgExperimentalFeatures: (organizationId: string, data: Record<string, boolean>, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
9345
9333
  /**
9346
9334
  * @description Lists SAML providers configured for the specified organization.
9347
9335
  *
@@ -10346,6 +10334,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10346
10334
  path?: SiteSectionPath;
10347
10335
  /** ID of the site-space to be used as the default in this section. */
10348
10336
  defaultSiteSpace?: string;
10337
+ /** Conditional expression used to evaluate whether the site section should be shown to the site's visitor (should evaluate to a boolean). If not set, the condition will remain unchanged. If set to null, the condition will be removed. */
10338
+ condition?: Condition | null;
10349
10339
  icon?: Icon | null;
10350
10340
  }, params?: RequestParams) => Promise<HttpResponse<SiteSection, Error>>;
10351
10341
  /**
@@ -10437,6 +10427,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10437
10427
  updateSiteSpaceById: (organizationId: string, siteId: string, siteSpaceId: string, data: {
10438
10428
  /** Path to the space on the site */
10439
10429
  path?: SiteSpacePath;
10430
+ /** Conditional expression used to evaluate whether the site space should be shown to the site's visitor (should evaluate to a boolean). If not set, the condition will remain unchanged. If set to null, the condition will be removed. */
10431
+ condition?: Condition | null;
10440
10432
  }, params?: RequestParams) => Promise<HttpResponse<SiteSpace, Error>>;
10441
10433
  /**
10442
10434
  * No description
@@ -10581,6 +10573,22 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10581
10573
  message: string;
10582
10574
  };
10583
10575
  }>>;
10576
+ /**
10577
+ * No description
10578
+ *
10579
+ * @tags sites
10580
+ * @name DeleteSiteSpaceCustomizationById
10581
+ * @summary Removes the customization configuration for a site space.
10582
+ * @request DELETE:/orgs/{organizationId}/sites/{siteId}/site-spaces/{siteSpaceId}/customization
10583
+ * @secure
10584
+ */
10585
+ deleteSiteSpaceCustomizationById: (organizationId: string, siteId: string, siteSpaceId: string, params?: RequestParams) => Promise<HttpResponse<void, Error | {
10586
+ error: {
10587
+ /** @format int32 */
10588
+ code: 400;
10589
+ message: string;
10590
+ };
10591
+ }>>;
10584
10592
  /**
10585
10593
  * No description
10586
10594
  *
@@ -10590,10 +10598,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10590
10598
  * @request GET:/orgs/{organizationId}/sites/{siteId}/site-spaces/{siteSpaceId}/customization/raw
10591
10599
  * @secure
10592
10600
  */
10593
- getSiteSpaceRawCustomizationById: (organizationId: string, siteId: string, siteSpaceId: string, params?: RequestParams) => Promise<HttpResponse<SiteCustomizationSettings & {
10594
- /** Indicates whether the site customization settings have been overridden. */
10595
- hasOverrides: boolean;
10596
- }, Error | {
10601
+ getSiteSpaceRawCustomizationById: (organizationId: string, siteId: string, siteSpaceId: string, params?: RequestParams) => Promise<HttpResponse<SiteSpaceCustomizationSettings, Error | {
10597
10602
  error: {
10598
10603
  /** @format int32 */
10599
10604
  code: 400;
@@ -11005,6 +11010,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
11005
11010
  reportingId: string;
11006
11011
  } | {
11007
11012
  status: "rejected";
11013
+ /**
11014
+ * Reason for the rejection
11015
+ * @maxLength 512
11016
+ */
11017
+ reason?: string;
11008
11018
  } | {
11009
11019
  status: "pending";
11010
11020
  }, params?: RequestParams) => Promise<HttpResponse<void, Error>>;
package/dist/index.cjs CHANGED
@@ -261,129 +261,103 @@ module.exports = __toCommonJS(src_exports);
261
261
 
262
262
  // package.json
263
263
  var name = "@gitbook/api";
264
- var version = "0.87.0";
264
+ var version = "0.88.1";
265
265
 
266
266
  // src/client.ts
267
267
  var import_event_iterator = __toESM(require_node(), 1);
268
268
 
269
269
  // ../../node_modules/eventsource-parser/dist/index.js
270
- function createParser(onParse) {
271
- let isFirstChunk;
272
- let buffer;
273
- let startingPosition;
274
- let startingFieldLength;
275
- let eventId;
276
- let eventName;
277
- let data;
278
- reset();
279
- return {
280
- feed,
281
- reset
282
- };
283
- function reset() {
284
- isFirstChunk = true;
285
- buffer = "";
286
- startingPosition = 0;
287
- startingFieldLength = -1;
288
- eventId = void 0;
289
- eventName = void 0;
290
- data = "";
270
+ var __defProp2 = Object.defineProperty;
271
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
272
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key != "symbol" ? key + "" : key, value);
273
+ var ParseError = class extends Error {
274
+ constructor(message, options) {
275
+ super(message), __publicField(this, "type"), __publicField(this, "field"), __publicField(this, "value"), __publicField(this, "line"), this.name = "ParseError", this.type = options.type, this.field = options.field, this.value = options.value, this.line = options.line;
291
276
  }
292
- function feed(chunk) {
293
- buffer = buffer ? buffer + chunk : chunk;
294
- if (isFirstChunk && hasBom(buffer)) {
295
- buffer = buffer.slice(BOM.length);
296
- }
297
- isFirstChunk = false;
298
- const length = buffer.length;
299
- let position = 0;
300
- let discardTrailingNewline = false;
301
- while (position < length) {
302
- if (discardTrailingNewline) {
303
- if (buffer[position] === "\n") {
304
- ++position;
305
- }
306
- discardTrailingNewline = false;
307
- }
308
- let lineLength = -1;
309
- let fieldLength = startingFieldLength;
310
- let character;
311
- for (let index = startingPosition; lineLength < 0 && index < length; ++index) {
312
- character = buffer[index];
313
- if (character === ":" && fieldLength < 0) {
314
- fieldLength = index - position;
315
- } else if (character === "\r") {
316
- discardTrailingNewline = true;
317
- lineLength = index - position;
318
- } else if (character === "\n") {
319
- lineLength = index - position;
320
- }
321
- }
322
- if (lineLength < 0) {
323
- startingPosition = length - position;
324
- startingFieldLength = fieldLength;
325
- break;
326
- } else {
327
- startingPosition = 0;
328
- startingFieldLength = -1;
329
- }
330
- parseEventStreamLine(buffer, position, fieldLength, lineLength);
331
- position += lineLength + 1;
332
- }
333
- if (position === length) {
334
- buffer = "";
335
- } else if (position > 0) {
336
- buffer = buffer.slice(position);
337
- }
277
+ };
278
+ function noop(_arg) {
279
+ }
280
+ function createParser(callbacks) {
281
+ const { onEvent = noop, onError = noop, onRetry = noop, onComment } = callbacks;
282
+ let incompleteLine = "", isFirstChunk = true, id, data = "", eventType = "";
283
+ function feed(newChunk) {
284
+ const chunk = isFirstChunk ? newChunk.replace(/^\xEF\xBB\xBF/, "") : newChunk, [complete, incomplete] = splitLines(`${incompleteLine}${chunk}`);
285
+ for (const line of complete)
286
+ parseLine(line);
287
+ incompleteLine = incomplete, isFirstChunk = false;
338
288
  }
339
- function parseEventStreamLine(lineBuffer, index, fieldLength, lineLength) {
340
- if (lineLength === 0) {
341
- if (data.length > 0) {
342
- onParse({
343
- type: "event",
344
- id: eventId,
345
- event: eventName || void 0,
346
- data: data.slice(0, -1)
347
- });
348
- data = "";
349
- eventId = void 0;
350
- }
351
- eventName = void 0;
289
+ function parseLine(line) {
290
+ if (line === "") {
291
+ dispatchEvent();
352
292
  return;
353
293
  }
354
- const noValue = fieldLength < 0;
355
- const field = lineBuffer.slice(index, index + (noValue ? lineLength : fieldLength));
356
- let step = 0;
357
- if (noValue) {
358
- step = lineLength;
359
- } else if (lineBuffer[index + fieldLength + 1] === " ") {
360
- step = fieldLength + 2;
361
- } else {
362
- step = fieldLength + 1;
294
+ if (line.startsWith(":")) {
295
+ onComment && onComment(line.slice(line.startsWith(": ") ? 2 : 1));
296
+ return;
363
297
  }
364
- const position = index + step;
365
- const valueLength = lineLength - step;
366
- const value = lineBuffer.slice(position, position + valueLength).toString();
367
- if (field === "data") {
368
- data += value ? "".concat(value, "\n") : "\n";
369
- } else if (field === "event") {
370
- eventName = value;
371
- } else if (field === "id" && !value.includes("\0")) {
372
- eventId = value;
373
- } else if (field === "retry") {
374
- const retry = parseInt(value, 10);
375
- if (!Number.isNaN(retry)) {
376
- onParse({
377
- type: "reconnect-interval",
378
- value: retry
379
- });
380
- }
298
+ const fieldSeparatorIndex = line.indexOf(":");
299
+ if (fieldSeparatorIndex !== -1) {
300
+ const field = line.slice(0, fieldSeparatorIndex), offset = line[fieldSeparatorIndex + 1] === " " ? 2 : 1, value = line.slice(fieldSeparatorIndex + offset);
301
+ processField(field, value, line);
302
+ return;
303
+ }
304
+ processField(line, "", line);
305
+ }
306
+ function processField(field, value, line) {
307
+ switch (field) {
308
+ case "event":
309
+ eventType = value;
310
+ break;
311
+ case "data":
312
+ data = `${data}${value}
313
+ `;
314
+ break;
315
+ case "id":
316
+ id = value.includes("\0") ? void 0 : value;
317
+ break;
318
+ case "retry":
319
+ /^\d+$/.test(value) ? onRetry(parseInt(value, 10)) : onError(
320
+ new ParseError(`Invalid \`retry\` value: "${value}"`, {
321
+ type: "invalid-retry",
322
+ value,
323
+ line
324
+ })
325
+ );
326
+ break;
327
+ default:
328
+ onError(
329
+ new ParseError(
330
+ `Unknown field "${field.length > 20 ? `${field.slice(0, 20)}\u2026` : field}"`,
331
+ { type: "unknown-field", field, value, line }
332
+ )
333
+ );
334
+ break;
381
335
  }
382
336
  }
337
+ function dispatchEvent() {
338
+ data.length > 0 && onEvent({
339
+ id,
340
+ event: eventType || void 0,
341
+ data: data.endsWith(`
342
+ `) ? data.slice(0, -1) : data
343
+ }), id = void 0, data = "", eventType = "";
344
+ }
345
+ function reset(options = {}) {
346
+ incompleteLine && options.consume && parseLine(incompleteLine), id = void 0, data = "", eventType = "", incompleteLine = "";
347
+ }
348
+ return { feed, reset };
383
349
  }
384
- var BOM = [239, 187, 191];
385
- function hasBom(buffer) {
386
- return BOM.every((charCode, index) => buffer.charCodeAt(index) === charCode);
350
+ function splitLines(chunk) {
351
+ const lines = [];
352
+ let incompleteLine = "";
353
+ const totalLength = chunk.length;
354
+ for (let i = 0; i < totalLength; i++) {
355
+ const char = chunk[i];
356
+ char === "\r" && chunk[i + 1] === `
357
+ ` ? (lines.push(incompleteLine), incompleteLine = "", i++) : char === "\r" || char === `
358
+ ` ? (lines.push(incompleteLine), incompleteLine = "") : incompleteLine += char;
359
+ }
360
+ return [lines, incompleteLine];
387
361
  }
388
362
 
389
363
  // src/client.ts
@@ -1119,14 +1093,22 @@ var HttpClient = class {
1119
1093
  reader.cancel();
1120
1094
  queue.stop();
1121
1095
  };
1122
- const parser = createParser((event) => {
1123
- if (event.type === "event") {
1124
- if (event.data === "done") {
1096
+ const parser = createParser({
1097
+ onEvent: (event) => {
1098
+ if (event.event === "done") {
1125
1099
  stop();
1100
+ } else if (event.event === "error") {
1101
+ const data = JSON.parse(event.data);
1102
+ reader.cancel();
1103
+ queue.fail(new Error(data.error.message));
1126
1104
  } else {
1127
1105
  const data = JSON.parse(event.data);
1128
1106
  queue.push(data);
1129
1107
  }
1108
+ },
1109
+ onError: (error) => {
1110
+ reader.cancel();
1111
+ queue.fail(error);
1130
1112
  }
1131
1113
  });
1132
1114
  const decoder = new TextDecoder();
@@ -2712,21 +2694,6 @@ var Api = class extends HttpClient {
2712
2694
  format: "json",
2713
2695
  ...params
2714
2696
  }),
2715
- listOrgExperimentalFeatures: (organizationId, params = {}) => this.request({
2716
- path: `/orgs/${organizationId}/experiments`,
2717
- method: "GET",
2718
- secure: true,
2719
- format: "json",
2720
- ...params
2721
- }),
2722
- updateOrgExperimentalFeatures: (organizationId, data, params = {}) => this.request({
2723
- path: `/orgs/${organizationId}/experiments`,
2724
- method: "POST",
2725
- body: data,
2726
- secure: true,
2727
- type: "application/json" /* Json */,
2728
- ...params
2729
- }),
2730
2697
  listSamlProvidersInOrganizationById: (organizationId, query, params = {}) => this.request({
2731
2698
  path: `/orgs/${organizationId}/saml`,
2732
2699
  method: "GET",
@@ -3248,6 +3215,12 @@ var Api = class extends HttpClient {
3248
3215
  format: "json",
3249
3216
  ...params
3250
3217
  }),
3218
+ deleteSiteSpaceCustomizationById: (organizationId, siteId, siteSpaceId, params = {}) => this.request({
3219
+ path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}/customization`,
3220
+ method: "DELETE",
3221
+ secure: true,
3222
+ ...params
3223
+ }),
3251
3224
  getSiteSpaceRawCustomizationById: (organizationId, siteId, siteSpaceId, params = {}) => this.request({
3252
3225
  path: `/orgs/${organizationId}/sites/${siteId}/site-spaces/${siteSpaceId}/customization/raw`,
3253
3226
  method: "GET",