@qaiddev/quests-embed 1.6.0 → 1.7.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/README.md +1 -1
- package/dist/embed.d.ts +17 -0
- package/dist/qaid-quests.js +187 -159
- package/dist/qaid-quests.js.map +1 -1
- package/dist/qaid-quests.umd.cjs +3 -3
- package/dist/qaid-quests.umd.cjs.map +1 -1
- package/dist/types.d.ts +7 -1
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -270,8 +270,14 @@ export interface QuestsConfig {
|
|
|
270
270
|
* widget passes `{ feedbackId }` so the backend can join the quest
|
|
271
271
|
* answers to the feedback record. The server decides which keys it
|
|
272
272
|
* persists; unknown keys are ignored.
|
|
273
|
+
*
|
|
274
|
+
* May be a promise. Only the background create waits for it; the form
|
|
275
|
+
* renders at once. That lets a host open the quest before it has the ids
|
|
276
|
+
* to send (thumbs-embed opens it while its own feedback POST is still in
|
|
277
|
+
* flight). A rejected promise sends no metadata. Hosts can check
|
|
278
|
+
* `QaidQuests.supports.asyncMetadata` before passing one.
|
|
273
279
|
*/
|
|
274
|
-
metadata?: Record<string, unknown>;
|
|
280
|
+
metadata?: Record<string, unknown> | Promise<Record<string, unknown> | undefined>;
|
|
275
281
|
/**
|
|
276
282
|
* Called once when the quest is completed and the server accepted the
|
|
277
283
|
* submit (right after the final "thank you" screen renders). Receives
|