featurebase-node 0.10.0 → 0.12.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/CHANGELOG.md +21 -0
- package/package.json +1 -1
- package/resources/feedback/feedback.d.mts +2 -2
- package/resources/feedback/feedback.d.mts.map +1 -1
- package/resources/feedback/feedback.d.ts +2 -2
- package/resources/feedback/feedback.d.ts.map +1 -1
- package/resources/feedback/feedback.js.map +1 -1
- package/resources/feedback/feedback.mjs.map +1 -1
- package/resources/feedback/index.d.mts +1 -1
- package/resources/feedback/index.d.mts.map +1 -1
- package/resources/feedback/index.d.ts +1 -1
- package/resources/feedback/index.d.ts.map +1 -1
- package/resources/feedback/index.js.map +1 -1
- package/resources/feedback/index.mjs.map +1 -1
- package/resources/feedback/posts/index.d.mts +1 -1
- package/resources/feedback/posts/index.d.mts.map +1 -1
- package/resources/feedback/posts/index.d.ts +1 -1
- package/resources/feedback/posts/index.d.ts.map +1 -1
- package/resources/feedback/posts/index.js.map +1 -1
- package/resources/feedback/posts/index.mjs.map +1 -1
- package/resources/feedback/posts/posts.d.mts +520 -1
- package/resources/feedback/posts/posts.d.mts.map +1 -1
- package/resources/feedback/posts/posts.d.ts +520 -1
- package/resources/feedback/posts/posts.d.ts.map +1 -1
- package/resources/feedback/posts/posts.js +155 -0
- package/resources/feedback/posts/posts.js.map +1 -1
- package/resources/feedback/posts/posts.mjs +155 -0
- package/resources/feedback/posts/posts.mjs.map +1 -1
- package/resources/help-center/articles.d.mts +407 -1
- package/resources/help-center/articles.d.mts.map +1 -1
- package/resources/help-center/articles.d.ts +407 -1
- package/resources/help-center/articles.d.ts.map +1 -1
- package/resources/help-center/articles.js +130 -0
- package/resources/help-center/articles.js.map +1 -1
- package/resources/help-center/articles.mjs +130 -0
- package/resources/help-center/articles.mjs.map +1 -1
- package/resources/help-center/help-center.d.mts +2 -2
- package/resources/help-center/help-center.d.mts.map +1 -1
- package/resources/help-center/help-center.d.ts +2 -2
- package/resources/help-center/help-center.d.ts.map +1 -1
- package/resources/help-center/help-center.js.map +1 -1
- package/resources/help-center/help-center.mjs.map +1 -1
- package/resources/help-center/index.d.mts +1 -1
- package/resources/help-center/index.d.mts.map +1 -1
- package/resources/help-center/index.d.ts +1 -1
- package/resources/help-center/index.d.ts.map +1 -1
- package/resources/help-center/index.js.map +1 -1
- package/resources/help-center/index.mjs.map +1 -1
- package/resources/support/conversations/conversations.d.mts +14 -10
- package/resources/support/conversations/conversations.d.mts.map +1 -1
- package/resources/support/conversations/conversations.d.ts +14 -10
- package/resources/support/conversations/conversations.d.ts.map +1 -1
- package/resources/support/conversations/conversations.js +3 -1
- package/resources/support/conversations/conversations.js.map +1 -1
- package/resources/support/conversations/conversations.mjs +3 -1
- package/resources/support/conversations/conversations.mjs.map +1 -1
- package/resources/users/companies/companies.d.mts +237 -1
- package/resources/users/companies/companies.d.mts.map +1 -1
- package/resources/users/companies/companies.d.ts +237 -1
- package/resources/users/companies/companies.d.ts.map +1 -1
- package/resources/users/companies/companies.js +94 -0
- package/resources/users/companies/companies.js.map +1 -1
- package/resources/users/companies/companies.mjs +94 -0
- package/resources/users/companies/companies.mjs.map +1 -1
- package/resources/users/companies/index.d.mts +1 -1
- package/resources/users/companies/index.d.mts.map +1 -1
- package/resources/users/companies/index.d.ts +1 -1
- package/resources/users/companies/index.d.ts.map +1 -1
- package/resources/users/companies/index.js.map +1 -1
- package/resources/users/companies/index.mjs.map +1 -1
- package/resources/users/contacts/contacts.d.mts +261 -1
- package/resources/users/contacts/contacts.d.mts.map +1 -1
- package/resources/users/contacts/contacts.d.ts +261 -1
- package/resources/users/contacts/contacts.d.ts.map +1 -1
- package/resources/users/contacts/contacts.js +99 -0
- package/resources/users/contacts/contacts.js.map +1 -1
- package/resources/users/contacts/contacts.mjs +99 -0
- package/resources/users/contacts/contacts.mjs.map +1 -1
- package/resources/users/contacts/index.d.mts +1 -1
- package/resources/users/contacts/index.d.mts.map +1 -1
- package/resources/users/contacts/index.d.ts +1 -1
- package/resources/users/contacts/index.d.ts.map +1 -1
- package/resources/users/contacts/index.js.map +1 -1
- package/resources/users/contacts/index.mjs.map +1 -1
- package/resources/users/index.d.mts +2 -2
- package/resources/users/index.d.mts.map +1 -1
- package/resources/users/index.d.ts +2 -2
- package/resources/users/index.d.ts.map +1 -1
- package/resources/users/index.js.map +1 -1
- package/resources/users/index.mjs.map +1 -1
- package/resources/users/users.d.mts +4 -4
- package/resources/users/users.d.mts.map +1 -1
- package/resources/users/users.d.ts +4 -4
- package/resources/users/users.d.ts.map +1 -1
- package/resources/users/users.js.map +1 -1
- package/resources/users/users.mjs.map +1 -1
- package/src/resources/feedback/feedback.ts +4 -0
- package/src/resources/feedback/index.ts +2 -0
- package/src/resources/feedback/posts/index.ts +2 -0
- package/src/resources/feedback/posts/posts.ts +636 -0
- package/src/resources/help-center/articles.ts +686 -0
- package/src/resources/help-center/help-center.ts +4 -0
- package/src/resources/help-center/index.ts +2 -0
- package/src/resources/support/conversations/conversations.ts +14 -12
- package/src/resources/users/companies/companies.ts +289 -0
- package/src/resources/users/companies/index.ts +2 -0
- package/src/resources/users/contacts/contacts.ts +320 -0
- package/src/resources/users/contacts/index.ts +2 -0
- package/src/resources/users/index.ts +4 -0
- package/src/resources/users/users.ts +8 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -342,6 +342,137 @@ export class Articles extends APIResource {
|
|
|
342
342
|
]),
|
|
343
343
|
});
|
|
344
344
|
}
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* Search help-center articles by structured filters and/or hybrid full-text
|
|
348
|
+
* search, with sort and cursor pagination.
|
|
349
|
+
*
|
|
350
|
+
* This endpoint mirrors `POST /v2/conversations/search`. Two modes, dispatched off
|
|
351
|
+
* whether you pass `search`:
|
|
352
|
+
*
|
|
353
|
+
* - **Filter mode** (no `search`): the structured `query` AST is translated to a
|
|
354
|
+
* Mongo predicate and paginated by `sort` + cursor. Same semantics as
|
|
355
|
+
* `POST /v2/companies/search` and `POST /v2/contacts/search`.
|
|
356
|
+
* - **Search mode** (`search` set): the free-text query runs as a hybrid (vector +
|
|
357
|
+
* BM25) search against the same article namespace the help-center copilot uses.
|
|
358
|
+
* Hits are then survivor-pruned in Mongo against the structured `query` AST and
|
|
359
|
+
* `organizationId`.
|
|
360
|
+
*
|
|
361
|
+
* `query` and `search` are independent and may be combined freely. An empty body
|
|
362
|
+
* lists everything for the org.
|
|
363
|
+
*
|
|
364
|
+
* ### Hybrid full-text search (`search`)
|
|
365
|
+
*
|
|
366
|
+
* ```json
|
|
367
|
+
* { "search": "how to set up sso" }
|
|
368
|
+
* ```
|
|
369
|
+
*
|
|
370
|
+
* - Free-form text, 1–500 chars. Server-managed: no operators, no field selection.
|
|
371
|
+
* - Hybrid (vector embedding + BM25 keyword) ranking. Results are returned in
|
|
372
|
+
* relevance order unless you also pass `sort`, in which case the
|
|
373
|
+
* relevance-matched survivor set is reordered along that axis.
|
|
374
|
+
* - Top 200 ranked articles are kept per request and paginated in-memory; the same
|
|
375
|
+
* ranking is stable across pages.
|
|
376
|
+
* - May be combined with `query` to scope (e.g. `search` +
|
|
377
|
+
* `{ help_center_id = "..." }`).
|
|
378
|
+
*
|
|
379
|
+
* ### Structured query AST
|
|
380
|
+
*
|
|
381
|
+
* Each clause has the shape `{ field, operator, value }`. You can pass a single
|
|
382
|
+
* clause or wrap up to 15 in a top-level `AND` group:
|
|
383
|
+
*
|
|
384
|
+
* ```json
|
|
385
|
+
* {
|
|
386
|
+
* "query": {
|
|
387
|
+
* "operator": "AND",
|
|
388
|
+
* "value": [
|
|
389
|
+
* {
|
|
390
|
+
* "field": "help_center_id",
|
|
391
|
+
* "operator": "=",
|
|
392
|
+
* "value": "j7c5g8ah3ewxp4lo"
|
|
393
|
+
* },
|
|
394
|
+
* { "field": "state", "operator": "=", "value": "draft" },
|
|
395
|
+
* { "field": "updated_at", "operator": ">", "value": 1735689600 }
|
|
396
|
+
* ]
|
|
397
|
+
* },
|
|
398
|
+
* "sort": "updated_at:desc",
|
|
399
|
+
* "limit": 20
|
|
400
|
+
* }
|
|
401
|
+
* ```
|
|
402
|
+
*
|
|
403
|
+
* Top-level `OR` groups and nested groups are not supported in this version.
|
|
404
|
+
*
|
|
405
|
+
* ### Supported AST fields and operators
|
|
406
|
+
*
|
|
407
|
+
* | Field | Type | Operators |
|
|
408
|
+
* | ---------------- | ------------------------ | ------------------------------- |
|
|
409
|
+
* | `id` | string (article id) | `=`, `!=`, `IN`, `NIN` |
|
|
410
|
+
* | `help_center_id` | string | `=`, `!=`, `IN`, `NIN` |
|
|
411
|
+
* | `parent_id` | string (collection id) | `=`, `!=`, `IN`, `NIN` |
|
|
412
|
+
* | `author_id` | string | `=`, `!=`, `IN`, `NIN` |
|
|
413
|
+
* | `slug` | string | `=`, `!=`, `IN`, `NIN` |
|
|
414
|
+
* | `state` | enum (`live` \| `draft`) | `=`, `!=`, `IN`, `NIN` |
|
|
415
|
+
* | `created_at` | unix seconds | `=`, `!=`, `>`, `<`, `>=`, `<=` |
|
|
416
|
+
* | `updated_at` | unix seconds | `=`, `!=`, `>`, `<`, `>=`, `<=` |
|
|
417
|
+
*
|
|
418
|
+
* There is no AST-level full-text field. The string operators `~`, `!~`, `^`, `$`
|
|
419
|
+
* are reserved for future structured-text use and currently return `400` - use the
|
|
420
|
+
* top-level `search` sibling for free-text matching.
|
|
421
|
+
*
|
|
422
|
+
* `state` is derived from each help center's default-locale translation:
|
|
423
|
+
* `state = "live"` matches articles with a published `live` translation in their
|
|
424
|
+
* HC's default locale; `state = "draft"` matches the draft equivalent. Same
|
|
425
|
+
* semantics as the `state` query param on `GET /v2/help_center/articles`.
|
|
426
|
+
*
|
|
427
|
+
* ### Sort
|
|
428
|
+
*
|
|
429
|
+
* Allowed values: `created_at:desc` (default in filter mode), `created_at:asc`,
|
|
430
|
+
* `updated_at:desc`, `updated_at:asc`.
|
|
431
|
+
*
|
|
432
|
+
* In **search mode**, omitting `sort` returns results in relevance order. Passing
|
|
433
|
+
* `sort` reorders the relevance survivor set chronologically.
|
|
434
|
+
*
|
|
435
|
+
* The chosen mode + sort axis is encoded in the cursor; switching mode or axis
|
|
436
|
+
* mid-pagination returns `400 invalid_cursor`. Restart pagination without a cursor
|
|
437
|
+
* when changing.
|
|
438
|
+
*
|
|
439
|
+
* ### Pagination
|
|
440
|
+
*
|
|
441
|
+
* Cursor-based, `limit` between 1 and 100 (default 10). In filter mode,
|
|
442
|
+
* `totalCount` is approximate and capped at 5 000. In search mode, `totalCount` is
|
|
443
|
+
* exact within the 200-row top-K window and `totalCountCapped` is `true` when that
|
|
444
|
+
* cap is hit.
|
|
445
|
+
*
|
|
446
|
+
* ### Response
|
|
447
|
+
*
|
|
448
|
+
* Returns a standard list envelope with article rows identical to
|
|
449
|
+
* `GET /v2/help_center/articles/{id}` (including translations, hydrated against
|
|
450
|
+
* each article's parent help center default locale).
|
|
451
|
+
*
|
|
452
|
+
* ### Version Availability
|
|
453
|
+
*
|
|
454
|
+
* This endpoint is only available in API version 2026-01-01.nova and newer.
|
|
455
|
+
*
|
|
456
|
+
* @example
|
|
457
|
+
* ```ts
|
|
458
|
+
* const response = await client.helpCenter.articles.search();
|
|
459
|
+
* ```
|
|
460
|
+
*/
|
|
461
|
+
search(params: ArticleSearchParams, options?: RequestOptions): APIPromise<ArticleSearchResponse> {
|
|
462
|
+
const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
463
|
+
return this._client.post('/v2/help_center/articles/search', {
|
|
464
|
+
body,
|
|
465
|
+
...options,
|
|
466
|
+
headers: buildHeaders([
|
|
467
|
+
{
|
|
468
|
+
...(featurebaseVersion?.toString() != null ?
|
|
469
|
+
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
470
|
+
: undefined),
|
|
471
|
+
},
|
|
472
|
+
options?.headers,
|
|
473
|
+
]),
|
|
474
|
+
});
|
|
475
|
+
}
|
|
345
476
|
}
|
|
346
477
|
|
|
347
478
|
export type ArticlesCursorPage = CursorPage<Article>;
|
|
@@ -892,6 +1023,466 @@ export interface ArticleDeleteResponse {
|
|
|
892
1023
|
object: 'article';
|
|
893
1024
|
}
|
|
894
1025
|
|
|
1026
|
+
export interface ArticleSearchResponse {
|
|
1027
|
+
/**
|
|
1028
|
+
* Array of search results
|
|
1029
|
+
*/
|
|
1030
|
+
data: Array<ArticleSearchResponse.Data>;
|
|
1031
|
+
|
|
1032
|
+
/**
|
|
1033
|
+
* Cursor for fetching the next page (null if no more results)
|
|
1034
|
+
*/
|
|
1035
|
+
nextCursor: string | null;
|
|
1036
|
+
|
|
1037
|
+
/**
|
|
1038
|
+
* Object type identifier
|
|
1039
|
+
*/
|
|
1040
|
+
object: 'list';
|
|
1041
|
+
|
|
1042
|
+
/**
|
|
1043
|
+
* Total number of articles matching the query, capped at 5000. When the actual
|
|
1044
|
+
* total is at or above the cap, `totalCountCapped` is true and the value is
|
|
1045
|
+
* exactly the cap.
|
|
1046
|
+
*/
|
|
1047
|
+
totalCount?: number;
|
|
1048
|
+
|
|
1049
|
+
/**
|
|
1050
|
+
* True when `totalCount` is exactly the cap and the real count may be higher. UI
|
|
1051
|
+
* can render as e.g. "5000+".
|
|
1052
|
+
*/
|
|
1053
|
+
totalCountCapped?: boolean;
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
export namespace ArticleSearchResponse {
|
|
1057
|
+
export interface Data {
|
|
1058
|
+
/**
|
|
1059
|
+
* Article unique identifier
|
|
1060
|
+
*/
|
|
1061
|
+
id: string;
|
|
1062
|
+
|
|
1063
|
+
/**
|
|
1064
|
+
* Available locales
|
|
1065
|
+
*/
|
|
1066
|
+
availableLocales: Array<
|
|
1067
|
+
| 'bn'
|
|
1068
|
+
| 'bs'
|
|
1069
|
+
| 'pt-BR'
|
|
1070
|
+
| 'bg'
|
|
1071
|
+
| 'ca'
|
|
1072
|
+
| 'hr'
|
|
1073
|
+
| 'cs'
|
|
1074
|
+
| 'da'
|
|
1075
|
+
| 'nl'
|
|
1076
|
+
| 'en'
|
|
1077
|
+
| 'et'
|
|
1078
|
+
| 'fi'
|
|
1079
|
+
| 'fr'
|
|
1080
|
+
| 'de'
|
|
1081
|
+
| 'el'
|
|
1082
|
+
| 'hi'
|
|
1083
|
+
| 'hu'
|
|
1084
|
+
| 'id'
|
|
1085
|
+
| 'it'
|
|
1086
|
+
| 'ja'
|
|
1087
|
+
| 'ko'
|
|
1088
|
+
| 'lv'
|
|
1089
|
+
| 'lt'
|
|
1090
|
+
| 'ms'
|
|
1091
|
+
| 'mn'
|
|
1092
|
+
| 'nb'
|
|
1093
|
+
| 'pl'
|
|
1094
|
+
| 'pt'
|
|
1095
|
+
| 'ro'
|
|
1096
|
+
| 'ru'
|
|
1097
|
+
| 'sr'
|
|
1098
|
+
| 'zh-CN'
|
|
1099
|
+
| 'sk'
|
|
1100
|
+
| 'sl'
|
|
1101
|
+
| 'es'
|
|
1102
|
+
| 'sw'
|
|
1103
|
+
| 'sv'
|
|
1104
|
+
| 'th'
|
|
1105
|
+
| 'zh-TW'
|
|
1106
|
+
| 'tr'
|
|
1107
|
+
| 'uk'
|
|
1108
|
+
| 'vi'
|
|
1109
|
+
>;
|
|
1110
|
+
|
|
1111
|
+
/**
|
|
1112
|
+
* ISO 8601 timestamp when created
|
|
1113
|
+
*/
|
|
1114
|
+
createdAt: string;
|
|
1115
|
+
|
|
1116
|
+
/**
|
|
1117
|
+
* Help Center ID
|
|
1118
|
+
*/
|
|
1119
|
+
helpCenterId: string;
|
|
1120
|
+
|
|
1121
|
+
/**
|
|
1122
|
+
* Current locale
|
|
1123
|
+
*/
|
|
1124
|
+
locale:
|
|
1125
|
+
| 'bn'
|
|
1126
|
+
| 'bs'
|
|
1127
|
+
| 'pt-BR'
|
|
1128
|
+
| 'bg'
|
|
1129
|
+
| 'ca'
|
|
1130
|
+
| 'hr'
|
|
1131
|
+
| 'cs'
|
|
1132
|
+
| 'da'
|
|
1133
|
+
| 'nl'
|
|
1134
|
+
| 'en'
|
|
1135
|
+
| 'et'
|
|
1136
|
+
| 'fi'
|
|
1137
|
+
| 'fr'
|
|
1138
|
+
| 'de'
|
|
1139
|
+
| 'el'
|
|
1140
|
+
| 'hi'
|
|
1141
|
+
| 'hu'
|
|
1142
|
+
| 'id'
|
|
1143
|
+
| 'it'
|
|
1144
|
+
| 'ja'
|
|
1145
|
+
| 'ko'
|
|
1146
|
+
| 'lv'
|
|
1147
|
+
| 'lt'
|
|
1148
|
+
| 'ms'
|
|
1149
|
+
| 'mn'
|
|
1150
|
+
| 'nb'
|
|
1151
|
+
| 'pl'
|
|
1152
|
+
| 'pt'
|
|
1153
|
+
| 'ro'
|
|
1154
|
+
| 'ru'
|
|
1155
|
+
| 'sr'
|
|
1156
|
+
| 'zh-CN'
|
|
1157
|
+
| 'sk'
|
|
1158
|
+
| 'sl'
|
|
1159
|
+
| 'es'
|
|
1160
|
+
| 'sw'
|
|
1161
|
+
| 'sv'
|
|
1162
|
+
| 'th'
|
|
1163
|
+
| 'zh-TW'
|
|
1164
|
+
| 'tr'
|
|
1165
|
+
| 'uk'
|
|
1166
|
+
| 'vi';
|
|
1167
|
+
|
|
1168
|
+
/**
|
|
1169
|
+
* Object type identifier
|
|
1170
|
+
*/
|
|
1171
|
+
object: 'article';
|
|
1172
|
+
|
|
1173
|
+
/**
|
|
1174
|
+
* Organization ID
|
|
1175
|
+
*/
|
|
1176
|
+
organization: string;
|
|
1177
|
+
|
|
1178
|
+
/**
|
|
1179
|
+
* Article state
|
|
1180
|
+
*/
|
|
1181
|
+
state: 'live' | 'draft';
|
|
1182
|
+
|
|
1183
|
+
/**
|
|
1184
|
+
* ISO 8601 timestamp when last updated
|
|
1185
|
+
*/
|
|
1186
|
+
updatedAt: string;
|
|
1187
|
+
|
|
1188
|
+
/**
|
|
1189
|
+
* Article author
|
|
1190
|
+
*/
|
|
1191
|
+
author?: ArticlesAPI.ArticleAuthor;
|
|
1192
|
+
|
|
1193
|
+
/**
|
|
1194
|
+
* Article body content (HTML)
|
|
1195
|
+
*/
|
|
1196
|
+
body?: string;
|
|
1197
|
+
|
|
1198
|
+
/**
|
|
1199
|
+
* Default locale
|
|
1200
|
+
*/
|
|
1201
|
+
defaultLocale?:
|
|
1202
|
+
| 'bn'
|
|
1203
|
+
| 'bs'
|
|
1204
|
+
| 'pt-BR'
|
|
1205
|
+
| 'bg'
|
|
1206
|
+
| 'ca'
|
|
1207
|
+
| 'hr'
|
|
1208
|
+
| 'cs'
|
|
1209
|
+
| 'da'
|
|
1210
|
+
| 'nl'
|
|
1211
|
+
| 'en'
|
|
1212
|
+
| 'et'
|
|
1213
|
+
| 'fi'
|
|
1214
|
+
| 'fr'
|
|
1215
|
+
| 'de'
|
|
1216
|
+
| 'el'
|
|
1217
|
+
| 'hi'
|
|
1218
|
+
| 'hu'
|
|
1219
|
+
| 'id'
|
|
1220
|
+
| 'it'
|
|
1221
|
+
| 'ja'
|
|
1222
|
+
| 'ko'
|
|
1223
|
+
| 'lv'
|
|
1224
|
+
| 'lt'
|
|
1225
|
+
| 'ms'
|
|
1226
|
+
| 'mn'
|
|
1227
|
+
| 'nb'
|
|
1228
|
+
| 'pl'
|
|
1229
|
+
| 'pt'
|
|
1230
|
+
| 'ro'
|
|
1231
|
+
| 'ru'
|
|
1232
|
+
| 'sr'
|
|
1233
|
+
| 'zh-CN'
|
|
1234
|
+
| 'sk'
|
|
1235
|
+
| 'sl'
|
|
1236
|
+
| 'es'
|
|
1237
|
+
| 'sw'
|
|
1238
|
+
| 'sv'
|
|
1239
|
+
| 'th'
|
|
1240
|
+
| 'zh-TW'
|
|
1241
|
+
| 'tr'
|
|
1242
|
+
| 'uk'
|
|
1243
|
+
| 'vi';
|
|
1244
|
+
|
|
1245
|
+
/**
|
|
1246
|
+
* Article description
|
|
1247
|
+
*/
|
|
1248
|
+
description?: string;
|
|
1249
|
+
|
|
1250
|
+
/**
|
|
1251
|
+
* External URL
|
|
1252
|
+
*/
|
|
1253
|
+
externalUrl?: string;
|
|
1254
|
+
|
|
1255
|
+
/**
|
|
1256
|
+
* Featurebase URL
|
|
1257
|
+
*/
|
|
1258
|
+
featurebaseUrl?: string;
|
|
1259
|
+
|
|
1260
|
+
/**
|
|
1261
|
+
* Article icon
|
|
1262
|
+
*/
|
|
1263
|
+
icon?: Data.Icon | null;
|
|
1264
|
+
|
|
1265
|
+
/**
|
|
1266
|
+
* Whether draft differs from live
|
|
1267
|
+
*/
|
|
1268
|
+
isDraftDiffersFromLive?: boolean;
|
|
1269
|
+
|
|
1270
|
+
/**
|
|
1271
|
+
* Whether the article is published
|
|
1272
|
+
*/
|
|
1273
|
+
isPublished?: boolean;
|
|
1274
|
+
|
|
1275
|
+
/**
|
|
1276
|
+
* ISO 8601 timestamp when live version was last updated
|
|
1277
|
+
*/
|
|
1278
|
+
liveUpdatedAt?: string;
|
|
1279
|
+
|
|
1280
|
+
/**
|
|
1281
|
+
* Display order
|
|
1282
|
+
*/
|
|
1283
|
+
order?: number | null;
|
|
1284
|
+
|
|
1285
|
+
/**
|
|
1286
|
+
* Parent collection ID
|
|
1287
|
+
*/
|
|
1288
|
+
parentId?: string | null;
|
|
1289
|
+
|
|
1290
|
+
/**
|
|
1291
|
+
* Path to article within help center hierarchy
|
|
1292
|
+
*/
|
|
1293
|
+
path?: string;
|
|
1294
|
+
|
|
1295
|
+
/**
|
|
1296
|
+
* Published locales
|
|
1297
|
+
*/
|
|
1298
|
+
publishedLocales?: Array<
|
|
1299
|
+
| 'bn'
|
|
1300
|
+
| 'bs'
|
|
1301
|
+
| 'pt-BR'
|
|
1302
|
+
| 'bg'
|
|
1303
|
+
| 'ca'
|
|
1304
|
+
| 'hr'
|
|
1305
|
+
| 'cs'
|
|
1306
|
+
| 'da'
|
|
1307
|
+
| 'nl'
|
|
1308
|
+
| 'en'
|
|
1309
|
+
| 'et'
|
|
1310
|
+
| 'fi'
|
|
1311
|
+
| 'fr'
|
|
1312
|
+
| 'de'
|
|
1313
|
+
| 'el'
|
|
1314
|
+
| 'hi'
|
|
1315
|
+
| 'hu'
|
|
1316
|
+
| 'id'
|
|
1317
|
+
| 'it'
|
|
1318
|
+
| 'ja'
|
|
1319
|
+
| 'ko'
|
|
1320
|
+
| 'lv'
|
|
1321
|
+
| 'lt'
|
|
1322
|
+
| 'ms'
|
|
1323
|
+
| 'mn'
|
|
1324
|
+
| 'nb'
|
|
1325
|
+
| 'pl'
|
|
1326
|
+
| 'pt'
|
|
1327
|
+
| 'ro'
|
|
1328
|
+
| 'ru'
|
|
1329
|
+
| 'sr'
|
|
1330
|
+
| 'zh-CN'
|
|
1331
|
+
| 'sk'
|
|
1332
|
+
| 'sl'
|
|
1333
|
+
| 'es'
|
|
1334
|
+
| 'sw'
|
|
1335
|
+
| 'sv'
|
|
1336
|
+
| 'th'
|
|
1337
|
+
| 'zh-TW'
|
|
1338
|
+
| 'tr'
|
|
1339
|
+
| 'uk'
|
|
1340
|
+
| 'vi'
|
|
1341
|
+
>;
|
|
1342
|
+
|
|
1343
|
+
/**
|
|
1344
|
+
* URL slug
|
|
1345
|
+
*/
|
|
1346
|
+
slug?: string;
|
|
1347
|
+
|
|
1348
|
+
/**
|
|
1349
|
+
* Associated survey ID
|
|
1350
|
+
*/
|
|
1351
|
+
surveyId?: string;
|
|
1352
|
+
|
|
1353
|
+
/**
|
|
1354
|
+
* Article title
|
|
1355
|
+
*/
|
|
1356
|
+
title?: string;
|
|
1357
|
+
|
|
1358
|
+
/**
|
|
1359
|
+
* ISO 8601 timestamp when translation was created
|
|
1360
|
+
*/
|
|
1361
|
+
translationCreatedAt?: string;
|
|
1362
|
+
|
|
1363
|
+
/**
|
|
1364
|
+
* Translations by locale code
|
|
1365
|
+
*/
|
|
1366
|
+
translations?: Data.Translations;
|
|
1367
|
+
|
|
1368
|
+
/**
|
|
1369
|
+
* ISO 8601 timestamp when translation was last updated
|
|
1370
|
+
*/
|
|
1371
|
+
translationUpdatedAt?: string;
|
|
1372
|
+
|
|
1373
|
+
/**
|
|
1374
|
+
* Visibility settings
|
|
1375
|
+
*/
|
|
1376
|
+
visibleBy?: Array<string>;
|
|
1377
|
+
}
|
|
1378
|
+
|
|
1379
|
+
export namespace Data {
|
|
1380
|
+
/**
|
|
1381
|
+
* Article icon
|
|
1382
|
+
*/
|
|
1383
|
+
export interface Icon {
|
|
1384
|
+
/**
|
|
1385
|
+
* Icon type
|
|
1386
|
+
*/
|
|
1387
|
+
type: 'emoji' | 'custom';
|
|
1388
|
+
|
|
1389
|
+
/**
|
|
1390
|
+
* Icon value (emoji or URL)
|
|
1391
|
+
*/
|
|
1392
|
+
value: string;
|
|
1393
|
+
}
|
|
1394
|
+
|
|
1395
|
+
/**
|
|
1396
|
+
* Translations by locale code
|
|
1397
|
+
*/
|
|
1398
|
+
export interface Translations {
|
|
1399
|
+
id?: ArticlesAPI.ArticleTranslation;
|
|
1400
|
+
|
|
1401
|
+
bg?: ArticlesAPI.ArticleTranslation;
|
|
1402
|
+
|
|
1403
|
+
bn?: ArticlesAPI.ArticleTranslation;
|
|
1404
|
+
|
|
1405
|
+
bs?: ArticlesAPI.ArticleTranslation;
|
|
1406
|
+
|
|
1407
|
+
ca?: ArticlesAPI.ArticleTranslation;
|
|
1408
|
+
|
|
1409
|
+
cs?: ArticlesAPI.ArticleTranslation;
|
|
1410
|
+
|
|
1411
|
+
da?: ArticlesAPI.ArticleTranslation;
|
|
1412
|
+
|
|
1413
|
+
de?: ArticlesAPI.ArticleTranslation;
|
|
1414
|
+
|
|
1415
|
+
el?: ArticlesAPI.ArticleTranslation;
|
|
1416
|
+
|
|
1417
|
+
en?: ArticlesAPI.ArticleTranslation;
|
|
1418
|
+
|
|
1419
|
+
es?: ArticlesAPI.ArticleTranslation;
|
|
1420
|
+
|
|
1421
|
+
et?: ArticlesAPI.ArticleTranslation;
|
|
1422
|
+
|
|
1423
|
+
fi?: ArticlesAPI.ArticleTranslation;
|
|
1424
|
+
|
|
1425
|
+
fr?: ArticlesAPI.ArticleTranslation;
|
|
1426
|
+
|
|
1427
|
+
hi?: ArticlesAPI.ArticleTranslation;
|
|
1428
|
+
|
|
1429
|
+
hr?: ArticlesAPI.ArticleTranslation;
|
|
1430
|
+
|
|
1431
|
+
hu?: ArticlesAPI.ArticleTranslation;
|
|
1432
|
+
|
|
1433
|
+
it?: ArticlesAPI.ArticleTranslation;
|
|
1434
|
+
|
|
1435
|
+
ja?: ArticlesAPI.ArticleTranslation;
|
|
1436
|
+
|
|
1437
|
+
ko?: ArticlesAPI.ArticleTranslation;
|
|
1438
|
+
|
|
1439
|
+
lt?: ArticlesAPI.ArticleTranslation;
|
|
1440
|
+
|
|
1441
|
+
lv?: ArticlesAPI.ArticleTranslation;
|
|
1442
|
+
|
|
1443
|
+
mn?: ArticlesAPI.ArticleTranslation;
|
|
1444
|
+
|
|
1445
|
+
ms?: ArticlesAPI.ArticleTranslation;
|
|
1446
|
+
|
|
1447
|
+
nb?: ArticlesAPI.ArticleTranslation;
|
|
1448
|
+
|
|
1449
|
+
nl?: ArticlesAPI.ArticleTranslation;
|
|
1450
|
+
|
|
1451
|
+
pl?: ArticlesAPI.ArticleTranslation;
|
|
1452
|
+
|
|
1453
|
+
pt?: ArticlesAPI.ArticleTranslation;
|
|
1454
|
+
|
|
1455
|
+
'pt-BR'?: ArticlesAPI.ArticleTranslation;
|
|
1456
|
+
|
|
1457
|
+
ro?: ArticlesAPI.ArticleTranslation;
|
|
1458
|
+
|
|
1459
|
+
ru?: ArticlesAPI.ArticleTranslation;
|
|
1460
|
+
|
|
1461
|
+
sk?: ArticlesAPI.ArticleTranslation;
|
|
1462
|
+
|
|
1463
|
+
sl?: ArticlesAPI.ArticleTranslation;
|
|
1464
|
+
|
|
1465
|
+
sr?: ArticlesAPI.ArticleTranslation;
|
|
1466
|
+
|
|
1467
|
+
sv?: ArticlesAPI.ArticleTranslation;
|
|
1468
|
+
|
|
1469
|
+
sw?: ArticlesAPI.ArticleTranslation;
|
|
1470
|
+
|
|
1471
|
+
th?: ArticlesAPI.ArticleTranslation;
|
|
1472
|
+
|
|
1473
|
+
tr?: ArticlesAPI.ArticleTranslation;
|
|
1474
|
+
|
|
1475
|
+
uk?: ArticlesAPI.ArticleTranslation;
|
|
1476
|
+
|
|
1477
|
+
vi?: ArticlesAPI.ArticleTranslation;
|
|
1478
|
+
|
|
1479
|
+
'zh-CN'?: ArticlesAPI.ArticleTranslation;
|
|
1480
|
+
|
|
1481
|
+
'zh-TW'?: ArticlesAPI.ArticleTranslation;
|
|
1482
|
+
}
|
|
1483
|
+
}
|
|
1484
|
+
}
|
|
1485
|
+
|
|
895
1486
|
export interface ArticleCreateParams {
|
|
896
1487
|
/**
|
|
897
1488
|
* Body param: The title of the article
|
|
@@ -1238,6 +1829,99 @@ export interface ArticleDeleteParams {
|
|
|
1238
1829
|
'Featurebase-Version'?: '2026-01-01.nova' | '2025-12-12.clover';
|
|
1239
1830
|
}
|
|
1240
1831
|
|
|
1832
|
+
export interface ArticleSearchParams {
|
|
1833
|
+
/**
|
|
1834
|
+
* Body param: An opaque cursor for pagination. Use the `nextCursor` value from a
|
|
1835
|
+
* previous response to fetch the next page of results. The pagination keyset
|
|
1836
|
+
* (relevance score in search mode, sort-axis value in filter mode) is encoded in
|
|
1837
|
+
* the cursor; switching mode mid-pagination returns `400 invalid_cursor`.
|
|
1838
|
+
*/
|
|
1839
|
+
cursor?: string;
|
|
1840
|
+
|
|
1841
|
+
/**
|
|
1842
|
+
* Body param: A limit on the number of objects to be returned, between 1 and 100.
|
|
1843
|
+
*/
|
|
1844
|
+
limit?: number;
|
|
1845
|
+
|
|
1846
|
+
/**
|
|
1847
|
+
* Body param: Structured filter AST. Either a single filter clause or one
|
|
1848
|
+
* top-level AND group (max 15 clauses). Top-level OR groups are not yet supported.
|
|
1849
|
+
*/
|
|
1850
|
+
query?: ArticleSearchParams.SearchFilter | ArticleSearchParams.SearchFilterGroup;
|
|
1851
|
+
|
|
1852
|
+
/**
|
|
1853
|
+
* Body param: Plain-text full-text search across article title, description, and
|
|
1854
|
+
* body. Hybrid (vector + BM25) ranking via the same Turbopuffer namespace the
|
|
1855
|
+
* help-center copilot uses - server-managed, no operators, no field selection.
|
|
1856
|
+
* When set, results come back ranked by relevance unless `sort` is also passed (in
|
|
1857
|
+
* which case the relevance-matched set is reordered along that axis).
|
|
1858
|
+
*/
|
|
1859
|
+
search?: string;
|
|
1860
|
+
|
|
1861
|
+
/**
|
|
1862
|
+
* Body param: Sort field + direction. Defaults to `created_at:desc`. The chosen
|
|
1863
|
+
* sort axis is encoded in the cursor; switching `sort` mid-pagination returns
|
|
1864
|
+
* `400 invalid_cursor`.
|
|
1865
|
+
*/
|
|
1866
|
+
sort?: 'created_at:desc' | 'created_at:asc' | 'updated_at:desc' | 'updated_at:asc';
|
|
1867
|
+
|
|
1868
|
+
/**
|
|
1869
|
+
* Header param: API version for this request. Defaults to your organization's
|
|
1870
|
+
* configured API version if not specified.
|
|
1871
|
+
*/
|
|
1872
|
+
'Featurebase-Version'?: '2026-01-01.nova' | '2025-12-12.clover';
|
|
1873
|
+
}
|
|
1874
|
+
|
|
1875
|
+
export namespace ArticleSearchParams {
|
|
1876
|
+
export interface SearchFilter {
|
|
1877
|
+
/**
|
|
1878
|
+
* Field name to filter on (e.g. `state`, `tag_ids`, `created_at`)
|
|
1879
|
+
*/
|
|
1880
|
+
field: string;
|
|
1881
|
+
|
|
1882
|
+
/**
|
|
1883
|
+
* Comparison operator
|
|
1884
|
+
*/
|
|
1885
|
+
operator: '=' | '!=' | 'IN' | 'NIN' | '>' | '<' | '>=' | '<=' | '~' | '!~' | '^' | '$';
|
|
1886
|
+
|
|
1887
|
+
/**
|
|
1888
|
+
* Value to compare against (primitive or array of primitives)
|
|
1889
|
+
*/
|
|
1890
|
+
value: string | number | boolean | Array<string | number> | null;
|
|
1891
|
+
}
|
|
1892
|
+
|
|
1893
|
+
export interface SearchFilterGroup {
|
|
1894
|
+
/**
|
|
1895
|
+
* Group operator: AND (all match) or OR (any match)
|
|
1896
|
+
*/
|
|
1897
|
+
operator: 'AND' | 'OR';
|
|
1898
|
+
|
|
1899
|
+
/**
|
|
1900
|
+
* Array of filter clauses (1-15 entries)
|
|
1901
|
+
*/
|
|
1902
|
+
value: Array<SearchFilterGroup.Value>;
|
|
1903
|
+
}
|
|
1904
|
+
|
|
1905
|
+
export namespace SearchFilterGroup {
|
|
1906
|
+
export interface Value {
|
|
1907
|
+
/**
|
|
1908
|
+
* Field name to filter on (e.g. `state`, `tag_ids`, `created_at`)
|
|
1909
|
+
*/
|
|
1910
|
+
field: string;
|
|
1911
|
+
|
|
1912
|
+
/**
|
|
1913
|
+
* Comparison operator
|
|
1914
|
+
*/
|
|
1915
|
+
operator: '=' | '!=' | 'IN' | 'NIN' | '>' | '<' | '>=' | '<=' | '~' | '!~' | '^' | '$';
|
|
1916
|
+
|
|
1917
|
+
/**
|
|
1918
|
+
* Value to compare against (primitive or array of primitives)
|
|
1919
|
+
*/
|
|
1920
|
+
value: string | number | boolean | Array<string | number> | null;
|
|
1921
|
+
}
|
|
1922
|
+
}
|
|
1923
|
+
}
|
|
1924
|
+
|
|
1241
1925
|
export declare namespace Articles {
|
|
1242
1926
|
export {
|
|
1243
1927
|
type Article as Article,
|
|
@@ -1246,11 +1930,13 @@ export declare namespace Articles {
|
|
|
1246
1930
|
type ArticleTranslation as ArticleTranslation,
|
|
1247
1931
|
type ArticleTranslationInputNova as ArticleTranslationInputNova,
|
|
1248
1932
|
type ArticleDeleteResponse as ArticleDeleteResponse,
|
|
1933
|
+
type ArticleSearchResponse as ArticleSearchResponse,
|
|
1249
1934
|
type ArticlesCursorPage as ArticlesCursorPage,
|
|
1250
1935
|
type ArticleCreateParams as ArticleCreateParams,
|
|
1251
1936
|
type ArticleRetrieveParams as ArticleRetrieveParams,
|
|
1252
1937
|
type ArticleUpdateParams as ArticleUpdateParams,
|
|
1253
1938
|
type ArticleListParams as ArticleListParams,
|
|
1254
1939
|
type ArticleDeleteParams as ArticleDeleteParams,
|
|
1940
|
+
type ArticleSearchParams as ArticleSearchParams,
|
|
1255
1941
|
};
|
|
1256
1942
|
}
|