featurebase-node 0.8.0 → 0.9.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 +14 -0
- package/client.d.mts +3 -1
- package/client.d.mts.map +1 -1
- package/client.d.ts +3 -1
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/core/pagination.d.mts +15 -0
- package/core/pagination.d.mts.map +1 -1
- package/core/pagination.d.ts +15 -0
- package/core/pagination.d.ts.map +1 -1
- package/core/pagination.js +25 -1
- package/core/pagination.js.map +1 -1
- package/core/pagination.mjs +23 -0
- package/core/pagination.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/support/conversations/conversations.d.mts +810 -8
- package/resources/support/conversations/conversations.d.mts.map +1 -1
- package/resources/support/conversations/conversations.d.ts +810 -8
- package/resources/support/conversations/conversations.d.ts.map +1 -1
- package/resources/support/conversations/conversations.js +240 -4
- package/resources/support/conversations/conversations.js.map +1 -1
- package/resources/support/conversations/conversations.mjs +240 -4
- package/resources/support/conversations/conversations.mjs.map +1 -1
- package/resources/support/conversations/index.d.mts +1 -2
- package/resources/support/conversations/index.d.mts.map +1 -1
- package/resources/support/conversations/index.d.ts +1 -2
- package/resources/support/conversations/index.d.ts.map +1 -1
- package/resources/support/conversations/index.js +1 -3
- package/resources/support/conversations/index.js.map +1 -1
- package/resources/support/conversations/index.mjs +0 -1
- package/resources/support/conversations/index.mjs.map +1 -1
- package/resources/support/index.d.mts +1 -1
- package/resources/support/index.d.mts.map +1 -1
- package/resources/support/index.d.ts +1 -1
- package/resources/support/index.d.ts.map +1 -1
- package/resources/support/index.js.map +1 -1
- package/resources/support/index.mjs.map +1 -1
- package/resources/support/support.d.mts +2 -2
- package/resources/support/support.d.mts.map +1 -1
- package/resources/support/support.d.ts +2 -2
- package/resources/support/support.d.ts.map +1 -1
- package/resources/support/support.js.map +1 -1
- package/resources/support/support.mjs.map +1 -1
- package/src/client.ts +13 -1
- package/src/core/pagination.ts +49 -0
- package/src/resources/support/conversations/conversations.ts +1059 -86
- package/src/resources/support/conversations/index.ts +6 -7
- package/src/resources/support/index.ts +6 -0
- package/src/resources/support/support.ts +12 -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
- package/resources/support/conversations/tags.d.mts +0 -200
- package/resources/support/conversations/tags.d.mts.map +0 -1
- package/resources/support/conversations/tags.d.ts +0 -200
- package/resources/support/conversations/tags.d.ts.map +0 -1
- package/resources/support/conversations/tags.js +0 -146
- package/resources/support/conversations/tags.js.map +0 -1
- package/resources/support/conversations/tags.mjs +0 -142
- package/resources/support/conversations/tags.mjs.map +0 -1
- package/src/resources/support/conversations/tags.ts +0 -260
|
@@ -12,20 +12,19 @@ export {
|
|
|
12
12
|
type CsatWorkflowLink,
|
|
13
13
|
type EmailRecipients,
|
|
14
14
|
type ConversationDeleteResponse,
|
|
15
|
+
type ConversationAttachTagResponse,
|
|
16
|
+
type ConversationDetachTagResponse,
|
|
17
|
+
type ConversationSearchResponse,
|
|
15
18
|
type ConversationCreateParams,
|
|
16
19
|
type ConversationRetrieveParams,
|
|
17
20
|
type ConversationUpdateParams,
|
|
18
21
|
type ConversationListParams,
|
|
19
22
|
type ConversationDeleteParams,
|
|
23
|
+
type ConversationAttachTagParams,
|
|
24
|
+
type ConversationDetachTagParams,
|
|
20
25
|
type ConversationRedactParams,
|
|
21
26
|
type ConversationReplyParams,
|
|
27
|
+
type ConversationSearchParams,
|
|
22
28
|
type ConversationsCursorPage,
|
|
23
29
|
} from './conversations';
|
|
24
30
|
export { Participants, type ParticipantAddParams, type ParticipantRemoveParams } from './participants';
|
|
25
|
-
export {
|
|
26
|
-
Tags,
|
|
27
|
-
type AttachedConversationTag,
|
|
28
|
-
type ConversationTagMutationActor,
|
|
29
|
-
type TagAttachParams,
|
|
30
|
-
type TagDetachParams,
|
|
31
|
-
} from './tags';
|
|
@@ -22,13 +22,19 @@ export {
|
|
|
22
22
|
type CsatWorkflowLink,
|
|
23
23
|
type EmailRecipients,
|
|
24
24
|
type ConversationDeleteResponse,
|
|
25
|
+
type ConversationAttachTagResponse,
|
|
26
|
+
type ConversationDetachTagResponse,
|
|
27
|
+
type ConversationSearchResponse,
|
|
25
28
|
type ConversationCreateParams,
|
|
26
29
|
type ConversationRetrieveParams,
|
|
27
30
|
type ConversationUpdateParams,
|
|
28
31
|
type ConversationListParams,
|
|
29
32
|
type ConversationDeleteParams,
|
|
33
|
+
type ConversationAttachTagParams,
|
|
34
|
+
type ConversationDetachTagParams,
|
|
30
35
|
type ConversationRedactParams,
|
|
31
36
|
type ConversationReplyParams,
|
|
37
|
+
type ConversationSearchParams,
|
|
32
38
|
type ConversationsCursorPage,
|
|
33
39
|
} from './conversations/index';
|
|
34
40
|
export { Support } from './support';
|
|
@@ -15,9 +15,13 @@ import {
|
|
|
15
15
|
import * as ConversationsAPI from './conversations/conversations';
|
|
16
16
|
import {
|
|
17
17
|
Conversation,
|
|
18
|
+
ConversationAttachTagParams,
|
|
19
|
+
ConversationAttachTagResponse,
|
|
18
20
|
ConversationCreateParams,
|
|
19
21
|
ConversationDeleteParams,
|
|
20
22
|
ConversationDeleteResponse,
|
|
23
|
+
ConversationDetachTagParams,
|
|
24
|
+
ConversationDetachTagResponse,
|
|
21
25
|
ConversationListParams,
|
|
22
26
|
ConversationPart,
|
|
23
27
|
ConversationPartAuthor,
|
|
@@ -25,6 +29,8 @@ import {
|
|
|
25
29
|
ConversationRedactParams,
|
|
26
30
|
ConversationReplyParams,
|
|
27
31
|
ConversationRetrieveParams,
|
|
32
|
+
ConversationSearchParams,
|
|
33
|
+
ConversationSearchResponse,
|
|
28
34
|
ConversationTagApplication,
|
|
29
35
|
ConversationUpdateParams,
|
|
30
36
|
Conversations,
|
|
@@ -74,14 +80,20 @@ export declare namespace Support {
|
|
|
74
80
|
type CsatWorkflowLink as CsatWorkflowLink,
|
|
75
81
|
type EmailRecipients as EmailRecipients,
|
|
76
82
|
type ConversationDeleteResponse as ConversationDeleteResponse,
|
|
83
|
+
type ConversationAttachTagResponse as ConversationAttachTagResponse,
|
|
84
|
+
type ConversationDetachTagResponse as ConversationDetachTagResponse,
|
|
85
|
+
type ConversationSearchResponse as ConversationSearchResponse,
|
|
77
86
|
type ConversationsCursorPage as ConversationsCursorPage,
|
|
78
87
|
type ConversationCreateParams as ConversationCreateParams,
|
|
79
88
|
type ConversationRetrieveParams as ConversationRetrieveParams,
|
|
80
89
|
type ConversationUpdateParams as ConversationUpdateParams,
|
|
81
90
|
type ConversationListParams as ConversationListParams,
|
|
82
91
|
type ConversationDeleteParams as ConversationDeleteParams,
|
|
92
|
+
type ConversationAttachTagParams as ConversationAttachTagParams,
|
|
93
|
+
type ConversationDetachTagParams as ConversationDetachTagParams,
|
|
83
94
|
type ConversationRedactParams as ConversationRedactParams,
|
|
84
95
|
type ConversationReplyParams as ConversationReplyParams,
|
|
96
|
+
type ConversationSearchParams as ConversationSearchParams,
|
|
85
97
|
};
|
|
86
98
|
|
|
87
99
|
export {
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.9.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.9.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.9.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.9.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../../../core/resource.mjs";
|
|
2
|
-
import { APIPromise } from "../../../core/api-promise.mjs";
|
|
3
|
-
import { RequestOptions } from "../../../internal/request-options.mjs";
|
|
4
|
-
/**
|
|
5
|
-
* Conversations are messenger/inbox conversations in your Featurebase organization. Use this endpoint to list and retrieve conversation information.
|
|
6
|
-
*/
|
|
7
|
-
export declare class Tags extends APIResource {
|
|
8
|
-
/**
|
|
9
|
-
* Attaches a workspace tag to a conversation.
|
|
10
|
-
*
|
|
11
|
-
* This endpoint requires both the tag ID to attach and the `actingAdminId` of the
|
|
12
|
-
* admin on whose behalf the mutation is recorded.
|
|
13
|
-
*
|
|
14
|
-
* ### Path Parameters
|
|
15
|
-
*
|
|
16
|
-
* - `id` - The conversation ID (short ID)
|
|
17
|
-
*
|
|
18
|
-
* ### Request Body
|
|
19
|
-
*
|
|
20
|
-
* | Field | Type | Required | Description |
|
|
21
|
-
* | --------------- | ------ | -------- | ------------------------------------------------------------------------ |
|
|
22
|
-
* | `tagId` | string | Yes | The Featurebase tag ID to attach |
|
|
23
|
-
* | `actingAdminId` | string | Yes | The admin performing the mutation. Must be a member of the organization. |
|
|
24
|
-
*
|
|
25
|
-
* ### Behavior
|
|
26
|
-
*
|
|
27
|
-
* Featurebase resolves the latest taggable reply/message in the conversation and
|
|
28
|
-
* records the tag attachment against that part so audit metadata remains
|
|
29
|
-
* deterministic.
|
|
30
|
-
*
|
|
31
|
-
* ### Response
|
|
32
|
-
*
|
|
33
|
-
* Returns the affected tag plus attachment metadata such as `targetPartId`,
|
|
34
|
-
* `appliedAt`, and `appliedBy`.
|
|
35
|
-
*
|
|
36
|
-
* ### Example Request
|
|
37
|
-
*
|
|
38
|
-
* ```json
|
|
39
|
-
* {
|
|
40
|
-
* "tagId": "67ec1234abcd5678ef901234",
|
|
41
|
-
* "actingAdminId": "507f1f77bcf86cd799439011"
|
|
42
|
-
* }
|
|
43
|
-
* ```
|
|
44
|
-
*
|
|
45
|
-
* ### Version Availability
|
|
46
|
-
*
|
|
47
|
-
* This endpoint is only available in API version 2026-01-01.nova and newer.
|
|
48
|
-
*
|
|
49
|
-
* @example
|
|
50
|
-
* ```ts
|
|
51
|
-
* const attachedConversationTag =
|
|
52
|
-
* await client.support.conversations.tags.attach('12345', {
|
|
53
|
-
* actingAdminId: '507f1f77bcf86cd799439011',
|
|
54
|
-
* tagId: '67ec1234abcd5678ef901234',
|
|
55
|
-
* });
|
|
56
|
-
* ```
|
|
57
|
-
*/
|
|
58
|
-
attach(id: string, params: TagAttachParams, options?: RequestOptions): APIPromise<AttachedConversationTag>;
|
|
59
|
-
/**
|
|
60
|
-
* Removes a workspace tag from a conversation.
|
|
61
|
-
*
|
|
62
|
-
* This endpoint requires the `actingAdminId` of the admin on whose behalf the
|
|
63
|
-
* mutation is recorded.
|
|
64
|
-
*
|
|
65
|
-
* ### Path Parameters
|
|
66
|
-
*
|
|
67
|
-
* - `id` - The conversation ID (short ID)
|
|
68
|
-
* - `tagId` - The Featurebase tag ID to remove
|
|
69
|
-
*
|
|
70
|
-
* ### Request Body
|
|
71
|
-
*
|
|
72
|
-
* | Field | Type | Required | Description |
|
|
73
|
-
* | --------------- | ------ | -------- | ------------------------------------------------------------------------ |
|
|
74
|
-
* | `actingAdminId` | string | Yes | The admin performing the mutation. Must be a member of the organization. |
|
|
75
|
-
*
|
|
76
|
-
* ### Behavior
|
|
77
|
-
*
|
|
78
|
-
* Featurebase resolves the latest taggable reply/message in the conversation and
|
|
79
|
-
* records the tag removal against that part so audit metadata remains
|
|
80
|
-
* deterministic.
|
|
81
|
-
*
|
|
82
|
-
* ### Response
|
|
83
|
-
*
|
|
84
|
-
* Returns the affected tag payload with the most relevant attachment metadata
|
|
85
|
-
* available for that relationship.
|
|
86
|
-
*
|
|
87
|
-
* ### Example Request
|
|
88
|
-
*
|
|
89
|
-
* ```json
|
|
90
|
-
* {
|
|
91
|
-
* "actingAdminId": "507f1f77bcf86cd799439011"
|
|
92
|
-
* }
|
|
93
|
-
* ```
|
|
94
|
-
*
|
|
95
|
-
* ### Version Availability
|
|
96
|
-
*
|
|
97
|
-
* This endpoint is only available in API version 2026-01-01.nova and newer.
|
|
98
|
-
*
|
|
99
|
-
* @example
|
|
100
|
-
* ```ts
|
|
101
|
-
* const attachedConversationTag =
|
|
102
|
-
* await client.support.conversations.tags.detach(
|
|
103
|
-
* '67ec1234abcd5678ef901234',
|
|
104
|
-
* {
|
|
105
|
-
* id: '12345',
|
|
106
|
-
* actingAdminId: '507f1f77bcf86cd799439011',
|
|
107
|
-
* },
|
|
108
|
-
* );
|
|
109
|
-
* ```
|
|
110
|
-
*/
|
|
111
|
-
detach(tagID: string, params: TagDetachParams, options?: RequestOptions): APIPromise<AttachedConversationTag>;
|
|
112
|
-
}
|
|
113
|
-
export interface AttachedConversationTag {
|
|
114
|
-
/**
|
|
115
|
-
* Unique tag identifier
|
|
116
|
-
*/
|
|
117
|
-
id: string;
|
|
118
|
-
/**
|
|
119
|
-
* Current tag name
|
|
120
|
-
*/
|
|
121
|
-
name: string;
|
|
122
|
-
/**
|
|
123
|
-
* Object type identifier for a tag
|
|
124
|
-
*/
|
|
125
|
-
type: 'tag';
|
|
126
|
-
/**
|
|
127
|
-
* ISO timestamp when the tag was applied
|
|
128
|
-
*/
|
|
129
|
-
appliedAt?: string | null;
|
|
130
|
-
/**
|
|
131
|
-
* Actor that applied the tag
|
|
132
|
-
*/
|
|
133
|
-
appliedBy?: ConversationTagMutationActor | null;
|
|
134
|
-
/**
|
|
135
|
-
* ISO timestamp when the tag was removed, if applicable
|
|
136
|
-
*/
|
|
137
|
-
removedAt?: string | null;
|
|
138
|
-
/**
|
|
139
|
-
* Actor that applied the tag
|
|
140
|
-
*/
|
|
141
|
-
removedBy?: ConversationTagMutationActor | null;
|
|
142
|
-
/**
|
|
143
|
-
* Reply/message ID used as the deterministic attachment target for this
|
|
144
|
-
* conversation tag mutation.
|
|
145
|
-
*/
|
|
146
|
-
targetPartId?: string | null;
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Actor that applied the tag
|
|
150
|
-
*/
|
|
151
|
-
export interface ConversationTagMutationActor {
|
|
152
|
-
/**
|
|
153
|
-
* Actor that caused the tag mutation
|
|
154
|
-
*/
|
|
155
|
-
type: 'admin' | 'customer' | 'lead' | 'bot' | 'integration' | 'system' | 'workflow';
|
|
156
|
-
/**
|
|
157
|
-
* Actor identifier when available
|
|
158
|
-
*/
|
|
159
|
-
id?: string | null;
|
|
160
|
-
/**
|
|
161
|
-
* Actor display name when available
|
|
162
|
-
*/
|
|
163
|
-
name?: string | null;
|
|
164
|
-
}
|
|
165
|
-
export interface TagAttachParams {
|
|
166
|
-
/**
|
|
167
|
-
* Body param: Required admin ID performing this tag attachment. Must be a member
|
|
168
|
-
* of the organization so the mutation can be attributed to a real admin actor.
|
|
169
|
-
*/
|
|
170
|
-
actingAdminId: string;
|
|
171
|
-
/**
|
|
172
|
-
* Body param: The Featurebase tag ID to attach to the conversation.
|
|
173
|
-
*/
|
|
174
|
-
tagId: string;
|
|
175
|
-
/**
|
|
176
|
-
* Header param: API version for this request. Defaults to your organization's
|
|
177
|
-
* configured API version if not specified.
|
|
178
|
-
*/
|
|
179
|
-
'Featurebase-Version'?: '2026-01-01.nova' | '2025-12-12.clover';
|
|
180
|
-
}
|
|
181
|
-
export interface TagDetachParams {
|
|
182
|
-
/**
|
|
183
|
-
* Path param: Conversation ID (short ID)
|
|
184
|
-
*/
|
|
185
|
-
id: string;
|
|
186
|
-
/**
|
|
187
|
-
* Body param: Required admin ID performing this tag removal. Must be a member of
|
|
188
|
-
* the organization so the mutation can be attributed to a real admin actor.
|
|
189
|
-
*/
|
|
190
|
-
actingAdminId: string;
|
|
191
|
-
/**
|
|
192
|
-
* Header param: API version for this request. Defaults to your organization's
|
|
193
|
-
* configured API version if not specified.
|
|
194
|
-
*/
|
|
195
|
-
'Featurebase-Version'?: '2026-01-01.nova' | '2025-12-12.clover';
|
|
196
|
-
}
|
|
197
|
-
export declare namespace Tags {
|
|
198
|
-
export { type AttachedConversationTag as AttachedConversationTag, type ConversationTagMutationActor as ConversationTagMutationActor, type TagAttachParams as TagAttachParams, type TagDetachParams as TagDetachParams, };
|
|
199
|
-
}
|
|
200
|
-
//# sourceMappingURL=tags.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tags.d.mts","sourceRoot":"","sources":["../../../src/resources/support/conversations/tags.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,IAAK,SAAQ,WAAW;IACnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiDG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;IAgB1G;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmDG;IACH,MAAM,CACJ,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,eAAe,EACvB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,uBAAuB,CAAC;CAevC;AAED,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC;IAEZ;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B;;OAEG;IACH,SAAS,CAAC,EAAE,4BAA4B,GAAG,IAAI,CAAC;IAEhD;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B;;OAEG;IACH,SAAS,CAAC,EAAE,4BAA4B,GAAG,IAAI,CAAC;IAEhD;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,IAAI,EAAE,OAAO,GAAG,UAAU,GAAG,MAAM,GAAG,KAAK,GAAG,aAAa,GAAG,QAAQ,GAAG,UAAU,CAAC;IAEpF;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEnB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,qBAAqB,CAAC,EAAE,iBAAiB,GAAG,mBAAmB,CAAC;CACjE;AAED,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,qBAAqB,CAAC,EAAE,iBAAiB,GAAG,mBAAmB,CAAC;CACjE;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EACL,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,eAAe,IAAI,eAAe,GACxC,CAAC;CACH"}
|
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
import { APIResource } from "../../../core/resource.js";
|
|
2
|
-
import { APIPromise } from "../../../core/api-promise.js";
|
|
3
|
-
import { RequestOptions } from "../../../internal/request-options.js";
|
|
4
|
-
/**
|
|
5
|
-
* Conversations are messenger/inbox conversations in your Featurebase organization. Use this endpoint to list and retrieve conversation information.
|
|
6
|
-
*/
|
|
7
|
-
export declare class Tags extends APIResource {
|
|
8
|
-
/**
|
|
9
|
-
* Attaches a workspace tag to a conversation.
|
|
10
|
-
*
|
|
11
|
-
* This endpoint requires both the tag ID to attach and the `actingAdminId` of the
|
|
12
|
-
* admin on whose behalf the mutation is recorded.
|
|
13
|
-
*
|
|
14
|
-
* ### Path Parameters
|
|
15
|
-
*
|
|
16
|
-
* - `id` - The conversation ID (short ID)
|
|
17
|
-
*
|
|
18
|
-
* ### Request Body
|
|
19
|
-
*
|
|
20
|
-
* | Field | Type | Required | Description |
|
|
21
|
-
* | --------------- | ------ | -------- | ------------------------------------------------------------------------ |
|
|
22
|
-
* | `tagId` | string | Yes | The Featurebase tag ID to attach |
|
|
23
|
-
* | `actingAdminId` | string | Yes | The admin performing the mutation. Must be a member of the organization. |
|
|
24
|
-
*
|
|
25
|
-
* ### Behavior
|
|
26
|
-
*
|
|
27
|
-
* Featurebase resolves the latest taggable reply/message in the conversation and
|
|
28
|
-
* records the tag attachment against that part so audit metadata remains
|
|
29
|
-
* deterministic.
|
|
30
|
-
*
|
|
31
|
-
* ### Response
|
|
32
|
-
*
|
|
33
|
-
* Returns the affected tag plus attachment metadata such as `targetPartId`,
|
|
34
|
-
* `appliedAt`, and `appliedBy`.
|
|
35
|
-
*
|
|
36
|
-
* ### Example Request
|
|
37
|
-
*
|
|
38
|
-
* ```json
|
|
39
|
-
* {
|
|
40
|
-
* "tagId": "67ec1234abcd5678ef901234",
|
|
41
|
-
* "actingAdminId": "507f1f77bcf86cd799439011"
|
|
42
|
-
* }
|
|
43
|
-
* ```
|
|
44
|
-
*
|
|
45
|
-
* ### Version Availability
|
|
46
|
-
*
|
|
47
|
-
* This endpoint is only available in API version 2026-01-01.nova and newer.
|
|
48
|
-
*
|
|
49
|
-
* @example
|
|
50
|
-
* ```ts
|
|
51
|
-
* const attachedConversationTag =
|
|
52
|
-
* await client.support.conversations.tags.attach('12345', {
|
|
53
|
-
* actingAdminId: '507f1f77bcf86cd799439011',
|
|
54
|
-
* tagId: '67ec1234abcd5678ef901234',
|
|
55
|
-
* });
|
|
56
|
-
* ```
|
|
57
|
-
*/
|
|
58
|
-
attach(id: string, params: TagAttachParams, options?: RequestOptions): APIPromise<AttachedConversationTag>;
|
|
59
|
-
/**
|
|
60
|
-
* Removes a workspace tag from a conversation.
|
|
61
|
-
*
|
|
62
|
-
* This endpoint requires the `actingAdminId` of the admin on whose behalf the
|
|
63
|
-
* mutation is recorded.
|
|
64
|
-
*
|
|
65
|
-
* ### Path Parameters
|
|
66
|
-
*
|
|
67
|
-
* - `id` - The conversation ID (short ID)
|
|
68
|
-
* - `tagId` - The Featurebase tag ID to remove
|
|
69
|
-
*
|
|
70
|
-
* ### Request Body
|
|
71
|
-
*
|
|
72
|
-
* | Field | Type | Required | Description |
|
|
73
|
-
* | --------------- | ------ | -------- | ------------------------------------------------------------------------ |
|
|
74
|
-
* | `actingAdminId` | string | Yes | The admin performing the mutation. Must be a member of the organization. |
|
|
75
|
-
*
|
|
76
|
-
* ### Behavior
|
|
77
|
-
*
|
|
78
|
-
* Featurebase resolves the latest taggable reply/message in the conversation and
|
|
79
|
-
* records the tag removal against that part so audit metadata remains
|
|
80
|
-
* deterministic.
|
|
81
|
-
*
|
|
82
|
-
* ### Response
|
|
83
|
-
*
|
|
84
|
-
* Returns the affected tag payload with the most relevant attachment metadata
|
|
85
|
-
* available for that relationship.
|
|
86
|
-
*
|
|
87
|
-
* ### Example Request
|
|
88
|
-
*
|
|
89
|
-
* ```json
|
|
90
|
-
* {
|
|
91
|
-
* "actingAdminId": "507f1f77bcf86cd799439011"
|
|
92
|
-
* }
|
|
93
|
-
* ```
|
|
94
|
-
*
|
|
95
|
-
* ### Version Availability
|
|
96
|
-
*
|
|
97
|
-
* This endpoint is only available in API version 2026-01-01.nova and newer.
|
|
98
|
-
*
|
|
99
|
-
* @example
|
|
100
|
-
* ```ts
|
|
101
|
-
* const attachedConversationTag =
|
|
102
|
-
* await client.support.conversations.tags.detach(
|
|
103
|
-
* '67ec1234abcd5678ef901234',
|
|
104
|
-
* {
|
|
105
|
-
* id: '12345',
|
|
106
|
-
* actingAdminId: '507f1f77bcf86cd799439011',
|
|
107
|
-
* },
|
|
108
|
-
* );
|
|
109
|
-
* ```
|
|
110
|
-
*/
|
|
111
|
-
detach(tagID: string, params: TagDetachParams, options?: RequestOptions): APIPromise<AttachedConversationTag>;
|
|
112
|
-
}
|
|
113
|
-
export interface AttachedConversationTag {
|
|
114
|
-
/**
|
|
115
|
-
* Unique tag identifier
|
|
116
|
-
*/
|
|
117
|
-
id: string;
|
|
118
|
-
/**
|
|
119
|
-
* Current tag name
|
|
120
|
-
*/
|
|
121
|
-
name: string;
|
|
122
|
-
/**
|
|
123
|
-
* Object type identifier for a tag
|
|
124
|
-
*/
|
|
125
|
-
type: 'tag';
|
|
126
|
-
/**
|
|
127
|
-
* ISO timestamp when the tag was applied
|
|
128
|
-
*/
|
|
129
|
-
appliedAt?: string | null;
|
|
130
|
-
/**
|
|
131
|
-
* Actor that applied the tag
|
|
132
|
-
*/
|
|
133
|
-
appliedBy?: ConversationTagMutationActor | null;
|
|
134
|
-
/**
|
|
135
|
-
* ISO timestamp when the tag was removed, if applicable
|
|
136
|
-
*/
|
|
137
|
-
removedAt?: string | null;
|
|
138
|
-
/**
|
|
139
|
-
* Actor that applied the tag
|
|
140
|
-
*/
|
|
141
|
-
removedBy?: ConversationTagMutationActor | null;
|
|
142
|
-
/**
|
|
143
|
-
* Reply/message ID used as the deterministic attachment target for this
|
|
144
|
-
* conversation tag mutation.
|
|
145
|
-
*/
|
|
146
|
-
targetPartId?: string | null;
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Actor that applied the tag
|
|
150
|
-
*/
|
|
151
|
-
export interface ConversationTagMutationActor {
|
|
152
|
-
/**
|
|
153
|
-
* Actor that caused the tag mutation
|
|
154
|
-
*/
|
|
155
|
-
type: 'admin' | 'customer' | 'lead' | 'bot' | 'integration' | 'system' | 'workflow';
|
|
156
|
-
/**
|
|
157
|
-
* Actor identifier when available
|
|
158
|
-
*/
|
|
159
|
-
id?: string | null;
|
|
160
|
-
/**
|
|
161
|
-
* Actor display name when available
|
|
162
|
-
*/
|
|
163
|
-
name?: string | null;
|
|
164
|
-
}
|
|
165
|
-
export interface TagAttachParams {
|
|
166
|
-
/**
|
|
167
|
-
* Body param: Required admin ID performing this tag attachment. Must be a member
|
|
168
|
-
* of the organization so the mutation can be attributed to a real admin actor.
|
|
169
|
-
*/
|
|
170
|
-
actingAdminId: string;
|
|
171
|
-
/**
|
|
172
|
-
* Body param: The Featurebase tag ID to attach to the conversation.
|
|
173
|
-
*/
|
|
174
|
-
tagId: string;
|
|
175
|
-
/**
|
|
176
|
-
* Header param: API version for this request. Defaults to your organization's
|
|
177
|
-
* configured API version if not specified.
|
|
178
|
-
*/
|
|
179
|
-
'Featurebase-Version'?: '2026-01-01.nova' | '2025-12-12.clover';
|
|
180
|
-
}
|
|
181
|
-
export interface TagDetachParams {
|
|
182
|
-
/**
|
|
183
|
-
* Path param: Conversation ID (short ID)
|
|
184
|
-
*/
|
|
185
|
-
id: string;
|
|
186
|
-
/**
|
|
187
|
-
* Body param: Required admin ID performing this tag removal. Must be a member of
|
|
188
|
-
* the organization so the mutation can be attributed to a real admin actor.
|
|
189
|
-
*/
|
|
190
|
-
actingAdminId: string;
|
|
191
|
-
/**
|
|
192
|
-
* Header param: API version for this request. Defaults to your organization's
|
|
193
|
-
* configured API version if not specified.
|
|
194
|
-
*/
|
|
195
|
-
'Featurebase-Version'?: '2026-01-01.nova' | '2025-12-12.clover';
|
|
196
|
-
}
|
|
197
|
-
export declare namespace Tags {
|
|
198
|
-
export { type AttachedConversationTag as AttachedConversationTag, type ConversationTagMutationActor as ConversationTagMutationActor, type TagAttachParams as TagAttachParams, type TagDetachParams as TagDetachParams, };
|
|
199
|
-
}
|
|
200
|
-
//# sourceMappingURL=tags.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tags.d.ts","sourceRoot":"","sources":["../../../src/resources/support/conversations/tags.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAGzB;;GAEG;AACH,qBAAa,IAAK,SAAQ,WAAW;IACnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiDG;IACH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;IAgB1G;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmDG;IACH,MAAM,CACJ,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,eAAe,EACvB,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,uBAAuB,CAAC;CAevC;AAED,MAAM,WAAW,uBAAuB;IACtC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC;IAEZ;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B;;OAEG;IACH,SAAS,CAAC,EAAE,4BAA4B,GAAG,IAAI,CAAC;IAEhD;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B;;OAEG;IACH,SAAS,CAAC,EAAE,4BAA4B,GAAG,IAAI,CAAC;IAEhD;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,IAAI,EAAE,OAAO,GAAG,UAAU,GAAG,MAAM,GAAG,KAAK,GAAG,aAAa,GAAG,QAAQ,GAAG,UAAU,CAAC;IAEpF;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEnB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,qBAAqB,CAAC,EAAE,iBAAiB,GAAG,mBAAmB,CAAC;CACjE;AAED,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,qBAAqB,CAAC,EAAE,iBAAiB,GAAG,mBAAmB,CAAC;CACjE;AAED,MAAM,CAAC,OAAO,WAAW,IAAI,CAAC;IAC5B,OAAO,EACL,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,4BAA4B,IAAI,4BAA4B,EACjE,KAAK,eAAe,IAAI,eAAe,EACvC,KAAK,eAAe,IAAI,eAAe,GACxC,CAAC;CACH"}
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Tags = void 0;
|
|
5
|
-
const resource_1 = require("../../../core/resource.js");
|
|
6
|
-
const headers_1 = require("../../../internal/headers.js");
|
|
7
|
-
const path_1 = require("../../../internal/utils/path.js");
|
|
8
|
-
/**
|
|
9
|
-
* Conversations are messenger/inbox conversations in your Featurebase organization. Use this endpoint to list and retrieve conversation information.
|
|
10
|
-
*/
|
|
11
|
-
class Tags extends resource_1.APIResource {
|
|
12
|
-
/**
|
|
13
|
-
* Attaches a workspace tag to a conversation.
|
|
14
|
-
*
|
|
15
|
-
* This endpoint requires both the tag ID to attach and the `actingAdminId` of the
|
|
16
|
-
* admin on whose behalf the mutation is recorded.
|
|
17
|
-
*
|
|
18
|
-
* ### Path Parameters
|
|
19
|
-
*
|
|
20
|
-
* - `id` - The conversation ID (short ID)
|
|
21
|
-
*
|
|
22
|
-
* ### Request Body
|
|
23
|
-
*
|
|
24
|
-
* | Field | Type | Required | Description |
|
|
25
|
-
* | --------------- | ------ | -------- | ------------------------------------------------------------------------ |
|
|
26
|
-
* | `tagId` | string | Yes | The Featurebase tag ID to attach |
|
|
27
|
-
* | `actingAdminId` | string | Yes | The admin performing the mutation. Must be a member of the organization. |
|
|
28
|
-
*
|
|
29
|
-
* ### Behavior
|
|
30
|
-
*
|
|
31
|
-
* Featurebase resolves the latest taggable reply/message in the conversation and
|
|
32
|
-
* records the tag attachment against that part so audit metadata remains
|
|
33
|
-
* deterministic.
|
|
34
|
-
*
|
|
35
|
-
* ### Response
|
|
36
|
-
*
|
|
37
|
-
* Returns the affected tag plus attachment metadata such as `targetPartId`,
|
|
38
|
-
* `appliedAt`, and `appliedBy`.
|
|
39
|
-
*
|
|
40
|
-
* ### Example Request
|
|
41
|
-
*
|
|
42
|
-
* ```json
|
|
43
|
-
* {
|
|
44
|
-
* "tagId": "67ec1234abcd5678ef901234",
|
|
45
|
-
* "actingAdminId": "507f1f77bcf86cd799439011"
|
|
46
|
-
* }
|
|
47
|
-
* ```
|
|
48
|
-
*
|
|
49
|
-
* ### Version Availability
|
|
50
|
-
*
|
|
51
|
-
* This endpoint is only available in API version 2026-01-01.nova and newer.
|
|
52
|
-
*
|
|
53
|
-
* @example
|
|
54
|
-
* ```ts
|
|
55
|
-
* const attachedConversationTag =
|
|
56
|
-
* await client.support.conversations.tags.attach('12345', {
|
|
57
|
-
* actingAdminId: '507f1f77bcf86cd799439011',
|
|
58
|
-
* tagId: '67ec1234abcd5678ef901234',
|
|
59
|
-
* });
|
|
60
|
-
* ```
|
|
61
|
-
*/
|
|
62
|
-
attach(id, params, options) {
|
|
63
|
-
const { 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
64
|
-
return this._client.post((0, path_1.path) `/v2/conversations/${id}/tags`, {
|
|
65
|
-
body,
|
|
66
|
-
...options,
|
|
67
|
-
headers: (0, headers_1.buildHeaders)([
|
|
68
|
-
{
|
|
69
|
-
...(featurebaseVersion?.toString() != null ?
|
|
70
|
-
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
71
|
-
: undefined),
|
|
72
|
-
},
|
|
73
|
-
options?.headers,
|
|
74
|
-
]),
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Removes a workspace tag from a conversation.
|
|
79
|
-
*
|
|
80
|
-
* This endpoint requires the `actingAdminId` of the admin on whose behalf the
|
|
81
|
-
* mutation is recorded.
|
|
82
|
-
*
|
|
83
|
-
* ### Path Parameters
|
|
84
|
-
*
|
|
85
|
-
* - `id` - The conversation ID (short ID)
|
|
86
|
-
* - `tagId` - The Featurebase tag ID to remove
|
|
87
|
-
*
|
|
88
|
-
* ### Request Body
|
|
89
|
-
*
|
|
90
|
-
* | Field | Type | Required | Description |
|
|
91
|
-
* | --------------- | ------ | -------- | ------------------------------------------------------------------------ |
|
|
92
|
-
* | `actingAdminId` | string | Yes | The admin performing the mutation. Must be a member of the organization. |
|
|
93
|
-
*
|
|
94
|
-
* ### Behavior
|
|
95
|
-
*
|
|
96
|
-
* Featurebase resolves the latest taggable reply/message in the conversation and
|
|
97
|
-
* records the tag removal against that part so audit metadata remains
|
|
98
|
-
* deterministic.
|
|
99
|
-
*
|
|
100
|
-
* ### Response
|
|
101
|
-
*
|
|
102
|
-
* Returns the affected tag payload with the most relevant attachment metadata
|
|
103
|
-
* available for that relationship.
|
|
104
|
-
*
|
|
105
|
-
* ### Example Request
|
|
106
|
-
*
|
|
107
|
-
* ```json
|
|
108
|
-
* {
|
|
109
|
-
* "actingAdminId": "507f1f77bcf86cd799439011"
|
|
110
|
-
* }
|
|
111
|
-
* ```
|
|
112
|
-
*
|
|
113
|
-
* ### Version Availability
|
|
114
|
-
*
|
|
115
|
-
* This endpoint is only available in API version 2026-01-01.nova and newer.
|
|
116
|
-
*
|
|
117
|
-
* @example
|
|
118
|
-
* ```ts
|
|
119
|
-
* const attachedConversationTag =
|
|
120
|
-
* await client.support.conversations.tags.detach(
|
|
121
|
-
* '67ec1234abcd5678ef901234',
|
|
122
|
-
* {
|
|
123
|
-
* id: '12345',
|
|
124
|
-
* actingAdminId: '507f1f77bcf86cd799439011',
|
|
125
|
-
* },
|
|
126
|
-
* );
|
|
127
|
-
* ```
|
|
128
|
-
*/
|
|
129
|
-
detach(tagID, params, options) {
|
|
130
|
-
const { id, 'Featurebase-Version': featurebaseVersion, ...body } = params;
|
|
131
|
-
return this._client.delete((0, path_1.path) `/v2/conversations/${id}/tags/${tagID}`, {
|
|
132
|
-
body,
|
|
133
|
-
...options,
|
|
134
|
-
headers: (0, headers_1.buildHeaders)([
|
|
135
|
-
{
|
|
136
|
-
...(featurebaseVersion?.toString() != null ?
|
|
137
|
-
{ 'Featurebase-Version': featurebaseVersion?.toString() }
|
|
138
|
-
: undefined),
|
|
139
|
-
},
|
|
140
|
-
options?.headers,
|
|
141
|
-
]),
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
exports.Tags = Tags;
|
|
146
|
-
//# sourceMappingURL=tags.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tags.js","sourceRoot":"","sources":["../../../src/resources/support/conversations/tags.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAErD,0DAAyD;AAEzD,0DAAoD;AAEpD;;GAEG;AACH,MAAa,IAAK,SAAQ,sBAAW;IACnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiDG;IACH,MAAM,CAAC,EAAU,EAAE,MAAuB,EAAE,OAAwB;QAClE,MAAM,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACtE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAA,WAAI,EAAA,qBAAqB,EAAE,OAAO,EAAE;YAC3D,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;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmDG;IACH,MAAM,CACJ,KAAa,EACb,MAAuB,EACvB,OAAwB;QAExB,MAAM,EAAE,EAAE,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QAC1E,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,IAAA,WAAI,EAAA,qBAAqB,EAAE,SAAS,KAAK,EAAE,EAAE;YACtE,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;AA1ID,oBA0IC"}
|