@formbricks/hub 0.4.4 → 0.5.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 +38 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts.map +1 -1
- package/client.js +11 -0
- package/client.js.map +1 -1
- package/client.mjs +11 -0
- package/client.mjs.map +1 -1
- package/internal/types.d.mts +6 -6
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +6 -6
- package/internal/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/resources/feedback-records/feedback-records.d.mts +23 -20
- package/resources/feedback-records/feedback-records.d.mts.map +1 -1
- package/resources/feedback-records/feedback-records.d.ts +23 -20
- package/resources/feedback-records/feedback-records.d.ts.map +1 -1
- package/resources/feedback-records/feedback-records.js +12 -9
- package/resources/feedback-records/feedback-records.js.map +1 -1
- package/resources/feedback-records/feedback-records.mjs +12 -9
- package/resources/feedback-records/feedback-records.mjs.map +1 -1
- package/resources/feedback-records/search.d.mts +2 -1
- package/resources/feedback-records/search.d.mts.map +1 -1
- package/resources/feedback-records/search.d.ts +2 -1
- package/resources/feedback-records/search.d.ts.map +1 -1
- package/resources/feedback-records/search.js +2 -1
- package/resources/feedback-records/search.js.map +1 -1
- package/resources/feedback-records/search.mjs +2 -1
- package/resources/feedback-records/search.mjs.map +1 -1
- package/resources/webhooks.d.mts +10 -9
- package/resources/webhooks.d.mts.map +1 -1
- package/resources/webhooks.d.ts +10 -9
- package/resources/webhooks.d.ts.map +1 -1
- package/resources/webhooks.js +3 -2
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +3 -2
- package/resources/webhooks.mjs.map +1 -1
- package/src/client.ts +12 -0
- package/src/internal/types.ts +6 -8
- package/src/resources/feedback-records/feedback-records.ts +25 -22
- package/src/resources/feedback-records/search.ts +2 -1
- package/src/resources/webhooks.ts +11 -10
- 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
|
@@ -30,7 +30,7 @@ export class FeedbackRecords extends APIResource {
|
|
|
30
30
|
* language: 'en',
|
|
31
31
|
* source_id: 'survey-123',
|
|
32
32
|
* source_name: 'Q1 NPS Survey',
|
|
33
|
-
*
|
|
33
|
+
* user_id: 'user-abc-123',
|
|
34
34
|
* value_number: 9,
|
|
35
35
|
* });
|
|
36
36
|
* ```
|
|
@@ -75,7 +75,8 @@ export class FeedbackRecords extends APIResource {
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
/**
|
|
78
|
-
* Lists feedback records with optional filters
|
|
78
|
+
* Lists feedback records for a required tenant_id with optional additional filters
|
|
79
|
+
* and pagination
|
|
79
80
|
*
|
|
80
81
|
* @example
|
|
81
82
|
* ```ts
|
|
@@ -106,14 +107,15 @@ export class FeedbackRecords extends APIResource {
|
|
|
106
107
|
}
|
|
107
108
|
|
|
108
109
|
/**
|
|
109
|
-
* Permanently deletes
|
|
110
|
-
*
|
|
111
|
-
* requests.
|
|
110
|
+
* Permanently deletes feedback record data points matching the specified user_id.
|
|
111
|
+
* Omit tenant_id to delete that user_id across all tenants for GDPR Article 17
|
|
112
|
+
* (Right to Erasure) requests. Provide tenant_id to restrict deletion to that
|
|
113
|
+
* tenant only.
|
|
112
114
|
*
|
|
113
115
|
* @example
|
|
114
116
|
* ```ts
|
|
115
117
|
* const response = await client.feedbackRecords.bulkDelete({
|
|
116
|
-
*
|
|
118
|
+
* user_id: 'user-abc-123',
|
|
117
119
|
* });
|
|
118
120
|
* ```
|
|
119
121
|
*/
|
|
@@ -121,15 +123,16 @@ export class FeedbackRecords extends APIResource {
|
|
|
121
123
|
params: FeedbackRecordBulkDeleteParams,
|
|
122
124
|
options?: RequestOptions,
|
|
123
125
|
): APIPromise<FeedbackRecordBulkDeleteResponse> {
|
|
124
|
-
const {
|
|
125
|
-
return this._client.delete('/v1/feedback-records', { query: {
|
|
126
|
+
const { user_id, tenant_id } = params;
|
|
127
|
+
return this._client.delete('/v1/feedback-records', { query: { user_id, tenant_id }, ...options });
|
|
126
128
|
}
|
|
127
129
|
|
|
128
130
|
/**
|
|
129
131
|
* Returns feedback record IDs and similarity scores for records similar to the
|
|
130
132
|
* given one (by embedding). **Only available when embeddings are configured**
|
|
131
133
|
* (EMBEDDING_PROVIDER and EMBEDDING_MODEL set). Supported providers: openai,
|
|
132
|
-
* google (AI Studio), google-
|
|
134
|
+
* google (Gemini Developer API / Google AI Studio), google-gemini (Gemini
|
|
135
|
+
* Enterprise Agent Platform API). When embeddings are disabled, this endpoint
|
|
133
136
|
* returns 503 Service Unavailable. The source feedback record must belong to the
|
|
134
137
|
* given tenant_id (enforced).
|
|
135
138
|
*
|
|
@@ -233,9 +236,9 @@ export interface FeedbackRecordData {
|
|
|
233
236
|
source_name?: string;
|
|
234
237
|
|
|
235
238
|
/**
|
|
236
|
-
* User
|
|
239
|
+
* User ID (e.g., anonymous ID or email hash)
|
|
237
240
|
*/
|
|
238
|
-
|
|
241
|
+
user_id?: string;
|
|
239
242
|
|
|
240
243
|
/**
|
|
241
244
|
* Boolean response
|
|
@@ -410,9 +413,9 @@ export interface FeedbackRecordCreateParams {
|
|
|
410
413
|
source_name?: string | null;
|
|
411
414
|
|
|
412
415
|
/**
|
|
413
|
-
*
|
|
416
|
+
* User ID (e.g., anonymous ID or email hash)
|
|
414
417
|
*/
|
|
415
|
-
|
|
418
|
+
user_id?: string;
|
|
416
419
|
|
|
417
420
|
/**
|
|
418
421
|
* For yes/no questions
|
|
@@ -449,9 +452,9 @@ export interface FeedbackRecordUpdateParams {
|
|
|
449
452
|
metadata?: { [key: string]: unknown };
|
|
450
453
|
|
|
451
454
|
/**
|
|
452
|
-
*
|
|
455
|
+
* User ID (e.g., anonymous ID or email hash)
|
|
453
456
|
*/
|
|
454
|
-
|
|
457
|
+
user_id?: string;
|
|
455
458
|
|
|
456
459
|
/**
|
|
457
460
|
* Update boolean response
|
|
@@ -535,21 +538,21 @@ export interface FeedbackRecordListParams {
|
|
|
535
538
|
until?: string;
|
|
536
539
|
|
|
537
540
|
/**
|
|
538
|
-
* Filter by user
|
|
541
|
+
* Filter by user ID. NULL bytes not allowed.
|
|
539
542
|
*/
|
|
540
|
-
|
|
543
|
+
user_id?: string;
|
|
541
544
|
}
|
|
542
545
|
|
|
543
546
|
export interface FeedbackRecordBulkDeleteParams {
|
|
544
547
|
/**
|
|
545
|
-
* Delete
|
|
546
|
-
* allowed.
|
|
548
|
+
* Delete records matching this user ID (required). NULL bytes not allowed.
|
|
547
549
|
*/
|
|
548
|
-
|
|
550
|
+
user_id: string;
|
|
549
551
|
|
|
550
552
|
/**
|
|
551
|
-
*
|
|
552
|
-
*
|
|
553
|
+
* Optional tenant scope. Omit this parameter to delete all records matching
|
|
554
|
+
* user_id across tenants; provide it to delete only records for this tenant. Empty
|
|
555
|
+
* strings and NULL bytes are not allowed.
|
|
553
556
|
*/
|
|
554
557
|
tenant_id?: string;
|
|
555
558
|
}
|
|
@@ -12,7 +12,8 @@ export class Search extends APIResource {
|
|
|
12
12
|
* Embeds the search query and returns feedback record IDs with similarity scores
|
|
13
13
|
* (cosine, 0..1). **Only available when embeddings are configured**
|
|
14
14
|
* (EMBEDDING_PROVIDER and EMBEDDING_MODEL set). Supported providers: openai,
|
|
15
|
-
* google (AI Studio), google-
|
|
15
|
+
* google (Gemini Developer API / Google AI Studio), google-gemini (Gemini
|
|
16
|
+
* Enterprise Agent Platform API). When embeddings are disabled, this endpoint
|
|
16
17
|
* returns 503 Service Unavailable. Request body must include query and tenant_id
|
|
17
18
|
* (required for tenant isolation).
|
|
18
19
|
*
|
|
@@ -14,12 +14,13 @@ export class Webhooks extends APIResource {
|
|
|
14
14
|
* Creates a new webhook endpoint. When events occur (e.g.
|
|
15
15
|
* feedback*record.created), the Hub POSTs a signed payload to the webhook URL. If
|
|
16
16
|
* signing_key is omitted, a key is auto-generated (Standard Webhooks format,
|
|
17
|
-
* whsec*...).
|
|
18
|
-
* URL.
|
|
17
|
+
* whsec*...). tenant_id is required; webhooks only receive events from that exact
|
|
18
|
+
* tenant. See WebhookDeliveryPayload for the payload structure sent to your URL.
|
|
19
19
|
*
|
|
20
20
|
* @example
|
|
21
21
|
* ```ts
|
|
22
22
|
* const webhook = await client.webhooks.create({
|
|
23
|
+
* tenant_id: 'org-123',
|
|
23
24
|
* url: 'https://example.com/hub-events',
|
|
24
25
|
* enabled: true,
|
|
25
26
|
* event_types: [
|
|
@@ -360,6 +361,12 @@ export namespace WebhookListResponse {
|
|
|
360
361
|
}
|
|
361
362
|
|
|
362
363
|
export interface WebhookCreateParams {
|
|
364
|
+
/**
|
|
365
|
+
* Tenant/organization identifier. Required for webhook isolation; NULL bytes not
|
|
366
|
+
* allowed.
|
|
367
|
+
*/
|
|
368
|
+
tenant_id: string;
|
|
369
|
+
|
|
363
370
|
/**
|
|
364
371
|
* URL to receive webhook POSTs. Must be an HTTP or HTTPS URL. NULL bytes not
|
|
365
372
|
* allowed.
|
|
@@ -390,11 +397,6 @@ export interface WebhookCreateParams {
|
|
|
390
397
|
* allowed.
|
|
391
398
|
*/
|
|
392
399
|
signing_key?: string;
|
|
393
|
-
|
|
394
|
-
/**
|
|
395
|
-
* Tenant/organization identifier. NULL bytes not allowed.
|
|
396
|
-
*/
|
|
397
|
-
tenant_id?: string;
|
|
398
400
|
}
|
|
399
401
|
|
|
400
402
|
export interface WebhookUpdateParams {
|
|
@@ -422,10 +424,9 @@ export interface WebhookUpdateParams {
|
|
|
422
424
|
signing_key?: string;
|
|
423
425
|
|
|
424
426
|
/**
|
|
425
|
-
* Omit
|
|
426
|
-
* null).
|
|
427
|
+
* Omit to leave unchanged. Empty strings are rejected; webhooks cannot be global.
|
|
427
428
|
*/
|
|
428
|
-
tenant_id?: string
|
|
429
|
+
tenant_id?: string;
|
|
429
430
|
|
|
430
431
|
/**
|
|
431
432
|
* New webhook URL. Must be an HTTP or HTTPS URL. NULL bytes not allowed.
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.5.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.5.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.5.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.5.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|