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.
Files changed (73) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/internal/utils/log.d.mts.map +1 -1
  3. package/internal/utils/log.d.ts.map +1 -1
  4. package/internal/utils/log.js +2 -0
  5. package/internal/utils/log.js.map +1 -1
  6. package/internal/utils/log.mjs +2 -0
  7. package/internal/utils/log.mjs.map +1 -1
  8. package/package.json +1 -1
  9. package/resources/feedback/comments.d.mts +340 -1
  10. package/resources/feedback/comments.d.mts.map +1 -1
  11. package/resources/feedback/comments.d.ts +340 -1
  12. package/resources/feedback/comments.d.ts.map +1 -1
  13. package/resources/feedback/comments.js +160 -0
  14. package/resources/feedback/comments.js.map +1 -1
  15. package/resources/feedback/comments.mjs +160 -0
  16. package/resources/feedback/comments.mjs.map +1 -1
  17. package/resources/feedback/feedback.d.mts +2 -2
  18. package/resources/feedback/feedback.d.mts.map +1 -1
  19. package/resources/feedback/feedback.d.ts +2 -2
  20. package/resources/feedback/feedback.d.ts.map +1 -1
  21. package/resources/feedback/feedback.js.map +1 -1
  22. package/resources/feedback/feedback.mjs.map +1 -1
  23. package/resources/feedback/index.d.mts +1 -1
  24. package/resources/feedback/index.d.mts.map +1 -1
  25. package/resources/feedback/index.d.ts +1 -1
  26. package/resources/feedback/index.d.ts.map +1 -1
  27. package/resources/feedback/index.js.map +1 -1
  28. package/resources/feedback/index.mjs.map +1 -1
  29. package/resources/feedback/posts/posts.d.mts +51 -24
  30. package/resources/feedback/posts/posts.d.mts.map +1 -1
  31. package/resources/feedback/posts/posts.d.ts +51 -24
  32. package/resources/feedback/posts/posts.d.ts.map +1 -1
  33. package/resources/feedback/posts/posts.js +47 -21
  34. package/resources/feedback/posts/posts.js.map +1 -1
  35. package/resources/feedback/posts/posts.mjs +47 -21
  36. package/resources/feedback/posts/posts.mjs.map +1 -1
  37. package/resources/support/conversations/conversations.d.mts +27 -19
  38. package/resources/support/conversations/conversations.d.mts.map +1 -1
  39. package/resources/support/conversations/conversations.d.ts +27 -19
  40. package/resources/support/conversations/conversations.d.ts.map +1 -1
  41. package/resources/support/conversations/conversations.js +20 -14
  42. package/resources/support/conversations/conversations.js.map +1 -1
  43. package/resources/support/conversations/conversations.mjs +20 -14
  44. package/resources/support/conversations/conversations.mjs.map +1 -1
  45. package/resources/users/companies/companies.d.mts +33 -20
  46. package/resources/users/companies/companies.d.mts.map +1 -1
  47. package/resources/users/companies/companies.d.ts +33 -20
  48. package/resources/users/companies/companies.d.ts.map +1 -1
  49. package/resources/users/companies/companies.js +28 -17
  50. package/resources/users/companies/companies.js.map +1 -1
  51. package/resources/users/companies/companies.mjs +28 -17
  52. package/resources/users/companies/companies.mjs.map +1 -1
  53. package/resources/users/contacts/contacts.d.mts +33 -21
  54. package/resources/users/contacts/contacts.d.mts.map +1 -1
  55. package/resources/users/contacts/contacts.d.ts +33 -21
  56. package/resources/users/contacts/contacts.d.ts.map +1 -1
  57. package/resources/users/contacts/contacts.js +27 -17
  58. package/resources/users/contacts/contacts.js.map +1 -1
  59. package/resources/users/contacts/contacts.mjs +27 -17
  60. package/resources/users/contacts/contacts.mjs.map +1 -1
  61. package/src/internal/utils/log.ts +2 -0
  62. package/src/resources/feedback/comments.ts +396 -0
  63. package/src/resources/feedback/feedback.ts +4 -0
  64. package/src/resources/feedback/index.ts +2 -0
  65. package/src/resources/feedback/posts/posts.ts +64 -29
  66. package/src/resources/support/conversations/conversations.ts +27 -19
  67. package/src/resources/users/companies/companies.ts +38 -19
  68. package/src/resources/users/contacts/contacts.ts +40 -20
  69. package/src/version.ts +1 -1
  70. package/version.d.mts +1 -1
  71. package/version.d.ts +1 -1
  72. package/version.js +1 -1
  73. 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 `last_activity_at:asc` for the inverse.
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": "admin_assignee_id",
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
- * | Field | Type | Operators |
979
- * | ---------------------------- | --------------------------------------------------------------------------- | ---------------------- |
980
- * | `state` | enum (`open` / `closed` / `snoozed`) | `=`, `!=`, `IN`, `NIN` |
981
- * | `priority` | boolean | `=`, `!=` |
982
- * | `admin_assignee_id` | id or null (unassigned) | `=`, `!=`, `IN`, `NIN` |
983
- * | `team_assignee_id` | id or null (unassigned) | `=`, `!=`, `IN`, `NIN` |
984
- * | `brand_id` | id or null | `=`, `!=`, `IN`, `NIN` |
985
- * | `tag_ids` | id (matches any conversation containing this tag) | `=`, `!=`, `IN`, `NIN` |
986
- * | `user_id` / `participant_id` | id of a conversation participant | `=`, `!=`, `IN`, `NIN` |
987
- * | `company_id` | company id (matches conversations whose participants belong to the company) | `=`, `!=`, `IN`, `NIN` |
988
- * | `mentioned_admin_ids` | admin id | `=`, `!=`, `IN`, `NIN` |
989
- * | `created_at` | unix seconds | `=`, `>`, `<` |
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`, `tag_ids`,
3599
- * `admin_assignee_id`, etc.
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
- * last_activity_at:desc and search mode defaults to relevance ranking. When set,
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": "monthly_spend", "operator": ">", "value": 1000 }
429
+ * { "field": "monthlySpend", "operator": ">", "value": 1000 }
430
430
  * ]
431
431
  * },
432
- * "sort": "monthly_spend:desc",
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
- * | Field | Type | Operators |
442
- * | --------------- | ----------------------------------- | --------------------------- |
443
- * | `external_id` | string (caller-provided company id) | `=`, `!=`, `IN`, `NIN` |
444
- * | `name` | string | `=`, `!=`, `IN`, `NIN`, `~` |
445
- * | `monthly_spend` | number | `=`, `!=`, `>`, `<` |
446
- * | `plan` | string | `=`, `!=`, `IN`, `NIN` |
447
- * | `industry` | string | `=`, `!=`, `IN`, `NIN` |
448
- * | `website` | string | `=`, `!=`, `IN`, `NIN` |
449
- * | `company_size` | number | `=`, `!=`, `>`, `<` |
450
- * | `linked_users` | number | `=`, `!=`, `>`, `<` |
451
- * | `last_activity` | unix seconds | `=`, `!=`, `>`, `<` |
452
- * | `created_at` | unix seconds | `=`, `!=`, `>`, `<` |
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
- * - `created_at:desc` (default), `created_at:asc`
467
- * - `monthly_spend:desc`, `monthly_spend:asc`
468
- * - `last_activity:desc`, `last_activity:asc`
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 `created_at:desc`. The chosen
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": "last_activity", "operator": ">", "value": 1735689600 }
456
+ * { "field": "lastActivity", "operator": ">", "value": 1735689600 }
457
457
  * ]
458
458
  * },
459
- * "sort": "last_activity:desc",
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
- * | Field | Type | Operators |
469
- * | ------------------ | -------------------------------- | --------------------------- |
470
- * | `external_id` | string (caller-provided user id) | `=`, `!=`, `IN`, `NIN` |
471
- * | `email` | string | `=`, `!=`, `IN`, `NIN` |
472
- * | `name` | string | `=`, `!=`, `IN`, `NIN`, `~` |
473
- * | `type` | enum (`customer`, `lead`) | `=`, `!=`, `IN`, `NIN` |
474
- * | `company_ids` | id (Featurebase company `id`) | `=`, `!=`, `IN`, `NIN` |
475
- * | `posts_created` | number | `=`, `!=`, `>`, `<` |
476
- * | `comments_created` | number | `=`, `!=`, `>`, `<` |
477
- * | `last_activity` | unix seconds | `=`, `!=`, `>`, `<` |
478
- * | `created_at` | unix seconds | `=`, `!=`, `>`, `<` |
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
- * - `last_activity:desc` (default), `last_activity:asc`
497
- * - `created_at:desc`, `created_at:asc`
498
- * - `posts_created:desc`, `posts_created:asc`
499
- * - `comments_created:desc`, `comments_created:asc`
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 `last_activity:desc` (matches
1136
- * the dashboard's default contact ordering). The chosen sort axis is encoded in
1137
- * the cursor; switching `sort` mid-pagination returns `400 invalid_cursor`.
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.12.0'; // x-release-please-version
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.12.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.12.0";
1
+ export declare const VERSION = "0.13.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.12.0'; // x-release-please-version
4
+ exports.VERSION = '0.13.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.12.0'; // x-release-please-version
1
+ export const VERSION = '0.13.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map