featurebase-node 0.14.1 → 0.14.3
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 +8 -0
- package/package.json +1 -1
- package/resources/audit-logs.d.mts +2 -2
- package/resources/audit-logs.d.mts.map +1 -1
- package/resources/audit-logs.d.ts +2 -2
- package/resources/audit-logs.d.ts.map +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 +68 -1
- package/resources/feedback/posts/posts.d.mts.map +1 -1
- package/resources/feedback/posts/posts.d.ts +68 -1
- package/resources/feedback/posts/posts.d.ts.map +1 -1
- package/resources/feedback/posts/posts.js +69 -0
- package/resources/feedback/posts/posts.js.map +1 -1
- package/resources/feedback/posts/posts.mjs +69 -0
- package/resources/feedback/posts/posts.mjs.map +1 -1
- package/resources/help-center/articles.d.mts +248 -11
- package/resources/help-center/articles.d.mts.map +1 -1
- package/resources/help-center/articles.d.ts +248 -11
- package/resources/help-center/articles.d.ts.map +1 -1
- package/resources/help-center/articles.js +78 -0
- package/resources/help-center/articles.js.map +1 -1
- package/resources/help-center/articles.mjs +78 -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/reports.d.mts +227 -15
- package/resources/reports.d.mts.map +1 -1
- package/resources/reports.d.ts +227 -15
- package/resources/reports.d.ts.map +1 -1
- package/resources/reports.js +36 -8
- package/resources/reports.js.map +1 -1
- package/resources/reports.mjs +36 -8
- package/resources/reports.mjs.map +1 -1
- package/resources/support/conversations/conversations.d.mts +60 -19
- package/resources/support/conversations/conversations.d.mts.map +1 -1
- package/resources/support/conversations/conversations.d.ts +60 -19
- package/resources/support/conversations/conversations.d.ts.map +1 -1
- package/resources/support/conversations/conversations.js +47 -12
- package/resources/support/conversations/conversations.js.map +1 -1
- package/resources/support/conversations/conversations.mjs +47 -12
- package/resources/support/conversations/conversations.mjs.map +1 -1
- package/resources/users/contacts/contacts.d.mts +2 -2
- package/resources/users/contacts/contacts.d.ts +2 -2
- package/resources/users/contacts/contacts.js +1 -1
- package/resources/users/contacts/contacts.mjs +1 -1
- package/src/resources/audit-logs.ts +2 -0
- 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 +104 -0
- package/src/resources/help-center/articles.ts +380 -10
- package/src/resources/help-center/help-center.ts +8 -0
- package/src/resources/help-center/index.ts +4 -0
- package/src/resources/reports.ts +304 -14
- package/src/resources/support/conversations/conversations.ts +60 -19
- package/src/resources/users/contacts/contacts.ts +2 -2
- 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
|
@@ -344,6 +344,89 @@ export class Articles extends APIResource {
|
|
|
344
344
|
});
|
|
345
345
|
}
|
|
346
346
|
|
|
347
|
+
/**
|
|
348
|
+
* Surgically edit an article's body with a find/replace instruction, without
|
|
349
|
+
* re-uploading the whole HTML. Designed for AI agents doing high-precision,
|
|
350
|
+
* byte-stable edits (e.g. renaming a product across many articles).
|
|
351
|
+
*
|
|
352
|
+
* ### Two-tier matching
|
|
353
|
+
*
|
|
354
|
+
* Matching runs against the article's **stored** body and is tried in two tiers:
|
|
355
|
+
*
|
|
356
|
+
* 1. **Text nodes only** (`mode: "text"`, preferred): `oldText` is matched only
|
|
357
|
+
* inside visible text — markup, tags, and attributes are never searched or
|
|
358
|
+
* altered, so the result is byte-identical everywhere outside the replaced
|
|
359
|
+
* spans. Matching is entity-aware, so `oldText: "A & B"` matches a stored
|
|
360
|
+
* `A & B`.
|
|
361
|
+
* 2. **Raw markup fallback** (`mode: "html"`): only used when tier 1 finds
|
|
362
|
+
* nothing. `oldText` is matched as a literal substring over the raw body string
|
|
363
|
+
* (markup included), so you can swap an attribute value or tag. Because this
|
|
364
|
+
* can introduce markup, the full result is re-run through the XSS sanitizer
|
|
365
|
+
* before it is stored.
|
|
366
|
+
*
|
|
367
|
+
* Do **not** include `<img>` tags in `oldText` — their stored `src` differs from
|
|
368
|
+
* the API representation and will not match.
|
|
369
|
+
*
|
|
370
|
+
* ### Uniqueness rule
|
|
371
|
+
*
|
|
372
|
+
* By default the edit requires `oldText` to match **exactly once** and returns
|
|
373
|
+
* `400` if it is ambiguous. To edit multiple occurrences, either set
|
|
374
|
+
* `replaceAll: true` or assert the exact count with `expectedReplacements` (which
|
|
375
|
+
* takes precedence over `replaceAll`).
|
|
376
|
+
*
|
|
377
|
+
* ### Dry-run workflow
|
|
378
|
+
*
|
|
379
|
+
* Set `dryRun: true` to preview: the response reports the match count, the
|
|
380
|
+
* matching `mode`, and `previews` (each changed span framed by surrounding
|
|
381
|
+
* context) without writing. Recommended flow for bulk edits: dry-run across the
|
|
382
|
+
* target articles first, confirm the counts and previews, then re-issue each call
|
|
383
|
+
* with `dryRun: false`.
|
|
384
|
+
*
|
|
385
|
+
* ### Target
|
|
386
|
+
*
|
|
387
|
+
* `target: "draft"` (default) edits the unpublished draft. `target: "live"` edits
|
|
388
|
+
* the published content directly — this records a history snapshot and purges the
|
|
389
|
+
* public edge cache, mirroring a publish.
|
|
390
|
+
*
|
|
391
|
+
* ### Retry semantics
|
|
392
|
+
*
|
|
393
|
+
* Calls are not idempotent — after a timeout, re-read the article (or dry-run)
|
|
394
|
+
* before retrying; with the default unique-match mode a duplicate retry fails
|
|
395
|
+
* safely unless `newText` still contains `oldText`.
|
|
396
|
+
*
|
|
397
|
+
* ### Version Availability
|
|
398
|
+
*
|
|
399
|
+
* This endpoint is only available in API version 2026-01-01.nova and newer.
|
|
400
|
+
*
|
|
401
|
+
* @example
|
|
402
|
+
* ```ts
|
|
403
|
+
* const editArticleBodyResponse =
|
|
404
|
+
* await client.helpCenter.articles.editBody('1234567', {
|
|
405
|
+
* newText: 'New Product Name',
|
|
406
|
+
* oldText: 'Old Product Name',
|
|
407
|
+
* });
|
|
408
|
+
* ```
|
|
409
|
+
*/
|
|
410
|
+
editBody(
|
|
411
|
+
id: string,
|
|
412
|
+
params: ArticleEditBodyParams,
|
|
413
|
+
options?: RequestOptions,
|
|
414
|
+
): APIPromise<EditArticleBodyResponse> {
|
|
415
|
+
const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
416
|
+
return this._client.post(path`/v2/help_center/articles/${id}/edit_body`, {
|
|
417
|
+
body,
|
|
418
|
+
...options,
|
|
419
|
+
headers: buildHeaders([
|
|
420
|
+
{
|
|
421
|
+
...(featurebaseVersion?.toString() != null ?
|
|
422
|
+
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
423
|
+
: undefined),
|
|
424
|
+
},
|
|
425
|
+
options?.headers,
|
|
426
|
+
]),
|
|
427
|
+
});
|
|
428
|
+
}
|
|
429
|
+
|
|
347
430
|
/**
|
|
348
431
|
* Search help-center articles by structured filters and/or hybrid full-text
|
|
349
432
|
* search, with sort and cursor pagination.
|
|
@@ -1007,6 +1090,172 @@ export interface ArticleTranslationInputNova {
|
|
|
1007
1090
|
title?: string;
|
|
1008
1091
|
}
|
|
1009
1092
|
|
|
1093
|
+
export interface EditArticleBodyBody {
|
|
1094
|
+
/**
|
|
1095
|
+
* Replacement text. Keep this to a fragment, not a whole document (max 10000
|
|
1096
|
+
* chars). May be an empty string to delete the matched fragment. When the match
|
|
1097
|
+
* came from tier 2 (raw markup), the full resulting body is re-run through the XSS
|
|
1098
|
+
* sanitizer, so any dangerous markup in `newText` is stripped. Images inserted via
|
|
1099
|
+
* edit_body are not uploaded to Featurebase storage — use articles.update with
|
|
1100
|
+
* formatter 'raw' for image changes.
|
|
1101
|
+
*/
|
|
1102
|
+
newText: string;
|
|
1103
|
+
|
|
1104
|
+
/**
|
|
1105
|
+
* Exact fragment to find in the stored article body. Keep this to a fragment, not
|
|
1106
|
+
* a whole document (max 10000 chars). Tier 1 matches only inside TEXT nodes
|
|
1107
|
+
* (markup, tags, and attributes are never searched or altered) and is
|
|
1108
|
+
* entity-aware, so `oldText: "A & B"` matches a stored `A & B`. If tier 1
|
|
1109
|
+
* finds nothing, tier 2 falls back to a literal substring match over the raw body
|
|
1110
|
+
* string (markup included). Do NOT include `<img>` tags — their stored `src`
|
|
1111
|
+
* differs from the API representation and will not match.
|
|
1112
|
+
*/
|
|
1113
|
+
oldText: string;
|
|
1114
|
+
|
|
1115
|
+
/**
|
|
1116
|
+
* Preview the edit without writing. Returns the match count, matching `mode`, and
|
|
1117
|
+
* `previews` (changed spans with surrounding context) so an agent can verify the
|
|
1118
|
+
* edit before committing. Recommended workflow: dry-run across a set of articles
|
|
1119
|
+
* first, confirm the counts and previews, then re-issue each call with
|
|
1120
|
+
* `dryRun: false`.
|
|
1121
|
+
*/
|
|
1122
|
+
dryRun?: boolean;
|
|
1123
|
+
|
|
1124
|
+
/**
|
|
1125
|
+
* Assert the exact number of matches. When set, the edit replaces all matches only
|
|
1126
|
+
* if the count is exactly this value, otherwise it returns `400`. Takes precedence
|
|
1127
|
+
* over `replaceAll`. Use this to make bulk edits safe: dry-run first to learn the
|
|
1128
|
+
* count, then commit with the expected number.
|
|
1129
|
+
*/
|
|
1130
|
+
expectedReplacements?: number;
|
|
1131
|
+
|
|
1132
|
+
/**
|
|
1133
|
+
* Locale of the body to edit. Defaults to the help center's default locale.
|
|
1134
|
+
*/
|
|
1135
|
+
locale?:
|
|
1136
|
+
| 'bn'
|
|
1137
|
+
| 'bs'
|
|
1138
|
+
| 'pt-BR'
|
|
1139
|
+
| 'bg'
|
|
1140
|
+
| 'ca'
|
|
1141
|
+
| 'hr'
|
|
1142
|
+
| 'cs'
|
|
1143
|
+
| 'da'
|
|
1144
|
+
| 'nl'
|
|
1145
|
+
| 'en'
|
|
1146
|
+
| 'et'
|
|
1147
|
+
| 'fi'
|
|
1148
|
+
| 'fr'
|
|
1149
|
+
| 'de'
|
|
1150
|
+
| 'el'
|
|
1151
|
+
| 'hi'
|
|
1152
|
+
| 'hu'
|
|
1153
|
+
| 'id'
|
|
1154
|
+
| 'it'
|
|
1155
|
+
| 'ja'
|
|
1156
|
+
| 'ko'
|
|
1157
|
+
| 'lv'
|
|
1158
|
+
| 'lt'
|
|
1159
|
+
| 'ms'
|
|
1160
|
+
| 'mn'
|
|
1161
|
+
| 'nb'
|
|
1162
|
+
| 'pl'
|
|
1163
|
+
| 'pt'
|
|
1164
|
+
| 'ro'
|
|
1165
|
+
| 'ru'
|
|
1166
|
+
| 'sr'
|
|
1167
|
+
| 'zh-CN'
|
|
1168
|
+
| 'sk'
|
|
1169
|
+
| 'sl'
|
|
1170
|
+
| 'es'
|
|
1171
|
+
| 'sw'
|
|
1172
|
+
| 'sv'
|
|
1173
|
+
| 'th'
|
|
1174
|
+
| 'zh-TW'
|
|
1175
|
+
| 'tr'
|
|
1176
|
+
| 'uk'
|
|
1177
|
+
| 'vi';
|
|
1178
|
+
|
|
1179
|
+
/**
|
|
1180
|
+
* Replace every match. When omitted (or false) and `expectedReplacements` is not
|
|
1181
|
+
* set, the edit requires exactly one match and returns `400` if `oldText` is
|
|
1182
|
+
* ambiguous (found more than once). Provide more surrounding context in `oldText`
|
|
1183
|
+
* to make a unique match, or set this to true.
|
|
1184
|
+
*/
|
|
1185
|
+
replaceAll?: boolean;
|
|
1186
|
+
|
|
1187
|
+
/**
|
|
1188
|
+
* Which body to edit: the unpublished `draft` (default) or the published `live`
|
|
1189
|
+
* content. Editing `live` records a history snapshot and purges the public edge
|
|
1190
|
+
* cache, mirroring a publish.
|
|
1191
|
+
*/
|
|
1192
|
+
target?: 'draft' | 'live';
|
|
1193
|
+
}
|
|
1194
|
+
|
|
1195
|
+
export interface EditArticleBodyPreview {
|
|
1196
|
+
/**
|
|
1197
|
+
* The same span and window after the edit.
|
|
1198
|
+
*/
|
|
1199
|
+
after: string;
|
|
1200
|
+
|
|
1201
|
+
/**
|
|
1202
|
+
* The changed span framed by up to 60 characters of surrounding context, before
|
|
1203
|
+
* the edit.
|
|
1204
|
+
*/
|
|
1205
|
+
before: string;
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
export interface EditArticleBodyResponse {
|
|
1209
|
+
/**
|
|
1210
|
+
* The edited article id
|
|
1211
|
+
*/
|
|
1212
|
+
id: string;
|
|
1213
|
+
|
|
1214
|
+
/**
|
|
1215
|
+
* Whether this was a preview (no write performed)
|
|
1216
|
+
*/
|
|
1217
|
+
dryRun: boolean;
|
|
1218
|
+
|
|
1219
|
+
/**
|
|
1220
|
+
* Locale that was edited
|
|
1221
|
+
*/
|
|
1222
|
+
locale: string;
|
|
1223
|
+
|
|
1224
|
+
/**
|
|
1225
|
+
* Number of matches found for `oldText`
|
|
1226
|
+
*/
|
|
1227
|
+
matches: number;
|
|
1228
|
+
|
|
1229
|
+
/**
|
|
1230
|
+
* Which matching tier applied. `text` = text-node-only, byte-stable (markup
|
|
1231
|
+
* untouched). `html` = raw-markup fallback (result re-sanitized). Tier 1 (`text`)
|
|
1232
|
+
* is always attempted first.
|
|
1233
|
+
*/
|
|
1234
|
+
mode: 'text' | 'html';
|
|
1235
|
+
|
|
1236
|
+
/**
|
|
1237
|
+
* Object type identifier
|
|
1238
|
+
*/
|
|
1239
|
+
object: 'article.body_edit';
|
|
1240
|
+
|
|
1241
|
+
/**
|
|
1242
|
+
* Up to 20 before/after windows, one per replaced match, for verification. Preview
|
|
1243
|
+
* strings are raw untrusted text (tier-2 previews show pre-sanitization content) —
|
|
1244
|
+
* never render them as HTML.
|
|
1245
|
+
*/
|
|
1246
|
+
previews: Array<EditArticleBodyPreview>;
|
|
1247
|
+
|
|
1248
|
+
/**
|
|
1249
|
+
* Number of matches actually replaced (0 when `dryRun` is true)
|
|
1250
|
+
*/
|
|
1251
|
+
replaced: number;
|
|
1252
|
+
|
|
1253
|
+
/**
|
|
1254
|
+
* Which body was edited
|
|
1255
|
+
*/
|
|
1256
|
+
target: 'draft' | 'live';
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1010
1259
|
export interface ArticleDeleteResponse {
|
|
1011
1260
|
/**
|
|
1012
1261
|
* Unique identifier of the deleted article
|
|
@@ -1514,12 +1763,16 @@ export interface ArticleCreateParams {
|
|
|
1514
1763
|
description?: string;
|
|
1515
1764
|
|
|
1516
1765
|
/**
|
|
1517
|
-
* Body param: Content formatter. `
|
|
1518
|
-
*
|
|
1519
|
-
*
|
|
1520
|
-
*
|
|
1766
|
+
* Body param: Content formatter. `raw` stores Featurebase-canonical HTML verbatim
|
|
1767
|
+
* after XSS sanitization — formatting (alignment, colors, classes, blank-line
|
|
1768
|
+
* spacers, accordions) is preserved byte-for-byte. Use this whenever you are
|
|
1769
|
+
* editing an article whose body you previously read from this API. `default`
|
|
1770
|
+
* applies lossy cleanup meant for foreign HTML/markdown; `ai` runs the input
|
|
1771
|
+
* through Featurebase AI to convert arbitrary markdown / HTML / docs from other
|
|
1772
|
+
* tools into our custom block format (callouts, multi-code, accordions, columns).
|
|
1773
|
+
* Never use `default` or `ai` to re-save an existing article body.
|
|
1521
1774
|
*/
|
|
1522
|
-
formatter?: 'default' | 'ai';
|
|
1775
|
+
formatter?: 'default' | 'ai' | 'raw';
|
|
1523
1776
|
|
|
1524
1777
|
/**
|
|
1525
1778
|
* Body param: The ID of the help center to create the article in. If parentId is
|
|
@@ -1677,12 +1930,16 @@ export interface ArticleUpdateParams {
|
|
|
1677
1930
|
description?: string;
|
|
1678
1931
|
|
|
1679
1932
|
/**
|
|
1680
|
-
* Body param: Content formatter. `
|
|
1681
|
-
*
|
|
1682
|
-
*
|
|
1683
|
-
*
|
|
1933
|
+
* Body param: Content formatter. `raw` stores Featurebase-canonical HTML verbatim
|
|
1934
|
+
* after XSS sanitization — formatting (alignment, colors, classes, blank-line
|
|
1935
|
+
* spacers, accordions) is preserved byte-for-byte. Use this whenever you are
|
|
1936
|
+
* editing an article whose body you previously read from this API. `default`
|
|
1937
|
+
* applies lossy cleanup meant for foreign HTML/markdown; `ai` runs the input
|
|
1938
|
+
* through Featurebase AI to convert arbitrary markdown / HTML / docs from other
|
|
1939
|
+
* tools into our custom block format (callouts, multi-code, accordions, columns).
|
|
1940
|
+
* Never use `default` or `ai` to re-save an existing article body.
|
|
1684
1941
|
*/
|
|
1685
|
-
formatter?: 'default' | 'ai';
|
|
1942
|
+
formatter?: 'default' | 'ai' | 'raw';
|
|
1686
1943
|
|
|
1687
1944
|
/**
|
|
1688
1945
|
* Body param: Icon object for the article
|
|
@@ -1815,6 +2072,115 @@ export interface ArticleDeleteParams {
|
|
|
1815
2072
|
'Featurebase-Version'?: '2026-01-01.nova' | '2025-12-12.clover';
|
|
1816
2073
|
}
|
|
1817
2074
|
|
|
2075
|
+
export interface ArticleEditBodyParams {
|
|
2076
|
+
/**
|
|
2077
|
+
* Body param: Replacement text. Keep this to a fragment, not a whole document (max
|
|
2078
|
+
* 10000 chars). May be an empty string to delete the matched fragment. When the
|
|
2079
|
+
* match came from tier 2 (raw markup), the full resulting body is re-run through
|
|
2080
|
+
* the XSS sanitizer, so any dangerous markup in `newText` is stripped. Images
|
|
2081
|
+
* inserted via edit_body are not uploaded to Featurebase storage — use
|
|
2082
|
+
* articles.update with formatter 'raw' for image changes.
|
|
2083
|
+
*/
|
|
2084
|
+
newText: string;
|
|
2085
|
+
|
|
2086
|
+
/**
|
|
2087
|
+
* Body param: Exact fragment to find in the stored article body. Keep this to a
|
|
2088
|
+
* fragment, not a whole document (max 10000 chars). Tier 1 matches only inside
|
|
2089
|
+
* TEXT nodes (markup, tags, and attributes are never searched or altered) and is
|
|
2090
|
+
* entity-aware, so `oldText: "A & B"` matches a stored `A & B`. If tier 1
|
|
2091
|
+
* finds nothing, tier 2 falls back to a literal substring match over the raw body
|
|
2092
|
+
* string (markup included). Do NOT include `<img>` tags — their stored `src`
|
|
2093
|
+
* differs from the API representation and will not match.
|
|
2094
|
+
*/
|
|
2095
|
+
oldText: string;
|
|
2096
|
+
|
|
2097
|
+
/**
|
|
2098
|
+
* Body param: Preview the edit without writing. Returns the match count, matching
|
|
2099
|
+
* `mode`, and `previews` (changed spans with surrounding context) so an agent can
|
|
2100
|
+
* verify the edit before committing. Recommended workflow: dry-run across a set of
|
|
2101
|
+
* articles first, confirm the counts and previews, then re-issue each call with
|
|
2102
|
+
* `dryRun: false`.
|
|
2103
|
+
*/
|
|
2104
|
+
dryRun?: boolean;
|
|
2105
|
+
|
|
2106
|
+
/**
|
|
2107
|
+
* Body param: Assert the exact number of matches. When set, the edit replaces all
|
|
2108
|
+
* matches only if the count is exactly this value, otherwise it returns `400`.
|
|
2109
|
+
* Takes precedence over `replaceAll`. Use this to make bulk edits safe: dry-run
|
|
2110
|
+
* first to learn the count, then commit with the expected number.
|
|
2111
|
+
*/
|
|
2112
|
+
expectedReplacements?: number;
|
|
2113
|
+
|
|
2114
|
+
/**
|
|
2115
|
+
* Body param: Locale of the body to edit. Defaults to the help center's default
|
|
2116
|
+
* locale.
|
|
2117
|
+
*/
|
|
2118
|
+
locale?:
|
|
2119
|
+
| 'bn'
|
|
2120
|
+
| 'bs'
|
|
2121
|
+
| 'pt-BR'
|
|
2122
|
+
| 'bg'
|
|
2123
|
+
| 'ca'
|
|
2124
|
+
| 'hr'
|
|
2125
|
+
| 'cs'
|
|
2126
|
+
| 'da'
|
|
2127
|
+
| 'nl'
|
|
2128
|
+
| 'en'
|
|
2129
|
+
| 'et'
|
|
2130
|
+
| 'fi'
|
|
2131
|
+
| 'fr'
|
|
2132
|
+
| 'de'
|
|
2133
|
+
| 'el'
|
|
2134
|
+
| 'hi'
|
|
2135
|
+
| 'hu'
|
|
2136
|
+
| 'id'
|
|
2137
|
+
| 'it'
|
|
2138
|
+
| 'ja'
|
|
2139
|
+
| 'ko'
|
|
2140
|
+
| 'lv'
|
|
2141
|
+
| 'lt'
|
|
2142
|
+
| 'ms'
|
|
2143
|
+
| 'mn'
|
|
2144
|
+
| 'nb'
|
|
2145
|
+
| 'pl'
|
|
2146
|
+
| 'pt'
|
|
2147
|
+
| 'ro'
|
|
2148
|
+
| 'ru'
|
|
2149
|
+
| 'sr'
|
|
2150
|
+
| 'zh-CN'
|
|
2151
|
+
| 'sk'
|
|
2152
|
+
| 'sl'
|
|
2153
|
+
| 'es'
|
|
2154
|
+
| 'sw'
|
|
2155
|
+
| 'sv'
|
|
2156
|
+
| 'th'
|
|
2157
|
+
| 'zh-TW'
|
|
2158
|
+
| 'tr'
|
|
2159
|
+
| 'uk'
|
|
2160
|
+
| 'vi';
|
|
2161
|
+
|
|
2162
|
+
/**
|
|
2163
|
+
* Body param: Replace every match. When omitted (or false) and
|
|
2164
|
+
* `expectedReplacements` is not set, the edit requires exactly one match and
|
|
2165
|
+
* returns `400` if `oldText` is ambiguous (found more than once). Provide more
|
|
2166
|
+
* surrounding context in `oldText` to make a unique match, or set this to true.
|
|
2167
|
+
*/
|
|
2168
|
+
replaceAll?: boolean;
|
|
2169
|
+
|
|
2170
|
+
/**
|
|
2171
|
+
* Body param: Which body to edit: the unpublished `draft` (default) or the
|
|
2172
|
+
* published `live` content. Editing `live` records a history snapshot and purges
|
|
2173
|
+
* the public edge cache, mirroring a publish.
|
|
2174
|
+
*/
|
|
2175
|
+
target?: 'draft' | 'live';
|
|
2176
|
+
|
|
2177
|
+
/**
|
|
2178
|
+
* Header param: API version for this request. Defaults to your organization's
|
|
2179
|
+
* configured API version if not specified.
|
|
2180
|
+
*/
|
|
2181
|
+
'Featurebase-Version'?: '2026-01-01.nova' | '2025-12-12.clover';
|
|
2182
|
+
}
|
|
2183
|
+
|
|
1818
2184
|
export interface ArticleSearchParams {
|
|
1819
2185
|
/**
|
|
1820
2186
|
* Body param: An opaque cursor for pagination. Use the `nextCursor` value from a
|
|
@@ -1866,6 +2232,9 @@ export declare namespace Articles {
|
|
|
1866
2232
|
type ArticleIconInputNova as ArticleIconInputNova,
|
|
1867
2233
|
type ArticleTranslation as ArticleTranslation,
|
|
1868
2234
|
type ArticleTranslationInputNova as ArticleTranslationInputNova,
|
|
2235
|
+
type EditArticleBodyBody as EditArticleBodyBody,
|
|
2236
|
+
type EditArticleBodyPreview as EditArticleBodyPreview,
|
|
2237
|
+
type EditArticleBodyResponse as EditArticleBodyResponse,
|
|
1869
2238
|
type ArticleDeleteResponse as ArticleDeleteResponse,
|
|
1870
2239
|
type ArticleSearchResponse as ArticleSearchResponse,
|
|
1871
2240
|
type ArticlesCursorPage as ArticlesCursorPage,
|
|
@@ -1874,6 +2243,7 @@ export declare namespace Articles {
|
|
|
1874
2243
|
type ArticleRetrieveParams as ArticleRetrieveParams,
|
|
1875
2244
|
type ArticleUpdateParams as ArticleUpdateParams,
|
|
1876
2245
|
type ArticleDeleteParams as ArticleDeleteParams,
|
|
2246
|
+
type ArticleEditBodyParams as ArticleEditBodyParams,
|
|
1877
2247
|
type ArticleSearchParams as ArticleSearchParams,
|
|
1878
2248
|
};
|
|
1879
2249
|
}
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
ArticleCreateParams,
|
|
9
9
|
ArticleDeleteParams,
|
|
10
10
|
ArticleDeleteResponse,
|
|
11
|
+
ArticleEditBodyParams,
|
|
11
12
|
ArticleIcon,
|
|
12
13
|
ArticleIconInputNova,
|
|
13
14
|
ArticleListParams,
|
|
@@ -19,6 +20,9 @@ import {
|
|
|
19
20
|
ArticleUpdateParams,
|
|
20
21
|
Articles,
|
|
21
22
|
ArticlesCursorPage,
|
|
23
|
+
EditArticleBodyBody,
|
|
24
|
+
EditArticleBodyPreview,
|
|
25
|
+
EditArticleBodyResponse,
|
|
22
26
|
} from './articles';
|
|
23
27
|
import * as CollectionsAPI from './collections';
|
|
24
28
|
import {
|
|
@@ -105,6 +109,9 @@ export declare namespace HelpCenter {
|
|
|
105
109
|
type ArticleIconInputNova as ArticleIconInputNova,
|
|
106
110
|
type ArticleTranslation as ArticleTranslation,
|
|
107
111
|
type ArticleTranslationInputNova as ArticleTranslationInputNova,
|
|
112
|
+
type EditArticleBodyBody as EditArticleBodyBody,
|
|
113
|
+
type EditArticleBodyPreview as EditArticleBodyPreview,
|
|
114
|
+
type EditArticleBodyResponse as EditArticleBodyResponse,
|
|
108
115
|
type ArticleDeleteResponse as ArticleDeleteResponse,
|
|
109
116
|
type ArticleSearchResponse as ArticleSearchResponse,
|
|
110
117
|
type ArticlesCursorPage as ArticlesCursorPage,
|
|
@@ -113,6 +120,7 @@ export declare namespace HelpCenter {
|
|
|
113
120
|
type ArticleRetrieveParams as ArticleRetrieveParams,
|
|
114
121
|
type ArticleUpdateParams as ArticleUpdateParams,
|
|
115
122
|
type ArticleDeleteParams as ArticleDeleteParams,
|
|
123
|
+
type ArticleEditBodyParams as ArticleEditBodyParams,
|
|
116
124
|
type ArticleSearchParams as ArticleSearchParams,
|
|
117
125
|
};
|
|
118
126
|
|
|
@@ -8,6 +8,9 @@ export {
|
|
|
8
8
|
type ArticleIconInputNova,
|
|
9
9
|
type ArticleTranslation,
|
|
10
10
|
type ArticleTranslationInputNova,
|
|
11
|
+
type EditArticleBodyBody,
|
|
12
|
+
type EditArticleBodyPreview,
|
|
13
|
+
type EditArticleBodyResponse,
|
|
11
14
|
type ArticleDeleteResponse,
|
|
12
15
|
type ArticleSearchResponse,
|
|
13
16
|
type ArticleListParams,
|
|
@@ -15,6 +18,7 @@ export {
|
|
|
15
18
|
type ArticleRetrieveParams,
|
|
16
19
|
type ArticleUpdateParams,
|
|
17
20
|
type ArticleDeleteParams,
|
|
21
|
+
type ArticleEditBodyParams,
|
|
18
22
|
type ArticleSearchParams,
|
|
19
23
|
type ArticlesCursorPage,
|
|
20
24
|
} from './articles';
|