@wireai/activation 0.1.0 → 0.2.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/AGENTS.md +82 -40
- package/CHANGELOG.md +17 -2
- package/INTEGRATION_PROMPT.md +8 -8
- package/README.md +38 -38
- package/dist/analytics/index.d.mts +92 -0
- package/dist/analytics/index.d.ts +92 -0
- package/dist/analytics/index.js +439 -0
- package/dist/analytics/index.js.map +1 -0
- package/dist/analytics/index.mjs +426 -0
- package/dist/analytics/index.mjs.map +1 -0
- package/dist/coachmarks/index.js.map +1 -1
- package/dist/coachmarks/index.mjs.map +1 -1
- package/dist/decision-BzbiKwk3.d.mts +79 -0
- package/dist/decision-plDEOCkt.d.ts +79 -0
- package/dist/eventQueue-CxKi7Qd5.d.mts +546 -0
- package/dist/eventQueue-rV1dtJJR.d.ts +546 -0
- package/dist/index.d.mts +162 -418
- package/dist/index.d.ts +162 -418
- package/dist/index.js +407 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +402 -5
- package/dist/index.mjs.map +1 -1
- package/dist/questionnaire/index.d.mts +2 -1
- package/dist/questionnaire/index.d.ts +2 -1
- package/dist/questionnaire/index.js.map +1 -1
- package/dist/questionnaire/index.mjs.map +1 -1
- package/dist/reviews/index.d.mts +5 -40
- package/dist/reviews/index.d.ts +5 -40
- package/dist/reviews/index.js.map +1 -1
- package/dist/reviews/index.mjs.map +1 -1
- package/dist/showcase/index.js.map +1 -1
- package/dist/showcase/index.mjs.map +1 -1
- package/dist/transport-BeO_Brcu.d.mts +40 -0
- package/dist/transport-DLpd1v5_.d.ts +40 -0
- package/dist/{decision-Cl8OFYzu.d.mts → types-A6pTxIZV.d.mts} +1 -77
- package/dist/{decision-CFvGY6nP.d.ts → types-BhpXJGlg.d.ts} +1 -77
- package/llms.txt +7 -7
- package/metro/index.d.ts +3 -3
- package/metro/index.js +3 -3
- package/package.json +15 -1
- package/src/analytics/contextEnvelope.ts +72 -0
- package/src/analytics/eventQueue.ts +331 -0
- package/src/analytics/index.ts +47 -0
- package/src/analytics/screenTracking.ts +122 -0
- package/src/analytics/useScreenTracking.ts +48 -0
- package/src/coachmarks/index.ts +2 -2
- package/src/features/WireFeaturesProvider.tsx +1 -1
- package/src/features/index.ts +2 -2
- package/src/index.ts +18 -1
- package/src/questionnaire/index.ts +2 -2
- package/src/reviews/index.ts +2 -2
- package/src/session-analytics/index.ts +20 -0
- package/src/session-analytics/lifecycle.ts +236 -0
- package/src/session-analytics/reportSessionStart.ts +27 -7
- package/src/session-analytics/useLifecycleEvents.ts +184 -0
- package/src/showcase/index.ts +2 -2
- package/src/types.ts +1 -1
package/dist/reviews/index.d.mts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
|
-
import { R as ReviewGateProps,
|
|
3
|
-
export {
|
|
2
|
+
import { R as ReviewGateProps, a as ReviewPresentation, U as UseReviewGateOptions, b as ReviewGateController, c as ReviewDecision, d as ReviewStoreConfig } from '../types-A6pTxIZV.mjs';
|
|
3
|
+
export { e as RatingRoute, f as ReviewConfig, g as ReviewGateEvent, h as ReviewGateEventName, i as ReviewSubmission, j as ReviewTarget } from '../types-A6pTxIZV.mjs';
|
|
4
4
|
export { C as ReviewModal, a as ReviewModalHandle, b as ReviewModalProps } from '../CenteredModal-C3qQBHsA.mjs';
|
|
5
|
+
export { G as GateRules, a as GateSignals, b as buildReviewSubmission, d as decideReview, e as evaluateGate, r as resolveRules, c as routeRating } from '../decision-BzbiKwk3.mjs';
|
|
5
6
|
import { c as OnboardingFonts } from '../types-BKfpdZzX.mjs';
|
|
7
|
+
export { R as ReportAppEventOptions, r as reportAppEvent, s as submitReview } from '../transport-BeO_Brcu.mjs';
|
|
6
8
|
import '../types-GL_hQ0TN.mjs';
|
|
7
9
|
import '../types-CMuOexw0.mjs';
|
|
8
10
|
|
|
@@ -173,41 +175,4 @@ declare const openStoreListing: (store: ReviewStoreConfig | undefined) => Promis
|
|
|
173
175
|
*/
|
|
174
176
|
declare const requestStoreReview: (store?: ReviewStoreConfig) => Promise<"native" | "store_url" | "none">;
|
|
175
177
|
|
|
176
|
-
|
|
177
|
-
* transport.ts — kit → Wire server requests for the review module, all fire-and-forget
|
|
178
|
-
* (analytics/reviews must never break the app). Mirrors analytics/reportClientEvent: a
|
|
179
|
-
* thin fetch wrapper, Bearer tenant key, swallow every error.
|
|
180
|
-
*
|
|
181
|
-
* • submitReview → POST {serverUrl}/v1/reviews (the 1-4 feedback body)
|
|
182
|
-
* • reportAppEvent → POST {serverUrl}/v1/events (generic app.* namespace)
|
|
183
|
-
*
|
|
184
|
-
* `reportAppEvent` is the strategic extension: it lets a host report arbitrary in-app
|
|
185
|
-
* events through the SAME transport (stored server-side as event_type='app_event',
|
|
186
|
-
* question_key=<name>), which is what the backend review-firing rules evaluate on — and
|
|
187
|
-
* it seeds the broader app-analytics stream. Keep payloads minimal + non-PII.
|
|
188
|
-
*/
|
|
189
|
-
|
|
190
|
-
/**
|
|
191
|
-
* POST a review (the 1-4 feedback path). Fire-and-forget: a missing target, a build error,
|
|
192
|
-
* a missing `fetch`, or a network failure is swallowed and the call returns immediately.
|
|
193
|
-
*/
|
|
194
|
-
declare const submitReview: (target: ReviewTarget | undefined, review: ReviewSubmission) => void;
|
|
195
|
-
/** Options for a reported app event. `deviceKey` groups a device's sessions server-side. */
|
|
196
|
-
interface ReportAppEventOptions {
|
|
197
|
-
/** The onboarding/session id to correlate with, when known. */
|
|
198
|
-
sessionId?: string;
|
|
199
|
-
/** A stable, non-PII device id — the review-decision endpoint reads it for min-sessions. */
|
|
200
|
-
deviceKey?: string;
|
|
201
|
-
/** Small non-PII extras. */
|
|
202
|
-
meta?: Record<string, unknown>;
|
|
203
|
-
}
|
|
204
|
-
/**
|
|
205
|
-
* Report a generic in-app event through the existing events transport. Stored server-side
|
|
206
|
-
* as `event_type='app_event'`, `question_key=<name>`. Fire-and-forget. Keep `name` a short
|
|
207
|
-
* stable identifier and `meta` small + non-PII.
|
|
208
|
-
*
|
|
209
|
-
* reportAppEvent(target, "content_share", { sessionId, deviceKey });
|
|
210
|
-
*/
|
|
211
|
-
declare const reportAppEvent: (target: ReviewTarget | undefined, name: string, options?: ReportAppEventOptions) => void;
|
|
212
|
-
|
|
213
|
-
export { DEFAULT_PRESENTATION, FEEDBACK_MAX_LINES, FEEDBACK_MIN_LINES, type FeedbackInputHeights, CENTERED_MODAL_ANIM as REVIEW_MODAL_ANIM, type ReportAppEventOptions, ReviewDecision, ReviewGate, ReviewGateController, ReviewGateProps, ReviewPresentation, ReviewStoreConfig, ReviewSubmission, ReviewTarget, UseReviewGateOptions, centeredModalFrame as entranceFrame, feedbackInputHeights, openStoreListing, reportAppEvent, requestStoreReview, resolvePresentation, reviewLastShownKey, reviewSeenKey, reviewSessionsKey, sameDecision, shallowEqual, storeUrl, submitReview, useReviewGate };
|
|
178
|
+
export { DEFAULT_PRESENTATION, FEEDBACK_MAX_LINES, FEEDBACK_MIN_LINES, type FeedbackInputHeights, CENTERED_MODAL_ANIM as REVIEW_MODAL_ANIM, ReviewDecision, ReviewGate, ReviewGateController, ReviewGateProps, ReviewPresentation, ReviewStoreConfig, UseReviewGateOptions, centeredModalFrame as entranceFrame, feedbackInputHeights, openStoreListing, requestStoreReview, resolvePresentation, reviewLastShownKey, reviewSeenKey, reviewSessionsKey, sameDecision, shallowEqual, storeUrl, useReviewGate };
|
package/dist/reviews/index.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
|
-
import { R as ReviewGateProps,
|
|
3
|
-
export {
|
|
2
|
+
import { R as ReviewGateProps, a as ReviewPresentation, U as UseReviewGateOptions, b as ReviewGateController, c as ReviewDecision, d as ReviewStoreConfig } from '../types-BhpXJGlg.js';
|
|
3
|
+
export { e as RatingRoute, f as ReviewConfig, g as ReviewGateEvent, h as ReviewGateEventName, i as ReviewSubmission, j as ReviewTarget } from '../types-BhpXJGlg.js';
|
|
4
4
|
export { C as ReviewModal, a as ReviewModalHandle, b as ReviewModalProps } from '../CenteredModal-Cdgns6--.js';
|
|
5
|
+
export { G as GateRules, a as GateSignals, b as buildReviewSubmission, d as decideReview, e as evaluateGate, r as resolveRules, c as routeRating } from '../decision-plDEOCkt.js';
|
|
5
6
|
import { c as OnboardingFonts } from '../types-BKfpdZzX.js';
|
|
7
|
+
export { R as ReportAppEventOptions, r as reportAppEvent, s as submitReview } from '../transport-DLpd1v5_.js';
|
|
6
8
|
import '../types-GL_hQ0TN.js';
|
|
7
9
|
import '../types-CMuOexw0.js';
|
|
8
10
|
|
|
@@ -173,41 +175,4 @@ declare const openStoreListing: (store: ReviewStoreConfig | undefined) => Promis
|
|
|
173
175
|
*/
|
|
174
176
|
declare const requestStoreReview: (store?: ReviewStoreConfig) => Promise<"native" | "store_url" | "none">;
|
|
175
177
|
|
|
176
|
-
|
|
177
|
-
* transport.ts — kit → Wire server requests for the review module, all fire-and-forget
|
|
178
|
-
* (analytics/reviews must never break the app). Mirrors analytics/reportClientEvent: a
|
|
179
|
-
* thin fetch wrapper, Bearer tenant key, swallow every error.
|
|
180
|
-
*
|
|
181
|
-
* • submitReview → POST {serverUrl}/v1/reviews (the 1-4 feedback body)
|
|
182
|
-
* • reportAppEvent → POST {serverUrl}/v1/events (generic app.* namespace)
|
|
183
|
-
*
|
|
184
|
-
* `reportAppEvent` is the strategic extension: it lets a host report arbitrary in-app
|
|
185
|
-
* events through the SAME transport (stored server-side as event_type='app_event',
|
|
186
|
-
* question_key=<name>), which is what the backend review-firing rules evaluate on — and
|
|
187
|
-
* it seeds the broader app-analytics stream. Keep payloads minimal + non-PII.
|
|
188
|
-
*/
|
|
189
|
-
|
|
190
|
-
/**
|
|
191
|
-
* POST a review (the 1-4 feedback path). Fire-and-forget: a missing target, a build error,
|
|
192
|
-
* a missing `fetch`, or a network failure is swallowed and the call returns immediately.
|
|
193
|
-
*/
|
|
194
|
-
declare const submitReview: (target: ReviewTarget | undefined, review: ReviewSubmission) => void;
|
|
195
|
-
/** Options for a reported app event. `deviceKey` groups a device's sessions server-side. */
|
|
196
|
-
interface ReportAppEventOptions {
|
|
197
|
-
/** The onboarding/session id to correlate with, when known. */
|
|
198
|
-
sessionId?: string;
|
|
199
|
-
/** A stable, non-PII device id — the review-decision endpoint reads it for min-sessions. */
|
|
200
|
-
deviceKey?: string;
|
|
201
|
-
/** Small non-PII extras. */
|
|
202
|
-
meta?: Record<string, unknown>;
|
|
203
|
-
}
|
|
204
|
-
/**
|
|
205
|
-
* Report a generic in-app event through the existing events transport. Stored server-side
|
|
206
|
-
* as `event_type='app_event'`, `question_key=<name>`. Fire-and-forget. Keep `name` a short
|
|
207
|
-
* stable identifier and `meta` small + non-PII.
|
|
208
|
-
*
|
|
209
|
-
* reportAppEvent(target, "content_share", { sessionId, deviceKey });
|
|
210
|
-
*/
|
|
211
|
-
declare const reportAppEvent: (target: ReviewTarget | undefined, name: string, options?: ReportAppEventOptions) => void;
|
|
212
|
-
|
|
213
|
-
export { DEFAULT_PRESENTATION, FEEDBACK_MAX_LINES, FEEDBACK_MIN_LINES, type FeedbackInputHeights, CENTERED_MODAL_ANIM as REVIEW_MODAL_ANIM, type ReportAppEventOptions, ReviewDecision, ReviewGate, ReviewGateController, ReviewGateProps, ReviewPresentation, ReviewStoreConfig, ReviewSubmission, ReviewTarget, UseReviewGateOptions, centeredModalFrame as entranceFrame, feedbackInputHeights, openStoreListing, reportAppEvent, requestStoreReview, resolvePresentation, reviewLastShownKey, reviewSeenKey, reviewSessionsKey, sameDecision, shallowEqual, storeUrl, submitReview, useReviewGate };
|
|
178
|
+
export { DEFAULT_PRESENTATION, FEEDBACK_MAX_LINES, FEEDBACK_MIN_LINES, type FeedbackInputHeights, CENTERED_MODAL_ANIM as REVIEW_MODAL_ANIM, ReviewDecision, ReviewGate, ReviewGateController, ReviewGateProps, ReviewPresentation, ReviewStoreConfig, UseReviewGateOptions, centeredModalFrame as entranceFrame, feedbackInputHeights, openStoreListing, requestStoreReview, resolvePresentation, reviewLastShownKey, reviewSeenKey, reviewSessionsKey, sameDecision, shallowEqual, storeUrl, useReviewGate };
|