@formbricks/hub 0.2.0 → 0.4.1
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 +72 -0
- package/README.md +2 -2
- package/client.d.mts +15 -3
- package/client.d.mts.map +1 -1
- package/client.d.ts +15 -3
- package/client.d.ts.map +1 -1
- package/client.js +28 -18
- package/client.js.map +1 -1
- package/client.mjs +28 -18
- package/client.mjs.map +1 -1
- package/internal/tslib.js +17 -17
- package/internal/utils/query.d.mts +5 -0
- package/internal/utils/query.d.mts.map +1 -0
- package/internal/utils/query.d.ts +5 -0
- package/internal/utils/query.d.ts.map +1 -0
- package/internal/utils/query.js +23 -0
- package/internal/utils/query.js.map +1 -0
- package/internal/utils/query.mjs +20 -0
- package/internal/utils/query.mjs.map +1 -0
- package/internal/utils.d.mts +1 -0
- package/internal/utils.d.ts +1 -0
- package/internal/utils.js +1 -0
- package/internal/utils.js.map +1 -1
- package/internal/utils.mjs +1 -0
- package/package.json +7 -1
- package/resources/feedback-records/feedback-records.d.mts +473 -0
- package/resources/feedback-records/feedback-records.d.mts.map +1 -0
- package/resources/feedback-records/feedback-records.d.ts +473 -0
- package/resources/feedback-records/feedback-records.d.ts.map +1 -0
- package/resources/feedback-records/feedback-records.js +139 -0
- package/resources/feedback-records/feedback-records.js.map +1 -0
- package/resources/feedback-records/feedback-records.mjs +134 -0
- package/resources/feedback-records/feedback-records.mjs.map +1 -0
- package/resources/feedback-records/index.d.mts +3 -0
- package/resources/feedback-records/index.d.mts.map +1 -0
- package/resources/feedback-records/index.d.ts +3 -0
- package/resources/feedback-records/index.d.ts.map +1 -0
- package/resources/feedback-records/index.js +9 -0
- package/resources/feedback-records/index.js.map +1 -0
- package/resources/feedback-records/index.mjs +4 -0
- package/resources/feedback-records/index.mjs.map +1 -0
- package/resources/feedback-records/search.d.mts +98 -0
- package/resources/feedback-records/search.d.mts.map +1 -0
- package/resources/feedback-records/search.d.ts +98 -0
- package/resources/feedback-records/search.d.ts.map +1 -0
- package/resources/feedback-records/search.js +38 -0
- package/resources/feedback-records/search.js.map +1 -0
- package/resources/feedback-records/search.mjs +34 -0
- package/resources/feedback-records/search.mjs.map +1 -0
- package/resources/feedback-records.d.mts +1 -369
- package/resources/feedback-records.d.mts.map +1 -1
- package/resources/feedback-records.d.ts +1 -369
- package/resources/feedback-records.d.ts.map +1 -1
- package/resources/feedback-records.js +2 -102
- package/resources/feedback-records.js.map +1 -1
- package/resources/feedback-records.mjs +1 -100
- package/resources/feedback-records.mjs.map +1 -1
- package/resources/health.d.mts +3 -0
- package/resources/health.d.mts.map +1 -1
- package/resources/health.d.ts +3 -0
- package/resources/health.d.ts.map +1 -1
- package/resources/health.js +3 -0
- package/resources/health.js.map +1 -1
- package/resources/health.mjs +3 -0
- package/resources/health.mjs.map +1 -1
- package/resources/index.d.mts +2 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +4 -2
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -1
- package/resources/index.mjs.map +1 -1
- package/resources/webhooks.d.mts +338 -0
- package/resources/webhooks.d.mts.map +1 -0
- package/resources/webhooks.d.ts +338 -0
- package/resources/webhooks.d.ts.map +1 -0
- package/resources/webhooks.js +91 -0
- package/resources/webhooks.js.map +1 -0
- package/resources/webhooks.mjs +87 -0
- package/resources/webhooks.mjs.map +1 -0
- package/src/client.ts +56 -23
- package/src/internal/utils/query.ts +23 -0
- package/src/internal/utils.ts +1 -0
- package/src/resources/feedback-records/feedback-records.ts +601 -0
- package/src/resources/feedback-records/index.ts +19 -0
- package/src/resources/feedback-records/search.ts +126 -0
- package/src/resources/feedback-records.ts +1 -469
- package/src/resources/health.ts +3 -0
- package/src/resources/index.ts +13 -1
- package/src/resources/webhooks.ts +469 -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
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Feedback record CRUD and search
|
|
9
|
+
*/
|
|
10
|
+
export class Search extends APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Embeds the search query and returns feedback record IDs with similarity scores
|
|
13
|
+
* (cosine, 0..1). **Only available when embeddings are configured**
|
|
14
|
+
* (EMBEDDING_PROVIDER and EMBEDDING_MODEL set). When embeddings are disabled, this
|
|
15
|
+
* endpoint returns 503 Service Unavailable. Request body must include query and
|
|
16
|
+
* tenant_id (required for tenant isolation).
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* const response =
|
|
21
|
+
* await client.feedbackRecords.search.performSemanticSearch(
|
|
22
|
+
* {
|
|
23
|
+
* query: 'What do users think about login speed?',
|
|
24
|
+
* tenant_id: 'org-123',
|
|
25
|
+
* },
|
|
26
|
+
* );
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
performSemanticSearch(
|
|
30
|
+
params: SearchPerformSemanticSearchParams,
|
|
31
|
+
options?: RequestOptions,
|
|
32
|
+
): APIPromise<SearchPerformSemanticSearchResponse> {
|
|
33
|
+
const { cursor, limit, min_score, ...body } = params;
|
|
34
|
+
return this._client.post('/v1/feedback-records/search/semantic', {
|
|
35
|
+
query: { cursor, limit, min_score },
|
|
36
|
+
body,
|
|
37
|
+
...options,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface SearchPerformSemanticSearchResponse {
|
|
43
|
+
/**
|
|
44
|
+
* List of feedback record IDs with similarity scores (0 = unrelated, 1 =
|
|
45
|
+
* identical). Consistent with list endpoints.
|
|
46
|
+
*/
|
|
47
|
+
data: Array<SearchPerformSemanticSearchResponse.Data>;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Limit used in query (echoed for consistency with list endpoints)
|
|
51
|
+
*/
|
|
52
|
+
limit: number;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Opaque cursor for the next page (keyset paging). Present only when there may be
|
|
56
|
+
* more results (full page returned). Omit when no next page. Use this exact value
|
|
57
|
+
* as the cursor query param for the next page.
|
|
58
|
+
*/
|
|
59
|
+
next_cursor?: string;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export namespace SearchPerformSemanticSearchResponse {
|
|
63
|
+
export interface Data {
|
|
64
|
+
/**
|
|
65
|
+
* Feedback record UUID
|
|
66
|
+
*/
|
|
67
|
+
feedback_record_id: string;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Label of the feedback field (included in embedding for context). May be empty if
|
|
71
|
+
* the source record had no label.
|
|
72
|
+
*/
|
|
73
|
+
field_label: string;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Similarity score (0..1)
|
|
77
|
+
*/
|
|
78
|
+
score: number;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* value_text of the feedback record (the text that was embedded). May be empty if
|
|
82
|
+
* the source had no text; embeddings are only created for records with non-empty
|
|
83
|
+
* value_text, but the field can be cleared after embedding creation.
|
|
84
|
+
*/
|
|
85
|
+
value_text: string;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export interface SearchPerformSemanticSearchParams {
|
|
90
|
+
/**
|
|
91
|
+
* Body param: Search query text (embedded and compared via cosine similarity)
|
|
92
|
+
*/
|
|
93
|
+
query: string;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Body param: Tenant ID (required for isolation; must match feedback record
|
|
97
|
+
* tenant_id)
|
|
98
|
+
*/
|
|
99
|
+
tenant_id: string;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Query param: Omit for the first page. For the next page, use the exact value
|
|
103
|
+
* from the previous response's next_cursor. Opaque (base64-encoded); keyset
|
|
104
|
+
* pagination.
|
|
105
|
+
*/
|
|
106
|
+
cursor?: string;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Query param: Number of results to return (default 10, max 100). Consistent with
|
|
110
|
+
* list endpoints.
|
|
111
|
+
*/
|
|
112
|
+
limit?: number;
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Query param: Minimum similarity score (0..1); only results with score >=
|
|
116
|
+
* min_score are returned. Default 0.7 to reduce noise.
|
|
117
|
+
*/
|
|
118
|
+
min_score?: number;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export declare namespace Search {
|
|
122
|
+
export {
|
|
123
|
+
type SearchPerformSemanticSearchResponse as SearchPerformSemanticSearchResponse,
|
|
124
|
+
type SearchPerformSemanticSearchParams as SearchPerformSemanticSearchParams,
|
|
125
|
+
};
|
|
126
|
+
}
|
|
@@ -1,471 +1,3 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
import { APIPromise } from '../core/api-promise';
|
|
5
|
-
import { buildHeaders } from '../internal/headers';
|
|
6
|
-
import { RequestOptions } from '../internal/request-options';
|
|
7
|
-
import { path } from '../internal/utils/path';
|
|
8
|
-
|
|
9
|
-
export class FeedbackRecords extends APIResource {
|
|
10
|
-
/**
|
|
11
|
-
* Creates a new feedback record data point
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```ts
|
|
15
|
-
* const feedbackRecordData =
|
|
16
|
-
* await client.feedbackRecords.create({
|
|
17
|
-
* field_id: 'q1',
|
|
18
|
-
* field_type: 'rating',
|
|
19
|
-
* source_type: 'survey',
|
|
20
|
-
* field_label: 'How satisfied are you?',
|
|
21
|
-
* language: 'en',
|
|
22
|
-
* source_id: 'survey-123',
|
|
23
|
-
* source_name: 'Q1 NPS Survey',
|
|
24
|
-
* tenant_id: 'org-123',
|
|
25
|
-
* user_identifier: 'user-abc-123',
|
|
26
|
-
* value_number: 9,
|
|
27
|
-
* });
|
|
28
|
-
* ```
|
|
29
|
-
*/
|
|
30
|
-
create(body: FeedbackRecordCreateParams, options?: RequestOptions): APIPromise<FeedbackRecordData> {
|
|
31
|
-
return this._client.post('/v1/feedback-records', { body, ...options });
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Retrieves a single feedback record data point by its UUID
|
|
36
|
-
*
|
|
37
|
-
* @example
|
|
38
|
-
* ```ts
|
|
39
|
-
* const feedbackRecordData =
|
|
40
|
-
* await client.feedbackRecords.retrieve(
|
|
41
|
-
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
42
|
-
* );
|
|
43
|
-
* ```
|
|
44
|
-
*/
|
|
45
|
-
retrieve(id: string, options?: RequestOptions): APIPromise<FeedbackRecordData> {
|
|
46
|
-
return this._client.get(path`/v1/feedback-records/${id}`, options);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Updates specific fields of a feedback record data point
|
|
51
|
-
*
|
|
52
|
-
* @example
|
|
53
|
-
* ```ts
|
|
54
|
-
* const feedbackRecordData =
|
|
55
|
-
* await client.feedbackRecords.update(
|
|
56
|
-
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
57
|
-
* { value_text: 'Updated feedback text' },
|
|
58
|
-
* );
|
|
59
|
-
* ```
|
|
60
|
-
*/
|
|
61
|
-
update(
|
|
62
|
-
id: string,
|
|
63
|
-
body: FeedbackRecordUpdateParams,
|
|
64
|
-
options?: RequestOptions,
|
|
65
|
-
): APIPromise<FeedbackRecordData> {
|
|
66
|
-
return this._client.patch(path`/v1/feedback-records/${id}`, { body, ...options });
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Lists feedback records with optional filters and pagination
|
|
71
|
-
*
|
|
72
|
-
* @example
|
|
73
|
-
* ```ts
|
|
74
|
-
* const feedbackRecords = await client.feedbackRecords.list();
|
|
75
|
-
* ```
|
|
76
|
-
*/
|
|
77
|
-
list(
|
|
78
|
-
query: FeedbackRecordListParams | null | undefined = {},
|
|
79
|
-
options?: RequestOptions,
|
|
80
|
-
): APIPromise<FeedbackRecordListResponse> {
|
|
81
|
-
return this._client.get('/v1/feedback-records', { query, ...options });
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Permanently deletes a feedback record data point
|
|
86
|
-
*
|
|
87
|
-
* @example
|
|
88
|
-
* ```ts
|
|
89
|
-
* await client.feedbackRecords.delete(
|
|
90
|
-
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
91
|
-
* );
|
|
92
|
-
* ```
|
|
93
|
-
*/
|
|
94
|
-
delete(id: string, options?: RequestOptions): APIPromise<void> {
|
|
95
|
-
return this._client.delete(path`/v1/feedback-records/${id}`, {
|
|
96
|
-
...options,
|
|
97
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* Permanently deletes all feedback record data points matching the specified
|
|
103
|
-
* user_identifier. This endpoint supports GDPR Article 17 (Right to Erasure)
|
|
104
|
-
* requests.
|
|
105
|
-
*
|
|
106
|
-
* @example
|
|
107
|
-
* ```ts
|
|
108
|
-
* const response = await client.feedbackRecords.bulkDelete({
|
|
109
|
-
* user_identifier: 'user_identifier',
|
|
110
|
-
* });
|
|
111
|
-
* ```
|
|
112
|
-
*/
|
|
113
|
-
bulkDelete(
|
|
114
|
-
params: FeedbackRecordBulkDeleteParams,
|
|
115
|
-
options?: RequestOptions,
|
|
116
|
-
): APIPromise<FeedbackRecordBulkDeleteResponse> {
|
|
117
|
-
const { user_identifier, tenant_id } = params;
|
|
118
|
-
return this._client.delete('/v1/feedback-records', { query: { user_identifier, tenant_id }, ...options });
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
export interface FeedbackRecordData {
|
|
123
|
-
/**
|
|
124
|
-
* UUIDv7 primary key
|
|
125
|
-
*/
|
|
126
|
-
id: string;
|
|
127
|
-
|
|
128
|
-
/**
|
|
129
|
-
* When the feedback was collected
|
|
130
|
-
*/
|
|
131
|
-
collected_at: string;
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* When this record was created
|
|
135
|
-
*/
|
|
136
|
-
created_at: string;
|
|
137
|
-
|
|
138
|
-
/**
|
|
139
|
-
* Identifier for the question/field
|
|
140
|
-
*/
|
|
141
|
-
field_id: string;
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
* Type of field
|
|
145
|
-
*/
|
|
146
|
-
field_type: string;
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* Type of feedback source
|
|
150
|
-
*/
|
|
151
|
-
source_type: string;
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* When this record was last updated
|
|
155
|
-
*/
|
|
156
|
-
updated_at: string;
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* Stable identifier grouping related fields (for ranking, matrix, grid questions)
|
|
160
|
-
*/
|
|
161
|
-
field_group_id?: string;
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* Human-readable question text for the group
|
|
165
|
-
*/
|
|
166
|
-
field_group_label?: string;
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
* The actual question text
|
|
170
|
-
*/
|
|
171
|
-
field_label?: string;
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* ISO language code. NULL bytes not allowed.
|
|
175
|
-
*/
|
|
176
|
-
language?: string;
|
|
177
|
-
|
|
178
|
-
/**
|
|
179
|
-
* Additional context
|
|
180
|
-
*/
|
|
181
|
-
metadata?: { [key: string]: unknown };
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* Reference to survey/form/ticket ID
|
|
185
|
-
*/
|
|
186
|
-
source_id?: string;
|
|
187
|
-
|
|
188
|
-
/**
|
|
189
|
-
* Human-readable name
|
|
190
|
-
*/
|
|
191
|
-
source_name?: string;
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
* Tenant/organization identifier. NULL bytes not allowed.
|
|
195
|
-
*/
|
|
196
|
-
tenant_id?: string;
|
|
197
|
-
|
|
198
|
-
/**
|
|
199
|
-
* User identifier
|
|
200
|
-
*/
|
|
201
|
-
user_identifier?: string;
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
* Boolean response
|
|
205
|
-
*/
|
|
206
|
-
value_boolean?: boolean;
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* Date response
|
|
210
|
-
*/
|
|
211
|
-
value_date?: string;
|
|
212
|
-
|
|
213
|
-
/**
|
|
214
|
-
* Numeric response
|
|
215
|
-
*/
|
|
216
|
-
value_number?: number;
|
|
217
|
-
|
|
218
|
-
/**
|
|
219
|
-
* Text response. NULL bytes not allowed.
|
|
220
|
-
*/
|
|
221
|
-
value_text?: string;
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
export interface FeedbackRecordListResponse {
|
|
225
|
-
/**
|
|
226
|
-
* List of feedback records
|
|
227
|
-
*/
|
|
228
|
-
data: Array<FeedbackRecordData>;
|
|
229
|
-
|
|
230
|
-
/**
|
|
231
|
-
* Limit used in query
|
|
232
|
-
*/
|
|
233
|
-
limit: number;
|
|
234
|
-
|
|
235
|
-
/**
|
|
236
|
-
* Offset used in query
|
|
237
|
-
*/
|
|
238
|
-
offset: number;
|
|
239
|
-
|
|
240
|
-
/**
|
|
241
|
-
* Total count of feedback records matching filters
|
|
242
|
-
*/
|
|
243
|
-
total: number;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
export interface FeedbackRecordBulkDeleteResponse {
|
|
247
|
-
/**
|
|
248
|
-
* Number of records deleted
|
|
249
|
-
*/
|
|
250
|
-
deleted_count: number;
|
|
251
|
-
|
|
252
|
-
/**
|
|
253
|
-
* Human-readable status message
|
|
254
|
-
*/
|
|
255
|
-
message: string;
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
export interface FeedbackRecordCreateParams {
|
|
259
|
-
/**
|
|
260
|
-
* Identifier for the question/field. NULL bytes not allowed.
|
|
261
|
-
*/
|
|
262
|
-
field_id: string;
|
|
263
|
-
|
|
264
|
-
/**
|
|
265
|
-
* Field type: text (enrichable), categorical, nps, csat, ces, rating, number,
|
|
266
|
-
* boolean, date
|
|
267
|
-
*/
|
|
268
|
-
field_type: 'text' | 'categorical' | 'nps' | 'csat' | 'ces' | 'rating' | 'number' | 'boolean' | 'date';
|
|
269
|
-
|
|
270
|
-
/**
|
|
271
|
-
* Type of feedback source (e.g., survey, review, feedback_form). NULL bytes not
|
|
272
|
-
* allowed.
|
|
273
|
-
*/
|
|
274
|
-
source_type: string;
|
|
275
|
-
|
|
276
|
-
/**
|
|
277
|
-
* When the feedback was collected (defaults to now). Must be between 1970-01-01
|
|
278
|
-
* and 2080-12-31.
|
|
279
|
-
*/
|
|
280
|
-
collected_at?: string;
|
|
281
|
-
|
|
282
|
-
/**
|
|
283
|
-
* Stable identifier grouping related fields (for ranking, matrix, grid questions).
|
|
284
|
-
* NULL bytes not allowed.
|
|
285
|
-
*/
|
|
286
|
-
field_group_id?: string;
|
|
287
|
-
|
|
288
|
-
/**
|
|
289
|
-
* Human-readable question text for the group
|
|
290
|
-
*/
|
|
291
|
-
field_group_label?: string;
|
|
292
|
-
|
|
293
|
-
/**
|
|
294
|
-
* The actual question text
|
|
295
|
-
*/
|
|
296
|
-
field_label?: string;
|
|
297
|
-
|
|
298
|
-
/**
|
|
299
|
-
* ISO language code. NULL bytes not allowed.
|
|
300
|
-
*/
|
|
301
|
-
language?: string;
|
|
302
|
-
|
|
303
|
-
/**
|
|
304
|
-
* User agent, device, location, referrer, tags, etc. NULL bytes (\x00 or \u0000)
|
|
305
|
-
* are not allowed in JSON keys or values.
|
|
306
|
-
*/
|
|
307
|
-
metadata?: { [key: string]: unknown };
|
|
308
|
-
|
|
309
|
-
/**
|
|
310
|
-
* Reference to survey/form/ticket ID
|
|
311
|
-
*/
|
|
312
|
-
source_id?: string;
|
|
313
|
-
|
|
314
|
-
/**
|
|
315
|
-
* Human-readable name
|
|
316
|
-
*/
|
|
317
|
-
source_name?: string;
|
|
318
|
-
|
|
319
|
-
/**
|
|
320
|
-
* Tenant/organization identifier for multi-tenancy. NULL bytes not allowed.
|
|
321
|
-
*/
|
|
322
|
-
tenant_id?: string;
|
|
323
|
-
|
|
324
|
-
/**
|
|
325
|
-
* Anonymous ID or email hash
|
|
326
|
-
*/
|
|
327
|
-
user_identifier?: string;
|
|
328
|
-
|
|
329
|
-
/**
|
|
330
|
-
* For yes/no questions
|
|
331
|
-
*/
|
|
332
|
-
value_boolean?: boolean;
|
|
333
|
-
|
|
334
|
-
/**
|
|
335
|
-
* For date responses. Must be between 1970-01-01 and 2080-12-31.
|
|
336
|
-
*/
|
|
337
|
-
value_date?: string;
|
|
338
|
-
|
|
339
|
-
/**
|
|
340
|
-
* For ratings, NPS scores, numeric responses. Must be between -1e15 and +1e15.
|
|
341
|
-
*/
|
|
342
|
-
value_number?: number;
|
|
343
|
-
|
|
344
|
-
/**
|
|
345
|
-
* For open-ended text responses. NULL bytes not allowed.
|
|
346
|
-
*/
|
|
347
|
-
value_text?: string;
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
export interface FeedbackRecordUpdateParams {
|
|
351
|
-
/**
|
|
352
|
-
* Update language. NULL bytes not allowed.
|
|
353
|
-
*/
|
|
354
|
-
language?: string;
|
|
355
|
-
|
|
356
|
-
/**
|
|
357
|
-
* Update metadata. NULL bytes (\x00 or \u0000) are not allowed in JSON keys or
|
|
358
|
-
* values.
|
|
359
|
-
*/
|
|
360
|
-
metadata?: { [key: string]: unknown };
|
|
361
|
-
|
|
362
|
-
/**
|
|
363
|
-
* Update user identifier
|
|
364
|
-
*/
|
|
365
|
-
user_identifier?: string;
|
|
366
|
-
|
|
367
|
-
/**
|
|
368
|
-
* Update boolean response
|
|
369
|
-
*/
|
|
370
|
-
value_boolean?: boolean;
|
|
371
|
-
|
|
372
|
-
/**
|
|
373
|
-
* Update date response. Must be between 1970-01-01 and 2080-12-31.
|
|
374
|
-
*/
|
|
375
|
-
value_date?: string;
|
|
376
|
-
|
|
377
|
-
/**
|
|
378
|
-
* Update numeric response. Must be between -1e15 and +1e15.
|
|
379
|
-
*/
|
|
380
|
-
value_number?: number;
|
|
381
|
-
|
|
382
|
-
/**
|
|
383
|
-
* Update text response. NULL bytes not allowed.
|
|
384
|
-
*/
|
|
385
|
-
value_text?: string;
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
export interface FeedbackRecordListParams {
|
|
389
|
-
/**
|
|
390
|
-
* Filter by field group ID (for ranking/matrix questions). NULL bytes not allowed.
|
|
391
|
-
*/
|
|
392
|
-
field_group_id?: string;
|
|
393
|
-
|
|
394
|
-
/**
|
|
395
|
-
* Filter by field ID. NULL bytes not allowed.
|
|
396
|
-
*/
|
|
397
|
-
field_id?: string;
|
|
398
|
-
|
|
399
|
-
/**
|
|
400
|
-
* Filter by field type. NULL bytes not allowed.
|
|
401
|
-
*/
|
|
402
|
-
field_type?: string;
|
|
403
|
-
|
|
404
|
-
/**
|
|
405
|
-
* Number of results to return (max 1000)
|
|
406
|
-
*/
|
|
407
|
-
limit?: number;
|
|
408
|
-
|
|
409
|
-
/**
|
|
410
|
-
* Number of results to skip
|
|
411
|
-
*/
|
|
412
|
-
offset?: number;
|
|
413
|
-
|
|
414
|
-
/**
|
|
415
|
-
* Filter by collected_at >= since (ISO 8601 format). Must be between 1970-01-01
|
|
416
|
-
* and 2080-12-31.
|
|
417
|
-
*/
|
|
418
|
-
since?: string;
|
|
419
|
-
|
|
420
|
-
/**
|
|
421
|
-
* Filter by source ID (NULL bytes not allowed)
|
|
422
|
-
*/
|
|
423
|
-
source_id?: string;
|
|
424
|
-
|
|
425
|
-
/**
|
|
426
|
-
* Filter by source type. NULL bytes not allowed.
|
|
427
|
-
*/
|
|
428
|
-
source_type?: string;
|
|
429
|
-
|
|
430
|
-
/**
|
|
431
|
-
* Filter by tenant ID (for multi-tenant deployments). NULL bytes not allowed.
|
|
432
|
-
*/
|
|
433
|
-
tenant_id?: string;
|
|
434
|
-
|
|
435
|
-
/**
|
|
436
|
-
* Filter by collected_at <= until (ISO 8601 format). Must be between 1970-01-01
|
|
437
|
-
* and 2080-12-31.
|
|
438
|
-
*/
|
|
439
|
-
until?: string;
|
|
440
|
-
|
|
441
|
-
/**
|
|
442
|
-
* Filter by user identifier. NULL bytes not allowed.
|
|
443
|
-
*/
|
|
444
|
-
user_identifier?: string;
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
export interface FeedbackRecordBulkDeleteParams {
|
|
448
|
-
/**
|
|
449
|
-
* Delete all records matching this user identifier (required). NULL bytes not
|
|
450
|
-
* allowed.
|
|
451
|
-
*/
|
|
452
|
-
user_identifier: string;
|
|
453
|
-
|
|
454
|
-
/**
|
|
455
|
-
* Filter by tenant ID (optional, for multi-tenant deployments). NULL bytes not
|
|
456
|
-
* allowed.
|
|
457
|
-
*/
|
|
458
|
-
tenant_id?: string;
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
export declare namespace FeedbackRecords {
|
|
462
|
-
export {
|
|
463
|
-
type FeedbackRecordData as FeedbackRecordData,
|
|
464
|
-
type FeedbackRecordListResponse as FeedbackRecordListResponse,
|
|
465
|
-
type FeedbackRecordBulkDeleteResponse as FeedbackRecordBulkDeleteResponse,
|
|
466
|
-
type FeedbackRecordCreateParams as FeedbackRecordCreateParams,
|
|
467
|
-
type FeedbackRecordUpdateParams as FeedbackRecordUpdateParams,
|
|
468
|
-
type FeedbackRecordListParams as FeedbackRecordListParams,
|
|
469
|
-
type FeedbackRecordBulkDeleteParams as FeedbackRecordBulkDeleteParams,
|
|
470
|
-
};
|
|
471
|
-
}
|
|
3
|
+
export * from './feedback-records/index';
|
package/src/resources/health.ts
CHANGED
|
@@ -5,6 +5,9 @@ import { APIPromise } from '../core/api-promise';
|
|
|
5
5
|
import { buildHeaders } from '../internal/headers';
|
|
6
6
|
import { RequestOptions } from '../internal/request-options';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* Health check endpoints
|
|
10
|
+
*/
|
|
8
11
|
export class Health extends APIResource {
|
|
9
12
|
/**
|
|
10
13
|
* Returns OK if the service is running
|
package/src/resources/index.ts
CHANGED
|
@@ -5,9 +5,21 @@ export {
|
|
|
5
5
|
type FeedbackRecordData,
|
|
6
6
|
type FeedbackRecordListResponse,
|
|
7
7
|
type FeedbackRecordBulkDeleteResponse,
|
|
8
|
+
type FeedbackRecordRetrieveSimilarResponse,
|
|
8
9
|
type FeedbackRecordCreateParams,
|
|
9
10
|
type FeedbackRecordUpdateParams,
|
|
10
11
|
type FeedbackRecordListParams,
|
|
11
12
|
type FeedbackRecordBulkDeleteParams,
|
|
12
|
-
|
|
13
|
+
type FeedbackRecordRetrieveSimilarParams,
|
|
14
|
+
} from './feedback-records/feedback-records';
|
|
13
15
|
export { Health, type HealthCheckResponse } from './health';
|
|
16
|
+
export {
|
|
17
|
+
Webhooks,
|
|
18
|
+
type WebhookCreateResponse,
|
|
19
|
+
type WebhookRetrieveResponse,
|
|
20
|
+
type WebhookUpdateResponse,
|
|
21
|
+
type WebhookListResponse,
|
|
22
|
+
type WebhookCreateParams,
|
|
23
|
+
type WebhookUpdateParams,
|
|
24
|
+
type WebhookListParams,
|
|
25
|
+
} from './webhooks';
|