@anglerai/react-native-analytics 0.0.0-stage → 0.1.0-rc.1

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 (39) hide show
  1. package/AnglerAnalyticsRN.podspec +25 -0
  2. package/LICENSE +21 -0
  3. package/README.md +92 -2
  4. package/android/build.gradle +64 -0
  5. package/android/src/main/java/ai/getangler/analytics/reactnative/AnglerAnalyticsModule.kt +51 -0
  6. package/android/src/main/java/ai/getangler/analytics/reactnative/AnglerAnalyticsPackage.kt +25 -0
  7. package/android/src/main/java/ai/getangler/analytics/reactnative/ConfigParser.kt +58 -0
  8. package/android/src/test/java/ai/getangler/analytics/reactnative/ConfigParserTest.kt +51 -0
  9. package/ios/AnglerAnalyticsBridge.swift +58 -0
  10. package/ios/AnglerAnalyticsRN.mm +84 -0
  11. package/ios/vendor/AnglerAnalytics/Angler.swift +132 -0
  12. package/ios/vendor/AnglerAnalytics/AnglerCore.swift +398 -0
  13. package/ios/vendor/AnglerAnalytics/Attribution/AttributionStore.swift +109 -0
  14. package/ios/vendor/AnglerAnalytics/Attribution/ClickIdParser.swift +52 -0
  15. package/ios/vendor/AnglerAnalytics/Device/AdIdProvider.swift +36 -0
  16. package/ios/vendor/AnglerAnalytics/Device/DeviceContext.swift +111 -0
  17. package/ios/vendor/AnglerAnalytics/Device/FirebaseIdProvider.swift +35 -0
  18. package/ios/vendor/AnglerAnalytics/Lifecycle/LifecycleObserver.swift +77 -0
  19. package/ios/vendor/AnglerAnalytics/Lifecycle/SharedApplication.swift +15 -0
  20. package/ios/vendor/AnglerAnalytics/Log.swift +24 -0
  21. package/ios/vendor/AnglerAnalytics/Network/Flusher.swift +112 -0
  22. package/ios/vendor/AnglerAnalytics/Network/ResponsePolicy.swift +29 -0
  23. package/ios/vendor/AnglerAnalytics/Network/Scheduler.swift +13 -0
  24. package/ios/vendor/AnglerAnalytics/Network/Transport.swift +55 -0
  25. package/ios/vendor/AnglerAnalytics/Payload/JSONValue.swift +81 -0
  26. package/ios/vendor/AnglerAnalytics/Payload/Models.generated.swift +580 -0
  27. package/ios/vendor/AnglerAnalytics/Payload/PayloadBuilder.swift +148 -0
  28. package/ios/vendor/AnglerAnalytics/Payload/StandardEvent.swift +26 -0
  29. package/ios/vendor/AnglerAnalytics/Payload/TypedModels.swift +14 -0
  30. package/ios/vendor/AnglerAnalytics/Resources/PrivacyInfo.xcprivacy +77 -0
  31. package/ios/vendor/AnglerAnalytics/Storage/Clock.swift +14 -0
  32. package/ios/vendor/AnglerAnalytics/Storage/EventQueue.swift +85 -0
  33. package/ios/vendor/AnglerAnalytics/Storage/IdentityStore.swift +76 -0
  34. package/ios/vendor/AnglerAnalytics/Storage/KeyValueStore.swift +38 -0
  35. package/ios/vendor/AnglerAnalytics/Version.swift +4 -0
  36. package/package.json +46 -4
  37. package/src/NativeAnglerAnalytics.ts +21 -0
  38. package/src/index.ts +159 -0
  39. package/src/models.generated.ts +347 -0
package/src/index.ts ADDED
@@ -0,0 +1,159 @@
1
+ import { Linking } from 'react-native';
2
+ import NativeAnglerAnalytics, { type Spec } from './NativeAnglerAnalytics';
3
+ import type { AnglerData, AnglerEventName } from './models.generated';
4
+
5
+ export * from './models.generated';
6
+
7
+ export type AnglerConfig = {
8
+ workspaceId: string;
9
+ /** Workspace JWT. */
10
+ token: string;
11
+ /** `data.getangler.ai` (default) or `dev-data.getangler.ai`. */
12
+ domain?: string;
13
+ /** Overrides `client_id`. Defaults to the install ID. */
14
+ clientId?: string;
15
+ /**
16
+ * iOS App Store ID (`id1234567890`), sent as the `app_id` device property; TikTok's app events
17
+ * need it. Android always sends the package name.
18
+ */
19
+ appStoreId?: string;
20
+ trackLifecycleEvents?: boolean;
21
+ flushAt?: number;
22
+ flushIntervalSeconds?: number;
23
+ maxQueueSize?: number;
24
+ debugLogging?: boolean;
25
+ /** Subscribe to `Linking` and forward deep links automatically. Default `true`. */
26
+ autoHandleDeepLinks?: boolean;
27
+ };
28
+
29
+ export type TrackOptions = {
30
+ /** The event's data objects (cart, cartLine, checkout, …), typed from data-api's schema. */
31
+ data?: AnglerData;
32
+ properties?: Record<string, string>;
33
+ eventId?: string;
34
+ };
35
+
36
+ declare const __DEV__: boolean;
37
+
38
+ function warn(message: string, error?: unknown): void {
39
+ if (typeof __DEV__ !== 'undefined' && __DEV__) {
40
+ // eslint-disable-next-line no-console
41
+ console.warn(`[Angler] ${message}`, error ?? '');
42
+ }
43
+ }
44
+
45
+ /** Runs a native call. Analytics must never crash the host app, so nothing escapes. */
46
+ function call(fn: (native: Spec) => void): void {
47
+ const native = NativeAnglerAnalytics;
48
+ if (!native) {
49
+ warn('native module AnglerAnalytics is not linked; is the app rebuilt with the New Architecture?');
50
+ return;
51
+ }
52
+ try {
53
+ fn(native);
54
+ } catch (e) {
55
+ warn('native call failed', e);
56
+ }
57
+ }
58
+
59
+ function toJson(value: unknown, what: string): string | null {
60
+ try {
61
+ const json = JSON.stringify(value);
62
+ return json === undefined ? null : json;
63
+ } catch (e) {
64
+ warn(`${what} is not serializable to JSON; sending the event without it`, e);
65
+ return null;
66
+ }
67
+ }
68
+
69
+ let linkingSubscribed = false;
70
+
71
+ function subscribeToDeepLinks(): void {
72
+ if (linkingSubscribed) return;
73
+ linkingSubscribed = true;
74
+ try {
75
+ Linking.getInitialURL()
76
+ .then((url) => {
77
+ if (url) call((n) => n.handleDeepLink(url));
78
+ })
79
+ .catch((e) => warn('Linking.getInitialURL failed', e));
80
+ Linking.addEventListener('url', ({ url }) => {
81
+ if (url) call((n) => n.handleDeepLink(url));
82
+ });
83
+ } catch (e) {
84
+ warn('could not subscribe to Linking', e);
85
+ }
86
+ }
87
+
88
+ export const Angler = {
89
+ /** Starts the SDK. Safe to call again (e.g. on Fast Refresh): repeats are ignored. */
90
+ configure(config: AnglerConfig): void {
91
+ try {
92
+ const { autoHandleDeepLinks = true, ...rest } = config ?? ({} as AnglerConfig);
93
+ const fields: Record<string, unknown> = {};
94
+ for (const [k, v] of Object.entries(rest)) if (v !== undefined && v !== null) fields[k] = v;
95
+ fields.wrapper = 'react-native';
96
+ const json = toJson(fields, 'config');
97
+ if (json) call((n) => n.configure(json));
98
+ // After configure, so the native side is set up before the initial URL arrives.
99
+ if (autoHandleDeepLinks) subscribeToDeepLinks();
100
+ } catch (e) {
101
+ warn('configure failed', e);
102
+ }
103
+ },
104
+
105
+ /**
106
+ * Queues an event: a standard name (`AnglerEvent.productAddedToCart`) or any other string, which
107
+ * is sent as a `custom_event`.
108
+ */
109
+ track(name: AnglerEventName, options?: TrackOptions): void {
110
+ try {
111
+ const { data, properties, eventId } = options ?? {};
112
+ const dataJson = data && Object.keys(data).length > 0 ? toJson(data, 'data') : null;
113
+ let propertiesJson: string | null = null;
114
+ if (properties) {
115
+ const strings: Record<string, string> = {};
116
+ for (const [k, v] of Object.entries(properties)) {
117
+ if (typeof v === 'string') strings[k] = v;
118
+ else warn(`property '${k}' is not a string; dropped`);
119
+ }
120
+ if (Object.keys(strings).length > 0) propertiesJson = toJson(strings, 'properties');
121
+ }
122
+ call((n) => n.track(String(name), dataJson, propertiesJson, eventId ?? null));
123
+ } catch (e) {
124
+ warn('track failed', e);
125
+ }
126
+ },
127
+
128
+ /** Captures click IDs from a URL. Called automatically unless `autoHandleDeepLinks` is false. */
129
+ handleDeepLink(url: string): void {
130
+ call((n) => n.handleDeepLink(String(url)));
131
+ },
132
+
133
+ setUserId(userId: string | null): void {
134
+ call((n) => n.setUserId(userId ?? null));
135
+ },
136
+
137
+ setIdentifier(name: string, value: string | null): void {
138
+ call((n) => n.setIdentifier(String(name), value ?? null));
139
+ },
140
+
141
+ setApplicationTrackingEnabled(enabled: boolean): void {
142
+ call((n) => n.setApplicationTrackingEnabled(Boolean(enabled)));
143
+ },
144
+
145
+ /** `false` stops all collection and deletes queued events. */
146
+ setEnabled(enabled: boolean): void {
147
+ call((n) => n.setEnabled(Boolean(enabled)));
148
+ },
149
+
150
+ flush(): void {
151
+ call((n) => n.flush());
152
+ },
153
+
154
+ reset(): void {
155
+ call((n) => n.reset());
156
+ },
157
+ };
158
+
159
+ export default Angler;
@@ -0,0 +1,347 @@
1
+ // Generated by scripts/generate-models.mjs from data-api's events schema (data-api d36fffc).
2
+ // Don't edit: re-export the schema and run the generator.
3
+
4
+ /** The standard event names data-api accepts. Any other string is sent as a `custom_event`. */
5
+ export const AnglerEvent = {
6
+ appInstalled: 'app_installed',
7
+ appLaunched: 'app_launched',
8
+ cartViewed: 'cart_viewed',
9
+ checkoutAddressInfoSubmitted: 'checkout_address_info_submitted',
10
+ checkoutCompleted: 'checkout_completed',
11
+ checkoutContactInfoSubmitted: 'checkout_contact_info_submitted',
12
+ checkoutShippingInfoSubmitted: 'checkout_shipping_info_submitted',
13
+ checkoutStarted: 'checkout_started',
14
+ collectionViewed: 'collection_viewed',
15
+ formSubmitted: 'form_submitted',
16
+ loggedIn: 'logged_in',
17
+ pageViewed: 'page_viewed',
18
+ paymentInfoSubmitted: 'payment_info_submitted',
19
+ productAddedToCart: 'product_added_to_cart',
20
+ productRemovedFromCart: 'product_removed_from_cart',
21
+ productViewed: 'product_viewed',
22
+ registrationCompleted: 'registration_completed',
23
+ searchSubmitted: 'search_submitted',
24
+ } as const;
25
+
26
+ export type AnglerStandardEvent = (typeof AnglerEvent)[keyof typeof AnglerEvent];
27
+ /** A standard event name, or any other string for a custom event. */
28
+ // eslint-disable-next-line @typescript-eslint/ban-types
29
+ export type AnglerEventName = AnglerStandardEvent | (string & {});
30
+
31
+ /** One of: AnglerMoney, AnglerPricingPercentageValue. */
32
+ export type AnglerDiscountApplicationValue = AnglerMoney | AnglerPricingPercentageValue;
33
+
34
+ /** An event's data: the commerce objects it refers to, plus custom name/value pairs. */
35
+ export interface AnglerData {
36
+ cart?: AnglerCart | null;
37
+ /** Represents information about the merchandise in the cart. */
38
+ cartLine?: AnglerCartLine | null;
39
+ checkout?: AnglerCheckout | null;
40
+ collection?: AnglerCollection | null;
41
+ /** Product variant of the line item. */
42
+ productVariant?: AnglerProductVariant | null;
43
+ searchResult?: AnglerSearchResult | null;
44
+ customer?: AnglerCustomer | null;
45
+ form?: AnglerFormElement | null;
46
+ contacts?: AnglerCustomer[] | null;
47
+ customData?: AnglerCustomValue[] | null;
48
+ }
49
+
50
+ export interface AnglerCart {
51
+ /** The estimated costs that the customer will pay at checkout. */
52
+ cost?: AnglerCartCost | null;
53
+ /** A globally unique identifier. */
54
+ id?: string | null;
55
+ lines?: AnglerCartLine[] | null;
56
+ /** The total number of items in the cart. */
57
+ totalQuantity?: number | null;
58
+ }
59
+
60
+ /** The estimated costs that the customer will pay at checkout. */
61
+ export interface AnglerCartCost {
62
+ /** A monetary value with currency. */
63
+ totalAmount?: AnglerMoney | null;
64
+ }
65
+
66
+ /** A monetary value with currency. */
67
+ export interface AnglerMoney {
68
+ /** Decimal money amount. */
69
+ amount?: number | null;
70
+ /** Currency of the money. */
71
+ currencyCode?: string | null;
72
+ }
73
+
74
+ /** Represents information about the merchandise in the cart. */
75
+ export interface AnglerCartLine {
76
+ /** The cost of the merchandise line that the buyer will pay at checkout. */
77
+ cost?: AnglerCartLineCost | null;
78
+ /** Product variant of the line item. */
79
+ merchandise?: AnglerProductVariant | null;
80
+ /** The quantity of the merchandise that the customer intends to purchase. */
81
+ quantity?: number | null;
82
+ }
83
+
84
+ /** The cost of the merchandise line that the buyer will pay at checkout. */
85
+ export interface AnglerCartLineCost {
86
+ /** A monetary value with currency. */
87
+ totalAmount?: AnglerMoney | null;
88
+ }
89
+
90
+ /** Product variant of the line item. */
91
+ export interface AnglerProductVariant {
92
+ /** A globally unique identifier. */
93
+ id?: string | null;
94
+ /** Image associated with the product variant. This field falls back to the product image if no image is available. */
95
+ image?: AnglerImage | null;
96
+ /** The inventory item associated with the product variant, including its per-item cost (COGS). */
97
+ inventoryItem?: AnglerInventoryItem | null;
98
+ /** A monetary value with currency. */
99
+ price?: AnglerMoney | null;
100
+ /** The product object that the product variant belongs to. */
101
+ product?: AnglerProduct | null;
102
+ /** The SKU (stock keeping unit) associated with the variant. */
103
+ sku?: string | null;
104
+ /** The product variant’s title. */
105
+ title?: string | null;
106
+ /** The product variant’s untranslated title. */
107
+ untranslatedTitle?: string | null;
108
+ }
109
+
110
+ /** Image associated with the product variant. This field falls back to the product image if no image is available. */
111
+ export interface AnglerImage {
112
+ /** The location of the image as a URL. */
113
+ src?: string | null;
114
+ }
115
+
116
+ /** The inventory item associated with the product variant, including its per-item cost (COGS). */
117
+ export interface AnglerInventoryItem {
118
+ /** Inventory item identifier. Optional; for Shopify shops this is the inventory_items.id. For non-Shopify, may equal variant.id. */
119
+ id?: string | null;
120
+ /** A monetary value with currency representing the unit cost to manufacture, distribute, and sell the item. */
121
+ cost?: AnglerMoney | null;
122
+ }
123
+
124
+ /** The product object that the product variant belongs to. */
125
+ export interface AnglerProduct {
126
+ /** The ID of the product. */
127
+ id?: string | null;
128
+ /** The product’s title. */
129
+ title?: string | null;
130
+ /** The product’s untranslated title. */
131
+ untranslatedTitle?: string | null;
132
+ /** The product’s vendor name. */
133
+ vendor?: string | null;
134
+ /** The product type specified by the merchant. */
135
+ type?: string | null;
136
+ /** The relative URL of the product. */
137
+ url?: string | null;
138
+ }
139
+
140
+ export interface AnglerCheckout {
141
+ /** A list of attributes accumulated throughout the checkout process. */
142
+ attributes?: AnglerAttribute[] | null;
143
+ /** An address. */
144
+ billingAddress?: AnglerMailingAddress | null;
145
+ /** The three-letter code that represents the currency, for example, USD. Supported codes include standard ISO 4217 codes, legacy codes, and non-standard codes. */
146
+ currencyCode?: string | null;
147
+ /** A list of discount applications. */
148
+ discountApplications?: AnglerDiscountApplication[] | null;
149
+ /** The email attached to this checkout. */
150
+ email?: string | null;
151
+ /** Hashed value of email in SHA256 (lower case). */
152
+ hashedEmail?: string | null;
153
+ /** A list of line item objects, each one containing information about an item in the checkout. */
154
+ lineItems?: AnglerCheckoutLineItem[] | null;
155
+ order?: AnglerOrder | null;
156
+ /** A unique phone number for the customer. */
157
+ phone?: string | null;
158
+ /** Hashed value of phone in SHA256 (lower case). */
159
+ hashedPhone?: string | null;
160
+ /** An address. */
161
+ shippingAddress?: AnglerMailingAddress | null;
162
+ shippingLine?: AnglerShippingRate | null;
163
+ /** A monetary value with currency. */
164
+ subtotalPrice?: AnglerMoney | null;
165
+ /** A unique identifier for a particular checkout. */
166
+ token?: string | null;
167
+ /** A monetary value with currency. */
168
+ totalPrice?: AnglerMoney | null;
169
+ /** A monetary value with currency. */
170
+ totalTax?: AnglerMoney | null;
171
+ }
172
+
173
+ export interface AnglerAttribute {
174
+ key: string;
175
+ value?: string | null;
176
+ }
177
+
178
+ /** An address. */
179
+ export interface AnglerMailingAddress {
180
+ /** The first line of the address. This is usually the street address or a P.O. Box number. */
181
+ address1?: string | null;
182
+ /** The second line of the address. This is usually an apartment, suite, or unit number. */
183
+ address2?: string | null;
184
+ /** The name of the city, district, village, or town. */
185
+ city?: string | null;
186
+ /** The name of the country. */
187
+ country?: string | null;
188
+ /** The two-letter code that represents the country, for example, US. The country codes generally follows ISO 3166-1 alpha-2 guidelines. */
189
+ countryCode?: string | null;
190
+ /** The customer’s first name. */
191
+ firstName?: string | null;
192
+ /** The customer’s last name. */
193
+ lastName?: string | null;
194
+ /** The phone number for this mailing address as entered by the customer. */
195
+ phone?: string | null;
196
+ /** The region of the address, such as the province, state, or district. */
197
+ province?: string | null;
198
+ /** The two-letter code for the region. For example, ON. */
199
+ provinceCode?: string | null;
200
+ /** The ZIP or postal code of the address. */
201
+ zip?: string | null;
202
+ /** Hashed value of phone in SHA256 (lower case). */
203
+ hashedPhone?: string | null;
204
+ /** Hashed value of first name in SHA256 (lower case). */
205
+ hashedFirstName?: string | null;
206
+ /** Hashed value of last name in SHA256 (lower case). */
207
+ hashedLastName?: string | null;
208
+ /** Hashed value of zip in SHA256 (lower case). */
209
+ hashedZip?: string | null;
210
+ }
211
+
212
+ /** Discount applications capture the intentions of a discount source at the time of application. */
213
+ export interface AnglerDiscountApplication {
214
+ /** The method by which the discount's value is applied to its entitled items. */
215
+ allocationMethod?: string | null;
216
+ /** How the discount amount is distributed on the discounted lines. */
217
+ targetSelection?: string | null;
218
+ /** The type of line (i.e. line item or shipping line) on an order that the discount is applicable towards. */
219
+ targetType?: string | null;
220
+ /** The customer-facing name of the discount. If the type of discount is a DISCOUNT_CODE, this title attribute represents the code of the discount. */
221
+ title?: string | null;
222
+ /** The type of the discount. */
223
+ type?: string | null;
224
+ /** The value of the discount. */
225
+ value?: AnglerDiscountApplicationValue | null;
226
+ }
227
+
228
+ /** The value of the percentage pricing object. */
229
+ export interface AnglerPricingPercentageValue {
230
+ /** The percentage value of the object. */
231
+ percentage?: number | null;
232
+ }
233
+
234
+ /** A list of line item objects, each one containing information about an item in the checkout. */
235
+ export interface AnglerCheckoutLineItem {
236
+ /** The discounts that have been applied to the checkout line item by a discount application. */
237
+ discountAllocations?: AnglerDiscountAllocation[] | null;
238
+ /** A globally unique identifier. */
239
+ id?: string | null;
240
+ /** The quantity of the line item. */
241
+ quantity?: number | null;
242
+ /** The selling plan associated with the line item and the effect that each selling plan has on variants when they're purchased. */
243
+ sellingPlanAllocation?: AnglerSellingPlanAllocation | null;
244
+ /** The title of the line item. Defaults to the product's title. */
245
+ title?: string | null;
246
+ /** Product variant of the line item. */
247
+ variant?: AnglerProductVariant | null;
248
+ }
249
+
250
+ /** An amount discounting the line that has been allocated by a discount. */
251
+ export interface AnglerDiscountAllocation {
252
+ /** A monetary value with currency. */
253
+ amount?: AnglerMoney | null;
254
+ /** Discount applications capture the intentions of a discount source at the time of application. */
255
+ discountApplication?: AnglerDiscountApplication | null;
256
+ }
257
+
258
+ /** The selling plan associated with the line item and the effect that each selling plan has on variants when they're purchased. */
259
+ export interface AnglerSellingPlanAllocation {
260
+ /** A representation of how products and variants can be sold and purchased. For example, an individual selling plan could be '6 weeks of prepaid granola, delivered weekly'. */
261
+ sellingPlan?: AnglerSellingPlan | null;
262
+ }
263
+
264
+ /** A representation of how products and variants can be sold and purchased. For example, an individual selling plan could be '6 weeks of prepaid granola, delivered weekly'. */
265
+ export interface AnglerSellingPlan {
266
+ /** A globally unique identifier. */
267
+ id?: string | null;
268
+ /** The name of the selling plan. For example, '6 weeks of prepaid granola, delivered weekly'. */
269
+ name?: string | null;
270
+ }
271
+
272
+ export interface AnglerOrder {
273
+ /** The ID of the order. */
274
+ id?: string | null;
275
+ }
276
+
277
+ export interface AnglerShippingRate {
278
+ /** A monetary value with currency. */
279
+ price?: AnglerMoney | null;
280
+ }
281
+
282
+ export interface AnglerCollection {
283
+ /** A globally unique identifier. */
284
+ id?: string | null;
285
+ /** The collection’s name. */
286
+ title?: string | null;
287
+ productVariants?: AnglerProductVariant[] | null;
288
+ }
289
+
290
+ export interface AnglerSearchResult {
291
+ /** The search query that was executed. */
292
+ query?: string | null;
293
+ productVariants?: AnglerProductVariant[] | null;
294
+ }
295
+
296
+ export interface AnglerCustomer {
297
+ /** A unique identifier for the customer. */
298
+ id?: string | null;
299
+ /** The customer's email address. */
300
+ email?: string | null;
301
+ /** The customer's first name. */
302
+ firstName?: string | null;
303
+ /** The customer's last name. */
304
+ lastName?: string | null;
305
+ /** The number of orders associated with this customer. */
306
+ ordersCount?: number | null;
307
+ /** The unique phone number (E.164 format) for this customer. */
308
+ phone?: string | null;
309
+ /** The customer's date of birth. */
310
+ dob?: string | null;
311
+ /** Hashed value of email in SHA256 (lower case). */
312
+ hashedEmail?: string | null;
313
+ /** Hashed value of phone in SHA256 (lower case). */
314
+ hashedPhone?: string | null;
315
+ /** Hashed value of first name in SHA256 (lower case). */
316
+ hashedFirstName?: string | null;
317
+ /** Hashed value of last name in SHA256 (lower case). */
318
+ hashedLastName?: string | null;
319
+ /** Hashed value of date of birth in SHA256 (lower case). */
320
+ hashedDob?: string | null;
321
+ }
322
+
323
+ export interface AnglerFormElement {
324
+ /** The id attribute of an element. */
325
+ id?: string | null;
326
+ /** The action attribute of a form element. */
327
+ action?: string | null;
328
+ elements?: AnglerInputElement[] | null;
329
+ }
330
+
331
+ export interface AnglerInputElement {
332
+ /** The id attribute of an element. */
333
+ id?: string | null;
334
+ /** The name attribute of an element. */
335
+ name?: string | null;
336
+ /** A string representation of the tag of an element. */
337
+ tagName?: string | null;
338
+ /** The type attribute of an element. Often relevant for an input or button element. */
339
+ type?: string | null;
340
+ /** The value attribute of an element. Often relevant for an input element. */
341
+ value?: string | null;
342
+ }
343
+
344
+ export interface AnglerCustomValue {
345
+ name: string;
346
+ value: string;
347
+ }