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
|
@@ -954,18 +954,53 @@ class Conversations extends resource_1.APIResource {
|
|
|
954
954
|
* `participant_id`, `company_id`, `created_at`) are still accepted for back-compat
|
|
955
955
|
* but are deprecated — please migrate to camelCase in new code.
|
|
956
956
|
*
|
|
957
|
-
* | Field
|
|
958
|
-
* |
|
|
959
|
-
* | `state`
|
|
960
|
-
* | `priority`
|
|
961
|
-
* | `adminAssigneeId`
|
|
962
|
-
* | `teamAssigneeId`
|
|
963
|
-
* | `brandId`
|
|
964
|
-
* | `tagIds`
|
|
965
|
-
* | `userId` / `participantId`
|
|
966
|
-
* | `companyId`
|
|
967
|
-
* | `mentionedAdminIds`
|
|
968
|
-
* | `createdAt`
|
|
957
|
+
* | Field | Type | Operators |
|
|
958
|
+
* | -------------------------------- | --------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
|
|
959
|
+
* | `state` | enum (`open` / `closed` / `snoozed`) | `=`, `!=`, `IN`, `NIN` |
|
|
960
|
+
* | `priority` | boolean | `=`, `!=` |
|
|
961
|
+
* | `adminAssigneeId` | id or null (unassigned) | `=`, `!=`, `IN`, `NIN` |
|
|
962
|
+
* | `teamAssigneeId` | id or null (unassigned) | `=`, `!=`, `IN`, `NIN` |
|
|
963
|
+
* | `brandId` | id or null | `=`, `!=`, `IN`, `NIN` |
|
|
964
|
+
* | `tagIds` | id (matches any conversation containing this tag) | `=`, `!=`, `IN`, `NIN` |
|
|
965
|
+
* | `userId` / `participantId` | id of a conversation participant | `=`, `!=`, `IN`, `NIN` |
|
|
966
|
+
* | `companyId` | company id (matches conversations whose participants belong to the company) | `=`, `!=`, `IN`, `NIN` |
|
|
967
|
+
* | `mentionedAdminIds` | admin id | `=`, `!=`, `IN`, `NIN` |
|
|
968
|
+
* | `createdAt` | unix seconds | `=`, `>`, `<` |
|
|
969
|
+
* | `customAttributes.<attributeId>` | conversation custom attribute (see below) | `=`, `!=`, `IN`, `NIN`; plus `>`, `<`, `>=`, `<=` for `number` / `date` |
|
|
970
|
+
*
|
|
971
|
+
* ### Filtering by custom attributes
|
|
972
|
+
*
|
|
973
|
+
* Any non-archived conversation custom attribute can be used as a filter field via
|
|
974
|
+
* `customAttributes.<attributeId>`, where `<attributeId>` is the attribute's `id`
|
|
975
|
+
* from `GET /v2/conversation_attributes`. The accepted value shape follows the
|
|
976
|
+
* attribute's `fieldSubType`:
|
|
977
|
+
*
|
|
978
|
+
* - `select` / `multi-select` — pass an option **label** (e.g.
|
|
979
|
+
* `"Product question"`) or an option **id**; both are matched interchangeably,
|
|
980
|
+
* and id-based filters keep working after options are renamed
|
|
981
|
+
* - `text` — string
|
|
982
|
+
* - `number` — number; range operators (`>`, `<`, `>=`, `<=`) are supported
|
|
983
|
+
* - `date` — ISO 8601 string or unix seconds; range operators are supported
|
|
984
|
+
* - `checkbox` — boolean
|
|
985
|
+
*
|
|
986
|
+
* Example — all conversations where the "Issue type" select attribute is "Product
|
|
987
|
+
* question":
|
|
988
|
+
*
|
|
989
|
+
* ```json
|
|
990
|
+
* {
|
|
991
|
+
* "query": {
|
|
992
|
+
* "field": "customAttributes.6863d3fca1234b0d5e15c86c",
|
|
993
|
+
* "operator": "=",
|
|
994
|
+
* "value": "Product question"
|
|
995
|
+
* },
|
|
996
|
+
* "include": ["customAttributeDefinitions"]
|
|
997
|
+
* }
|
|
998
|
+
* ```
|
|
999
|
+
*
|
|
1000
|
+
* Referencing an attribute id that does not exist (or has been archived) returns a
|
|
1001
|
+
* `field_unknown` error. Set `include` to `["customAttributeDefinitions"]` to get
|
|
1002
|
+
* each returned conversation's attribute values resolved with names and types
|
|
1003
|
+
* alongside the ID-keyed `customAttributes` map.
|
|
969
1004
|
*
|
|
970
1005
|
* For unbounded fields a query consisting only of `!=` or `NIN` clauses is
|
|
971
1006
|
* rejected with `query_too_broad` to prevent full-org scans. Combine the negation
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversations.js","sourceRoot":"","sources":["../../../src/resources/support/conversations/conversations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;AAKrD,2EAAkD;AAClD,oDAA6F;AAE7F,4DAA0F;AAC1F,0DAAyD;AAEzD,0DAAoD;AAEpD;;GAEG;AACH,MAAa,aAAc,SAAQ,sBAAW;IAA9C;;QACE,iBAAY,GAAiC,IAAI,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"conversations.js","sourceRoot":"","sources":["../../../src/resources/support/conversations/conversations.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,wDAAqD;AAKrD,2EAAkD;AAClD,oDAA6F;AAE7F,4DAA0F;AAC1F,0DAAyD;AAEzD,0DAAoD;AAEpD;;GAEG;AACH,MAAa,aAAc,SAAQ,sBAAW;IAA9C;;QACE,iBAAY,GAAiC,IAAI,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAojC9F,CAAC;IAljCC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAqEG;IACH,IAAI,CACF,SAAoD,EAAE,EACtD,OAAwB;QAExB,MAAM,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAC7E,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,mBAAmB,EAAE,CAAA,uBAAwB,CAAA,EAAE;YAC5E,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB;oBACE,GAAG,CAAC,kBAAkB,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC;wBAC1C,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,QAAQ,EAAE,EAAE;wBAC3D,CAAC,CAAC,SAAS,CAAC;iBACb;g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AY,EAAC;gBACpB;oBACE,GAAG,CAAC,kBAAkB,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC;wBAC1C,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,QAAQ,EAAE,EAAE;wBAC3D,CAAC,CAAC,SAAS,CAAC;iBACb;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2IG;IACH,MAAM,CAAC,MAAgC,EAAE,OAAwB;QAC/D,MAAM,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACtE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,EAAE;YACnD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC;gBACpB;oBACE,GAAG,CAAC,kBAAkB,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC;wBAC1C,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,QAAQ,EAAE,EAAE;wBAC3D,CAAC,CAAC,SAAS,CAAC;iBACb;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AArjCD,sCAqjCC;AA+7ED,aAAa,CAAC,YAAY,GAAG,2BAAY,CAAC"}
|
|
@@ -950,18 +950,53 @@ export class Conversations extends APIResource {
|
|
|
950
950
|
* `participant_id`, `company_id`, `created_at`) are still accepted for back-compat
|
|
951
951
|
* but are deprecated — please migrate to camelCase in new code.
|
|
952
952
|
*
|
|
953
|
-
* | Field
|
|
954
|
-
* |
|
|
955
|
-
* | `state`
|
|
956
|
-
* | `priority`
|
|
957
|
-
* | `adminAssigneeId`
|
|
958
|
-
* | `teamAssigneeId`
|
|
959
|
-
* | `brandId`
|
|
960
|
-
* | `tagIds`
|
|
961
|
-
* | `userId` / `participantId`
|
|
962
|
-
* | `companyId`
|
|
963
|
-
* | `mentionedAdminIds`
|
|
964
|
-
* | `createdAt`
|
|
953
|
+
* | Field | Type | Operators |
|
|
954
|
+
* | -------------------------------- | --------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
|
|
955
|
+
* | `state` | enum (`open` / `closed` / `snoozed`) | `=`, `!=`, `IN`, `NIN` |
|
|
956
|
+
* | `priority` | boolean | `=`, `!=` |
|
|
957
|
+
* | `adminAssigneeId` | id or null (unassigned) | `=`, `!=`, `IN`, `NIN` |
|
|
958
|
+
* | `teamAssigneeId` | id or null (unassigned) | `=`, `!=`, `IN`, `NIN` |
|
|
959
|
+
* | `brandId` | id or null | `=`, `!=`, `IN`, `NIN` |
|
|
960
|
+
* | `tagIds` | id (matches any conversation containing this tag) | `=`, `!=`, `IN`, `NIN` |
|
|
961
|
+
* | `userId` / `participantId` | id of a conversation participant | `=`, `!=`, `IN`, `NIN` |
|
|
962
|
+
* | `companyId` | company id (matches conversations whose participants belong to the company) | `=`, `!=`, `IN`, `NIN` |
|
|
963
|
+
* | `mentionedAdminIds` | admin id | `=`, `!=`, `IN`, `NIN` |
|
|
964
|
+
* | `createdAt` | unix seconds | `=`, `>`, `<` |
|
|
965
|
+
* | `customAttributes.<attributeId>` | conversation custom attribute (see below) | `=`, `!=`, `IN`, `NIN`; plus `>`, `<`, `>=`, `<=` for `number` / `date` |
|
|
966
|
+
*
|
|
967
|
+
* ### Filtering by custom attributes
|
|
968
|
+
*
|
|
969
|
+
* Any non-archived conversation custom attribute can be used as a filter field via
|
|
970
|
+
* `customAttributes.<attributeId>`, where `<attributeId>` is the attribute's `id`
|
|
971
|
+
* from `GET /v2/conversation_attributes`. The accepted value shape follows the
|
|
972
|
+
* attribute's `fieldSubType`:
|
|
973
|
+
*
|
|
974
|
+
* - `select` / `multi-select` — pass an option **label** (e.g.
|
|
975
|
+
* `"Product question"`) or an option **id**; both are matched interchangeably,
|
|
976
|
+
* and id-based filters keep working after options are renamed
|
|
977
|
+
* - `text` — string
|
|
978
|
+
* - `number` — number; range operators (`>`, `<`, `>=`, `<=`) are supported
|
|
979
|
+
* - `date` — ISO 8601 string or unix seconds; range operators are supported
|
|
980
|
+
* - `checkbox` — boolean
|
|
981
|
+
*
|
|
982
|
+
* Example — all conversations where the "Issue type" select attribute is "Product
|
|
983
|
+
* question":
|
|
984
|
+
*
|
|
985
|
+
* ```json
|
|
986
|
+
* {
|
|
987
|
+
* "query": {
|
|
988
|
+
* "field": "customAttributes.6863d3fca1234b0d5e15c86c",
|
|
989
|
+
* "operator": "=",
|
|
990
|
+
* "value": "Product question"
|
|
991
|
+
* },
|
|
992
|
+
* "include": ["customAttributeDefinitions"]
|
|
993
|
+
* }
|
|
994
|
+
* ```
|
|
995
|
+
*
|
|
996
|
+
* Referencing an attribute id that does not exist (or has been archived) returns a
|
|
997
|
+
* `field_unknown` error. Set `include` to `["customAttributeDefinitions"]` to get
|
|
998
|
+
* each returned conversation's attribute values resolved with names and types
|
|
999
|
+
* alongside the ID-keyed `customAttributes` map.
|
|
965
1000
|
*
|
|
966
1001
|
* For unbounded fields a query consisting only of `!=` or `NIN` clauses is
|
|
967
1002
|
* rejected with `query_too_broad` to prevent full-org scans. Combine the negation
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversations.mjs","sourceRoot":"","sources":["../../../src/resources/support/conversations/conversations.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,mCAA+B;AAKrD,OAAO,KAAK,eAAe,2BAAuB;AAClD,OAAO,EAAiD,YAAY,EAAE,2BAAuB;AAE7F,OAAO,EAAE,UAAU,EAAsC,qCAAiC;AAC1F,OAAO,EAAE,YAAY,EAAE,sCAAkC;AAEzD,OAAO,EAAE,IAAI,EAAE,yCAAqC;AAEpD;;GAEG;AACH,MAAM,OAAO,aAAc,SAAQ,WAAW;IAA9C;;QACE,iBAAY,GAAiC,IAAI,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"conversations.mjs","sourceRoot":"","sources":["../../../src/resources/support/conversations/conversations.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,mCAA+B;AAKrD,OAAO,KAAK,eAAe,2BAAuB;AAClD,OAAO,EAAiD,YAAY,EAAE,2BAAuB;AAE7F,OAAO,EAAE,UAAU,EAAsC,qCAAiC;AAC1F,OAAO,EAAE,YAAY,EAAE,sCAAkC;AAEzD,OAAO,EAAE,IAAI,EAAE,yCAAqC;AAEpD;;GAEG;AACH,MAAM,OAAO,aAAc,SAAQ,WAAW;IAA9C;;QACE,iBAAY,GAAiC,IAAI,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAojC9F,CAAC;IAljCC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAqEG;IACH,IAAI,CACF,SAAoD,EAAE,EACtD,OAAwB;QAExB,MAAM,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,IAAI,EAAE,CAAC;QAC7E,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,mBAAmB,EAAE,CAAA,UAAwB,CAAA,EAAE;YAC5E,KAAK;YACL,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB;oBACE,GAAG,CAAC,kBAAkB,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC;wBAC1C,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,QAAQ,EAAE,EAAE;wBAC3D,CAAC,CAAC,SAAS,CAAC;iBACb;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAA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EAAE;wBAC3D,CAAC,CAAC,SAAS,CAAC;iBACb;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2IG;IACH,MAAM,CAAC,MAAgC,EAAE,OAAwB;QAC/D,MAAM,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACtE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0BAA0B,EAAE;YACnD,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC;gBACpB;oBACE,GAAG,CAAC,kBAAkB,EAAE,QAAQ,EAAE,IAAI,IAAI,CAAC,CAAC;wBAC1C,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,QAAQ,EAAE,EAAE;wBAC3D,CAAC,CAAC,SAAS,CAAC;iBACb;gBACD,OAAO,EAAE,OAAO;aACjB,CAAC;SACH,CAAC,CAAC;IACL,CAAC;CACF;AA+7ED,aAAa,CAAC,YAAY,GAAG,YAAY,CAAC"}
|
|
@@ -102,7 +102,7 @@ export declare class Contacts extends APIResource {
|
|
|
102
102
|
* | `subscribedToChangelog` | boolean | No | Whether subscribed to changelog |
|
|
103
103
|
* | `locale` | string | No | Contact locale/language |
|
|
104
104
|
* | `phone` | string | No | Contact phone number |
|
|
105
|
-
* | `roles` | array | No | Role
|
|
105
|
+
* | `roles` | array | No | Role (User Tag) names to assign |
|
|
106
106
|
* | `userHash` | string | No | HMAC hash for identity verification |
|
|
107
107
|
* | `createdAt` | string | No | When the contact was created (ISO 8601) |
|
|
108
108
|
*
|
|
@@ -786,7 +786,7 @@ export interface ContactCreateOrUpdateParams {
|
|
|
786
786
|
*/
|
|
787
787
|
profilePicture?: string | null;
|
|
788
788
|
/**
|
|
789
|
-
* Body param: Array of role
|
|
789
|
+
* Body param: Array of role (User Tag) names to assign to the contact
|
|
790
790
|
*/
|
|
791
791
|
roles?: Array<string>;
|
|
792
792
|
/**
|
|
@@ -102,7 +102,7 @@ export declare class Contacts extends APIResource {
|
|
|
102
102
|
* | `subscribedToChangelog` | boolean | No | Whether subscribed to changelog |
|
|
103
103
|
* | `locale` | string | No | Contact locale/language |
|
|
104
104
|
* | `phone` | string | No | Contact phone number |
|
|
105
|
-
* | `roles` | array | No | Role
|
|
105
|
+
* | `roles` | array | No | Role (User Tag) names to assign |
|
|
106
106
|
* | `userHash` | string | No | HMAC hash for identity verification |
|
|
107
107
|
* | `createdAt` | string | No | When the contact was created (ISO 8601) |
|
|
108
108
|
*
|
|
@@ -786,7 +786,7 @@ export interface ContactCreateOrUpdateParams {
|
|
|
786
786
|
*/
|
|
787
787
|
profilePicture?: string | null;
|
|
788
788
|
/**
|
|
789
|
-
* Body param: Array of role
|
|
789
|
+
* Body param: Array of role (User Tag) names to assign to the contact
|
|
790
790
|
*/
|
|
791
791
|
roles?: Array<string>;
|
|
792
792
|
/**
|
|
@@ -121,7 +121,7 @@ class Contacts extends resource_1.APIResource {
|
|
|
121
121
|
* | `subscribedToChangelog` | boolean | No | Whether subscribed to changelog |
|
|
122
122
|
* | `locale` | string | No | Contact locale/language |
|
|
123
123
|
* | `phone` | string | No | Contact phone number |
|
|
124
|
-
* | `roles` | array | No | Role
|
|
124
|
+
* | `roles` | array | No | Role (User Tag) names to assign |
|
|
125
125
|
* | `userHash` | string | No | HMAC hash for identity verification |
|
|
126
126
|
* | `createdAt` | string | No | When the contact was created (ISO 8601) |
|
|
127
127
|
*
|
|
@@ -117,7 +117,7 @@ export class Contacts extends APIResource {
|
|
|
117
117
|
* | `subscribedToChangelog` | boolean | No | Whether subscribed to changelog |
|
|
118
118
|
* | `locale` | string | No | Contact locale/language |
|
|
119
119
|
* | `phone` | string | No | Contact phone number |
|
|
120
|
-
* | `roles` | array | No | Role
|
|
120
|
+
* | `roles` | array | No | Role (User Tag) names to assign |
|
|
121
121
|
* | `userHash` | string | No | HMAC hash for identity verification |
|
|
122
122
|
* | `createdAt` | string | No | When the contact was created (ISO 8601) |
|
|
123
123
|
*
|
|
@@ -176,6 +176,7 @@ export interface AuditLogListResponse {
|
|
|
176
176
|
| 'organization.owner_transferred'
|
|
177
177
|
| 'article.created'
|
|
178
178
|
| 'article.updated'
|
|
179
|
+
| 'article.body_edited'
|
|
179
180
|
| 'article.published'
|
|
180
181
|
| 'article.unpublished'
|
|
181
182
|
| 'article.deleted'
|
|
@@ -456,6 +457,7 @@ export interface AuditLogListParams extends CursorPageParams {
|
|
|
456
457
|
| 'organization.owner_transferred'
|
|
457
458
|
| 'article.created'
|
|
458
459
|
| 'article.updated'
|
|
460
|
+
| 'article.body_edited'
|
|
459
461
|
| 'article.published'
|
|
460
462
|
| 'article.unpublished'
|
|
461
463
|
| 'article.deleted'
|
|
@@ -46,10 +46,12 @@ import {
|
|
|
46
46
|
PostDeleteResponse,
|
|
47
47
|
PostFeatures,
|
|
48
48
|
PostListParams,
|
|
49
|
+
PostMergeParams,
|
|
49
50
|
PostRetrieveParams,
|
|
50
51
|
PostSearchParams,
|
|
51
52
|
PostSearchResponse,
|
|
52
53
|
PostTag,
|
|
54
|
+
PostUnmergeParams,
|
|
53
55
|
PostUpdateParams,
|
|
54
56
|
Posts,
|
|
55
57
|
PostsCursorPage,
|
|
@@ -97,6 +99,8 @@ export declare namespace Feedback {
|
|
|
97
99
|
type PostRetrieveParams as PostRetrieveParams,
|
|
98
100
|
type PostUpdateParams as PostUpdateParams,
|
|
99
101
|
type PostDeleteParams as PostDeleteParams,
|
|
102
|
+
type PostMergeParams as PostMergeParams,
|
|
103
|
+
type PostUnmergeParams as PostUnmergeParams,
|
|
100
104
|
type PostSearchParams as PostSearchParams,
|
|
101
105
|
};
|
|
102
106
|
|
|
@@ -315,6 +315,77 @@ export class Posts extends APIResource {
|
|
|
315
315
|
});
|
|
316
316
|
}
|
|
317
317
|
|
|
318
|
+
/**
|
|
319
|
+
* Merges a source post into a destination post.
|
|
320
|
+
*
|
|
321
|
+
* The source post is removed from public post lists. Its votes, comments, and
|
|
322
|
+
* supported integration links are moved to the destination post.
|
|
323
|
+
*
|
|
324
|
+
* Both posts must belong to the authenticated organization. Neither post can
|
|
325
|
+
* already be merged, and a post cannot be merged into itself.
|
|
326
|
+
*
|
|
327
|
+
* Retrying the same source and destination after a successful merge is safe and
|
|
328
|
+
* returns the destination post without merging the data again.
|
|
329
|
+
*
|
|
330
|
+
* The response contains the updated destination post.
|
|
331
|
+
*
|
|
332
|
+
* @example
|
|
333
|
+
* ```ts
|
|
334
|
+
* const post = await client.feedback.posts.merge({
|
|
335
|
+
* destinationPostId: '507f1f77bcf86cd799439012',
|
|
336
|
+
* sourcePostId: '507f1f77bcf86cd799439011',
|
|
337
|
+
* });
|
|
338
|
+
* ```
|
|
339
|
+
*/
|
|
340
|
+
merge(params: PostMergeParams, options?: RequestOptions): APIPromise<Post> {
|
|
341
|
+
const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
342
|
+
return this._client.post('/v2/posts/merge', {
|
|
343
|
+
body,
|
|
344
|
+
...options,
|
|
345
|
+
headers: buildHeaders([
|
|
346
|
+
{
|
|
347
|
+
...(featurebaseVersion?.toString() != null ?
|
|
348
|
+
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
349
|
+
: undefined),
|
|
350
|
+
},
|
|
351
|
+
options?.headers,
|
|
352
|
+
]),
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Restores a post that was previously merged.
|
|
358
|
+
*
|
|
359
|
+
* The restored post returns to public post lists. Its votes and comments are
|
|
360
|
+
* removed from the destination post and restored on the source post.
|
|
361
|
+
*
|
|
362
|
+
* Retrying an unmerge after it succeeds is safe and returns the restored post.
|
|
363
|
+
*
|
|
364
|
+
* The response contains the restored post.
|
|
365
|
+
*
|
|
366
|
+
* @example
|
|
367
|
+
* ```ts
|
|
368
|
+
* const post = await client.feedback.posts.unmerge({
|
|
369
|
+
* postId: '507f1f77bcf86cd799439011',
|
|
370
|
+
* });
|
|
371
|
+
* ```
|
|
372
|
+
*/
|
|
373
|
+
unmerge(params: PostUnmergeParams, options?: RequestOptions): APIPromise<Post> {
|
|
374
|
+
const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
375
|
+
return this._client.post('/v2/posts/unmerge', {
|
|
376
|
+
body,
|
|
377
|
+
...options,
|
|
378
|
+
headers: buildHeaders([
|
|
379
|
+
{
|
|
380
|
+
...(featurebaseVersion?.toString() != null ?
|
|
381
|
+
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
382
|
+
: undefined),
|
|
383
|
+
},
|
|
384
|
+
options?.headers,
|
|
385
|
+
]),
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
|
|
318
389
|
/**
|
|
319
390
|
* Search feedback posts with a structured filter AST, full-text search, sorting,
|
|
320
391
|
* and cursor pagination.
|
|
@@ -1476,6 +1547,37 @@ export interface PostDeleteParams {
|
|
|
1476
1547
|
'Featurebase-Version'?: '2026-01-01.nova' | '2025-12-12.clover';
|
|
1477
1548
|
}
|
|
1478
1549
|
|
|
1550
|
+
export interface PostMergeParams {
|
|
1551
|
+
/**
|
|
1552
|
+
* Body param: ID of the post that receives the source post data
|
|
1553
|
+
*/
|
|
1554
|
+
destinationPostId: string;
|
|
1555
|
+
|
|
1556
|
+
/**
|
|
1557
|
+
* Body param: ID of the post to merge into the destination post
|
|
1558
|
+
*/
|
|
1559
|
+
sourcePostId: string;
|
|
1560
|
+
|
|
1561
|
+
/**
|
|
1562
|
+
* Header param: API version for this request. Defaults to your organization's
|
|
1563
|
+
* configured API version if not specified.
|
|
1564
|
+
*/
|
|
1565
|
+
'Featurebase-Version'?: '2026-01-01.nova' | '2025-12-12.clover';
|
|
1566
|
+
}
|
|
1567
|
+
|
|
1568
|
+
export interface PostUnmergeParams {
|
|
1569
|
+
/**
|
|
1570
|
+
* Body param: ID of the merged post to restore
|
|
1571
|
+
*/
|
|
1572
|
+
postId: string;
|
|
1573
|
+
|
|
1574
|
+
/**
|
|
1575
|
+
* Header param: API version for this request. Defaults to your organization's
|
|
1576
|
+
* configured API version if not specified.
|
|
1577
|
+
*/
|
|
1578
|
+
'Featurebase-Version'?: '2026-01-01.nova' | '2025-12-12.clover';
|
|
1579
|
+
}
|
|
1580
|
+
|
|
1479
1581
|
export interface PostSearchParams {
|
|
1480
1582
|
/**
|
|
1481
1583
|
* Body param: An opaque cursor for pagination. Use the `nextCursor` value from a
|
|
@@ -1561,6 +1663,8 @@ export declare namespace Posts {
|
|
|
1561
1663
|
type PostRetrieveParams as PostRetrieveParams,
|
|
1562
1664
|
type PostUpdateParams as PostUpdateParams,
|
|
1563
1665
|
type PostDeleteParams as PostDeleteParams,
|
|
1666
|
+
type PostMergeParams as PostMergeParams,
|
|
1667
|
+
type PostUnmergeParams as PostUnmergeParams,
|
|
1564
1668
|
type PostSearchParams as PostSearchParams,
|
|
1565
1669
|
};
|
|
1566
1670
|
|