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
|
@@ -313,6 +313,162 @@ export class Posts extends APIResource {
|
|
|
313
313
|
]),
|
|
314
314
|
});
|
|
315
315
|
}
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* Search feedback posts with a structured filter AST, full-text search, sorting,
|
|
319
|
+
* and cursor pagination.
|
|
320
|
+
*
|
|
321
|
+
* ### Two modes (combinable)
|
|
322
|
+
*
|
|
323
|
+
* - **Filter mode** — pass a structured `query` AST (and/or `sort`) and the
|
|
324
|
+
* endpoint returns posts matching the filter, ordered by `sort` (default
|
|
325
|
+
* `created_at:desc`). Same shape as `/v2/conversations/search`,
|
|
326
|
+
* `/v2/companies/search`, `/v2/contacts/search`.
|
|
327
|
+
* - **Search mode** — pass a top-level `search` string and the endpoint runs a
|
|
328
|
+
* hybrid full-text + vector search (BM25 + embeddings, semanticRatio 0.5) over
|
|
329
|
+
* post `title` and `content`, returning matches ranked by relevance. Optional:
|
|
330
|
+
* combine with `query` to constrain the search to a board / status / time
|
|
331
|
+
* window, and/or `sort` to override relevance ranking with chronological order.
|
|
332
|
+
*
|
|
333
|
+
* ```json
|
|
334
|
+
* {
|
|
335
|
+
* "search": "mobile dark mode",
|
|
336
|
+
* "query": {
|
|
337
|
+
* "operator": "AND",
|
|
338
|
+
* "value": [
|
|
339
|
+
* {
|
|
340
|
+
* "field": "board_id",
|
|
341
|
+
* "operator": "IN",
|
|
342
|
+
* "value": ["507f1f77bcf86cd799439011"]
|
|
343
|
+
* }
|
|
344
|
+
* ]
|
|
345
|
+
* },
|
|
346
|
+
* "limit": 20
|
|
347
|
+
* }
|
|
348
|
+
* ```
|
|
349
|
+
*
|
|
350
|
+
* `search` is server-managed: no operators, no field selection, no special syntax
|
|
351
|
+
* — same plain-text contract as `/v2/conversations/search`. The string must be
|
|
352
|
+
* 1–500 characters; up to ~1024 BM25-tokenizer characters are forwarded to
|
|
353
|
+
* Turbopuffer (longer queries are truncated at a word boundary).
|
|
354
|
+
*
|
|
355
|
+
* ### Structured query AST
|
|
356
|
+
*
|
|
357
|
+
* Each clause has the shape `{ field, operator, value }`. You can pass a single
|
|
358
|
+
* clause or wrap up to 15 in a top-level `AND` group:
|
|
359
|
+
*
|
|
360
|
+
* ```json
|
|
361
|
+
* {
|
|
362
|
+
* "query": {
|
|
363
|
+
* "operator": "AND",
|
|
364
|
+
* "value": [
|
|
365
|
+
* {
|
|
366
|
+
* "field": "board_id",
|
|
367
|
+
* "operator": "IN",
|
|
368
|
+
* "value": ["507f1f77bcf86cd799439011"]
|
|
369
|
+
* },
|
|
370
|
+
* { "field": "upvotes", "operator": ">", "value": 10 }
|
|
371
|
+
* ]
|
|
372
|
+
* },
|
|
373
|
+
* "sort": "upvotes:desc",
|
|
374
|
+
* "limit": 20
|
|
375
|
+
* }
|
|
376
|
+
* ```
|
|
377
|
+
*
|
|
378
|
+
* Top-level `OR` groups and nested groups are not supported in this version.
|
|
379
|
+
*
|
|
380
|
+
* ### Supported fields and operators
|
|
381
|
+
*
|
|
382
|
+
* | Field | Type | Operators |
|
|
383
|
+
* | ----------------------------------------------------------------- | ---------------------------- | -------------------------------------------------- |
|
|
384
|
+
* | `board_id` | id (categoryId) | `=`, `!=`, `IN`, `NIN` |
|
|
385
|
+
* | `status_id` | id (postStatus) | `=`, `!=`, `IN`, `NIN` |
|
|
386
|
+
* | `tag_id` | id (postTags) | `=`, `!=`, `IN`, `NIN` |
|
|
387
|
+
* | `author_id` | string (user id) | `=`, `!=`, `IN`, `NIN` |
|
|
388
|
+
* | `assignee_id` | id or null (admin) | `=`, `!=`, `IN`, `NIN` (use `null` for unassigned) |
|
|
389
|
+
* | `company_id` | string (external company id) | `=`, `!=`, `IN`, `NIN` |
|
|
390
|
+
* | `created_at`, `updated_at`, `eta` | unix seconds | `=`, `!=`, `>`, `<`, `>=`, `<=` |
|
|
391
|
+
* | `upvotes`, `comment_count`, `monthly_spend`, `opportunity_amount` | number | `=`, `!=`, `>`, `<`, `>=`, `<=` |
|
|
392
|
+
* | `in_review`, `is_pinned` | boolean | `=`, `!=` |
|
|
393
|
+
*
|
|
394
|
+
* Use the top-level `search` field for full-text search across `title` and
|
|
395
|
+
* `content` (see "Search mode" above). The clause-level operators `~`, `!~`, `^`,
|
|
396
|
+
* `$` are reserved for future use and currently return `400`.
|
|
397
|
+
*
|
|
398
|
+
* A filter-mode query (no `search`) consisting only of `!=` or `NIN` clauses on
|
|
399
|
+
* unbounded fields is rejected with `query_too_broad` to prevent full-org scans.
|
|
400
|
+
* Combine the negation with at least one positive clause (`=`, `IN`, `>`, `<`)
|
|
401
|
+
* instead. Boolean fields (`in_review`, `is_pinned`) are bounded so a standalone
|
|
402
|
+
* negation on them is allowed. Search mode (with `search` set) relaxes this — the
|
|
403
|
+
* FTS query itself acts as the positive constraint.
|
|
404
|
+
*
|
|
405
|
+
* ### Sort
|
|
406
|
+
*
|
|
407
|
+
* Allowed values:
|
|
408
|
+
*
|
|
409
|
+
* - `created_at:desc` (default), `created_at:asc`
|
|
410
|
+
* - `updated_at:desc`, `updated_at:asc`
|
|
411
|
+
* - `upvotes:desc`, `upvotes:asc`
|
|
412
|
+
* - `eta:desc`, `eta:asc`
|
|
413
|
+
* - `trending_score:desc`, `trending_score:asc`
|
|
414
|
+
* - `monthly_spend:desc`, `monthly_spend:asc` (sum of upvoters' monthly spend)
|
|
415
|
+
* - `opportunity_amount:desc`, `opportunity_amount:asc` (linked HubSpot/Salesforce
|
|
416
|
+
* value)
|
|
417
|
+
* - `comment_count:desc`, `comment_count:asc`
|
|
418
|
+
*
|
|
419
|
+
* When `search` is set, results are ranked by relevance unless `sort` is also set,
|
|
420
|
+
* in which case the matching posts are returned in the requested order. The chosen
|
|
421
|
+
* sort axis (or relevance) is encoded in the cursor; switching `sort` (or toggling
|
|
422
|
+
* `search` on/off) mid-pagination returns `400 invalid_cursor`. Restart pagination
|
|
423
|
+
* without a cursor when changing the sort or search shape.
|
|
424
|
+
*
|
|
425
|
+
* ### Pagination
|
|
426
|
+
*
|
|
427
|
+
* Cursor-based, `limit` between 1 and 100 (default 10). In filter mode,
|
|
428
|
+
* `totalCount` is approximate and capped at 5000; `totalCountCapped` is `true`
|
|
429
|
+
* when the real count may be higher. In search mode, `totalCount` reflects the
|
|
430
|
+
* matching survivor set after the AST filter and is capped at 200 (the Turbopuffer
|
|
431
|
+
* top-K).
|
|
432
|
+
*
|
|
433
|
+
* ### Server-side guards
|
|
434
|
+
*
|
|
435
|
+
* These exclusions are always applied and CANNOT be disabled via the AST:
|
|
436
|
+
*
|
|
437
|
+
* - Spam posts (`isSpam: true`) are excluded.
|
|
438
|
+
* - Merged posts (those rolled into another post) are excluded — the canonical row
|
|
439
|
+
* is what's returned.
|
|
440
|
+
* - Support-board (ticket) categories are excluded — tickets have their own
|
|
441
|
+
* `/v2/tickets` surface.
|
|
442
|
+
*
|
|
443
|
+
* ### Response
|
|
444
|
+
*
|
|
445
|
+
* Returns a standard list envelope with post rows identical to
|
|
446
|
+
* `GET /v2/posts/{id}`.
|
|
447
|
+
*
|
|
448
|
+
* ### Version Availability
|
|
449
|
+
*
|
|
450
|
+
* This endpoint is only available in API version 2026-01-01.nova and newer.
|
|
451
|
+
*
|
|
452
|
+
* @example
|
|
453
|
+
* ```ts
|
|
454
|
+
* const response = await client.feedback.posts.search();
|
|
455
|
+
* ```
|
|
456
|
+
*/
|
|
457
|
+
search(params: PostSearchParams, options?: RequestOptions): APIPromise<PostSearchResponse> {
|
|
458
|
+
const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
459
|
+
return this._client.post('/v2/posts/search', {
|
|
460
|
+
body,
|
|
461
|
+
...options,
|
|
462
|
+
headers: buildHeaders([
|
|
463
|
+
{
|
|
464
|
+
...(featurebaseVersion?.toString() != null ?
|
|
465
|
+
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
466
|
+
: undefined),
|
|
467
|
+
},
|
|
468
|
+
options?.headers,
|
|
469
|
+
]),
|
|
470
|
+
});
|
|
471
|
+
}
|
|
316
472
|
}
|
|
317
473
|
|
|
318
474
|
export type PostsCursorPage = CursorPage<Post>;
|
|
@@ -673,6 +829,377 @@ export interface PostDeleteResponse {
|
|
|
673
829
|
object: 'post';
|
|
674
830
|
}
|
|
675
831
|
|
|
832
|
+
export interface PostSearchResponse {
|
|
833
|
+
/**
|
|
834
|
+
* Array of search results
|
|
835
|
+
*/
|
|
836
|
+
data: Array<PostSearchResponse.Data>;
|
|
837
|
+
|
|
838
|
+
/**
|
|
839
|
+
* Cursor for fetching the next page (null if no more results)
|
|
840
|
+
*/
|
|
841
|
+
nextCursor: string | null;
|
|
842
|
+
|
|
843
|
+
/**
|
|
844
|
+
* Object type identifier
|
|
845
|
+
*/
|
|
846
|
+
object: 'list';
|
|
847
|
+
|
|
848
|
+
/**
|
|
849
|
+
* Total number of posts matching the query, capped at 5000. When the actual total
|
|
850
|
+
* is at or above the cap, `totalCountCapped` is true and the value is exactly the
|
|
851
|
+
* cap.
|
|
852
|
+
*/
|
|
853
|
+
totalCount?: number;
|
|
854
|
+
|
|
855
|
+
/**
|
|
856
|
+
* True when `totalCount` is exactly the cap and the real count may be higher. UI
|
|
857
|
+
* can render as e.g. "5000+".
|
|
858
|
+
*/
|
|
859
|
+
totalCountCapped?: boolean;
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
export namespace PostSearchResponse {
|
|
863
|
+
export interface Data {
|
|
864
|
+
/**
|
|
865
|
+
* Unique identifier
|
|
866
|
+
*/
|
|
867
|
+
id: string;
|
|
868
|
+
|
|
869
|
+
access: Data.Access;
|
|
870
|
+
|
|
871
|
+
/**
|
|
872
|
+
* ID of the admin assigned to this post, null if unassigned
|
|
873
|
+
*/
|
|
874
|
+
assigneeId: string | null;
|
|
875
|
+
|
|
876
|
+
author: Data.Author | null;
|
|
877
|
+
|
|
878
|
+
/**
|
|
879
|
+
* Board (category) ID this post belongs to
|
|
880
|
+
*/
|
|
881
|
+
boardId: string;
|
|
882
|
+
|
|
883
|
+
/**
|
|
884
|
+
* Total number of comments
|
|
885
|
+
*/
|
|
886
|
+
commentCount: number;
|
|
887
|
+
|
|
888
|
+
/**
|
|
889
|
+
* Post content in HTML format
|
|
890
|
+
*/
|
|
891
|
+
content: string;
|
|
892
|
+
|
|
893
|
+
/**
|
|
894
|
+
* ISO 8601 timestamp when created
|
|
895
|
+
*/
|
|
896
|
+
createdAt: string;
|
|
897
|
+
|
|
898
|
+
/**
|
|
899
|
+
* Custom field values keyed by field ID
|
|
900
|
+
*/
|
|
901
|
+
customFields: { [key: string]: unknown };
|
|
902
|
+
|
|
903
|
+
/**
|
|
904
|
+
* Estimated completion time as ISO 8601 timestamp, null if not set
|
|
905
|
+
*/
|
|
906
|
+
eta: string | null;
|
|
907
|
+
|
|
908
|
+
features: Data.Features;
|
|
909
|
+
|
|
910
|
+
/**
|
|
911
|
+
* Whether the post is pending moderation review
|
|
912
|
+
*/
|
|
913
|
+
inReview: boolean;
|
|
914
|
+
|
|
915
|
+
/**
|
|
916
|
+
* Third-party integration links associated with this post
|
|
917
|
+
*/
|
|
918
|
+
integrations: Data.Integrations;
|
|
919
|
+
|
|
920
|
+
/**
|
|
921
|
+
* Whether the post is pinned to the top
|
|
922
|
+
*/
|
|
923
|
+
isPinned: boolean;
|
|
924
|
+
|
|
925
|
+
/**
|
|
926
|
+
* Object type identifier
|
|
927
|
+
*/
|
|
928
|
+
object: 'post';
|
|
929
|
+
|
|
930
|
+
/**
|
|
931
|
+
* Total opportunity amount from linked HubSpot deals and Salesforce opportunities
|
|
932
|
+
*/
|
|
933
|
+
opportunityAmount: number | null;
|
|
934
|
+
|
|
935
|
+
/**
|
|
936
|
+
* Full URL to view the post
|
|
937
|
+
*/
|
|
938
|
+
postUrl: string;
|
|
939
|
+
|
|
940
|
+
/**
|
|
941
|
+
* URL-friendly slug
|
|
942
|
+
*/
|
|
943
|
+
slug: string;
|
|
944
|
+
|
|
945
|
+
status: PostStatusesAPI.PostStatus;
|
|
946
|
+
|
|
947
|
+
/**
|
|
948
|
+
* Tags attached to this post
|
|
949
|
+
*/
|
|
950
|
+
tags: Array<Data.Tag>;
|
|
951
|
+
|
|
952
|
+
/**
|
|
953
|
+
* Post title
|
|
954
|
+
*/
|
|
955
|
+
title: string;
|
|
956
|
+
|
|
957
|
+
/**
|
|
958
|
+
* ISO 8601 timestamp when last modified
|
|
959
|
+
*/
|
|
960
|
+
updatedAt: string;
|
|
961
|
+
|
|
962
|
+
/**
|
|
963
|
+
* Total number of upvotes
|
|
964
|
+
*/
|
|
965
|
+
upvotes: number;
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
export namespace Data {
|
|
969
|
+
export interface Access {
|
|
970
|
+
/**
|
|
971
|
+
* External company IDs explicitly granted access to this post. Empty array means
|
|
972
|
+
* no company-level restrictions. Non-empty means only users belonging to these
|
|
973
|
+
* companies can see the post.
|
|
974
|
+
*/
|
|
975
|
+
companyExternalIds: Array<string>;
|
|
976
|
+
|
|
977
|
+
/**
|
|
978
|
+
* User IDs explicitly granted access to this post. Empty array means no user-level
|
|
979
|
+
* restrictions (post uses board/org visibility). Non-empty means only these users
|
|
980
|
+
* (plus admins) can see the post.
|
|
981
|
+
*/
|
|
982
|
+
userIds: Array<string>;
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
export interface Author {
|
|
986
|
+
/**
|
|
987
|
+
* Author unique identifier
|
|
988
|
+
*/
|
|
989
|
+
id: string | null;
|
|
990
|
+
|
|
991
|
+
/**
|
|
992
|
+
* Author email (if available)
|
|
993
|
+
*/
|
|
994
|
+
email: string | null;
|
|
995
|
+
|
|
996
|
+
/**
|
|
997
|
+
* Author display name
|
|
998
|
+
*/
|
|
999
|
+
name: string;
|
|
1000
|
+
|
|
1001
|
+
/**
|
|
1002
|
+
* Author profile picture URL
|
|
1003
|
+
*/
|
|
1004
|
+
profilePicture: string | null;
|
|
1005
|
+
|
|
1006
|
+
/**
|
|
1007
|
+
* Type of user who authored the post
|
|
1008
|
+
*/
|
|
1009
|
+
type: 'admin' | 'customer' | 'guest' | 'integration' | 'bot' | 'lead';
|
|
1010
|
+
}
|
|
1011
|
+
|
|
1012
|
+
export interface Features {
|
|
1013
|
+
/**
|
|
1014
|
+
* Whether comments are allowed on this post
|
|
1015
|
+
*/
|
|
1016
|
+
commentsEnabled: boolean;
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
/**
|
|
1020
|
+
* Third-party integration links associated with this post
|
|
1021
|
+
*/
|
|
1022
|
+
export interface Integrations {
|
|
1023
|
+
clickup: Array<Integrations.Clickup>;
|
|
1024
|
+
|
|
1025
|
+
devops: Array<Integrations.Devop>;
|
|
1026
|
+
|
|
1027
|
+
github: Array<Integrations.GitHub>;
|
|
1028
|
+
|
|
1029
|
+
hubspot: Array<Integrations.Hubspot>;
|
|
1030
|
+
|
|
1031
|
+
jira: Array<Integrations.Jira>;
|
|
1032
|
+
|
|
1033
|
+
linear: Array<Integrations.Linear>;
|
|
1034
|
+
|
|
1035
|
+
salesforce: Array<Integrations.Salesforce>;
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
export namespace Integrations {
|
|
1039
|
+
export interface Clickup {
|
|
1040
|
+
/**
|
|
1041
|
+
* ClickUp task ID
|
|
1042
|
+
*/
|
|
1043
|
+
id: string;
|
|
1044
|
+
|
|
1045
|
+
/**
|
|
1046
|
+
* ClickUp task title
|
|
1047
|
+
*/
|
|
1048
|
+
title: string;
|
|
1049
|
+
|
|
1050
|
+
/**
|
|
1051
|
+
* URL to the ClickUp task
|
|
1052
|
+
*/
|
|
1053
|
+
url: string;
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
export interface Devop {
|
|
1057
|
+
/**
|
|
1058
|
+
* Azure DevOps work item ID
|
|
1059
|
+
*/
|
|
1060
|
+
id: number;
|
|
1061
|
+
|
|
1062
|
+
/**
|
|
1063
|
+
* Azure DevOps project ID
|
|
1064
|
+
*/
|
|
1065
|
+
projectId: string;
|
|
1066
|
+
|
|
1067
|
+
/**
|
|
1068
|
+
* Azure DevOps project name
|
|
1069
|
+
*/
|
|
1070
|
+
projectName: string;
|
|
1071
|
+
|
|
1072
|
+
/**
|
|
1073
|
+
* Work item title
|
|
1074
|
+
*/
|
|
1075
|
+
title: string;
|
|
1076
|
+
|
|
1077
|
+
/**
|
|
1078
|
+
* URL to the work item
|
|
1079
|
+
*/
|
|
1080
|
+
url: string;
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
export interface GitHub {
|
|
1084
|
+
/**
|
|
1085
|
+
* GitHub issue ID
|
|
1086
|
+
*/
|
|
1087
|
+
id: string;
|
|
1088
|
+
|
|
1089
|
+
/**
|
|
1090
|
+
* GitHub issue number
|
|
1091
|
+
*/
|
|
1092
|
+
number: string;
|
|
1093
|
+
|
|
1094
|
+
/**
|
|
1095
|
+
* Full repository name (owner/repo)
|
|
1096
|
+
*/
|
|
1097
|
+
repositoryFullName: string;
|
|
1098
|
+
|
|
1099
|
+
/**
|
|
1100
|
+
* Repository name
|
|
1101
|
+
*/
|
|
1102
|
+
repositoryName: string;
|
|
1103
|
+
|
|
1104
|
+
/**
|
|
1105
|
+
* GitHub issue title
|
|
1106
|
+
*/
|
|
1107
|
+
title: string;
|
|
1108
|
+
|
|
1109
|
+
/**
|
|
1110
|
+
* URL to the GitHub issue
|
|
1111
|
+
*/
|
|
1112
|
+
url: string;
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
export interface Hubspot {
|
|
1116
|
+
/**
|
|
1117
|
+
* Deal amount (for DEAL type)
|
|
1118
|
+
*/
|
|
1119
|
+
dealAmount: number | null;
|
|
1120
|
+
|
|
1121
|
+
/**
|
|
1122
|
+
* Whether the deal is closed (for DEAL type)
|
|
1123
|
+
*/
|
|
1124
|
+
dealClosed: boolean | null;
|
|
1125
|
+
|
|
1126
|
+
/**
|
|
1127
|
+
* HubSpot object ID
|
|
1128
|
+
*/
|
|
1129
|
+
objectId: number;
|
|
1130
|
+
|
|
1131
|
+
/**
|
|
1132
|
+
* HubSpot object type
|
|
1133
|
+
*/
|
|
1134
|
+
type: 'TICKET' | 'DEAL' | 'CONTACT';
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
export interface Jira {
|
|
1138
|
+
/**
|
|
1139
|
+
* Jira issue ID
|
|
1140
|
+
*/
|
|
1141
|
+
issueId: string;
|
|
1142
|
+
|
|
1143
|
+
/**
|
|
1144
|
+
* URL to the Jira issue
|
|
1145
|
+
*/
|
|
1146
|
+
issueUrl: string | null;
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
export interface Linear {
|
|
1150
|
+
/**
|
|
1151
|
+
* Linear issue ID
|
|
1152
|
+
*/
|
|
1153
|
+
issueId: string;
|
|
1154
|
+
|
|
1155
|
+
/**
|
|
1156
|
+
* URL to the Linear issue
|
|
1157
|
+
*/
|
|
1158
|
+
issueUrl: string | null;
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
export interface Salesforce {
|
|
1162
|
+
/**
|
|
1163
|
+
* Opportunity amount (for Opportunity type)
|
|
1164
|
+
*/
|
|
1165
|
+
amount: number | null;
|
|
1166
|
+
|
|
1167
|
+
/**
|
|
1168
|
+
* Whether the opportunity is closed (for Opportunity type)
|
|
1169
|
+
*/
|
|
1170
|
+
isClosed: boolean | null;
|
|
1171
|
+
|
|
1172
|
+
/**
|
|
1173
|
+
* Salesforce record ID
|
|
1174
|
+
*/
|
|
1175
|
+
objectId: string;
|
|
1176
|
+
|
|
1177
|
+
/**
|
|
1178
|
+
* Salesforce object type
|
|
1179
|
+
*/
|
|
1180
|
+
objectType: 'Opportunity' | 'Case';
|
|
1181
|
+
}
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
export interface Tag {
|
|
1185
|
+
/**
|
|
1186
|
+
* Tag unique identifier
|
|
1187
|
+
*/
|
|
1188
|
+
id: string;
|
|
1189
|
+
|
|
1190
|
+
/**
|
|
1191
|
+
* Tag color hex code
|
|
1192
|
+
*/
|
|
1193
|
+
color: string | null;
|
|
1194
|
+
|
|
1195
|
+
/**
|
|
1196
|
+
* Tag name
|
|
1197
|
+
*/
|
|
1198
|
+
name: string;
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1201
|
+
}
|
|
1202
|
+
|
|
676
1203
|
export interface PostCreateParams {
|
|
677
1204
|
/**
|
|
678
1205
|
* Body param: Board ID to create post in
|
|
@@ -960,18 +1487,127 @@ export interface PostDeleteParams {
|
|
|
960
1487
|
'Featurebase-Version'?: '2026-01-01.nova' | '2025-12-12.clover';
|
|
961
1488
|
}
|
|
962
1489
|
|
|
1490
|
+
export interface PostSearchParams {
|
|
1491
|
+
/**
|
|
1492
|
+
* Body param: An opaque cursor for pagination. Use the `nextCursor` value from a
|
|
1493
|
+
* previous response to fetch the next page of results.
|
|
1494
|
+
*/
|
|
1495
|
+
cursor?: string;
|
|
1496
|
+
|
|
1497
|
+
/**
|
|
1498
|
+
* Body param: A limit on the number of objects to be returned, between 1 and 100.
|
|
1499
|
+
*/
|
|
1500
|
+
limit?: number;
|
|
1501
|
+
|
|
1502
|
+
/**
|
|
1503
|
+
* Body param: Structured filter AST. Either a single filter clause or one
|
|
1504
|
+
* top-level AND group (max 15 clauses). Top-level OR groups are not yet supported.
|
|
1505
|
+
*/
|
|
1506
|
+
query?: PostSearchParams.SearchFilter | PostSearchParams.SearchFilterGroup;
|
|
1507
|
+
|
|
1508
|
+
/**
|
|
1509
|
+
* Body param: Plain-text full-text search across post `title` and `content`.
|
|
1510
|
+
* Server-managed (hybrid BM25 + vector) — no operators, no field selection. When
|
|
1511
|
+
* `search` is set, results are ranked by relevance unless `sort` is also set, in
|
|
1512
|
+
* which case the matching posts are returned in the requested order. Combine with
|
|
1513
|
+
* `query` to constrain the search to a board / status / time window.
|
|
1514
|
+
*/
|
|
1515
|
+
search?: string;
|
|
1516
|
+
|
|
1517
|
+
/**
|
|
1518
|
+
* Body param: Sort field + direction. Defaults to `created_at:desc`. The chosen
|
|
1519
|
+
* sort axis is encoded in the cursor; switching `sort` mid-pagination returns
|
|
1520
|
+
* `400 invalid_cursor`.
|
|
1521
|
+
*/
|
|
1522
|
+
sort?:
|
|
1523
|
+
| 'created_at:desc'
|
|
1524
|
+
| 'created_at:asc'
|
|
1525
|
+
| 'updated_at:desc'
|
|
1526
|
+
| 'updated_at:asc'
|
|
1527
|
+
| 'upvotes:desc'
|
|
1528
|
+
| 'upvotes:asc'
|
|
1529
|
+
| 'eta:desc'
|
|
1530
|
+
| 'eta:asc'
|
|
1531
|
+
| 'trending_score:desc'
|
|
1532
|
+
| 'trending_score:asc'
|
|
1533
|
+
| 'monthly_spend:desc'
|
|
1534
|
+
| 'monthly_spend:asc'
|
|
1535
|
+
| 'opportunity_amount:desc'
|
|
1536
|
+
| 'opportunity_amount:asc'
|
|
1537
|
+
| 'comment_count:desc'
|
|
1538
|
+
| 'comment_count:asc';
|
|
1539
|
+
|
|
1540
|
+
/**
|
|
1541
|
+
* Header param: API version for this request. Defaults to your organization's
|
|
1542
|
+
* configured API version if not specified.
|
|
1543
|
+
*/
|
|
1544
|
+
'Featurebase-Version'?: '2026-01-01.nova' | '2025-12-12.clover';
|
|
1545
|
+
}
|
|
1546
|
+
|
|
1547
|
+
export namespace PostSearchParams {
|
|
1548
|
+
export interface SearchFilter {
|
|
1549
|
+
/**
|
|
1550
|
+
* Field name to filter on (e.g. `state`, `tag_ids`, `created_at`)
|
|
1551
|
+
*/
|
|
1552
|
+
field: string;
|
|
1553
|
+
|
|
1554
|
+
/**
|
|
1555
|
+
* Comparison operator
|
|
1556
|
+
*/
|
|
1557
|
+
operator: '=' | '!=' | 'IN' | 'NIN' | '>' | '<' | '>=' | '<=' | '~' | '!~' | '^' | '$';
|
|
1558
|
+
|
|
1559
|
+
/**
|
|
1560
|
+
* Value to compare against (primitive or array of primitives)
|
|
1561
|
+
*/
|
|
1562
|
+
value: string | number | boolean | Array<string | number> | null;
|
|
1563
|
+
}
|
|
1564
|
+
|
|
1565
|
+
export interface SearchFilterGroup {
|
|
1566
|
+
/**
|
|
1567
|
+
* Group operator: AND (all match) or OR (any match)
|
|
1568
|
+
*/
|
|
1569
|
+
operator: 'AND' | 'OR';
|
|
1570
|
+
|
|
1571
|
+
/**
|
|
1572
|
+
* Array of filter clauses (1-15 entries)
|
|
1573
|
+
*/
|
|
1574
|
+
value: Array<SearchFilterGroup.Value>;
|
|
1575
|
+
}
|
|
1576
|
+
|
|
1577
|
+
export namespace SearchFilterGroup {
|
|
1578
|
+
export interface Value {
|
|
1579
|
+
/**
|
|
1580
|
+
* Field name to filter on (e.g. `state`, `tag_ids`, `created_at`)
|
|
1581
|
+
*/
|
|
1582
|
+
field: string;
|
|
1583
|
+
|
|
1584
|
+
/**
|
|
1585
|
+
* Comparison operator
|
|
1586
|
+
*/
|
|
1587
|
+
operator: '=' | '!=' | 'IN' | 'NIN' | '>' | '<' | '>=' | '<=' | '~' | '!~' | '^' | '$';
|
|
1588
|
+
|
|
1589
|
+
/**
|
|
1590
|
+
* Value to compare against (primitive or array of primitives)
|
|
1591
|
+
*/
|
|
1592
|
+
value: string | number | boolean | Array<string | number> | null;
|
|
1593
|
+
}
|
|
1594
|
+
}
|
|
1595
|
+
}
|
|
1596
|
+
|
|
963
1597
|
Posts.Voters = Voters;
|
|
964
1598
|
|
|
965
1599
|
export declare namespace Posts {
|
|
966
1600
|
export {
|
|
967
1601
|
type Post as Post,
|
|
968
1602
|
type PostDeleteResponse as PostDeleteResponse,
|
|
1603
|
+
type PostSearchResponse as PostSearchResponse,
|
|
969
1604
|
type PostsCursorPage as PostsCursorPage,
|
|
970
1605
|
type PostCreateParams as PostCreateParams,
|
|
971
1606
|
type PostRetrieveParams as PostRetrieveParams,
|
|
972
1607
|
type PostUpdateParams as PostUpdateParams,
|
|
973
1608
|
type PostListParams as PostListParams,
|
|
974
1609
|
type PostDeleteParams as PostDeleteParams,
|
|
1610
|
+
type PostSearchParams as PostSearchParams,
|
|
975
1611
|
};
|
|
976
1612
|
|
|
977
1613
|
export {
|