@uniformdev/context 19.214.0 → 19.214.1-alpha.10

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 CHANGED
@@ -30,12 +30,12 @@ type CookieTransitionDataStoreOptions = {
30
30
  */
31
31
  serverCookieValue?: string;
32
32
  /**
33
- * @deprecated
33
+ * @deprecated experimental functionality subject to change
34
34
  * The value of the quirk cookie during server-side rendering.
35
35
  */
36
36
  quirkCookieValue?: string;
37
37
  /**
38
- * @deprecated
38
+ * @deprecated experimental functionality subject to change
39
39
  * Whether to enable the experimental quirks feature.
40
40
  */
41
41
  experimental_quirksEnabled?: boolean;
@@ -45,7 +45,7 @@ type CookieTransitionDataStoreOptions = {
45
45
  */
46
46
  cookieName?: string;
47
47
  /**
48
- * @deprecated
48
+ * @deprecated experimental functionality subject to change
49
49
  * The name of the cookie to store quirks in.
50
50
  * Defaults to UNIFORM_DEFAULT_QUIRK_COOKIE_NAME if not set.
51
51
  */
@@ -200,6 +200,7 @@ type InsightsEndpoint = {
200
200
  };
201
201
  type EnableUniformInsightsOptions = {
202
202
  endpoint: InsightsEndpoint;
203
+ projectId: string;
203
204
  };
204
205
  declare const enableUniformInsights: (options: EnableUniformInsightsOptions) => ContextPlugin;
205
206
 
package/dist/index.d.ts CHANGED
@@ -30,12 +30,12 @@ type CookieTransitionDataStoreOptions = {
30
30
  */
31
31
  serverCookieValue?: string;
32
32
  /**
33
- * @deprecated
33
+ * @deprecated experimental functionality subject to change
34
34
  * The value of the quirk cookie during server-side rendering.
35
35
  */
36
36
  quirkCookieValue?: string;
37
37
  /**
38
- * @deprecated
38
+ * @deprecated experimental functionality subject to change
39
39
  * Whether to enable the experimental quirks feature.
40
40
  */
41
41
  experimental_quirksEnabled?: boolean;
@@ -45,7 +45,7 @@ type CookieTransitionDataStoreOptions = {
45
45
  */
46
46
  cookieName?: string;
47
47
  /**
48
- * @deprecated
48
+ * @deprecated experimental functionality subject to change
49
49
  * The name of the cookie to store quirks in.
50
50
  * Defaults to UNIFORM_DEFAULT_QUIRK_COOKIE_NAME if not set.
51
51
  */
@@ -200,6 +200,7 @@ type InsightsEndpoint = {
200
200
  };
201
201
  type EnableUniformInsightsOptions = {
202
202
  endpoint: InsightsEndpoint;
203
+ projectId: string;
203
204
  };
204
205
  declare const enableUniformInsights: (options: EnableUniformInsightsOptions) => ContextPlugin;
205
206
 
package/dist/index.esm.js CHANGED
@@ -2093,7 +2093,10 @@ var getBasePayload = () => {
2093
2093
  href: window.location.href
2094
2094
  };
2095
2095
  };
2096
- var createInsightsClient = ({ endpoint }) => {
2096
+ var createInsightsClient = ({
2097
+ endpoint,
2098
+ projectId
2099
+ }) => {
2097
2100
  let endpointUrl;
2098
2101
  const apiKey = endpoint.apiKey;
2099
2102
  if (endpoint.type === "api") {
@@ -2135,6 +2138,7 @@ var createInsightsClient = ({ endpoint }) => {
2135
2138
  visitor_id: options.visitorId,
2136
2139
  page_view_id: options.pageId,
2137
2140
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
2141
+ project_id: projectId,
2138
2142
  payload: {
2139
2143
  ...getBasePayload(),
2140
2144
  previous_session_id: options.previousSessionId
@@ -2150,6 +2154,7 @@ var createInsightsClient = ({ endpoint }) => {
2150
2154
  visitor_id: options.visitorId,
2151
2155
  page_view_id: options.pageId,
2152
2156
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
2157
+ project_id: projectId,
2153
2158
  payload: getBasePayload()
2154
2159
  };
2155
2160
  return sendMessage(message);
@@ -2162,6 +2167,7 @@ var createInsightsClient = ({ endpoint }) => {
2162
2167
  visitor_id: options.visitorId,
2163
2168
  page_view_id: options.pageId,
2164
2169
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
2170
+ project_id: projectId,
2165
2171
  payload: {
2166
2172
  ...getBasePayload(),
2167
2173
  ...options
@@ -2178,6 +2184,7 @@ var createInsightsClient = ({ endpoint }) => {
2178
2184
  visitor_id: options.visitorId,
2179
2185
  page_view_id: options.pageId,
2180
2186
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
2187
+ project_id: projectId,
2181
2188
  payload: {
2182
2189
  ...getBasePayload(),
2183
2190
  name: options.name,
@@ -2198,6 +2205,7 @@ var createInsightsClient = ({ endpoint }) => {
2198
2205
  visitor_id: options.visitorId,
2199
2206
  page_view_id: options.pageId,
2200
2207
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
2208
+ project_id: projectId,
2201
2209
  payload: {
2202
2210
  ...getBasePayload(),
2203
2211
  goalId: options.goalId
@@ -2213,6 +2221,7 @@ var createInsightsClient = ({ endpoint }) => {
2213
2221
  visitor_id: options.visitorId,
2214
2222
  page_view_id: options.pageId,
2215
2223
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
2224
+ project_id: projectId,
2216
2225
  payload: {
2217
2226
  ...getBasePayload(),
2218
2227
  scores: options.scores
@@ -2255,10 +2264,12 @@ var generatePageId = () => {
2255
2264
  };
2256
2265
  var createInsights = ({
2257
2266
  endpoint,
2267
+ projectId,
2258
2268
  sessionDurationSeconds = 30 * 60
2259
2269
  }) => {
2260
2270
  const client = createInsightsClient({
2261
- endpoint
2271
+ endpoint,
2272
+ projectId
2262
2273
  });
2263
2274
  const storage = createInsightsStorage();
2264
2275
  let storageData = void 0;
@@ -2356,7 +2367,8 @@ var createInsights = ({
2356
2367
  };
2357
2368
  var enableUniformInsights = (options) => {
2358
2369
  const insights = createInsights({
2359
- endpoint: options.endpoint
2370
+ endpoint: options.endpoint,
2371
+ projectId: options.projectId
2360
2372
  });
2361
2373
  let previousUrl = void 0;
2362
2374
  return {
package/dist/index.js CHANGED
@@ -2182,7 +2182,10 @@ var getBasePayload = () => {
2182
2182
  href: window.location.href
2183
2183
  };
2184
2184
  };
2185
- var createInsightsClient = ({ endpoint }) => {
2185
+ var createInsightsClient = ({
2186
+ endpoint,
2187
+ projectId
2188
+ }) => {
2186
2189
  let endpointUrl;
2187
2190
  const apiKey = endpoint.apiKey;
2188
2191
  if (endpoint.type === "api") {
@@ -2224,6 +2227,7 @@ var createInsightsClient = ({ endpoint }) => {
2224
2227
  visitor_id: options.visitorId,
2225
2228
  page_view_id: options.pageId,
2226
2229
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
2230
+ project_id: projectId,
2227
2231
  payload: {
2228
2232
  ...getBasePayload(),
2229
2233
  previous_session_id: options.previousSessionId
@@ -2239,6 +2243,7 @@ var createInsightsClient = ({ endpoint }) => {
2239
2243
  visitor_id: options.visitorId,
2240
2244
  page_view_id: options.pageId,
2241
2245
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
2246
+ project_id: projectId,
2242
2247
  payload: getBasePayload()
2243
2248
  };
2244
2249
  return sendMessage(message);
@@ -2251,6 +2256,7 @@ var createInsightsClient = ({ endpoint }) => {
2251
2256
  visitor_id: options.visitorId,
2252
2257
  page_view_id: options.pageId,
2253
2258
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
2259
+ project_id: projectId,
2254
2260
  payload: {
2255
2261
  ...getBasePayload(),
2256
2262
  ...options
@@ -2267,6 +2273,7 @@ var createInsightsClient = ({ endpoint }) => {
2267
2273
  visitor_id: options.visitorId,
2268
2274
  page_view_id: options.pageId,
2269
2275
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
2276
+ project_id: projectId,
2270
2277
  payload: {
2271
2278
  ...getBasePayload(),
2272
2279
  name: options.name,
@@ -2287,6 +2294,7 @@ var createInsightsClient = ({ endpoint }) => {
2287
2294
  visitor_id: options.visitorId,
2288
2295
  page_view_id: options.pageId,
2289
2296
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
2297
+ project_id: projectId,
2290
2298
  payload: {
2291
2299
  ...getBasePayload(),
2292
2300
  goalId: options.goalId
@@ -2302,6 +2310,7 @@ var createInsightsClient = ({ endpoint }) => {
2302
2310
  visitor_id: options.visitorId,
2303
2311
  page_view_id: options.pageId,
2304
2312
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
2313
+ project_id: projectId,
2305
2314
  payload: {
2306
2315
  ...getBasePayload(),
2307
2316
  scores: options.scores
@@ -2344,10 +2353,12 @@ var generatePageId = () => {
2344
2353
  };
2345
2354
  var createInsights = ({
2346
2355
  endpoint,
2356
+ projectId,
2347
2357
  sessionDurationSeconds = 30 * 60
2348
2358
  }) => {
2349
2359
  const client = createInsightsClient({
2350
- endpoint
2360
+ endpoint,
2361
+ projectId
2351
2362
  });
2352
2363
  const storage = createInsightsStorage();
2353
2364
  let storageData = void 0;
@@ -2445,7 +2456,8 @@ var createInsights = ({
2445
2456
  };
2446
2457
  var enableUniformInsights = (options) => {
2447
2458
  const insights = createInsights({
2448
- endpoint: options.endpoint
2459
+ endpoint: options.endpoint,
2460
+ projectId: options.projectId
2449
2461
  });
2450
2462
  let previousUrl = void 0;
2451
2463
  return {
package/dist/index.mjs CHANGED
@@ -2093,7 +2093,10 @@ var getBasePayload = () => {
2093
2093
  href: window.location.href
2094
2094
  };
2095
2095
  };
2096
- var createInsightsClient = ({ endpoint }) => {
2096
+ var createInsightsClient = ({
2097
+ endpoint,
2098
+ projectId
2099
+ }) => {
2097
2100
  let endpointUrl;
2098
2101
  const apiKey = endpoint.apiKey;
2099
2102
  if (endpoint.type === "api") {
@@ -2135,6 +2138,7 @@ var createInsightsClient = ({ endpoint }) => {
2135
2138
  visitor_id: options.visitorId,
2136
2139
  page_view_id: options.pageId,
2137
2140
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
2141
+ project_id: projectId,
2138
2142
  payload: {
2139
2143
  ...getBasePayload(),
2140
2144
  previous_session_id: options.previousSessionId
@@ -2150,6 +2154,7 @@ var createInsightsClient = ({ endpoint }) => {
2150
2154
  visitor_id: options.visitorId,
2151
2155
  page_view_id: options.pageId,
2152
2156
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
2157
+ project_id: projectId,
2153
2158
  payload: getBasePayload()
2154
2159
  };
2155
2160
  return sendMessage(message);
@@ -2162,6 +2167,7 @@ var createInsightsClient = ({ endpoint }) => {
2162
2167
  visitor_id: options.visitorId,
2163
2168
  page_view_id: options.pageId,
2164
2169
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
2170
+ project_id: projectId,
2165
2171
  payload: {
2166
2172
  ...getBasePayload(),
2167
2173
  ...options
@@ -2178,6 +2184,7 @@ var createInsightsClient = ({ endpoint }) => {
2178
2184
  visitor_id: options.visitorId,
2179
2185
  page_view_id: options.pageId,
2180
2186
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
2187
+ project_id: projectId,
2181
2188
  payload: {
2182
2189
  ...getBasePayload(),
2183
2190
  name: options.name,
@@ -2198,6 +2205,7 @@ var createInsightsClient = ({ endpoint }) => {
2198
2205
  visitor_id: options.visitorId,
2199
2206
  page_view_id: options.pageId,
2200
2207
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
2208
+ project_id: projectId,
2201
2209
  payload: {
2202
2210
  ...getBasePayload(),
2203
2211
  goalId: options.goalId
@@ -2213,6 +2221,7 @@ var createInsightsClient = ({ endpoint }) => {
2213
2221
  visitor_id: options.visitorId,
2214
2222
  page_view_id: options.pageId,
2215
2223
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
2224
+ project_id: projectId,
2216
2225
  payload: {
2217
2226
  ...getBasePayload(),
2218
2227
  scores: options.scores
@@ -2255,10 +2264,12 @@ var generatePageId = () => {
2255
2264
  };
2256
2265
  var createInsights = ({
2257
2266
  endpoint,
2267
+ projectId,
2258
2268
  sessionDurationSeconds = 30 * 60
2259
2269
  }) => {
2260
2270
  const client = createInsightsClient({
2261
- endpoint
2271
+ endpoint,
2272
+ projectId
2262
2273
  });
2263
2274
  const storage = createInsightsStorage();
2264
2275
  let storageData = void 0;
@@ -2356,7 +2367,8 @@ var createInsights = ({
2356
2367
  };
2357
2368
  var enableUniformInsights = (options) => {
2358
2369
  const insights = createInsights({
2359
- endpoint: options.endpoint
2370
+ endpoint: options.endpoint,
2371
+ projectId: options.projectId
2360
2372
  });
2361
2373
  let previousUrl = void 0;
2362
2374
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/context",
3
- "version": "19.214.0",
3
+ "version": "19.214.1-alpha.10+98dac3377a",
4
4
  "description": "Uniform Context core package",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -68,5 +68,5 @@
68
68
  "publishConfig": {
69
69
  "access": "public"
70
70
  },
71
- "gitHead": "057019805f3d07ac560a53b0a621268a9c3c3518"
71
+ "gitHead": "98dac3377a8313b1d70d0b02632a6a7192f2409c"
72
72
  }