@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/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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qaiddev/quests-embed",
3
- "version": "1.6.0",
3
+ "version": "1.7.0",
4
4
  "description": "Any Questions for your Users?",
5
5
  "type": "module",
6
6
  "main": "./dist/qaid-quests.umd.cjs",