@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
|
@@ -1,370 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
-
import { RequestOptions } from "../internal/request-options.js";
|
|
4
|
-
export declare class FeedbackRecords extends APIResource {
|
|
5
|
-
/**
|
|
6
|
-
* Creates a new feedback record data point
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* ```ts
|
|
10
|
-
* const feedbackRecordData =
|
|
11
|
-
* await client.feedbackRecords.create({
|
|
12
|
-
* field_id: 'q1',
|
|
13
|
-
* field_type: 'rating',
|
|
14
|
-
* source_type: 'survey',
|
|
15
|
-
* field_label: 'How satisfied are you?',
|
|
16
|
-
* language: 'en',
|
|
17
|
-
* source_id: 'survey-123',
|
|
18
|
-
* source_name: 'Q1 NPS Survey',
|
|
19
|
-
* tenant_id: 'org-123',
|
|
20
|
-
* user_identifier: 'user-abc-123',
|
|
21
|
-
* value_number: 9,
|
|
22
|
-
* });
|
|
23
|
-
* ```
|
|
24
|
-
*/
|
|
25
|
-
create(body: FeedbackRecordCreateParams, options?: RequestOptions): APIPromise<FeedbackRecordData>;
|
|
26
|
-
/**
|
|
27
|
-
* Retrieves a single feedback record data point by its UUID
|
|
28
|
-
*
|
|
29
|
-
* @example
|
|
30
|
-
* ```ts
|
|
31
|
-
* const feedbackRecordData =
|
|
32
|
-
* await client.feedbackRecords.retrieve(
|
|
33
|
-
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
34
|
-
* );
|
|
35
|
-
* ```
|
|
36
|
-
*/
|
|
37
|
-
retrieve(id: string, options?: RequestOptions): APIPromise<FeedbackRecordData>;
|
|
38
|
-
/**
|
|
39
|
-
* Updates specific fields of a feedback record data point
|
|
40
|
-
*
|
|
41
|
-
* @example
|
|
42
|
-
* ```ts
|
|
43
|
-
* const feedbackRecordData =
|
|
44
|
-
* await client.feedbackRecords.update(
|
|
45
|
-
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
46
|
-
* { value_text: 'Updated feedback text' },
|
|
47
|
-
* );
|
|
48
|
-
* ```
|
|
49
|
-
*/
|
|
50
|
-
update(id: string, body: FeedbackRecordUpdateParams, options?: RequestOptions): APIPromise<FeedbackRecordData>;
|
|
51
|
-
/**
|
|
52
|
-
* Lists feedback records with optional filters and pagination
|
|
53
|
-
*
|
|
54
|
-
* @example
|
|
55
|
-
* ```ts
|
|
56
|
-
* const feedbackRecords = await client.feedbackRecords.list();
|
|
57
|
-
* ```
|
|
58
|
-
*/
|
|
59
|
-
list(query?: FeedbackRecordListParams | null | undefined, options?: RequestOptions): APIPromise<FeedbackRecordListResponse>;
|
|
60
|
-
/**
|
|
61
|
-
* Permanently deletes a feedback record data point
|
|
62
|
-
*
|
|
63
|
-
* @example
|
|
64
|
-
* ```ts
|
|
65
|
-
* await client.feedbackRecords.delete(
|
|
66
|
-
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
67
|
-
* );
|
|
68
|
-
* ```
|
|
69
|
-
*/
|
|
70
|
-
delete(id: string, options?: RequestOptions): APIPromise<void>;
|
|
71
|
-
/**
|
|
72
|
-
* Permanently deletes all feedback record data points matching the specified
|
|
73
|
-
* user_identifier. This endpoint supports GDPR Article 17 (Right to Erasure)
|
|
74
|
-
* requests.
|
|
75
|
-
*
|
|
76
|
-
* @example
|
|
77
|
-
* ```ts
|
|
78
|
-
* const response = await client.feedbackRecords.bulkDelete({
|
|
79
|
-
* user_identifier: 'user_identifier',
|
|
80
|
-
* });
|
|
81
|
-
* ```
|
|
82
|
-
*/
|
|
83
|
-
bulkDelete(params: FeedbackRecordBulkDeleteParams, options?: RequestOptions): APIPromise<FeedbackRecordBulkDeleteResponse>;
|
|
84
|
-
}
|
|
85
|
-
export interface FeedbackRecordData {
|
|
86
|
-
/**
|
|
87
|
-
* UUIDv7 primary key
|
|
88
|
-
*/
|
|
89
|
-
id: string;
|
|
90
|
-
/**
|
|
91
|
-
* When the feedback was collected
|
|
92
|
-
*/
|
|
93
|
-
collected_at: string;
|
|
94
|
-
/**
|
|
95
|
-
* When this record was created
|
|
96
|
-
*/
|
|
97
|
-
created_at: string;
|
|
98
|
-
/**
|
|
99
|
-
* Identifier for the question/field
|
|
100
|
-
*/
|
|
101
|
-
field_id: string;
|
|
102
|
-
/**
|
|
103
|
-
* Type of field
|
|
104
|
-
*/
|
|
105
|
-
field_type: string;
|
|
106
|
-
/**
|
|
107
|
-
* Type of feedback source
|
|
108
|
-
*/
|
|
109
|
-
source_type: string;
|
|
110
|
-
/**
|
|
111
|
-
* When this record was last updated
|
|
112
|
-
*/
|
|
113
|
-
updated_at: string;
|
|
114
|
-
/**
|
|
115
|
-
* Stable identifier grouping related fields (for ranking, matrix, grid questions)
|
|
116
|
-
*/
|
|
117
|
-
field_group_id?: string;
|
|
118
|
-
/**
|
|
119
|
-
* Human-readable question text for the group
|
|
120
|
-
*/
|
|
121
|
-
field_group_label?: string;
|
|
122
|
-
/**
|
|
123
|
-
* The actual question text
|
|
124
|
-
*/
|
|
125
|
-
field_label?: string;
|
|
126
|
-
/**
|
|
127
|
-
* ISO language code. NULL bytes not allowed.
|
|
128
|
-
*/
|
|
129
|
-
language?: string;
|
|
130
|
-
/**
|
|
131
|
-
* Additional context
|
|
132
|
-
*/
|
|
133
|
-
metadata?: {
|
|
134
|
-
[key: string]: unknown;
|
|
135
|
-
};
|
|
136
|
-
/**
|
|
137
|
-
* Reference to survey/form/ticket ID
|
|
138
|
-
*/
|
|
139
|
-
source_id?: string;
|
|
140
|
-
/**
|
|
141
|
-
* Human-readable name
|
|
142
|
-
*/
|
|
143
|
-
source_name?: string;
|
|
144
|
-
/**
|
|
145
|
-
* Tenant/organization identifier. NULL bytes not allowed.
|
|
146
|
-
*/
|
|
147
|
-
tenant_id?: string;
|
|
148
|
-
/**
|
|
149
|
-
* User identifier
|
|
150
|
-
*/
|
|
151
|
-
user_identifier?: string;
|
|
152
|
-
/**
|
|
153
|
-
* Boolean response
|
|
154
|
-
*/
|
|
155
|
-
value_boolean?: boolean;
|
|
156
|
-
/**
|
|
157
|
-
* Date response
|
|
158
|
-
*/
|
|
159
|
-
value_date?: string;
|
|
160
|
-
/**
|
|
161
|
-
* Numeric response
|
|
162
|
-
*/
|
|
163
|
-
value_number?: number;
|
|
164
|
-
/**
|
|
165
|
-
* Text response. NULL bytes not allowed.
|
|
166
|
-
*/
|
|
167
|
-
value_text?: string;
|
|
168
|
-
}
|
|
169
|
-
export interface FeedbackRecordListResponse {
|
|
170
|
-
/**
|
|
171
|
-
* List of feedback records
|
|
172
|
-
*/
|
|
173
|
-
data: Array<FeedbackRecordData>;
|
|
174
|
-
/**
|
|
175
|
-
* Limit used in query
|
|
176
|
-
*/
|
|
177
|
-
limit: number;
|
|
178
|
-
/**
|
|
179
|
-
* Offset used in query
|
|
180
|
-
*/
|
|
181
|
-
offset: number;
|
|
182
|
-
/**
|
|
183
|
-
* Total count of feedback records matching filters
|
|
184
|
-
*/
|
|
185
|
-
total: number;
|
|
186
|
-
}
|
|
187
|
-
export interface FeedbackRecordBulkDeleteResponse {
|
|
188
|
-
/**
|
|
189
|
-
* Number of records deleted
|
|
190
|
-
*/
|
|
191
|
-
deleted_count: number;
|
|
192
|
-
/**
|
|
193
|
-
* Human-readable status message
|
|
194
|
-
*/
|
|
195
|
-
message: string;
|
|
196
|
-
}
|
|
197
|
-
export interface FeedbackRecordCreateParams {
|
|
198
|
-
/**
|
|
199
|
-
* Identifier for the question/field. NULL bytes not allowed.
|
|
200
|
-
*/
|
|
201
|
-
field_id: string;
|
|
202
|
-
/**
|
|
203
|
-
* Field type: text (enrichable), categorical, nps, csat, ces, rating, number,
|
|
204
|
-
* boolean, date
|
|
205
|
-
*/
|
|
206
|
-
field_type: 'text' | 'categorical' | 'nps' | 'csat' | 'ces' | 'rating' | 'number' | 'boolean' | 'date';
|
|
207
|
-
/**
|
|
208
|
-
* Type of feedback source (e.g., survey, review, feedback_form). NULL bytes not
|
|
209
|
-
* allowed.
|
|
210
|
-
*/
|
|
211
|
-
source_type: string;
|
|
212
|
-
/**
|
|
213
|
-
* When the feedback was collected (defaults to now). Must be between 1970-01-01
|
|
214
|
-
* and 2080-12-31.
|
|
215
|
-
*/
|
|
216
|
-
collected_at?: string;
|
|
217
|
-
/**
|
|
218
|
-
* Stable identifier grouping related fields (for ranking, matrix, grid questions).
|
|
219
|
-
* NULL bytes not allowed.
|
|
220
|
-
*/
|
|
221
|
-
field_group_id?: string;
|
|
222
|
-
/**
|
|
223
|
-
* Human-readable question text for the group
|
|
224
|
-
*/
|
|
225
|
-
field_group_label?: string;
|
|
226
|
-
/**
|
|
227
|
-
* The actual question text
|
|
228
|
-
*/
|
|
229
|
-
field_label?: string;
|
|
230
|
-
/**
|
|
231
|
-
* ISO language code. NULL bytes not allowed.
|
|
232
|
-
*/
|
|
233
|
-
language?: string;
|
|
234
|
-
/**
|
|
235
|
-
* User agent, device, location, referrer, tags, etc. NULL bytes (\x00 or \u0000)
|
|
236
|
-
* are not allowed in JSON keys or values.
|
|
237
|
-
*/
|
|
238
|
-
metadata?: {
|
|
239
|
-
[key: string]: unknown;
|
|
240
|
-
};
|
|
241
|
-
/**
|
|
242
|
-
* Reference to survey/form/ticket ID
|
|
243
|
-
*/
|
|
244
|
-
source_id?: string;
|
|
245
|
-
/**
|
|
246
|
-
* Human-readable name
|
|
247
|
-
*/
|
|
248
|
-
source_name?: string;
|
|
249
|
-
/**
|
|
250
|
-
* Tenant/organization identifier for multi-tenancy. NULL bytes not allowed.
|
|
251
|
-
*/
|
|
252
|
-
tenant_id?: string;
|
|
253
|
-
/**
|
|
254
|
-
* Anonymous ID or email hash
|
|
255
|
-
*/
|
|
256
|
-
user_identifier?: string;
|
|
257
|
-
/**
|
|
258
|
-
* For yes/no questions
|
|
259
|
-
*/
|
|
260
|
-
value_boolean?: boolean;
|
|
261
|
-
/**
|
|
262
|
-
* For date responses. Must be between 1970-01-01 and 2080-12-31.
|
|
263
|
-
*/
|
|
264
|
-
value_date?: string;
|
|
265
|
-
/**
|
|
266
|
-
* For ratings, NPS scores, numeric responses. Must be between -1e15 and +1e15.
|
|
267
|
-
*/
|
|
268
|
-
value_number?: number;
|
|
269
|
-
/**
|
|
270
|
-
* For open-ended text responses. NULL bytes not allowed.
|
|
271
|
-
*/
|
|
272
|
-
value_text?: string;
|
|
273
|
-
}
|
|
274
|
-
export interface FeedbackRecordUpdateParams {
|
|
275
|
-
/**
|
|
276
|
-
* Update language. NULL bytes not allowed.
|
|
277
|
-
*/
|
|
278
|
-
language?: string;
|
|
279
|
-
/**
|
|
280
|
-
* Update metadata. NULL bytes (\x00 or \u0000) are not allowed in JSON keys or
|
|
281
|
-
* values.
|
|
282
|
-
*/
|
|
283
|
-
metadata?: {
|
|
284
|
-
[key: string]: unknown;
|
|
285
|
-
};
|
|
286
|
-
/**
|
|
287
|
-
* Update user identifier
|
|
288
|
-
*/
|
|
289
|
-
user_identifier?: string;
|
|
290
|
-
/**
|
|
291
|
-
* Update boolean response
|
|
292
|
-
*/
|
|
293
|
-
value_boolean?: boolean;
|
|
294
|
-
/**
|
|
295
|
-
* Update date response. Must be between 1970-01-01 and 2080-12-31.
|
|
296
|
-
*/
|
|
297
|
-
value_date?: string;
|
|
298
|
-
/**
|
|
299
|
-
* Update numeric response. Must be between -1e15 and +1e15.
|
|
300
|
-
*/
|
|
301
|
-
value_number?: number;
|
|
302
|
-
/**
|
|
303
|
-
* Update text response. NULL bytes not allowed.
|
|
304
|
-
*/
|
|
305
|
-
value_text?: string;
|
|
306
|
-
}
|
|
307
|
-
export interface FeedbackRecordListParams {
|
|
308
|
-
/**
|
|
309
|
-
* Filter by field group ID (for ranking/matrix questions). NULL bytes not allowed.
|
|
310
|
-
*/
|
|
311
|
-
field_group_id?: string;
|
|
312
|
-
/**
|
|
313
|
-
* Filter by field ID. NULL bytes not allowed.
|
|
314
|
-
*/
|
|
315
|
-
field_id?: string;
|
|
316
|
-
/**
|
|
317
|
-
* Filter by field type. NULL bytes not allowed.
|
|
318
|
-
*/
|
|
319
|
-
field_type?: string;
|
|
320
|
-
/**
|
|
321
|
-
* Number of results to return (max 1000)
|
|
322
|
-
*/
|
|
323
|
-
limit?: number;
|
|
324
|
-
/**
|
|
325
|
-
* Number of results to skip
|
|
326
|
-
*/
|
|
327
|
-
offset?: number;
|
|
328
|
-
/**
|
|
329
|
-
* Filter by collected_at >= since (ISO 8601 format). Must be between 1970-01-01
|
|
330
|
-
* and 2080-12-31.
|
|
331
|
-
*/
|
|
332
|
-
since?: string;
|
|
333
|
-
/**
|
|
334
|
-
* Filter by source ID (NULL bytes not allowed)
|
|
335
|
-
*/
|
|
336
|
-
source_id?: string;
|
|
337
|
-
/**
|
|
338
|
-
* Filter by source type. NULL bytes not allowed.
|
|
339
|
-
*/
|
|
340
|
-
source_type?: string;
|
|
341
|
-
/**
|
|
342
|
-
* Filter by tenant ID (for multi-tenant deployments). NULL bytes not allowed.
|
|
343
|
-
*/
|
|
344
|
-
tenant_id?: string;
|
|
345
|
-
/**
|
|
346
|
-
* Filter by collected_at <= until (ISO 8601 format). Must be between 1970-01-01
|
|
347
|
-
* and 2080-12-31.
|
|
348
|
-
*/
|
|
349
|
-
until?: string;
|
|
350
|
-
/**
|
|
351
|
-
* Filter by user identifier. NULL bytes not allowed.
|
|
352
|
-
*/
|
|
353
|
-
user_identifier?: string;
|
|
354
|
-
}
|
|
355
|
-
export interface FeedbackRecordBulkDeleteParams {
|
|
356
|
-
/**
|
|
357
|
-
* Delete all records matching this user identifier (required). NULL bytes not
|
|
358
|
-
* allowed.
|
|
359
|
-
*/
|
|
360
|
-
user_identifier: string;
|
|
361
|
-
/**
|
|
362
|
-
* Filter by tenant ID (optional, for multi-tenant deployments). NULL bytes not
|
|
363
|
-
* allowed.
|
|
364
|
-
*/
|
|
365
|
-
tenant_id?: string;
|
|
366
|
-
}
|
|
367
|
-
export declare namespace FeedbackRecords {
|
|
368
|
-
export { type FeedbackRecordData as FeedbackRecordData, type FeedbackRecordListResponse as FeedbackRecordListResponse, type FeedbackRecordBulkDeleteResponse as FeedbackRecordBulkDeleteResponse, type FeedbackRecordCreateParams as FeedbackRecordCreateParams, type FeedbackRecordUpdateParams as FeedbackRecordUpdateParams, type FeedbackRecordListParams as FeedbackRecordListParams, type FeedbackRecordBulkDeleteParams as FeedbackRecordBulkDeleteParams, };
|
|
369
|
-
}
|
|
1
|
+
export * from "./feedback-records/index.js";
|
|
370
2
|
//# sourceMappingURL=feedback-records.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feedback-records.d.ts","sourceRoot":"","sources":["../src/resources/feedback-records.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"feedback-records.d.ts","sourceRoot":"","sources":["../src/resources/feedback-records.ts"],"names":[],"mappings":""}
|
|
@@ -1,106 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const headers_1 = require("../internal/headers.js");
|
|
7
|
-
const path_1 = require("../internal/utils/path.js");
|
|
8
|
-
class FeedbackRecords extends resource_1.APIResource {
|
|
9
|
-
/**
|
|
10
|
-
* Creates a new feedback record data point
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```ts
|
|
14
|
-
* const feedbackRecordData =
|
|
15
|
-
* await client.feedbackRecords.create({
|
|
16
|
-
* field_id: 'q1',
|
|
17
|
-
* field_type: 'rating',
|
|
18
|
-
* source_type: 'survey',
|
|
19
|
-
* field_label: 'How satisfied are you?',
|
|
20
|
-
* language: 'en',
|
|
21
|
-
* source_id: 'survey-123',
|
|
22
|
-
* source_name: 'Q1 NPS Survey',
|
|
23
|
-
* tenant_id: 'org-123',
|
|
24
|
-
* user_identifier: 'user-abc-123',
|
|
25
|
-
* value_number: 9,
|
|
26
|
-
* });
|
|
27
|
-
* ```
|
|
28
|
-
*/
|
|
29
|
-
create(body, options) {
|
|
30
|
-
return this._client.post('/v1/feedback-records', { body, ...options });
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Retrieves a single feedback record data point by its UUID
|
|
34
|
-
*
|
|
35
|
-
* @example
|
|
36
|
-
* ```ts
|
|
37
|
-
* const feedbackRecordData =
|
|
38
|
-
* await client.feedbackRecords.retrieve(
|
|
39
|
-
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
40
|
-
* );
|
|
41
|
-
* ```
|
|
42
|
-
*/
|
|
43
|
-
retrieve(id, options) {
|
|
44
|
-
return this._client.get((0, path_1.path) `/v1/feedback-records/${id}`, options);
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Updates specific fields of a feedback record data point
|
|
48
|
-
*
|
|
49
|
-
* @example
|
|
50
|
-
* ```ts
|
|
51
|
-
* const feedbackRecordData =
|
|
52
|
-
* await client.feedbackRecords.update(
|
|
53
|
-
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
54
|
-
* { value_text: 'Updated feedback text' },
|
|
55
|
-
* );
|
|
56
|
-
* ```
|
|
57
|
-
*/
|
|
58
|
-
update(id, body, options) {
|
|
59
|
-
return this._client.patch((0, path_1.path) `/v1/feedback-records/${id}`, { body, ...options });
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Lists feedback records with optional filters and pagination
|
|
63
|
-
*
|
|
64
|
-
* @example
|
|
65
|
-
* ```ts
|
|
66
|
-
* const feedbackRecords = await client.feedbackRecords.list();
|
|
67
|
-
* ```
|
|
68
|
-
*/
|
|
69
|
-
list(query = {}, options) {
|
|
70
|
-
return this._client.get('/v1/feedback-records', { query, ...options });
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Permanently deletes a feedback record data point
|
|
74
|
-
*
|
|
75
|
-
* @example
|
|
76
|
-
* ```ts
|
|
77
|
-
* await client.feedbackRecords.delete(
|
|
78
|
-
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
79
|
-
* );
|
|
80
|
-
* ```
|
|
81
|
-
*/
|
|
82
|
-
delete(id, options) {
|
|
83
|
-
return this._client.delete((0, path_1.path) `/v1/feedback-records/${id}`, {
|
|
84
|
-
...options,
|
|
85
|
-
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Permanently deletes all feedback record data points matching the specified
|
|
90
|
-
* user_identifier. This endpoint supports GDPR Article 17 (Right to Erasure)
|
|
91
|
-
* requests.
|
|
92
|
-
*
|
|
93
|
-
* @example
|
|
94
|
-
* ```ts
|
|
95
|
-
* const response = await client.feedbackRecords.bulkDelete({
|
|
96
|
-
* user_identifier: 'user_identifier',
|
|
97
|
-
* });
|
|
98
|
-
* ```
|
|
99
|
-
*/
|
|
100
|
-
bulkDelete(params, options) {
|
|
101
|
-
const { user_identifier, tenant_id } = params;
|
|
102
|
-
return this._client.delete('/v1/feedback-records', { query: { user_identifier, tenant_id }, ...options });
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
exports.FeedbackRecords = FeedbackRecords;
|
|
4
|
+
const tslib_1 = require("../internal/tslib.js");
|
|
5
|
+
tslib_1.__exportStar(require("./feedback-records/index.js"), exports);
|
|
106
6
|
//# sourceMappingURL=feedback-records.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feedback-records.js","sourceRoot":"","sources":["../src/resources/feedback-records.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,
|
|
1
|
+
{"version":3,"file":"feedback-records.js","sourceRoot":"","sources":["../src/resources/feedback-records.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sEAAyC"}
|
|
@@ -1,102 +1,3 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
|
|
3
|
-
import { buildHeaders } from "../internal/headers.mjs";
|
|
4
|
-
import { path } from "../internal/utils/path.mjs";
|
|
5
|
-
export class FeedbackRecords extends APIResource {
|
|
6
|
-
/**
|
|
7
|
-
* Creates a new feedback record data point
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* ```ts
|
|
11
|
-
* const feedbackRecordData =
|
|
12
|
-
* await client.feedbackRecords.create({
|
|
13
|
-
* field_id: 'q1',
|
|
14
|
-
* field_type: 'rating',
|
|
15
|
-
* source_type: 'survey',
|
|
16
|
-
* field_label: 'How satisfied are you?',
|
|
17
|
-
* language: 'en',
|
|
18
|
-
* source_id: 'survey-123',
|
|
19
|
-
* source_name: 'Q1 NPS Survey',
|
|
20
|
-
* tenant_id: 'org-123',
|
|
21
|
-
* user_identifier: 'user-abc-123',
|
|
22
|
-
* value_number: 9,
|
|
23
|
-
* });
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
create(body, options) {
|
|
27
|
-
return this._client.post('/v1/feedback-records', { body, ...options });
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Retrieves a single feedback record data point by its UUID
|
|
31
|
-
*
|
|
32
|
-
* @example
|
|
33
|
-
* ```ts
|
|
34
|
-
* const feedbackRecordData =
|
|
35
|
-
* await client.feedbackRecords.retrieve(
|
|
36
|
-
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
37
|
-
* );
|
|
38
|
-
* ```
|
|
39
|
-
*/
|
|
40
|
-
retrieve(id, options) {
|
|
41
|
-
return this._client.get(path `/v1/feedback-records/${id}`, options);
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Updates specific fields of a feedback record data point
|
|
45
|
-
*
|
|
46
|
-
* @example
|
|
47
|
-
* ```ts
|
|
48
|
-
* const feedbackRecordData =
|
|
49
|
-
* await client.feedbackRecords.update(
|
|
50
|
-
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
51
|
-
* { value_text: 'Updated feedback text' },
|
|
52
|
-
* );
|
|
53
|
-
* ```
|
|
54
|
-
*/
|
|
55
|
-
update(id, body, options) {
|
|
56
|
-
return this._client.patch(path `/v1/feedback-records/${id}`, { body, ...options });
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Lists feedback records with optional filters and pagination
|
|
60
|
-
*
|
|
61
|
-
* @example
|
|
62
|
-
* ```ts
|
|
63
|
-
* const feedbackRecords = await client.feedbackRecords.list();
|
|
64
|
-
* ```
|
|
65
|
-
*/
|
|
66
|
-
list(query = {}, options) {
|
|
67
|
-
return this._client.get('/v1/feedback-records', { query, ...options });
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Permanently deletes a feedback record data point
|
|
71
|
-
*
|
|
72
|
-
* @example
|
|
73
|
-
* ```ts
|
|
74
|
-
* await client.feedbackRecords.delete(
|
|
75
|
-
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
76
|
-
* );
|
|
77
|
-
* ```
|
|
78
|
-
*/
|
|
79
|
-
delete(id, options) {
|
|
80
|
-
return this._client.delete(path `/v1/feedback-records/${id}`, {
|
|
81
|
-
...options,
|
|
82
|
-
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Permanently deletes all feedback record data points matching the specified
|
|
87
|
-
* user_identifier. This endpoint supports GDPR Article 17 (Right to Erasure)
|
|
88
|
-
* requests.
|
|
89
|
-
*
|
|
90
|
-
* @example
|
|
91
|
-
* ```ts
|
|
92
|
-
* const response = await client.feedbackRecords.bulkDelete({
|
|
93
|
-
* user_identifier: 'user_identifier',
|
|
94
|
-
* });
|
|
95
|
-
* ```
|
|
96
|
-
*/
|
|
97
|
-
bulkDelete(params, options) {
|
|
98
|
-
const { user_identifier, tenant_id } = params;
|
|
99
|
-
return this._client.delete('/v1/feedback-records', { query: { user_identifier, tenant_id }, ...options });
|
|
100
|
-
}
|
|
101
|
-
}
|
|
2
|
+
export * from "./feedback-records/index.mjs";
|
|
102
3
|
//# sourceMappingURL=feedback-records.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feedback-records.mjs","sourceRoot":"","sources":["../src/resources/feedback-records.ts"],"names":[],"mappings":"AAAA,sFAAsF
|
|
1
|
+
{"version":3,"file":"feedback-records.mjs","sourceRoot":"","sources":["../src/resources/feedback-records.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
|
package/resources/health.d.mts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.mjs";
|
|
2
2
|
import { APIPromise } from "../core/api-promise.mjs";
|
|
3
3
|
import { RequestOptions } from "../internal/request-options.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* Health check endpoints
|
|
6
|
+
*/
|
|
4
7
|
export declare class Health extends APIResource {
|
|
5
8
|
/**
|
|
6
9
|
* Returns OK if the service is running
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"health.d.mts","sourceRoot":"","sources":["../src/resources/health.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAEzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;OAOG;IACH,KAAK,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC;CAMpD;AAED,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC;AAEzC,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EAAE,KAAK,mBAAmB,IAAI,mBAAmB,EAAE,CAAC;CAC5D"}
|
|
1
|
+
{"version":3,"file":"health.d.mts","sourceRoot":"","sources":["../src/resources/health.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAEzB;;GAEG;AACH,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;OAOG;IACH,KAAK,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC;CAMpD;AAED,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC;AAEzC,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EAAE,KAAK,mBAAmB,IAAI,mBAAmB,EAAE,CAAC;CAC5D"}
|
package/resources/health.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { APIResource } from "../core/resource.js";
|
|
2
2
|
import { APIPromise } from "../core/api-promise.js";
|
|
3
3
|
import { RequestOptions } from "../internal/request-options.js";
|
|
4
|
+
/**
|
|
5
|
+
* Health check endpoints
|
|
6
|
+
*/
|
|
4
7
|
export declare class Health extends APIResource {
|
|
5
8
|
/**
|
|
6
9
|
* Returns OK if the service is running
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"health.d.ts","sourceRoot":"","sources":["../src/resources/health.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAEzB,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;OAOG;IACH,KAAK,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC;CAMpD;AAED,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC;AAEzC,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EAAE,KAAK,mBAAmB,IAAI,mBAAmB,EAAE,CAAC;CAC5D"}
|
|
1
|
+
{"version":3,"file":"health.d.ts","sourceRoot":"","sources":["../src/resources/health.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,EAAE,UAAU,EAAE;OAEd,EAAE,cAAc,EAAE;AAEzB;;GAEG;AACH,qBAAa,MAAO,SAAQ,WAAW;IACrC;;;;;;;OAOG;IACH,KAAK,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC;CAMpD;AAED,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC;AAEzC,MAAM,CAAC,OAAO,WAAW,MAAM,CAAC;IAC9B,OAAO,EAAE,KAAK,mBAAmB,IAAI,mBAAmB,EAAE,CAAC;CAC5D"}
|
package/resources/health.js
CHANGED
|
@@ -4,6 +4,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.Health = void 0;
|
|
5
5
|
const resource_1 = require("../core/resource.js");
|
|
6
6
|
const headers_1 = require("../internal/headers.js");
|
|
7
|
+
/**
|
|
8
|
+
* Health check endpoints
|
|
9
|
+
*/
|
|
7
10
|
class Health extends resource_1.APIResource {
|
|
8
11
|
/**
|
|
9
12
|
* Returns OK if the service is running
|
package/resources/health.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"health.js","sourceRoot":"","sources":["../src/resources/health.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,oDAAmD;AAGnD,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;;;;;OAOG;IACH,KAAK,CAAC,OAAwB;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE;YACjC,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SACpE,CAAC,CAAC;IACL,CAAC;CACF;AAfD,wBAeC"}
|
|
1
|
+
{"version":3,"file":"health.js","sourceRoot":"","sources":["../src/resources/health.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,oDAAmD;AAGnD;;GAEG;AACH,MAAa,MAAO,SAAQ,sBAAW;IACrC;;;;;;;OAOG;IACH,KAAK,CAAC,OAAwB;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE;YACjC,GAAG,OAAO;YACV,OAAO,EAAE,IAAA,sBAAY,EAAC,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SACpE,CAAC,CAAC;IACL,CAAC;CACF;AAfD,wBAeC"}
|
package/resources/health.mjs
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
import { APIResource } from "../core/resource.mjs";
|
|
3
3
|
import { buildHeaders } from "../internal/headers.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* Health check endpoints
|
|
6
|
+
*/
|
|
4
7
|
export class Health extends APIResource {
|
|
5
8
|
/**
|
|
6
9
|
* Returns OK if the service is running
|
package/resources/health.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"health.mjs","sourceRoot":"","sources":["../src/resources/health.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,YAAY,EAAE;AAGvB,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;;;;;OAOG;IACH,KAAK,CAAC,OAAwB;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE;YACjC,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SACpE,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
1
|
+
{"version":3,"file":"health.mjs","sourceRoot":"","sources":["../src/resources/health.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,EAAE,YAAY,EAAE;AAGvB;;GAEG;AACH,MAAM,OAAO,MAAO,SAAQ,WAAW;IACrC;;;;;;;OAOG;IACH,KAAK,CAAC,OAAwB;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE;YACjC,GAAG,OAAO;YACV,OAAO,EAAE,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,YAAY,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;SACpE,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/resources/index.d.mts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export { FeedbackRecords, type FeedbackRecordData, type FeedbackRecordListResponse, type FeedbackRecordBulkDeleteResponse, type FeedbackRecordCreateParams, type FeedbackRecordUpdateParams, type FeedbackRecordListParams, type FeedbackRecordBulkDeleteParams, } from "./feedback-records.mjs";
|
|
1
|
+
export { FeedbackRecords, type FeedbackRecordData, type FeedbackRecordListResponse, type FeedbackRecordBulkDeleteResponse, type FeedbackRecordRetrieveSimilarResponse, type FeedbackRecordCreateParams, type FeedbackRecordUpdateParams, type FeedbackRecordListParams, type FeedbackRecordBulkDeleteParams, type FeedbackRecordRetrieveSimilarParams, } from "./feedback-records/feedback-records.mjs";
|
|
2
2
|
export { Health, type HealthCheckResponse } from "./health.mjs";
|
|
3
|
+
export { Webhooks, type WebhookCreateResponse, type WebhookRetrieveResponse, type WebhookUpdateResponse, type WebhookListResponse, type WebhookCreateParams, type WebhookUpdateParams, type WebhookListParams, } from "./webhooks.mjs";
|
|
3
4
|
//# sourceMappingURL=index.d.mts.map
|