avo-inspector 3.2.0 → 3.2.3

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.
Files changed (84) hide show
  1. package/README.md +10 -0
  2. package/dist/AvoBatcher.d.ts +9 -3
  3. package/dist/AvoInspector.d.ts +4 -0
  4. package/dist/AvoNetworkCallsHandler.d.ts +80 -5
  5. package/dist/__tests__/UnboundPublicMethods_test.d.ts +1 -0
  6. package/dist/__tests__/constants.d.ts +2 -1
  7. package/dist/__tests__/helpers/internalGateway.d.ts +23 -0
  8. package/dist/eventSpec/AvoEventSpecCache.d.ts +7 -4
  9. package/dist/eventSpec/AvoEventSpecFetchTypes.d.ts +12 -1
  10. package/dist/eventSpec/AvoEventSpecFetcher.d.ts +6 -1
  11. package/dist/index.js +1 -1
  12. package/dist/lite/AvoBatcherLite.d.ts +9 -3
  13. package/dist/lite/AvoBatcherLite.js +46 -7
  14. package/dist/lite/AvoInspectorLite.d.ts +2 -0
  15. package/dist/lite/AvoInspectorLite.js +95 -15
  16. package/dist/lite/AvoNetworkCallsHandlerLite.d.ts +79 -5
  17. package/dist/lite/AvoNetworkCallsHandlerLite.js +300 -20
  18. package/package.json +10 -1
  19. package/dist/AvoBatcher.js +0 -87
  20. package/dist/AvoDeduplicator.js +0 -142
  21. package/dist/AvoEncryption.js +0 -176
  22. package/dist/AvoInspector.js +0 -435
  23. package/dist/AvoNetworkCallsHandler.js +0 -229
  24. package/dist/AvoSchemaParser.js +0 -95
  25. package/dist/AvoStreamId.js +0 -82
  26. package/dist/__mocks__/xhr.js +0 -14
  27. package/dist/__mocks__/xhrError.js +0 -14
  28. package/dist/__tests__/AvoEncryption.js +0 -272
  29. package/dist/__tests__/AvoEncryptionIntegration.js +0 -191
  30. package/dist/__tests__/AvoEventSpecFetcher.js +0 -377
  31. package/dist/__tests__/AvoInspector.js +0 -335
  32. package/dist/__tests__/Batcher.js +0 -214
  33. package/dist/__tests__/BatcherPublic.js +0 -139
  34. package/dist/__tests__/Deduplicator.js +0 -190
  35. package/dist/__tests__/EventSpecCache.js +0 -143
  36. package/dist/__tests__/EventValidator.js +0 -543
  37. package/dist/__tests__/InstallationId.js +0 -60
  38. package/dist/__tests__/NetworkCallsHandler.js +0 -222
  39. package/dist/__tests__/NetworkCallsHandlerModelA.js +0 -206
  40. package/dist/__tests__/Parsing.js +0 -115
  41. package/dist/__tests__/Sessions.d.ts +0 -1
  42. package/dist/__tests__/Sessions.js +0 -10
  43. package/dist/__tests__/Storage.d.ts +0 -1
  44. package/dist/__tests__/Storage.js +0 -173
  45. package/dist/__tests__/StreamId.d.ts +0 -1
  46. package/dist/__tests__/StreamId.js +0 -153
  47. package/dist/__tests__/constants.js +0 -48
  48. package/dist/esm/AvoBatcher.js +0 -75
  49. package/dist/esm/AvoDeduplicator.js +0 -137
  50. package/dist/esm/AvoEncryption.js +0 -277
  51. package/dist/esm/AvoGuid.js +0 -9
  52. package/dist/esm/AvoInspector.js +0 -470
  53. package/dist/esm/AvoInspectorEnv.js +0 -5
  54. package/dist/esm/AvoNetworkCallsHandler.js +0 -181
  55. package/dist/esm/AvoSchemaParser.js +0 -128
  56. package/dist/esm/AvoStorage.js +0 -176
  57. package/dist/esm/AvoStreamId.js +0 -140
  58. package/dist/esm/eventSpec/AvoEventSpecCache.js +0 -165
  59. package/dist/esm/eventSpec/AvoEventSpecFetchTypes.js +0 -6
  60. package/dist/esm/eventSpec/AvoEventSpecFetcher.js +0 -203
  61. package/dist/esm/eventSpec/EventValidator.js +0 -687
  62. package/dist/esm/eventSpec/index.js +0 -4
  63. package/dist/esm/index.js +0 -3
  64. package/dist/esm/utils.js +0 -38
  65. package/dist/esm/version.js +0 -2
  66. package/dist/eventSpec/AvoEventSpecCache.js +0 -181
  67. package/dist/eventSpec/AvoEventSpecFetcher.js +0 -290
  68. package/dist/eventSpec/EventValidator.js +0 -846
  69. package/dist/eventSpec/index.js +0 -20
  70. package/dist/version.d.ts +0 -1
  71. package/dist/version.js +0 -5
  72. /package/dist/__tests__/{AvoEncryption.d.ts → ApiKeyHeaderInjection_test.d.ts} +0 -0
  73. /package/dist/__tests__/{AvoEncryptionIntegration.d.ts → BrowserBootstrap_test.d.ts} +0 -0
  74. /package/dist/__tests__/{AvoEventSpecFetcher.d.ts → EventSpecGatewayCoordinates_test.d.ts} +0 -0
  75. /package/dist/__tests__/{AvoInspector.d.ts → InFlightQueueGaps_test.d.ts} +0 -0
  76. /package/dist/__tests__/{Batcher.d.ts → InFlightQueue_test.d.ts} +0 -0
  77. /package/dist/__tests__/{BatcherPublic.d.ts → NetworkCallsHandlerLite_test.d.ts} +0 -0
  78. /package/dist/__tests__/{Deduplicator.d.ts → PublicSurface_test.d.ts} +0 -0
  79. /package/dist/__tests__/{EventSpecCache.d.ts → TrackOptionsIntegration_test.d.ts} +0 -0
  80. /package/dist/__tests__/{EventValidator.d.ts → TrackOptionsTransport_test.d.ts} +0 -0
  81. /package/dist/__tests__/{InstallationId.d.ts → TrackingHeaders_test.d.ts} +0 -0
  82. /package/dist/__tests__/{NetworkCallsHandler.d.ts → V1WireBaseline_test.d.ts} +0 -0
  83. /package/dist/__tests__/{NetworkCallsHandlerModelA.d.ts → V2QueuedAttribution_test.d.ts} +0 -0
  84. /package/dist/__tests__/{Parsing.d.ts → V2StopSending_test.d.ts} +0 -0
package/README.md CHANGED
@@ -269,10 +269,20 @@ inspector.setBatchFlushSeconds(10);
269
269
 
270
270
  You can control the network timeout for the SDK. Default is 2 seconds.
271
271
 
272
+ In dev and staging, every send waits at least 10 seconds, or `networkTimeout` if it is longer (0, no timeout, is kept). That includes an event that has an event spec, which is validated and sent on its own, right away. Production sends use `networkTimeout`.
273
+
272
274
  ```javascript
273
275
  Inspector.AvoInspector.networkTimeout = 5000;
274
276
  ```
275
277
 
278
+ # Maintainers: web GTM template support is internal
279
+
280
+ The Avo web GTM tag template reaches features that are not part of this SDK's public API: the
281
+ `/inspector/v2/track` transport and per-event gateway fields. They are reachable only through the
282
+ script-tag build, when `window.inspector.__CLIENT__` is `"gtm-web"`. Everything else — npm full,
283
+ npm lite and a regular script tag — sends to `/inspector/v1/track` exactly as 3.2.0 did. See
284
+ `src/browser.js` and `src/AvoNetworkCallsHandler.cs.md`. Don't document these for SDK users.
285
+
276
286
  ## Author
277
287
 
278
288
  Avo (https://www.avo.app), friends@avo.app
@@ -1,8 +1,8 @@
1
- import { type AvoNetworkCallsHandler, type EventProperty } from "./AvoNetworkCallsHandler";
1
+ import { type EventSchemaBody, type AvoNetworkCallsHandler, type EventProperty, type TrackOptions } from "./AvoNetworkCallsHandler";
2
2
  import type { EventSpecMetadata } from "./eventSpec/AvoEventSpecFetchTypes";
3
3
  export interface AvoBatcherType {
4
4
  handleSessionStarted: () => void;
5
- handleTrackSchema: (eventName: string, schema: EventProperty[], eventId: string | null, eventHash: string | null, eventSpecMetadata?: EventSpecMetadata) => void;
5
+ handleTrackSchema: (eventName: string, schema: EventProperty[], eventId: string | null, eventHash: string | null, eventSpecMetadata?: EventSpecMetadata, options?: TrackOptions) => void;
6
6
  }
7
7
  export declare class AvoBatcher implements AvoBatcherType {
8
8
  private events;
@@ -10,7 +10,13 @@ export declare class AvoBatcher implements AvoBatcherType {
10
10
  private readonly networkCallsHandler;
11
11
  constructor(networkCallsHandler: AvoNetworkCallsHandler);
12
12
  handleSessionStarted(): void;
13
- handleTrackSchema(eventName: string, schema: EventProperty[], eventId: string | null, eventHash: string | null, eventSpecMetadata?: EventSpecMetadata): void;
13
+ handleTrackSchema(eventName: string, schema: EventProperty[], eventId: string | null, eventHash: string | null, eventSpecMetadata?: EventSpecMetadata, options?: TrackOptions): void;
14
+ /**
15
+ * Queues an event body as it is, keeping its messageId and createdAt. Used to
16
+ * retry a failed immediate send: the request may have reached the server, and
17
+ * a resend must stay the same event rather than become a new one.
18
+ */
19
+ handleEventBody(eventBody: EventSchemaBody): void;
14
20
  private checkIfBatchNeedsToBeSent;
15
21
  private saveEvents;
16
22
  static get cacheKey(): string;
@@ -15,6 +15,7 @@ export declare class AvoInspector {
15
15
  private eventSpecCache?;
16
16
  private eventSpecFetcher?;
17
17
  private currentBranchId;
18
+ private readonly hasGatewayClient;
18
19
  static avoStorage: AvoStorage;
19
20
  private static _batchSize;
20
21
  static get batchSize(): number;
@@ -36,6 +37,7 @@ export declare class AvoInspector {
36
37
  publicEncryptionKey?: string;
37
38
  });
38
39
  trackSchemaFromEvent(eventName: string, eventProperties: Record<string, any>): Promise<EventProperty[]>;
40
+ private _trackSchemaFromEventWithOptions;
39
41
  private _avoFunctionTrackSchemaFromEvent;
40
42
  trackSchema(eventName: string, eventSchema: Array<{
41
43
  propertyName: string;
@@ -43,6 +45,7 @@ export declare class AvoInspector {
43
45
  encryptedPropertyValue?: string;
44
46
  children?: any;
45
47
  }>): Promise<void>;
48
+ private _trackSchemaWithOptions;
46
49
  private trackSchemaInternal;
47
50
  enableLogging(enable: boolean): void;
48
51
  extractSchema(eventProperties: Record<string, any>, shouldLogIfEnabled?: boolean): Promise<Array<{
@@ -53,6 +56,7 @@ export declare class AvoInspector {
53
56
  }>>;
54
57
  setBatchSize(newBatchSize: number): void;
55
58
  setBatchFlushSeconds(newBatchFlushSeconds: number): void;
59
+ private specCoordinates;
56
60
  /**
57
61
  * Handles branch change detection and cache storage for a fetched event spec.
58
62
  * This logic is shared between fetchEventSpecIfNeeded and fetchAndValidateEvent.
@@ -39,8 +39,44 @@ export interface BaseBody {
39
39
  export interface SessionStartedBody extends BaseBody {
40
40
  type: "sessionStarted";
41
41
  }
42
- export interface EventSchemaBody extends BaseBody {
42
+ /**
43
+ * INTERNAL — not part of the public API, and not exported from either entry
44
+ * point. Per-call gateway coordinates for the web GTM tag template, which passes
45
+ * them as a third argument to `window.inspector.trackSchemaFromEvent` in the
46
+ * script-tag build (see src/browser.js).
47
+ *
48
+ * They are sent as top-level siblings of `eventProperties` on the track body —
49
+ * never nested inside the schema, and never read from event data. Every value is
50
+ * trimmed; empty, whitespace-only and non-string values are treated as absent.
51
+ *
52
+ * They only apply on the v2 transport, i.e. when a client is configured.
53
+ * `POST /inspector/v2/track` decodes both hints and accepts a literal
54
+ * `appVersion: null` (stored as "unversioned"). Without a client the SDK is on
55
+ * `POST /inspector/v1/track` and the options are ignored entirely, `appVersion`
56
+ * included, so the body is exactly the one 3.2.0 built.
57
+ *
58
+ * Defined locally (not imported) in both AvoNetworkCallsHandler.ts and
59
+ * AvoNetworkCallsHandlerLite.ts to keep the lite-sync diff flat.
60
+ */
61
+ export interface TrackOptions {
62
+ /** Reference of the gateway output this observation was bound for. Omit for a gateway-level observation. */
63
+ outputReference?: string;
64
+ /** Low-cardinality hint identifying the event's upstream source (e.g. "web", "ios"). Never a user identifier. */
65
+ originHint?: string;
66
+ /** App version of the source that produced the event. With originHint set, replaces the SDK's configured version (literal null when omitted); without originHint, overrides it only when provided. */
67
+ appVersion?: string;
68
+ }
69
+ /** Events of a failed send that are worth queueing again; undefined means all of them. */
70
+ type RetryEvents = Array<SessionStartedBody | EventSchemaBody> | undefined;
71
+ export interface EventSchemaBody extends Omit<BaseBody, "appVersion"> {
43
72
  type: "event";
73
+ /**
74
+ * Nullable only here, and only on v2: with an originHint set and no per-event
75
+ * appVersion the event is source-scoped, so a literal null is sent rather than
76
+ * the SDK's configured version. Session-started bodies, and every v1 body,
77
+ * always carry the string version.
78
+ */
79
+ appVersion: string | null;
44
80
  /** ID of the base event from spec (null if no spec available) */
45
81
  eventId: string | null;
46
82
  /** Name seen in code */
@@ -50,6 +86,10 @@ export interface EventSchemaBody extends BaseBody {
50
86
  eventHash: string | null;
51
87
  /** Branch ID from getEventSpec response when value validation was performed */
52
88
  validatedBranchId?: string;
89
+ /** Gateway output this observation was bound for; absent = gateway checkpoint. v2 only. */
90
+ outputReference?: string;
91
+ /** Low-cardinality hint identifying the event's upstream source. v2 only. */
92
+ originHint?: string;
53
93
  }
54
94
  export declare class AvoNetworkCallsHandler {
55
95
  private readonly apiKey;
@@ -58,14 +98,42 @@ export declare class AvoNetworkCallsHandler {
58
98
  private readonly appVersion;
59
99
  private readonly libVersion;
60
100
  private readonly publicEncryptionKey?;
101
+ /**
102
+ * "gtm-web" for the web GTM tag template, otherwise undefined. It is the
103
+ * transport switch, decided once in the constructor: undefined keeps the v1
104
+ * request byte for byte as 3.2.0 sent it; "gtm-web" selects v2 and is the
105
+ * X-Avo-Client value.
106
+ */
107
+ private readonly client;
108
+ private readonly trackingEndpoint;
61
109
  private samplingRate;
62
110
  private sending;
63
- private static readonly trackingEndpoint;
64
- constructor(apiKey: string, envName: string, appName: string, appVersion: string, libVersion: string, publicEncryptionKey?: string);
65
- callInspectorWithBatchBody(inEvents: Array<SessionStartedBody | EventSchemaBody>, onCompleted: (error: Error | null) => any): void;
111
+ /** v2 only: permanent failures in a row for this instance's own events. */
112
+ private permanentFailures;
113
+ /** v2 only: permanent failures in a row per other api key and env, keyed as the send groups are. */
114
+ private readonly foreignFailures;
115
+ /** v2 only: set at most once, when sending can no longer succeed on this page. */
116
+ private sendingDisabled;
117
+ /** v2 only: set when the events themselves can never be sent, so queueing them would only grow the stored queue. */
118
+ private queueingDisabled;
119
+ constructor(apiKey: string, envName: string, appName: string, appVersion: string, libVersion: string, publicEncryptionKey?: string, client?: string);
120
+ /**
121
+ * v2 only: true once sending has stopped for this page (see
122
+ * maxConsecutivePermanentFailures). Always false on v1.
123
+ */
124
+ isSendingDisabled(): boolean;
125
+ /**
126
+ * v2 only: true when queueing events would only grow the stored queue, because
127
+ * they could never be sent under any configuration. Always false on v1.
128
+ */
129
+ isQueueingDisabled(): boolean;
130
+ private disableSending;
131
+ /** True while a batch sent through callInspectorWithBatchBody awaits its response. */
132
+ isBatchInFlight(): boolean;
133
+ callInspectorWithBatchBody(inEvents: Array<SessionStartedBody | EventSchemaBody>, onCompleted: (error: Error | null, retryEvents?: RetryEvents) => any): void;
66
134
  private fixStreamIds;
67
135
  bodyForSessionStartedCall(): SessionStartedBody;
68
- bodyForEventSchemaCall(eventName: string, eventProperties: EventProperty[], eventId: string | null, eventHash: string | null, eventSpecMetadata?: EventSpecMetadata, validatedBranchId?: string): EventSchemaBody;
136
+ bodyForEventSchemaCall(eventName: string, eventProperties: EventProperty[], eventId: string | null, eventHash: string | null, eventSpecMetadata?: EventSpecMetadata, validatedBranchId?: string, options?: TrackOptions): EventSchemaBody;
69
137
  private createBaseCallBody;
70
138
  /**
71
139
  * Calls Inspector API immediately with a single event (bypasses batching).
@@ -86,5 +154,12 @@ export declare class AvoNetworkCallsHandler {
86
154
  * synchronously in the unavailable case, so legacy timing is preserved.
87
155
  */
88
156
  private callInspectorApi;
157
+ private sendEvents;
158
+ /**
159
+ * Reports a failure as permanent (second argument true) when retrying the same
160
+ * request cannot succeed: the browser refused to build it, or the API answered
161
+ * a 4xx other than 408 and 429.
162
+ */
89
163
  private sendTrackingRequest;
90
164
  }
165
+ export {};
@@ -0,0 +1 @@
1
+ import "../__mocks__/xhr";
@@ -22,6 +22,7 @@ declare const requestMsg: {
22
22
  TIMEOUT: string;
23
23
  };
24
24
  declare const trackingEndpoint = "https://api.avo.app/inspector/v1/track";
25
+ declare const trackingEndpointV2 = "https://api.avo.app/inspector/v2/track";
25
26
  declare const sessionTimeMs: number;
26
27
  declare const type: {
27
28
  STRING: string;
@@ -33,4 +34,4 @@ declare const type: {
33
34
  NULL: string;
34
35
  UNKNOWN: string;
35
36
  };
36
- export { defaultOptions, error, mockedReturns, networkCallType, requestMsg, sessionTimeMs, type, trackingEndpoint };
37
+ export { defaultOptions, error, mockedReturns, networkCallType, requestMsg, sessionTimeMs, type, trackingEndpoint, trackingEndpointV2 };
@@ -0,0 +1,23 @@
1
+ /**
2
+ * The internal web GTM tag template path, for tests.
3
+ *
4
+ * None of this is public API. In production only the script-tag bootstrap
5
+ * (src/browser.js) uses it: it passes `window.inspector.__CLIENT__` as the
6
+ * untyped `_client` constructor option, and routes a third `trackSchemaFromEvent`
7
+ * / `trackSchema` argument to the private `_…WithOptions` methods. These helpers
8
+ * do the same from TypeScript, so tests reach it without widening public types.
9
+ */
10
+ export interface GatewayOptions {
11
+ outputReference?: unknown;
12
+ originHint?: unknown;
13
+ appVersion?: unknown;
14
+ }
15
+ /** Constructor options with the internal client set, as browser.js builds them. */
16
+ export declare const withClient: <T extends object>(options: T, client: string | undefined) => T;
17
+ /** Calls the internal `_trackSchemaFromEventWithOptions` on either build. */
18
+ export declare const trackSchemaFromEventWithOptions: (inspector: object, eventName: string, eventProperties: Record<string, any>, options: GatewayOptions | undefined) => Promise<any[]>;
19
+ /** Calls the internal `_trackSchemaWithOptions` on either build. */
20
+ export declare const trackSchemaWithOptions: (inspector: object, eventName: string, eventSchema: Array<{
21
+ propertyName: string;
22
+ propertyType: string;
23
+ }>, options: GatewayOptions | undefined) => Promise<void>;
@@ -1,4 +1,4 @@
1
- import type { EventSpecResponse } from "./AvoEventSpecFetchTypes";
1
+ import type { EventSpecResponse, EventSpecCoordinates } from "./AvoEventSpecFetchTypes";
2
2
  /**
3
3
  * EventSpecCache implements a dual-condition cache with LRU eviction.
4
4
  *
@@ -8,6 +8,9 @@ import type { EventSpecResponse } from "./AvoEventSpecFetchTypes";
8
8
  * - Each cache entry tracks: spec, timestamp, and hit count
9
9
  *
10
10
  * Cache Key Format: ${apiKey}:${streamId}:${eventName}
11
+ * With gateway coordinates (originHint / outputReference, web GTM tag template
12
+ * only) the key is JSON.stringify([apiKey, streamId, eventName, originHint, outputReference])
13
+ * instead, so specs for different checkpoints of the same event never share an entry.
11
14
  *
12
15
  * Note: Event count only increments on cache hits, not on every tracked event.
13
16
  * This ensures the cache evicts based on actual usage, not overall tracking volume.
@@ -33,7 +36,7 @@ export declare class EventSpecCache {
33
36
  * Returns true even for cached null specs (empty backend responses).
34
37
  * Use this to distinguish between "cache miss" and "cached empty response".
35
38
  */
36
- contains(apiKey: string, streamId: string, eventName: string): boolean;
39
+ contains(apiKey: string, streamId: string, eventName: string, coordinates?: EventSpecCoordinates): boolean;
37
40
  /**
38
41
  * Retrieves an event spec response from the cache if it exists and is valid.
39
42
  * Returns null if the entry is missing, expired, has exceeded event count,
@@ -41,12 +44,12 @@ export declare class EventSpecCache {
41
44
  *
42
45
  * On cache hit, increments the hit count for this entry and the global counter.
43
46
  */
44
- get(apiKey: string, streamId: string, eventName: string): EventSpecResponse | null;
47
+ get(apiKey: string, streamId: string, eventName: string, coordinates?: EventSpecCoordinates): EventSpecResponse | null;
45
48
  /**
46
49
  * Stores an event spec response in the cache.
47
50
  * Pass null to cache an empty response (event not found on backend).
48
51
  */
49
- set(apiKey: string, streamId: string, eventName: string, spec: EventSpecResponse | null): void;
52
+ set(apiKey: string, streamId: string, eventName: string, spec: EventSpecResponse | null, coordinates?: EventSpecCoordinates): void;
50
53
  /**
51
54
  * Determines if a cache entry should be evicted based on:
52
55
  * - Age (older than 5 minutes)
@@ -118,8 +118,19 @@ export interface EventSpecCacheEntry {
118
118
  /** Number of cache hits since this entry was cached */
119
119
  eventCount: number;
120
120
  }
121
+ /**
122
+ * Gateway coordinates of the event a spec is fetched for (internal, web GTM tag
123
+ * template only). Both are already normalized by the caller: trimmed, and absent
124
+ * when blank. With neither set, the spec fetch is exactly the source-key fetch.
125
+ */
126
+ export interface EventSpecCoordinates {
127
+ /** The source that produced the event, as the gateway names it */
128
+ originHint?: string;
129
+ /** The gateway output whose checkpoint observes the event */
130
+ outputReference?: string;
131
+ }
121
132
  /** Parameters for fetching event specifications from the API. */
122
- export interface FetchEventSpecParams {
133
+ export interface FetchEventSpecParams extends EventSpecCoordinates {
123
134
  /** The API key */
124
135
  apiKey: string;
125
136
  /** The stream ID */
@@ -22,7 +22,12 @@ export declare class AvoEventSpecFetcher {
22
22
  /** Environment name */
23
23
  private readonly env;
24
24
  constructor(timeout: number | undefined, shouldLog: boolean | undefined, env: string, baseUrl?: string);
25
- /** Generates a unique key for tracking in-flight requests. */
25
+ /**
26
+ * Generates a unique key for tracking in-flight requests, matching the spec
27
+ * cache key. The API key tells gateways apart, and gateway coordinates are
28
+ * part of the key, so fetches for different gateways or checkpoints of the
29
+ * same event name are never deduplicated into one.
30
+ */
26
31
  private generateRequestKey;
27
32
  /**
28
33
  * Fetches an event specification from the API.