featurebase-node 0.12.0 → 0.13.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 +18 -0
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js +2 -0
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +2 -0
- package/internal/utils/log.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/feedback/comments.d.mts +340 -1
- package/resources/feedback/comments.d.mts.map +1 -1
- package/resources/feedback/comments.d.ts +340 -1
- package/resources/feedback/comments.d.ts.map +1 -1
- package/resources/feedback/comments.js +160 -0
- package/resources/feedback/comments.js.map +1 -1
- package/resources/feedback/comments.mjs +160 -0
- package/resources/feedback/comments.mjs.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/posts.d.mts +51 -24
- package/resources/feedback/posts/posts.d.mts.map +1 -1
- package/resources/feedback/posts/posts.d.ts +51 -24
- package/resources/feedback/posts/posts.d.ts.map +1 -1
- package/resources/feedback/posts/posts.js +47 -21
- package/resources/feedback/posts/posts.js.map +1 -1
- package/resources/feedback/posts/posts.mjs +47 -21
- package/resources/feedback/posts/posts.mjs.map +1 -1
- package/resources/support/conversations/conversations.d.mts +27 -19
- package/resources/support/conversations/conversations.d.mts.map +1 -1
- package/resources/support/conversations/conversations.d.ts +27 -19
- package/resources/support/conversations/conversations.d.ts.map +1 -1
- package/resources/support/conversations/conversations.js +20 -14
- package/resources/support/conversations/conversations.js.map +1 -1
- package/resources/support/conversations/conversations.mjs +20 -14
- package/resources/support/conversations/conversations.mjs.map +1 -1
- package/resources/users/companies/companies.d.mts +33 -20
- package/resources/users/companies/companies.d.mts.map +1 -1
- package/resources/users/companies/companies.d.ts +33 -20
- package/resources/users/companies/companies.d.ts.map +1 -1
- package/resources/users/companies/companies.js +28 -17
- package/resources/users/companies/companies.js.map +1 -1
- package/resources/users/companies/companies.mjs +28 -17
- package/resources/users/companies/companies.mjs.map +1 -1
- package/resources/users/contacts/contacts.d.mts +33 -21
- package/resources/users/contacts/contacts.d.mts.map +1 -1
- package/resources/users/contacts/contacts.d.ts +33 -21
- package/resources/users/contacts/contacts.d.ts.map +1 -1
- package/resources/users/contacts/contacts.js +27 -17
- package/resources/users/contacts/contacts.js.map +1 -1
- package/resources/users/contacts/contacts.mjs +27 -17
- package/resources/users/contacts/contacts.mjs.map +1 -1
- package/src/internal/utils/log.ts +2 -0
- package/src/resources/feedback/comments.ts +396 -0
- package/src/resources/feedback/feedback.ts +4 -0
- package/src/resources/feedback/index.ts +2 -0
- package/src/resources/feedback/posts/posts.ts +64 -29
- package/src/resources/support/conversations/conversations.ts +27 -19
- package/src/resources/users/companies/companies.ts +38 -19
- package/src/resources/users/contacts/contacts.ts +40 -20
- 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
|
@@ -943,7 +943,7 @@ export class Conversations extends APIResource {
|
|
|
943
943
|
*
|
|
944
944
|
* - **Filter mode** (`query` set, `search` omitted): structured filtering against
|
|
945
945
|
* indexed conversation fields. Sorted by `lastActivityAt` desc by default; set
|
|
946
|
-
* `sort` to `
|
|
946
|
+
* `sort` to `lastActivityAt:asc` for the inverse.
|
|
947
947
|
* - **Search mode** (`search` set, `query` optional): full-text search across
|
|
948
948
|
* conversation messages, then narrowed by the same `query` AST so the same
|
|
949
949
|
* filters apply. Results are ranked by relevance by default; set `sort` to order
|
|
@@ -962,7 +962,7 @@ export class Conversations extends APIResource {
|
|
|
962
962
|
* "value": [
|
|
963
963
|
* { "field": "state", "operator": "=", "value": "open" },
|
|
964
964
|
* {
|
|
965
|
-
* "field": "
|
|
965
|
+
* "field": "adminAssigneeId",
|
|
966
966
|
* "operator": "=",
|
|
967
967
|
* "value": "507f1f77bcf86cd799439011"
|
|
968
968
|
* }
|
|
@@ -975,18 +975,24 @@ export class Conversations extends APIResource {
|
|
|
975
975
|
*
|
|
976
976
|
* ### Supported fields and operators
|
|
977
977
|
*
|
|
978
|
-
*
|
|
979
|
-
*
|
|
980
|
-
*
|
|
981
|
-
*
|
|
982
|
-
*
|
|
983
|
-
*
|
|
984
|
-
* |
|
|
985
|
-
* |
|
|
986
|
-
* | `
|
|
987
|
-
* | `
|
|
988
|
-
* | `
|
|
989
|
-
* | `
|
|
978
|
+
* Field names are camelCase, matching the rest of the v2 public API. Snake_case
|
|
979
|
+
* names that this endpoint originally shipped with (`admin_assignee_id`,
|
|
980
|
+
* `team_assignee_id`, `brand_id`, `tag_ids`, `mentioned_admin_ids`, `user_id`,
|
|
981
|
+
* `participant_id`, `company_id`, `created_at`) are still accepted for back-compat
|
|
982
|
+
* but are deprecated — please migrate to camelCase in new code.
|
|
983
|
+
*
|
|
984
|
+
* | Field | Type | Operators |
|
|
985
|
+
* | -------------------------- | --------------------------------------------------------------------------- | ---------------------- |
|
|
986
|
+
* | `state` | enum (`open` / `closed` / `snoozed`) | `=`, `!=`, `IN`, `NIN` |
|
|
987
|
+
* | `priority` | boolean | `=`, `!=` |
|
|
988
|
+
* | `adminAssigneeId` | id or null (unassigned) | `=`, `!=`, `IN`, `NIN` |
|
|
989
|
+
* | `teamAssigneeId` | id or null (unassigned) | `=`, `!=`, `IN`, `NIN` |
|
|
990
|
+
* | `brandId` | id or null | `=`, `!=`, `IN`, `NIN` |
|
|
991
|
+
* | `tagIds` | id (matches any conversation containing this tag) | `=`, `!=`, `IN`, `NIN` |
|
|
992
|
+
* | `userId` / `participantId` | id of a conversation participant | `=`, `!=`, `IN`, `NIN` |
|
|
993
|
+
* | `companyId` | company id (matches conversations whose participants belong to the company) | `=`, `!=`, `IN`, `NIN` |
|
|
994
|
+
* | `mentionedAdminIds` | admin id | `=`, `!=`, `IN`, `NIN` |
|
|
995
|
+
* | `createdAt` | unix seconds | `=`, `>`, `<` |
|
|
990
996
|
*
|
|
991
997
|
* For unbounded fields a query consisting only of `!=` or `NIN` clauses is
|
|
992
998
|
* rejected with `query_too_broad` to prevent full-org scans. Combine the negation
|
|
@@ -3595,8 +3601,9 @@ export interface ConversationSearchParams {
|
|
|
3595
3601
|
|
|
3596
3602
|
/**
|
|
3597
3603
|
* Body param: Structured filter AST. Either a single filter clause or one
|
|
3598
|
-
* top-level AND group. Use this for filtering by `state`, `
|
|
3599
|
-
* `
|
|
3604
|
+
* top-level AND group. Use this for filtering by `state`, `tagIds`,
|
|
3605
|
+
* `adminAssigneeId`, etc. (Legacy snake_case names are accepted for back-compat —
|
|
3606
|
+
* see the OpenAPI route description for the full alias map.)
|
|
3600
3607
|
*/
|
|
3601
3608
|
query?: ConversationSearchParams.SearchFilter | ConversationSearchParams.SearchFilterGroup;
|
|
3602
3609
|
|
|
@@ -3608,11 +3615,12 @@ export interface ConversationSearchParams {
|
|
|
3608
3615
|
|
|
3609
3616
|
/**
|
|
3610
3617
|
* Body param: Result ordering. When omitted, filter mode defaults to
|
|
3611
|
-
*
|
|
3618
|
+
* `lastActivityAt:desc` and search mode defaults to relevance ranking. When set,
|
|
3612
3619
|
* both modes order by lastActivityAt in the requested direction (so you can ask a
|
|
3613
|
-
* search query to return its hits in chronological order).
|
|
3620
|
+
* search query to return its hits in chronological order). Snake_case
|
|
3621
|
+
* `last_activity_at:*` is accepted for back-compat — prefer camelCase in new code.
|
|
3614
3622
|
*/
|
|
3615
|
-
sort?: 'last_activity_at:desc' | 'last_activity_at:asc';
|
|
3623
|
+
sort?: 'lastActivityAt:desc' | 'lastActivityAt:asc' | 'last_activity_at:desc' | 'last_activity_at:asc';
|
|
3616
3624
|
|
|
3617
3625
|
/**
|
|
3618
3626
|
* Header param: API version for this request. Defaults to your organization's
|
|
@@ -426,10 +426,10 @@ export class Companies extends APIResource {
|
|
|
426
426
|
* "operator": "AND",
|
|
427
427
|
* "value": [
|
|
428
428
|
* { "field": "plan", "operator": "IN", "value": ["enterprise", "pro"] },
|
|
429
|
-
* { "field": "
|
|
429
|
+
* { "field": "monthlySpend", "operator": ">", "value": 1000 }
|
|
430
430
|
* ]
|
|
431
431
|
* },
|
|
432
|
-
* "sort": "
|
|
432
|
+
* "sort": "monthlySpend:desc",
|
|
433
433
|
* "limit": 20
|
|
434
434
|
* }
|
|
435
435
|
* ```
|
|
@@ -438,18 +438,24 @@ export class Companies extends APIResource {
|
|
|
438
438
|
*
|
|
439
439
|
* ### Supported fields and operators
|
|
440
440
|
*
|
|
441
|
-
*
|
|
442
|
-
*
|
|
443
|
-
*
|
|
444
|
-
*
|
|
445
|
-
*
|
|
446
|
-
*
|
|
447
|
-
* |
|
|
448
|
-
* |
|
|
449
|
-
* | `
|
|
450
|
-
* | `
|
|
451
|
-
* | `
|
|
452
|
-
* | `
|
|
441
|
+
* Field names are camelCase, matching the rest of the v2 public API. Snake_case
|
|
442
|
+
* names that this endpoint originally shipped with (`external_id`,
|
|
443
|
+
* `monthly_spend`, `company_size`, `linked_users`, `last_activity`, `created_at`)
|
|
444
|
+
* are still accepted for back-compat but are deprecated — please migrate to
|
|
445
|
+
* camelCase in new code.
|
|
446
|
+
*
|
|
447
|
+
* | Field | Type | Operators |
|
|
448
|
+
* | -------------- | ----------------------------------- | --------------------------- |
|
|
449
|
+
* | `externalId` | string (caller-provided company id) | `=`, `!=`, `IN`, `NIN` |
|
|
450
|
+
* | `name` | string | `=`, `!=`, `IN`, `NIN`, `~` |
|
|
451
|
+
* | `monthlySpend` | number | `=`, `!=`, `>`, `<` |
|
|
452
|
+
* | `plan` | string | `=`, `!=`, `IN`, `NIN` |
|
|
453
|
+
* | `industry` | string | `=`, `!=`, `IN`, `NIN` |
|
|
454
|
+
* | `website` | string | `=`, `!=`, `IN`, `NIN` |
|
|
455
|
+
* | `companySize` | number | `=`, `!=`, `>`, `<` |
|
|
456
|
+
* | `linkedUsers` | number | `=`, `!=`, `>`, `<` |
|
|
457
|
+
* | `lastActivity` | unix seconds | `=`, `!=`, `>`, `<` |
|
|
458
|
+
* | `createdAt` | unix seconds | `=`, `!=`, `>`, `<` |
|
|
453
459
|
*
|
|
454
460
|
* The `name ~ "..."` operator runs a word-aware substring search via the
|
|
455
461
|
* underlying text index. Other string operators (`!~`, `^`, `$`) are reserved for
|
|
@@ -463,9 +469,14 @@ export class Companies extends APIResource {
|
|
|
463
469
|
*
|
|
464
470
|
* Allowed values:
|
|
465
471
|
*
|
|
466
|
-
* - `
|
|
467
|
-
* - `
|
|
468
|
-
* - `
|
|
472
|
+
* - `createdAt:desc` (default), `createdAt:asc`
|
|
473
|
+
* - `monthlySpend:desc`, `monthlySpend:asc`
|
|
474
|
+
* - `lastActivity:desc`, `lastActivity:asc`
|
|
475
|
+
*
|
|
476
|
+
* Snake_case sort axes (`created_at:desc`, `monthly_spend:asc`,
|
|
477
|
+
* `last_activity:desc`) are accepted for back-compat — the cursor encodes the
|
|
478
|
+
* canonical camelCase identity, so a caller can switch naming conventions
|
|
479
|
+
* mid-pagination without restarting.
|
|
469
480
|
*
|
|
470
481
|
* The chosen sort axis is encoded in the cursor; switching `sort` mid-pagination
|
|
471
482
|
* returns `400 invalid_cursor`. Restart pagination without a cursor when changing
|
|
@@ -823,11 +834,19 @@ export interface CompanySearchParams {
|
|
|
823
834
|
query?: CompanySearchParams.SearchFilter | CompanySearchParams.SearchFilterGroup;
|
|
824
835
|
|
|
825
836
|
/**
|
|
826
|
-
* Body param: Sort field + direction. Defaults to `
|
|
837
|
+
* Body param: Sort field + direction. Defaults to `createdAt:desc`. The chosen
|
|
827
838
|
* sort axis is encoded in the cursor; switching `sort` mid-pagination returns
|
|
828
|
-
* `400 invalid_cursor`.
|
|
839
|
+
* `400 invalid_cursor`. Snake_case names (`created_at:desc`, `monthly_spend:asc`,
|
|
840
|
+
* `last_activity:desc`) are accepted for back-compat — prefer camelCase in new
|
|
841
|
+
* code.
|
|
829
842
|
*/
|
|
830
843
|
sort?:
|
|
844
|
+
| 'createdAt:desc'
|
|
845
|
+
| 'createdAt:asc'
|
|
846
|
+
| 'monthlySpend:desc'
|
|
847
|
+
| 'monthlySpend:asc'
|
|
848
|
+
| 'lastActivity:desc'
|
|
849
|
+
| 'lastActivity:asc'
|
|
831
850
|
| 'created_at:desc'
|
|
832
851
|
| 'created_at:asc'
|
|
833
852
|
| 'monthly_spend:desc'
|
|
@@ -453,10 +453,10 @@ export class Contacts extends APIResource {
|
|
|
453
453
|
* "operator": "AND",
|
|
454
454
|
* "value": [
|
|
455
455
|
* { "field": "type", "operator": "=", "value": "customer" },
|
|
456
|
-
* { "field": "
|
|
456
|
+
* { "field": "lastActivity", "operator": ">", "value": 1735689600 }
|
|
457
457
|
* ]
|
|
458
458
|
* },
|
|
459
|
-
* "sort": "
|
|
459
|
+
* "sort": "lastActivity:desc",
|
|
460
460
|
* "limit": 20
|
|
461
461
|
* }
|
|
462
462
|
* ```
|
|
@@ -465,17 +465,23 @@ export class Contacts extends APIResource {
|
|
|
465
465
|
*
|
|
466
466
|
* ### Supported fields and operators
|
|
467
467
|
*
|
|
468
|
-
*
|
|
469
|
-
*
|
|
470
|
-
*
|
|
471
|
-
*
|
|
472
|
-
*
|
|
473
|
-
*
|
|
474
|
-
* |
|
|
475
|
-
* |
|
|
476
|
-
* | `
|
|
477
|
-
* | `
|
|
478
|
-
* | `
|
|
468
|
+
* Field names are camelCase, matching the rest of the v2 public API. Snake_case
|
|
469
|
+
* names that this endpoint originally shipped with (`external_id`, `company_ids`,
|
|
470
|
+
* `posts_created`, `comments_created`, `last_activity`, `created_at`) are still
|
|
471
|
+
* accepted for back-compat but are deprecated — please migrate to camelCase in new
|
|
472
|
+
* code.
|
|
473
|
+
*
|
|
474
|
+
* | Field | Type | Operators |
|
|
475
|
+
* | ----------------- | -------------------------------- | --------------------------- |
|
|
476
|
+
* | `externalId` | string (caller-provided user id) | `=`, `!=`, `IN`, `NIN` |
|
|
477
|
+
* | `email` | string | `=`, `!=`, `IN`, `NIN` |
|
|
478
|
+
* | `name` | string | `=`, `!=`, `IN`, `NIN`, `~` |
|
|
479
|
+
* | `type` | enum (`customer`, `lead`) | `=`, `!=`, `IN`, `NIN` |
|
|
480
|
+
* | `companyIds` | id (Featurebase company `id`) | `=`, `!=`, `IN`, `NIN` |
|
|
481
|
+
* | `postsCreated` | number | `=`, `!=`, `>`, `<` |
|
|
482
|
+
* | `commentsCreated` | number | `=`, `!=`, `>`, `<` |
|
|
483
|
+
* | `lastActivity` | unix seconds | `=`, `!=`, `>`, `<` |
|
|
484
|
+
* | `createdAt` | unix seconds | `=`, `!=`, `>`, `<` |
|
|
479
485
|
*
|
|
480
486
|
* The `name ~ "..."` operator runs a word-aware substring search via the
|
|
481
487
|
* underlying text index. Other string operators (`!~`, `^`, `$`) are reserved for
|
|
@@ -493,10 +499,14 @@ export class Contacts extends APIResource {
|
|
|
493
499
|
*
|
|
494
500
|
* Allowed values:
|
|
495
501
|
*
|
|
496
|
-
* - `
|
|
497
|
-
* - `
|
|
498
|
-
* - `
|
|
499
|
-
* - `
|
|
502
|
+
* - `lastActivity:desc` (default), `lastActivity:asc`
|
|
503
|
+
* - `createdAt:desc`, `createdAt:asc`
|
|
504
|
+
* - `postsCreated:desc`, `postsCreated:asc`
|
|
505
|
+
* - `commentsCreated:desc`, `commentsCreated:asc`
|
|
506
|
+
*
|
|
507
|
+
* Snake_case sort axes (`last_activity:desc`, `created_at:asc`, etc.) are accepted
|
|
508
|
+
* for back-compat — the cursor encodes the canonical camelCase identity, so a
|
|
509
|
+
* caller can switch naming conventions mid-pagination without restarting.
|
|
500
510
|
*
|
|
501
511
|
* The chosen sort axis is encoded in the cursor; switching `sort` mid-pagination
|
|
502
512
|
* returns `400 invalid_cursor`. Restart pagination without a cursor when changing
|
|
@@ -1132,11 +1142,21 @@ export interface ContactSearchParams {
|
|
|
1132
1142
|
query?: ContactSearchParams.SearchFilter | ContactSearchParams.SearchFilterGroup;
|
|
1133
1143
|
|
|
1134
1144
|
/**
|
|
1135
|
-
* Body param: Sort field + direction. Defaults to `
|
|
1136
|
-
*
|
|
1137
|
-
*
|
|
1145
|
+
* Body param: Sort field + direction. Defaults to `lastActivity:desc` (matches the
|
|
1146
|
+
* dashboard's default contact ordering). The chosen sort axis is encoded in the
|
|
1147
|
+
* cursor; switching `sort` mid-pagination returns `400 invalid_cursor`. Snake_case
|
|
1148
|
+
* names (`last_activity:desc`, `posts_created:asc`, …) are accepted for
|
|
1149
|
+
* back-compat — prefer camelCase in new code.
|
|
1138
1150
|
*/
|
|
1139
1151
|
sort?:
|
|
1152
|
+
| 'createdAt:desc'
|
|
1153
|
+
| 'createdAt:asc'
|
|
1154
|
+
| 'lastActivity:desc'
|
|
1155
|
+
| 'lastActivity:asc'
|
|
1156
|
+
| 'postsCreated:desc'
|
|
1157
|
+
| 'postsCreated:asc'
|
|
1158
|
+
| 'commentsCreated:desc'
|
|
1159
|
+
| 'commentsCreated:asc'
|
|
1140
1160
|
| 'created_at:desc'
|
|
1141
1161
|
| 'created_at:asc'
|
|
1142
1162
|
| 'last_activity:desc'
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.13.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.13.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.13.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.13.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|