@gitbook/api 0.163.0 → 0.164.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
@@ -1954,6 +1954,11 @@ export interface OrganizationBilling {
1954
1954
  endDate: Timestamp | null;
1955
1955
  /** If true, we were unable to collect the last payment */
1956
1956
  hasPaymentFailed: boolean;
1957
+ /**
1958
+ * If true, organization can create a checkout session to subscribe/update billing.
1959
+ * If false, organization must resolve other billing issues before a checkout can be done.
1960
+ */
1961
+ canCheckout: boolean;
1957
1962
  /** If true, the billing is set to cancel at the end of its current period */
1958
1963
  isScheduledToCancel: boolean;
1959
1964
  /** Pricing information for the organization */
@@ -4346,6 +4351,12 @@ export interface SubscriptionChanges {
4346
4351
  isPublished: boolean;
4347
4352
  })[];
4348
4353
  }
4354
+ /**
4355
+ * Coupon or promotion code to apply to billing operations.
4356
+ * @minLength 1
4357
+ * @maxLength 500
4358
+ */
4359
+ export type BillingCoupon = string;
4349
4360
  export interface UpgradeOrganizationBilling {
4350
4361
  /** Name of the product */
4351
4362
  product: BillingProduct;
@@ -4355,6 +4366,8 @@ export interface UpgradeOrganizationBilling {
4355
4366
  changes?: SubscriptionChanges;
4356
4367
  /** Reason that triggered the billing upgrade */
4357
4368
  reason?: string;
4369
+ /** Coupon or promotion code to apply to the subscription */
4370
+ coupon?: BillingCoupon;
4358
4371
  /** Mode to use for the upgrade (default value is `commit`): - `auto`: user is redirect to checkout if possible, other a preview of the auto-upgrade is returned. - `commit`: a checkout session is returned or an auto-upgrade is done - `preview`: a preview invoice is always returned */
4359
4372
  mode?: 'auto' | 'commit' | 'preview';
4360
4373
  }
@@ -4374,13 +4387,13 @@ export interface BillingInvoicePreview {
4374
4387
  periodStart: Timestamp;
4375
4388
  periodEnd: Timestamp;
4376
4389
  }[];
4377
- /** Discount applied to the subscription. */
4378
- discount?: {
4379
- /** The combined description of all discounts applied to the subscription. */
4390
+ /** Discounts applied to the subscription. */
4391
+ discounts?: {
4392
+ /** The description of the applied discount. */
4380
4393
  description: string;
4381
- /** The total amount of all discounts applied to the subscription. */
4394
+ /** The amount of the applied discount. */
4382
4395
  amount: number;
4383
- };
4396
+ }[];
4384
4397
  }
4385
4398
  export type BillingUpgrade = {
4386
4399
  result: 'checkout';
@@ -4433,7 +4446,6 @@ export declare enum BillingSwitchAction {
4433
4446
  Upgrade = "upgrade",
4434
4447
  UpgradePassive = "upgrade_passive",
4435
4448
  Downgrade = "downgrade",
4436
- UndoCancel = "undo_cancel",
4437
4449
  SwitchInterval = "switch_interval"
4438
4450
  }
4439
4451
  /** Identifier of a billing meter */
@@ -6712,11 +6724,15 @@ export type SiteInsightsEventSearchOpenResult = SiteInsightsEventBase & {
6712
6724
  type: 'search_open_result';
6713
6725
  /** Query of the search. */
6714
6726
  query: string;
6727
+ /** Target of the opened search result. */
6715
6728
  result: {
6716
6729
  /** ID of the concerned space. */
6717
6730
  spaceId: string;
6718
6731
  /** ID of the concerned page. */
6719
6732
  pageId: string;
6733
+ } | {
6734
+ /** ID of the concerned record. */
6735
+ recordId: string;
6720
6736
  };
6721
6737
  };
6722
6738
  export type SiteInsightsEventPagePostFeedback = SiteInsightsEventBase & {
@@ -6863,6 +6879,8 @@ export type SiteInsightsQueryEventsColumn = SiteInsightsQueryDateTimeColumn | {
6863
6879
  column: 'eventAPIOperationMethod';
6864
6880
  } | {
6865
6881
  column: 'eventSearchQuery';
6882
+ } | {
6883
+ column: 'eventSearchResultRecordId';
6866
6884
  } | {
6867
6885
  column: 'eventPageFeedbackRating';
6868
6886
  } | {
@@ -7038,6 +7056,9 @@ export type SiteInsightsQueryEventsValues = {
7038
7056
  } | {
7039
7057
  column: 'eventSearchQuery';
7040
7058
  values: string[];
7059
+ } | {
7060
+ column: 'eventSearchResultRecordId';
7061
+ values: (string | null)[];
7041
7062
  } | {
7042
7063
  column: 'pageFeedbackRating';
7043
7064
  values: {
@@ -7153,7 +7174,7 @@ export interface SiteAdsStats {
7153
7174
  /**
7154
7175
  * The source path to redirect from.
7155
7176
  * @maxLength 512
7156
- * @pattern ^\/(?:[A-Za-z0-9\-._~]|%[0-9A-Fa-f]{2})+(?:\/(?:[A-Za-z0-9\-._~]|%[0-9A-Fa-f]{2})+)*$
7177
+ * @pattern ^\/(?!\*)(?!.*\*.+)(?:[A-Za-z0-9\-._~]|%[0-9A-Fa-f]{2})+(?:\/(?:[A-Za-z0-9\-._~]|%[0-9A-Fa-f]{2})+)*(?:\/\*|\*)?$
7157
7178
  */
7158
7179
  export type SiteRedirectSourcePath = string;
7159
7180
  export interface SiteRedirectDestinationSiteSection {
@@ -7180,6 +7201,8 @@ export interface SiteRedirect {
7180
7201
  id: string;
7181
7202
  /** The source path to redirect from. */
7182
7203
  source: SiteRedirectSourcePath;
7204
+ /** Capture and append the wildcard-matched suffix to the destination URL. */
7205
+ captureWildcard: boolean;
7183
7206
  destination: SiteRedirectDestination;
7184
7207
  }
7185
7208
  export interface SiteRedirectInputDestinationPath {
@@ -13605,6 +13628,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13605
13628
  * @secure
13606
13629
  */
13607
13630
  upsertSiteContextRecords: (organizationId: string, siteId: string, data: ContextRecordInput[], params?: RequestParams) => Promise<HttpResponse<void, any>>;
13631
+ /**
13632
+ * No description
13633
+ *
13634
+ * @tags site-context
13635
+ * @name GetSiteContextRecordById
13636
+ * @summary Get a context record
13637
+ * @request GET:/orgs/{organizationId}/sites/{siteId}/context-records/{siteContextRecordId}
13638
+ * @secure
13639
+ */
13640
+ getSiteContextRecordById: (organizationId: string, siteId: string, siteContextRecordId: string, params?: RequestParams) => Promise<HttpResponse<ContextRecord, any>>;
13608
13641
  /**
13609
13642
  * No description
13610
13643
  *
@@ -14344,6 +14377,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
14344
14377
  createSiteRedirect: (organizationId: string, siteId: string, data: {
14345
14378
  /** The source path to redirect from. */
14346
14379
  source: SiteRedirectSourcePath;
14380
+ /**
14381
+ * Capture and append the wildcard-matched suffix to the destination URL.
14382
+ * @default false
14383
+ */
14384
+ captureWildcard?: boolean;
14347
14385
  destination: SiteRedirectInputDestination;
14348
14386
  }, params?: RequestParams) => Promise<HttpResponse<SiteRedirect, any>>;
14349
14387
  /**
@@ -14363,6 +14401,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
14363
14401
  redirects: {
14364
14402
  /** The source path to redirect from. */
14365
14403
  source: SiteRedirectSourcePath;
14404
+ /**
14405
+ * Capture and append the wildcard-matched suffix to the destination URL.
14406
+ * @default false
14407
+ */
14408
+ captureWildcard?: boolean;
14366
14409
  destination: SiteRedirectInputDestination;
14367
14410
  }[];
14368
14411
  }, params?: RequestParams) => Promise<HttpResponse<{
@@ -14424,6 +14467,8 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
14424
14467
  updateSiteRedirectById: (organizationId: string, siteId: string, siteRedirectId: string, data: {
14425
14468
  /** The source path to redirect from. */
14426
14469
  source?: SiteRedirectSourcePath;
14470
+ /** Capture and append the wildcard-matched suffix to the destination URL. */
14471
+ captureWildcard?: boolean;
14427
14472
  destination?: SiteRedirectDestination;
14428
14473
  }, params?: RequestParams) => Promise<HttpResponse<SiteRedirect, any>>;
14429
14474
  /**
@@ -92,7 +92,9 @@ export declare const SITE_SPACE_PATH_MIN_LENGTH = 1;
92
92
  export declare const SITE_SECTION_GROUP_TITLE_MAX_LENGTH = 100;
93
93
  export declare const SITE_SECTION_GROUP_TITLE_MIN_LENGTH = 1;
94
94
  export declare const TEAM_MEMBER_ROLE_ENUM: ["owner", "member"];
95
- export declare const BILLING_SWITCH_ACTION_ENUM: ["trial", "upgrade", "upgrade_passive", "downgrade", "undo_cancel", "switch_interval"];
95
+ export declare const BILLING_COUPON_MAX_LENGTH = 500;
96
+ export declare const BILLING_COUPON_MIN_LENGTH = 1;
97
+ export declare const BILLING_SWITCH_ACTION_ENUM: ["trial", "upgrade", "upgrade_passive", "downgrade", "switch_interval"];
96
98
  export declare const BILLING_METER_ENUM: ["ai_responses", "ai_agent_responses", "translation_words"];
97
99
  export declare const SAMLPROVIDER_LABEL_MAX_LENGTH = 30;
98
100
  export declare const SAMLPROVIDER_LABEL_MIN_LENGTH = 1;
@@ -159,7 +161,7 @@ export declare const SITE_INSIGHTS_VISITOR_BOT_ENUM: ["unknown", "googlebot", "b
159
161
  export declare const SITE_INSIGHTS_QUERY_OPERATOR_ENUM: ["in", "notIn", "greaterThan", "greaterThanOrEqual", "lessThan", "lessThanOrEqual"];
160
162
  export declare const SITE_INSIGHTS_QUERY_RANGE_PRESET_ENUM: ["lastYear", "last3Months", "last30Days", "last7Days", "last24Hours"];
161
163
  export declare const SITE_REDIRECT_SOURCE_PATH_MAX_LENGTH = 512;
162
- export declare const SITE_REDIRECT_SOURCE_PATH_PATTERN = "^\\/(?:[A-Za-z0-9\\-._~]|%[0-9A-Fa-f]{2})+(?:\\/(?:[A-Za-z0-9\\-._~]|%[0-9A-Fa-f]{2})+)*$";
164
+ export declare const SITE_REDIRECT_SOURCE_PATH_PATTERN = "^\\/(?!\\*)(?!.*\\*.+)(?:[A-Za-z0-9\\-._~]|%[0-9A-Fa-f]{2})+(?:\\/(?:[A-Za-z0-9\\-._~]|%[0-9A-Fa-f]{2})+)*(?:\\/\\*|\\*)?$";
163
165
  export declare const SITE_MCP_SERVER_NAME_MAX_LENGTH = 100;
164
166
  export declare const SITE_MCP_SERVER_NAME_MIN_LENGTH = 1;
165
167
  export declare const CUSTOM_HOSTNAME_DNS_STATUS_ENUM: ["dns_passed", "dns_wrong_cname", "dns_no_cname", "dns_cloudflare_proxied", "dns_wrong_caa"];
package/dist/index.cjs CHANGED
@@ -189,6 +189,8 @@ __export(src_exports, {
189
189
  APITOKEN_LABEL_MAX_LENGTH: () => APITOKEN_LABEL_MAX_LENGTH,
190
190
  AgentStatus: () => AgentStatus,
191
191
  Api: () => Api,
192
+ BILLING_COUPON_MAX_LENGTH: () => BILLING_COUPON_MAX_LENGTH,
193
+ BILLING_COUPON_MIN_LENGTH: () => BILLING_COUPON_MIN_LENGTH,
192
194
  BILLING_INTERVAL_ENUM: () => BILLING_INTERVAL_ENUM,
193
195
  BILLING_METER_ENUM: () => BILLING_METER_ENUM,
194
196
  BILLING_PRODUCT_ENUM: () => BILLING_PRODUCT_ENUM,
@@ -475,7 +477,7 @@ module.exports = __toCommonJS(src_exports);
475
477
 
476
478
  // package.json
477
479
  var name = "@gitbook/api";
478
- var version = "0.163.0";
480
+ var version = "0.164.0";
479
481
 
480
482
  // src/client.ts
481
483
  var import_event_iterator = __toESM(require_node(), 1);
@@ -972,7 +974,6 @@ var BillingSwitchAction = /* @__PURE__ */ ((BillingSwitchAction2) => {
972
974
  BillingSwitchAction2["Upgrade"] = "upgrade";
973
975
  BillingSwitchAction2["UpgradePassive"] = "upgrade_passive";
974
976
  BillingSwitchAction2["Downgrade"] = "downgrade";
975
- BillingSwitchAction2["UndoCancel"] = "undo_cancel";
976
977
  BillingSwitchAction2["SwitchInterval"] = "switch_interval";
977
978
  return BillingSwitchAction2;
978
979
  })(BillingSwitchAction || {});
@@ -3850,6 +3851,13 @@ var Api = class extends HttpClient {
3850
3851
  type: "application/json" /* Json */,
3851
3852
  ...params
3852
3853
  }),
3854
+ getSiteContextRecordById: (organizationId, siteId, siteContextRecordId, params = {}) => this.request({
3855
+ path: `/orgs/${organizationId}/sites/${siteId}/context-records/${siteContextRecordId}`,
3856
+ method: "GET",
3857
+ secure: true,
3858
+ format: "json",
3859
+ ...params
3860
+ }),
3853
3861
  listSiteContextConnections: (organizationId, siteId, query, params = {}) => this.request({
3854
3862
  path: `/orgs/${organizationId}/sites/${siteId}/context-connections`,
3855
3863
  method: "GET",
@@ -4432,7 +4440,9 @@ var SITE_SPACE_PATH_MIN_LENGTH = 1;
4432
4440
  var SITE_SECTION_GROUP_TITLE_MAX_LENGTH = 100;
4433
4441
  var SITE_SECTION_GROUP_TITLE_MIN_LENGTH = 1;
4434
4442
  var TEAM_MEMBER_ROLE_ENUM = ["owner", "member"];
4435
- var BILLING_SWITCH_ACTION_ENUM = ["trial", "upgrade", "upgrade_passive", "downgrade", "undo_cancel", "switch_interval"];
4443
+ var BILLING_COUPON_MAX_LENGTH = 500;
4444
+ var BILLING_COUPON_MIN_LENGTH = 1;
4445
+ var BILLING_SWITCH_ACTION_ENUM = ["trial", "upgrade", "upgrade_passive", "downgrade", "switch_interval"];
4436
4446
  var BILLING_METER_ENUM = ["ai_responses", "ai_agent_responses", "translation_words"];
4437
4447
  var SAMLPROVIDER_LABEL_MAX_LENGTH = 30;
4438
4448
  var SAMLPROVIDER_LABEL_MIN_LENGTH = 1;
@@ -4499,7 +4509,7 @@ var SITE_INSIGHTS_VISITOR_BOT_ENUM = ["unknown", "googlebot", "bingbot", "duckdu
4499
4509
  var SITE_INSIGHTS_QUERY_OPERATOR_ENUM = ["in", "notIn", "greaterThan", "greaterThanOrEqual", "lessThan", "lessThanOrEqual"];
4500
4510
  var SITE_INSIGHTS_QUERY_RANGE_PRESET_ENUM = ["lastYear", "last3Months", "last30Days", "last7Days", "last24Hours"];
4501
4511
  var SITE_REDIRECT_SOURCE_PATH_MAX_LENGTH = 512;
4502
- var SITE_REDIRECT_SOURCE_PATH_PATTERN = "^\\/(?:[A-Za-z0-9\\-._~]|%[0-9A-Fa-f]{2})+(?:\\/(?:[A-Za-z0-9\\-._~]|%[0-9A-Fa-f]{2})+)*$";
4512
+ var SITE_REDIRECT_SOURCE_PATH_PATTERN = "^\\/(?!\\*)(?!.*\\*.+)(?:[A-Za-z0-9\\-._~]|%[0-9A-Fa-f]{2})+(?:\\/(?:[A-Za-z0-9\\-._~]|%[0-9A-Fa-f]{2})+)*(?:\\/\\*|\\*)?$";
4503
4513
  var SITE_MCP_SERVER_NAME_MAX_LENGTH = 100;
4504
4514
  var SITE_MCP_SERVER_NAME_MIN_LENGTH = 1;
4505
4515
  var CUSTOM_HOSTNAME_DNS_STATUS_ENUM = ["dns_passed", "dns_wrong_cname", "dns_no_cname", "dns_cloudflare_proxied", "dns_wrong_caa"];
@@ -4600,6 +4610,8 @@ var GitBookAPI = class extends Api {
4600
4610
  APITOKEN_LABEL_MAX_LENGTH,
4601
4611
  AgentStatus,
4602
4612
  Api,
4613
+ BILLING_COUPON_MAX_LENGTH,
4614
+ BILLING_COUPON_MIN_LENGTH,
4603
4615
  BILLING_INTERVAL_ENUM,
4604
4616
  BILLING_METER_ENUM,
4605
4617
  BILLING_PRODUCT_ENUM,
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.163.0";
175
+ var version = "0.164.0";
176
176
 
177
177
  // src/client.ts
178
178
  var import_event_iterator = __toESM(require_node(), 1);
@@ -669,7 +669,6 @@ var BillingSwitchAction = /* @__PURE__ */ ((BillingSwitchAction2) => {
669
669
  BillingSwitchAction2["Upgrade"] = "upgrade";
670
670
  BillingSwitchAction2["UpgradePassive"] = "upgrade_passive";
671
671
  BillingSwitchAction2["Downgrade"] = "downgrade";
672
- BillingSwitchAction2["UndoCancel"] = "undo_cancel";
673
672
  BillingSwitchAction2["SwitchInterval"] = "switch_interval";
674
673
  return BillingSwitchAction2;
675
674
  })(BillingSwitchAction || {});
@@ -3547,6 +3546,13 @@ var Api = class extends HttpClient {
3547
3546
  type: "application/json" /* Json */,
3548
3547
  ...params
3549
3548
  }),
3549
+ getSiteContextRecordById: (organizationId, siteId, siteContextRecordId, params = {}) => this.request({
3550
+ path: `/orgs/${organizationId}/sites/${siteId}/context-records/${siteContextRecordId}`,
3551
+ method: "GET",
3552
+ secure: true,
3553
+ format: "json",
3554
+ ...params
3555
+ }),
3550
3556
  listSiteContextConnections: (organizationId, siteId, query, params = {}) => this.request({
3551
3557
  path: `/orgs/${organizationId}/sites/${siteId}/context-connections`,
3552
3558
  method: "GET",
@@ -4129,7 +4135,9 @@ var SITE_SPACE_PATH_MIN_LENGTH = 1;
4129
4135
  var SITE_SECTION_GROUP_TITLE_MAX_LENGTH = 100;
4130
4136
  var SITE_SECTION_GROUP_TITLE_MIN_LENGTH = 1;
4131
4137
  var TEAM_MEMBER_ROLE_ENUM = ["owner", "member"];
4132
- var BILLING_SWITCH_ACTION_ENUM = ["trial", "upgrade", "upgrade_passive", "downgrade", "undo_cancel", "switch_interval"];
4138
+ var BILLING_COUPON_MAX_LENGTH = 500;
4139
+ var BILLING_COUPON_MIN_LENGTH = 1;
4140
+ var BILLING_SWITCH_ACTION_ENUM = ["trial", "upgrade", "upgrade_passive", "downgrade", "switch_interval"];
4133
4141
  var BILLING_METER_ENUM = ["ai_responses", "ai_agent_responses", "translation_words"];
4134
4142
  var SAMLPROVIDER_LABEL_MAX_LENGTH = 30;
4135
4143
  var SAMLPROVIDER_LABEL_MIN_LENGTH = 1;
@@ -4196,7 +4204,7 @@ var SITE_INSIGHTS_VISITOR_BOT_ENUM = ["unknown", "googlebot", "bingbot", "duckdu
4196
4204
  var SITE_INSIGHTS_QUERY_OPERATOR_ENUM = ["in", "notIn", "greaterThan", "greaterThanOrEqual", "lessThan", "lessThanOrEqual"];
4197
4205
  var SITE_INSIGHTS_QUERY_RANGE_PRESET_ENUM = ["lastYear", "last3Months", "last30Days", "last7Days", "last24Hours"];
4198
4206
  var SITE_REDIRECT_SOURCE_PATH_MAX_LENGTH = 512;
4199
- var SITE_REDIRECT_SOURCE_PATH_PATTERN = "^\\/(?:[A-Za-z0-9\\-._~]|%[0-9A-Fa-f]{2})+(?:\\/(?:[A-Za-z0-9\\-._~]|%[0-9A-Fa-f]{2})+)*$";
4207
+ var SITE_REDIRECT_SOURCE_PATH_PATTERN = "^\\/(?!\\*)(?!.*\\*.+)(?:[A-Za-z0-9\\-._~]|%[0-9A-Fa-f]{2})+(?:\\/(?:[A-Za-z0-9\\-._~]|%[0-9A-Fa-f]{2})+)*(?:\\/\\*|\\*)?$";
4200
4208
  var SITE_MCP_SERVER_NAME_MAX_LENGTH = 100;
4201
4209
  var SITE_MCP_SERVER_NAME_MIN_LENGTH = 1;
4202
4210
  var CUSTOM_HOSTNAME_DNS_STATUS_ENUM = ["dns_passed", "dns_wrong_cname", "dns_no_cname", "dns_cloudflare_proxied", "dns_wrong_caa"];
@@ -4296,6 +4304,8 @@ export {
4296
4304
  APITOKEN_LABEL_MAX_LENGTH,
4297
4305
  AgentStatus,
4298
4306
  Api,
4307
+ BILLING_COUPON_MAX_LENGTH,
4308
+ BILLING_COUPON_MIN_LENGTH,
4299
4309
  BILLING_INTERVAL_ENUM,
4300
4310
  BILLING_METER_ENUM,
4301
4311
  BILLING_PRODUCT_ENUM,
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.163.0",
7
+ "version": "0.164.0",
8
8
  "sideEffects": false,
9
9
  "files": [
10
10
  "README.md",
package/spec/openapi.json CHANGED
@@ -14541,6 +14541,43 @@
14541
14541
  }
14542
14542
  }
14543
14543
  },
14544
+ "/orgs/{organizationId}/sites/{siteId}/context-records/{siteContextRecordId}": {
14545
+ "get": {
14546
+ "operationId": "getSiteContextRecordById",
14547
+ "summary": "Get a context record",
14548
+ "tags": [
14549
+ "site-context"
14550
+ ],
14551
+ "security": [
14552
+ {
14553
+ "user": []
14554
+ }
14555
+ ],
14556
+ "parameters": [
14557
+ {
14558
+ "$ref": "#/components/parameters/organizationId"
14559
+ },
14560
+ {
14561
+ "$ref": "#/components/parameters/siteId"
14562
+ },
14563
+ {
14564
+ "$ref": "#/components/parameters/siteContextRecordId"
14565
+ }
14566
+ ],
14567
+ "responses": {
14568
+ "200": {
14569
+ "description": "OK",
14570
+ "content": {
14571
+ "application/json": {
14572
+ "schema": {
14573
+ "$ref": "#/components/schemas/ContextRecord"
14574
+ }
14575
+ }
14576
+ }
14577
+ }
14578
+ }
14579
+ }
14580
+ },
14544
14581
  "/orgs/{organizationId}/sites/{siteId}/context-connections": {
14545
14582
  "get": {
14546
14583
  "operationId": "listSiteContextConnections",
@@ -16963,6 +17000,11 @@
16963
17000
  "source": {
16964
17001
  "$ref": "#/components/schemas/SiteRedirectSourcePath"
16965
17002
  },
17003
+ "captureWildcard": {
17004
+ "type": "boolean",
17005
+ "default": false,
17006
+ "description": "Capture and append the wildcard-matched suffix to the destination URL."
17007
+ },
16966
17008
  "destination": {
16967
17009
  "$ref": "#/components/schemas/SiteRedirectInputDestination"
16968
17010
  }
@@ -17024,6 +17066,11 @@
17024
17066
  "source": {
17025
17067
  "$ref": "#/components/schemas/SiteRedirectSourcePath"
17026
17068
  },
17069
+ "captureWildcard": {
17070
+ "type": "boolean",
17071
+ "default": false,
17072
+ "description": "Capture and append the wildcard-matched suffix to the destination URL."
17073
+ },
17027
17074
  "destination": {
17028
17075
  "$ref": "#/components/schemas/SiteRedirectInputDestination"
17029
17076
  }
@@ -17237,6 +17284,10 @@
17237
17284
  "source": {
17238
17285
  "$ref": "#/components/schemas/SiteRedirectSourcePath"
17239
17286
  },
17287
+ "captureWildcard": {
17288
+ "type": "boolean",
17289
+ "description": "Capture and append the wildcard-matched suffix to the destination URL."
17290
+ },
17240
17291
  "destination": {
17241
17292
  "$ref": "#/components/schemas/SiteRedirectDestination"
17242
17293
  }
@@ -18784,6 +18835,15 @@
18784
18835
  "type": "string"
18785
18836
  }
18786
18837
  },
18838
+ "siteContextRecordId": {
18839
+ "name": "siteContextRecordId",
18840
+ "in": "path",
18841
+ "required": true,
18842
+ "description": "The unique id of the context record",
18843
+ "schema": {
18844
+ "type": "string"
18845
+ }
18846
+ },
18787
18847
  "siteContextConnectionId": {
18788
18848
  "name": "siteContextConnectionId",
18789
18849
  "in": "path",
@@ -26252,6 +26312,10 @@
26252
26312
  "description": "If true, we were unable to collect the last payment",
26253
26313
  "type": "boolean"
26254
26314
  },
26315
+ "canCheckout": {
26316
+ "description": "If true, organization can create a checkout session to subscribe/update billing. \nIf false, organization must resolve other billing issues before a checkout can be done.\n",
26317
+ "type": "boolean"
26318
+ },
26255
26319
  "isScheduledToCancel": {
26256
26320
  "description": "If true, the billing is set to cancel at the end of its current period",
26257
26321
  "type": "boolean"
@@ -26284,6 +26348,7 @@
26284
26348
  "interval",
26285
26349
  "endDate",
26286
26350
  "hasPaymentFailed",
26351
+ "canCheckout",
26287
26352
  "isScheduledToCancel",
26288
26353
  "pricing",
26289
26354
  "usageAddons"
@@ -33287,6 +33352,12 @@
33287
33352
  "updateSites"
33288
33353
  ]
33289
33354
  },
33355
+ "BillingCoupon": {
33356
+ "type": "string",
33357
+ "description": "Coupon or promotion code to apply to billing operations.",
33358
+ "minLength": 1,
33359
+ "maxLength": 500
33360
+ },
33290
33361
  "UpgradeOrganizationBilling": {
33291
33362
  "type": "object",
33292
33363
  "properties": {
@@ -33303,6 +33374,10 @@
33303
33374
  "type": "string",
33304
33375
  "description": "Reason that triggered the billing upgrade"
33305
33376
  },
33377
+ "coupon": {
33378
+ "$ref": "#/components/schemas/BillingCoupon",
33379
+ "description": "Coupon or promotion code to apply to the subscription"
33380
+ },
33306
33381
  "mode": {
33307
33382
  "type": "string",
33308
33383
  "description": "Mode to use for the upgrade (default value is `commit`): - `auto`: user is redirect to checkout if possible, other a preview of the auto-upgrade is returned. - `commit`: a checkout session is returned or an auto-upgrade is done - `preview`: a preview invoice is always returned\n",
@@ -33364,23 +33439,26 @@
33364
33439
  ]
33365
33440
  }
33366
33441
  },
33367
- "discount": {
33368
- "type": "object",
33369
- "description": "Discount applied to the subscription.",
33370
- "properties": {
33371
- "description": {
33372
- "description": "The combined description of all discounts applied to the subscription.",
33373
- "type": "string"
33442
+ "discounts": {
33443
+ "type": "array",
33444
+ "description": "Discounts applied to the subscription.",
33445
+ "items": {
33446
+ "type": "object",
33447
+ "properties": {
33448
+ "description": {
33449
+ "description": "The description of the applied discount.",
33450
+ "type": "string"
33451
+ },
33452
+ "amount": {
33453
+ "description": "The amount of the applied discount.",
33454
+ "type": "number"
33455
+ }
33374
33456
  },
33375
- "amount": {
33376
- "description": "The total amount of all discounts applied to the subscription.",
33377
- "type": "number"
33378
- }
33379
- },
33380
- "required": [
33381
- "amount",
33382
- "description"
33383
- ]
33457
+ "required": [
33458
+ "amount",
33459
+ "description"
33460
+ ]
33461
+ }
33384
33462
  }
33385
33463
  },
33386
33464
  "required": [
@@ -33584,7 +33662,6 @@
33584
33662
  "upgrade",
33585
33663
  "upgrade_passive",
33586
33664
  "downgrade",
33587
- "undo_cancel",
33588
33665
  "switch_interval"
33589
33666
  ]
33590
33667
  },
@@ -39778,20 +39855,37 @@
39778
39855
  "description": "Query of the search."
39779
39856
  },
39780
39857
  "result": {
39781
- "type": "object",
39782
- "properties": {
39783
- "spaceId": {
39784
- "type": "string",
39785
- "description": "ID of the concerned space."
39858
+ "description": "Target of the opened search result.",
39859
+ "oneOf": [
39860
+ {
39861
+ "type": "object",
39862
+ "properties": {
39863
+ "spaceId": {
39864
+ "type": "string",
39865
+ "description": "ID of the concerned space."
39866
+ },
39867
+ "pageId": {
39868
+ "type": "string",
39869
+ "description": "ID of the concerned page."
39870
+ }
39871
+ },
39872
+ "required": [
39873
+ "spaceId",
39874
+ "pageId"
39875
+ ]
39786
39876
  },
39787
- "pageId": {
39788
- "type": "string",
39789
- "description": "ID of the concerned page."
39877
+ {
39878
+ "type": "object",
39879
+ "properties": {
39880
+ "recordId": {
39881
+ "type": "string",
39882
+ "description": "ID of the concerned record."
39883
+ }
39884
+ },
39885
+ "required": [
39886
+ "recordId"
39887
+ ]
39790
39888
  }
39791
- },
39792
- "required": [
39793
- "spaceId",
39794
- "pageId"
39795
39889
  ]
39796
39890
  }
39797
39891
  },
@@ -40587,6 +40681,20 @@
40587
40681
  }
40588
40682
  }
40589
40683
  },
40684
+ {
40685
+ "type": "object",
40686
+ "required": [
40687
+ "column"
40688
+ ],
40689
+ "properties": {
40690
+ "column": {
40691
+ "type": "string",
40692
+ "enum": [
40693
+ "eventSearchResultRecordId"
40694
+ ]
40695
+ }
40696
+ }
40697
+ },
40590
40698
  {
40591
40699
  "type": "object",
40592
40700
  "required": [
@@ -41539,6 +41647,28 @@
41539
41647
  }
41540
41648
  }
41541
41649
  },
41650
+ {
41651
+ "type": "object",
41652
+ "required": [
41653
+ "column",
41654
+ "values"
41655
+ ],
41656
+ "properties": {
41657
+ "column": {
41658
+ "type": "string",
41659
+ "enum": [
41660
+ "eventSearchResultRecordId"
41661
+ ]
41662
+ },
41663
+ "values": {
41664
+ "type": "array",
41665
+ "items": {
41666
+ "type": "string",
41667
+ "nullable": true
41668
+ }
41669
+ }
41670
+ }
41671
+ },
41542
41672
  {
41543
41673
  "type": "object",
41544
41674
  "required": [
@@ -42068,7 +42198,7 @@
42068
42198
  "type": "string",
42069
42199
  "description": "The source path to redirect from.",
42070
42200
  "maxLength": 512,
42071
- "pattern": "^\\/(?:[A-Za-z0-9\\-._~]|%[0-9A-Fa-f]{2})+(?:\\/(?:[A-Za-z0-9\\-._~]|%[0-9A-Fa-f]{2})+)*$"
42201
+ "pattern": "^\\/(?!\\*)(?!.*\\*.+)(?:[A-Za-z0-9\\-._~]|%[0-9A-Fa-f]{2})+(?:\\/(?:[A-Za-z0-9\\-._~]|%[0-9A-Fa-f]{2})+)*(?:\\/\\*|\\*)?$"
42072
42202
  },
42073
42203
  "SiteRedirectDestinationSiteSection": {
42074
42204
  "type": "object",
@@ -42161,6 +42291,10 @@
42161
42291
  "source": {
42162
42292
  "$ref": "#/components/schemas/SiteRedirectSourcePath"
42163
42293
  },
42294
+ "captureWildcard": {
42295
+ "type": "boolean",
42296
+ "description": "Capture and append the wildcard-matched suffix to the destination URL."
42297
+ },
42164
42298
  "destination": {
42165
42299
  "$ref": "#/components/schemas/SiteRedirectDestination"
42166
42300
  }
@@ -42169,6 +42303,7 @@
42169
42303
  "object",
42170
42304
  "id",
42171
42305
  "source",
42306
+ "captureWildcard",
42172
42307
  "destination"
42173
42308
  ]
42174
42309
  },
package/spec/openapi.yaml CHANGED
@@ -8235,6 +8235,25 @@ paths:
8235
8235
  responses:
8236
8236
  "204":
8237
8237
  description: The context records have been created or updated
8238
+ "/orgs/{organizationId}/sites/{siteId}/context-records/{siteContextRecordId}":
8239
+ get:
8240
+ operationId: getSiteContextRecordById
8241
+ summary: Get a context record
8242
+ tags:
8243
+ - site-context
8244
+ security:
8245
+ - user: []
8246
+ parameters:
8247
+ - $ref: "#/components/parameters/organizationId"
8248
+ - $ref: "#/components/parameters/siteId"
8249
+ - $ref: "#/components/parameters/siteContextRecordId"
8250
+ responses:
8251
+ "200":
8252
+ description: OK
8253
+ content:
8254
+ application/json:
8255
+ schema:
8256
+ $ref: "#/components/schemas/ContextRecord"
8238
8257
  "/orgs/{organizationId}/sites/{siteId}/context-connections":
8239
8258
  get:
8240
8259
  operationId: listSiteContextConnections
@@ -9564,6 +9583,10 @@ paths:
9564
9583
  properties:
9565
9584
  source:
9566
9585
  $ref: "#/components/schemas/SiteRedirectSourcePath"
9586
+ captureWildcard:
9587
+ type: boolean
9588
+ default: false
9589
+ description: Capture and append the wildcard-matched suffix to the destination URL.
9567
9590
  destination:
9568
9591
  $ref: "#/components/schemas/SiteRedirectInputDestination"
9569
9592
  required:
@@ -9602,6 +9625,10 @@ paths:
9602
9625
  properties:
9603
9626
  source:
9604
9627
  $ref: "#/components/schemas/SiteRedirectSourcePath"
9628
+ captureWildcard:
9629
+ type: boolean
9630
+ default: false
9631
+ description: Capture and append the wildcard-matched suffix to the destination URL.
9605
9632
  destination:
9606
9633
  $ref: "#/components/schemas/SiteRedirectInputDestination"
9607
9634
  required:
@@ -9725,6 +9752,9 @@ paths:
9725
9752
  properties:
9726
9753
  source:
9727
9754
  $ref: "#/components/schemas/SiteRedirectSourcePath"
9755
+ captureWildcard:
9756
+ type: boolean
9757
+ description: Capture and append the wildcard-matched suffix to the destination URL.
9728
9758
  destination:
9729
9759
  $ref: "#/components/schemas/SiteRedirectDestination"
9730
9760
  responses:
@@ -10728,6 +10758,13 @@ components:
10728
10758
  description: The unique id of the section within a site
10729
10759
  schema:
10730
10760
  type: string
10761
+ siteContextRecordId:
10762
+ name: siteContextRecordId
10763
+ in: path
10764
+ required: true
10765
+ description: The unique id of the context record
10766
+ schema:
10767
+ type: string
10731
10768
  siteContextConnectionId:
10732
10769
  name: siteContextConnectionId
10733
10770
  in: path
@@ -15516,6 +15553,11 @@ components:
15516
15553
  hasPaymentFailed:
15517
15554
  description: If true, we were unable to collect the last payment
15518
15555
  type: boolean
15556
+ canCheckout:
15557
+ description: |
15558
+ If true, organization can create a checkout session to subscribe/update billing.
15559
+ If false, organization must resolve other billing issues before a checkout can be done.
15560
+ type: boolean
15519
15561
  isScheduledToCancel:
15520
15562
  description: If true, the billing is set to cancel at the end of its current period
15521
15563
  type: boolean
@@ -15540,6 +15582,7 @@ components:
15540
15582
  - interval
15541
15583
  - endDate
15542
15584
  - hasPaymentFailed
15585
+ - canCheckout
15543
15586
  - isScheduledToCancel
15544
15587
  - pricing
15545
15588
  - usageAddons
@@ -20203,6 +20246,11 @@ components:
20203
20246
  required:
20204
20247
  - removeMembers
20205
20248
  - updateSites
20249
+ BillingCoupon:
20250
+ type: string
20251
+ description: Coupon or promotion code to apply to billing operations.
20252
+ minLength: 1
20253
+ maxLength: 500
20206
20254
  UpgradeOrganizationBilling:
20207
20255
  type: object
20208
20256
  properties:
@@ -20215,6 +20263,9 @@ components:
20215
20263
  reason:
20216
20264
  type: string
20217
20265
  description: Reason that triggered the billing upgrade
20266
+ coupon:
20267
+ $ref: "#/components/schemas/BillingCoupon"
20268
+ description: Coupon or promotion code to apply to the subscription
20218
20269
  mode:
20219
20270
  type: string
20220
20271
  description: |
@@ -20260,19 +20311,21 @@ components:
20260
20311
  - description
20261
20312
  - periodStart
20262
20313
  - periodEnd
20263
- discount:
20264
- type: object
20265
- description: Discount applied to the subscription.
20266
- properties:
20267
- description:
20268
- description: The combined description of all discounts applied to the subscription.
20269
- type: string
20270
- amount:
20271
- description: The total amount of all discounts applied to the subscription.
20272
- type: number
20273
- required:
20274
- - amount
20275
- - description
20314
+ discounts:
20315
+ type: array
20316
+ description: Discounts applied to the subscription.
20317
+ items:
20318
+ type: object
20319
+ properties:
20320
+ description:
20321
+ description: The description of the applied discount.
20322
+ type: string
20323
+ amount:
20324
+ description: The amount of the applied discount.
20325
+ type: number
20326
+ required:
20327
+ - amount
20328
+ - description
20276
20329
  required:
20277
20330
  - amount
20278
20331
  - amountDueToday
@@ -20407,7 +20460,6 @@ components:
20407
20460
  - upgrade
20408
20461
  - upgrade_passive
20409
20462
  - downgrade
20410
- - undo_cancel
20411
20463
  - switch_interval
20412
20464
  BillingMeter:
20413
20465
  type: string
@@ -24770,17 +24822,26 @@ components:
24770
24822
  type: string
24771
24823
  description: Query of the search.
24772
24824
  result:
24773
- type: object
24774
- properties:
24775
- spaceId:
24776
- type: string
24777
- description: ID of the concerned space.
24778
- pageId:
24779
- type: string
24780
- description: ID of the concerned page.
24781
- required:
24782
- - spaceId
24783
- - pageId
24825
+ description: Target of the opened search result.
24826
+ oneOf:
24827
+ - type: object
24828
+ properties:
24829
+ spaceId:
24830
+ type: string
24831
+ description: ID of the concerned space.
24832
+ pageId:
24833
+ type: string
24834
+ description: ID of the concerned page.
24835
+ required:
24836
+ - spaceId
24837
+ - pageId
24838
+ - type: object
24839
+ properties:
24840
+ recordId:
24841
+ type: string
24842
+ description: ID of the concerned record.
24843
+ required:
24844
+ - recordId
24784
24845
  required:
24785
24846
  - type
24786
24847
  - query
@@ -25237,6 +25298,14 @@ components:
25237
25298
  type: string
25238
25299
  enum:
25239
25300
  - eventSearchQuery
25301
+ - type: object
25302
+ required:
25303
+ - column
25304
+ properties:
25305
+ column:
25306
+ type: string
25307
+ enum:
25308
+ - eventSearchResultRecordId
25240
25309
  - type: object
25241
25310
  required:
25242
25311
  - column
@@ -25835,6 +25904,20 @@ components:
25835
25904
  type: array
25836
25905
  items:
25837
25906
  type: string
25907
+ - type: object
25908
+ required:
25909
+ - column
25910
+ - values
25911
+ properties:
25912
+ column:
25913
+ type: string
25914
+ enum:
25915
+ - eventSearchResultRecordId
25916
+ values:
25917
+ type: array
25918
+ items:
25919
+ type: string
25920
+ nullable: true
25838
25921
  - type: object
25839
25922
  required:
25840
25923
  - column
@@ -26174,7 +26257,7 @@ components:
26174
26257
  type: string
26175
26258
  description: The source path to redirect from.
26176
26259
  maxLength: 512
26177
- pattern: ^\/(?:[A-Za-z0-9\-._~]|%[0-9A-Fa-f]{2})+(?:\/(?:[A-Za-z0-9\-._~]|%[0-9A-Fa-f]{2})+)*$
26260
+ pattern: ^\/(?!\*)(?!.*\*.+)(?:[A-Za-z0-9\-._~]|%[0-9A-Fa-f]{2})+(?:\/(?:[A-Za-z0-9\-._~]|%[0-9A-Fa-f]{2})+)*(?:\/\*|\*)?$
26178
26261
  SiteRedirectDestinationSiteSection:
26179
26262
  type: object
26180
26263
  properties:
@@ -26235,12 +26318,16 @@ components:
26235
26318
  description: The unique identifier for the redirect.
26236
26319
  source:
26237
26320
  $ref: "#/components/schemas/SiteRedirectSourcePath"
26321
+ captureWildcard:
26322
+ type: boolean
26323
+ description: Capture and append the wildcard-matched suffix to the destination URL.
26238
26324
  destination:
26239
26325
  $ref: "#/components/schemas/SiteRedirectDestination"
26240
26326
  required:
26241
26327
  - object
26242
26328
  - id
26243
26329
  - source
26330
+ - captureWildcard
26244
26331
  - destination
26245
26332
  SiteRedirectInputDestinationPath:
26246
26333
  type: object