@aranova/tracking-react 0.21.0 → 0.22.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/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +59 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +59 -4
- package/dist/index.mjs.map +1 -1
- package/dist/{phone-utils-B2vHJkNz.d.mts → phone-utils-BhWfNuPS.d.mts} +8 -0
- package/dist/{phone-utils-B2vHJkNz.d.ts → phone-utils-BhWfNuPS.d.ts} +8 -0
- package/dist/phone.d.mts +1 -1
- package/dist/phone.d.ts +1 -1
- package/dist/sales.d.mts +1 -1
- package/dist/sales.d.ts +1 -1
- package/dist/sales.js +7 -0
- package/dist/sales.js.map +1 -1
- package/dist/sales.mjs +7 -0
- package/dist/sales.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/{sales-CBQJ2SBT.d.mts → sales-BhCYJqDy.d.mts} +4 -4
- package/dist/{sales-CBQJ2SBT.d.ts → sales-BhCYJqDy.d.ts} +4 -4
|
@@ -287,6 +287,14 @@ interface TrackingClientContext {
|
|
|
287
287
|
environment: TrackingEnvironment;
|
|
288
288
|
/** All active gtag IDs loaded on this page, keyed by label. */
|
|
289
289
|
active_gtag_ids: Record<string, string> | null;
|
|
290
|
+
/**
|
|
291
|
+
* SDK capabilities constructed in this runtime, sorted.
|
|
292
|
+
*
|
|
293
|
+
* Rebuilt per batch rather than sent once at mount, so a client constructed
|
|
294
|
+
* later on a deeper route (a sales client on `/checkout`, a calendar client
|
|
295
|
+
* on `/book`) still reports. See `capabilities.ts`.
|
|
296
|
+
*/
|
|
297
|
+
capabilities: string[];
|
|
290
298
|
}
|
|
291
299
|
/**
|
|
292
300
|
* Session payload sent to `POST /tracking/events`.
|
|
@@ -287,6 +287,14 @@ interface TrackingClientContext {
|
|
|
287
287
|
environment: TrackingEnvironment;
|
|
288
288
|
/** All active gtag IDs loaded on this page, keyed by label. */
|
|
289
289
|
active_gtag_ids: Record<string, string> | null;
|
|
290
|
+
/**
|
|
291
|
+
* SDK capabilities constructed in this runtime, sorted.
|
|
292
|
+
*
|
|
293
|
+
* Rebuilt per batch rather than sent once at mount, so a client constructed
|
|
294
|
+
* later on a deeper route (a sales client on `/checkout`, a calendar client
|
|
295
|
+
* on `/book`) still reports. See `capabilities.ts`.
|
|
296
|
+
*/
|
|
297
|
+
capabilities: string[];
|
|
290
298
|
}
|
|
291
299
|
/**
|
|
292
300
|
* Session payload sent to `POST /tracking/events`.
|
package/dist/phone.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { l as DEFAULT_PHONE_COUNTRY, i as ParsedPhone, P as PhoneConfig, j as PhoneDisplayFormat, m as TrackedField, q as formatPhone, r as formatPhoneAsTyped, y as parsePhone, z as phoneField, E as toE164 } from './phone-utils-
|
|
1
|
+
export { l as DEFAULT_PHONE_COUNTRY, i as ParsedPhone, P as PhoneConfig, j as PhoneDisplayFormat, m as TrackedField, q as formatPhone, r as formatPhoneAsTyped, y as parsePhone, z as phoneField, E as toE164 } from './phone-utils-BhWfNuPS.mjs';
|
|
2
2
|
export { CountryCode } from 'libphonenumber-js';
|
|
3
3
|
import 'zod';
|
package/dist/phone.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { l as DEFAULT_PHONE_COUNTRY, i as ParsedPhone, P as PhoneConfig, j as PhoneDisplayFormat, m as TrackedField, q as formatPhone, r as formatPhoneAsTyped, y as parsePhone, z as phoneField, E as toE164 } from './phone-utils-
|
|
1
|
+
export { l as DEFAULT_PHONE_COUNTRY, i as ParsedPhone, P as PhoneConfig, j as PhoneDisplayFormat, m as TrackedField, q as formatPhone, r as formatPhoneAsTyped, y as parsePhone, z as phoneField, E as toE164 } from './phone-utils-BhWfNuPS.js';
|
|
2
2
|
export { CountryCode } from 'libphonenumber-js';
|
|
3
3
|
import 'zod';
|
package/dist/sales.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { A as AranovaApiError, B as BusinessConfig, a as BusinessConfigFeatures, b as BusinessConfigService, c as CompareTo, f as CurrencyRevenue, g as CustomerCurrencyDelta, h as CustomerCurrencyTotal, i as CustomerGetOptions, j as CustomerGetResult, k as CustomerKpis, l as CustomerKpisDeltas, m as CustomerKpisPrevious, n as CustomerListPage, o as CustomerListQuery, p as CustomerProfile, q as CustomerSegment, r as CustomerSegmentCount, s as CustomerSortField, t as CustomerSummary, u as CustomerSummaryQuery, D as DistinctCustomersByCurrency, G as Granularity, N as NAMED_RANGES, v as NamedRange, P as PublicServiceItem, S as SUPPORTED_CURRENCIES, w as Sale, x as SaleCursorPage, y as SaleFilters, z as SaleInput, E as SaleItem, F as SaleItemInput, H as SaleKeysetSortField, I as SaleListPage, J as SaleListQuery, K as SaleListQueryV2, L as SaleService, M as SaleServiceInput, O as SaleSortField, Q as SaleSortOrder, R as SaleSummary, U as SaleSummaryPrevious, V as SaleSummaryQuery, W as SaleSummaryQueryV2, X as SaleSummaryV2, Y as SaleUpdateInput, Z as SalesBusinessClient, _ as SalesCategoryBreakdown, $ as SalesClient, a0 as SalesClientConfig, a1 as SalesCustomersClient, a2 as SalesServiceBreakdown, a3 as SalesTransportConfig, a4 as SalesTrendPoint, a5 as SummaryCurrencyDelta, a6 as SummaryDeltas, a7 as SummaryWindow, a8 as SupportedCurrency, a9 as TRACKING_RANGES, aa as TrackingOverviewRange, ac as createSalesClient, ad as fetchServices, ae as formatDateInTz, af as formatMoney, ag as fromMinor, aj as saleCreateSchema, ak as saleItemSchema, al as saleServiceSchema, am as saleUpdateSchema, an as salesRequest, ap as toMinor } from './sales-
|
|
1
|
+
export { A as AranovaApiError, B as BusinessConfig, a as BusinessConfigFeatures, b as BusinessConfigService, c as CompareTo, f as CurrencyRevenue, g as CustomerCurrencyDelta, h as CustomerCurrencyTotal, i as CustomerGetOptions, j as CustomerGetResult, k as CustomerKpis, l as CustomerKpisDeltas, m as CustomerKpisPrevious, n as CustomerListPage, o as CustomerListQuery, p as CustomerProfile, q as CustomerSegment, r as CustomerSegmentCount, s as CustomerSortField, t as CustomerSummary, u as CustomerSummaryQuery, D as DistinctCustomersByCurrency, G as Granularity, N as NAMED_RANGES, v as NamedRange, P as PublicServiceItem, S as SUPPORTED_CURRENCIES, w as Sale, x as SaleCursorPage, y as SaleFilters, z as SaleInput, E as SaleItem, F as SaleItemInput, H as SaleKeysetSortField, I as SaleListPage, J as SaleListQuery, K as SaleListQueryV2, L as SaleService, M as SaleServiceInput, O as SaleSortField, Q as SaleSortOrder, R as SaleSummary, U as SaleSummaryPrevious, V as SaleSummaryQuery, W as SaleSummaryQueryV2, X as SaleSummaryV2, Y as SaleUpdateInput, Z as SalesBusinessClient, _ as SalesCategoryBreakdown, $ as SalesClient, a0 as SalesClientConfig, a1 as SalesCustomersClient, a2 as SalesServiceBreakdown, a3 as SalesTransportConfig, a4 as SalesTrendPoint, a5 as SummaryCurrencyDelta, a6 as SummaryDeltas, a7 as SummaryWindow, a8 as SupportedCurrency, a9 as TRACKING_RANGES, aa as TrackingOverviewRange, ac as createSalesClient, ad as fetchServices, ae as formatDateInTz, af as formatMoney, ag as fromMinor, aj as saleCreateSchema, ak as saleItemSchema, al as saleServiceSchema, am as saleUpdateSchema, an as salesRequest, ap as toMinor } from './sales-BhCYJqDy.mjs';
|
|
2
2
|
import 'zod';
|
|
3
3
|
import 'libphonenumber-js';
|
package/dist/sales.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { A as AranovaApiError, B as BusinessConfig, a as BusinessConfigFeatures, b as BusinessConfigService, c as CompareTo, f as CurrencyRevenue, g as CustomerCurrencyDelta, h as CustomerCurrencyTotal, i as CustomerGetOptions, j as CustomerGetResult, k as CustomerKpis, l as CustomerKpisDeltas, m as CustomerKpisPrevious, n as CustomerListPage, o as CustomerListQuery, p as CustomerProfile, q as CustomerSegment, r as CustomerSegmentCount, s as CustomerSortField, t as CustomerSummary, u as CustomerSummaryQuery, D as DistinctCustomersByCurrency, G as Granularity, N as NAMED_RANGES, v as NamedRange, P as PublicServiceItem, S as SUPPORTED_CURRENCIES, w as Sale, x as SaleCursorPage, y as SaleFilters, z as SaleInput, E as SaleItem, F as SaleItemInput, H as SaleKeysetSortField, I as SaleListPage, J as SaleListQuery, K as SaleListQueryV2, L as SaleService, M as SaleServiceInput, O as SaleSortField, Q as SaleSortOrder, R as SaleSummary, U as SaleSummaryPrevious, V as SaleSummaryQuery, W as SaleSummaryQueryV2, X as SaleSummaryV2, Y as SaleUpdateInput, Z as SalesBusinessClient, _ as SalesCategoryBreakdown, $ as SalesClient, a0 as SalesClientConfig, a1 as SalesCustomersClient, a2 as SalesServiceBreakdown, a3 as SalesTransportConfig, a4 as SalesTrendPoint, a5 as SummaryCurrencyDelta, a6 as SummaryDeltas, a7 as SummaryWindow, a8 as SupportedCurrency, a9 as TRACKING_RANGES, aa as TrackingOverviewRange, ac as createSalesClient, ad as fetchServices, ae as formatDateInTz, af as formatMoney, ag as fromMinor, aj as saleCreateSchema, ak as saleItemSchema, al as saleServiceSchema, am as saleUpdateSchema, an as salesRequest, ap as toMinor } from './sales-
|
|
1
|
+
export { A as AranovaApiError, B as BusinessConfig, a as BusinessConfigFeatures, b as BusinessConfigService, c as CompareTo, f as CurrencyRevenue, g as CustomerCurrencyDelta, h as CustomerCurrencyTotal, i as CustomerGetOptions, j as CustomerGetResult, k as CustomerKpis, l as CustomerKpisDeltas, m as CustomerKpisPrevious, n as CustomerListPage, o as CustomerListQuery, p as CustomerProfile, q as CustomerSegment, r as CustomerSegmentCount, s as CustomerSortField, t as CustomerSummary, u as CustomerSummaryQuery, D as DistinctCustomersByCurrency, G as Granularity, N as NAMED_RANGES, v as NamedRange, P as PublicServiceItem, S as SUPPORTED_CURRENCIES, w as Sale, x as SaleCursorPage, y as SaleFilters, z as SaleInput, E as SaleItem, F as SaleItemInput, H as SaleKeysetSortField, I as SaleListPage, J as SaleListQuery, K as SaleListQueryV2, L as SaleService, M as SaleServiceInput, O as SaleSortField, Q as SaleSortOrder, R as SaleSummary, U as SaleSummaryPrevious, V as SaleSummaryQuery, W as SaleSummaryQueryV2, X as SaleSummaryV2, Y as SaleUpdateInput, Z as SalesBusinessClient, _ as SalesCategoryBreakdown, $ as SalesClient, a0 as SalesClientConfig, a1 as SalesCustomersClient, a2 as SalesServiceBreakdown, a3 as SalesTransportConfig, a4 as SalesTrendPoint, a5 as SummaryCurrencyDelta, a6 as SummaryDeltas, a7 as SummaryWindow, a8 as SupportedCurrency, a9 as TRACKING_RANGES, aa as TrackingOverviewRange, ac as createSalesClient, ad as fetchServices, ae as formatDateInTz, af as formatMoney, ag as fromMinor, aj as saleCreateSchema, ak as saleItemSchema, al as saleServiceSchema, am as saleUpdateSchema, an as salesRequest, ap as toMinor } from './sales-BhCYJqDy.js';
|
|
2
2
|
import 'zod';
|
|
3
3
|
import 'libphonenumber-js';
|
package/dist/sales.js
CHANGED
|
@@ -38,6 +38,12 @@ __export(sales_exports, {
|
|
|
38
38
|
});
|
|
39
39
|
module.exports = __toCommonJS(sales_exports);
|
|
40
40
|
|
|
41
|
+
// ../tracking-core/src/capabilities.ts
|
|
42
|
+
var registered = /* @__PURE__ */ new Set();
|
|
43
|
+
function registerCapability(capability) {
|
|
44
|
+
registered.add(capability);
|
|
45
|
+
}
|
|
46
|
+
|
|
41
47
|
// ../tracking-core/src/phone.ts
|
|
42
48
|
var import_libphonenumber_js = require("libphonenumber-js");
|
|
43
49
|
var DEFAULT_PHONE_COUNTRY = "CA";
|
|
@@ -356,6 +362,7 @@ function fireRecordedConversions(firing, input, recorded, sale, currency) {
|
|
|
356
362
|
}
|
|
357
363
|
}
|
|
358
364
|
function createSalesClient(config) {
|
|
365
|
+
if (config.firing) registerCapability("conversion_goals_manual");
|
|
359
366
|
async function record(input) {
|
|
360
367
|
const currency = input.currency ?? config.defaultCurrency;
|
|
361
368
|
if (!currency) {
|