@disconnectme/lightbox-sdk 0.1.1 → 0.1.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.
- package/dist/index.cjs +87 -0
- package/dist/index.d.cts +161 -1
- package/dist/index.d.ts +161 -1
- package/dist/index.js +87 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -173,6 +173,93 @@ var LightboxClient = class {
|
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
175
|
};
|
|
176
|
+
/**
|
|
177
|
+
* Web traffic API methods
|
|
178
|
+
*/
|
|
179
|
+
web = {
|
|
180
|
+
sites: {
|
|
181
|
+
/**
|
|
182
|
+
* Get HTTP requests observed when visiting a specific site.
|
|
183
|
+
*/
|
|
184
|
+
requests: (site, params) => {
|
|
185
|
+
return this.request(
|
|
186
|
+
`/v1/web/sites/${encodeURIComponent(site)}/requests`,
|
|
187
|
+
params
|
|
188
|
+
);
|
|
189
|
+
},
|
|
190
|
+
/**
|
|
191
|
+
* Get cookies observed when visiting a specific site.
|
|
192
|
+
*/
|
|
193
|
+
cookies: (site, params) => {
|
|
194
|
+
return this.request(
|
|
195
|
+
`/v1/web/sites/${encodeURIComponent(site)}/cookies`,
|
|
196
|
+
params
|
|
197
|
+
);
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
domains: {
|
|
201
|
+
/**
|
|
202
|
+
* Get HTTP requests made to a specific destination domain.
|
|
203
|
+
*/
|
|
204
|
+
requests: (domain, params) => {
|
|
205
|
+
return this.request(
|
|
206
|
+
`/v1/web/domains/${encodeURIComponent(domain)}/requests`,
|
|
207
|
+
params
|
|
208
|
+
);
|
|
209
|
+
},
|
|
210
|
+
/**
|
|
211
|
+
* Get cookies set by a specific domain.
|
|
212
|
+
*/
|
|
213
|
+
cookies: (domain, params) => {
|
|
214
|
+
return this.request(
|
|
215
|
+
`/v1/web/domains/${encodeURIComponent(domain)}/cookies`,
|
|
216
|
+
params
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
/**
|
|
221
|
+
* JavaScript API symbol tracking methods
|
|
222
|
+
*/
|
|
223
|
+
javascript: {
|
|
224
|
+
/**
|
|
225
|
+
* Get the catalog of all JavaScript symbols available for querying.
|
|
226
|
+
* This is a static list of browser APIs monitored during web crawls.
|
|
227
|
+
*/
|
|
228
|
+
catalog: (params) => {
|
|
229
|
+
return this.request(
|
|
230
|
+
"/v1/web/javascript/symbols",
|
|
231
|
+
params
|
|
232
|
+
);
|
|
233
|
+
},
|
|
234
|
+
/**
|
|
235
|
+
* Get all scripts that access a specific JavaScript API symbol.
|
|
236
|
+
*/
|
|
237
|
+
symbols: (symbol, params) => {
|
|
238
|
+
return this.request(
|
|
239
|
+
`/v1/web/javascript/symbols/${encodeURIComponent(symbol)}`,
|
|
240
|
+
params
|
|
241
|
+
);
|
|
242
|
+
},
|
|
243
|
+
/**
|
|
244
|
+
* Get JavaScript API accesses by scripts from a specific domain.
|
|
245
|
+
*/
|
|
246
|
+
scripts: (domain, params) => {
|
|
247
|
+
return this.request(
|
|
248
|
+
`/v1/web/javascript/scripts/${encodeURIComponent(domain)}`,
|
|
249
|
+
params
|
|
250
|
+
);
|
|
251
|
+
},
|
|
252
|
+
/**
|
|
253
|
+
* Get JavaScript API accesses observed when visiting a specific site.
|
|
254
|
+
*/
|
|
255
|
+
sites: (site, params) => {
|
|
256
|
+
return this.request(
|
|
257
|
+
`/v1/web/javascript/sites/${encodeURIComponent(site)}`,
|
|
258
|
+
params
|
|
259
|
+
);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
};
|
|
176
263
|
};
|
|
177
264
|
// Annotate the CommonJS export names for ESM import in node:
|
|
178
265
|
0 && (module.exports = {
|
package/dist/index.d.cts
CHANGED
|
@@ -151,6 +151,42 @@ interface AppFilesData {
|
|
|
151
151
|
};
|
|
152
152
|
files: AppFile[];
|
|
153
153
|
}
|
|
154
|
+
type ScopeMode = "auto" | "root" | "host";
|
|
155
|
+
interface WebRequest {
|
|
156
|
+
id: string;
|
|
157
|
+
site_etld1: string;
|
|
158
|
+
request_etld1: string;
|
|
159
|
+
url: string;
|
|
160
|
+
method: string;
|
|
161
|
+
resource_type: string | null;
|
|
162
|
+
timestamp: string;
|
|
163
|
+
is_third_party: boolean;
|
|
164
|
+
}
|
|
165
|
+
interface WebRequestCollectionData {
|
|
166
|
+
type: "http_request_collection";
|
|
167
|
+
summary: {
|
|
168
|
+
returned: number;
|
|
169
|
+
};
|
|
170
|
+
requests: WebRequest[];
|
|
171
|
+
}
|
|
172
|
+
interface WebCookie {
|
|
173
|
+
id: string;
|
|
174
|
+
site_etld1: string;
|
|
175
|
+
cookie_etld1: string;
|
|
176
|
+
name: string;
|
|
177
|
+
value?: string | null;
|
|
178
|
+
is_secure: boolean;
|
|
179
|
+
is_http_only: boolean;
|
|
180
|
+
same_site?: string | null;
|
|
181
|
+
timestamp: string;
|
|
182
|
+
}
|
|
183
|
+
interface WebCookieCollectionData {
|
|
184
|
+
type: "cookie_collection";
|
|
185
|
+
summary: {
|
|
186
|
+
returned: number;
|
|
187
|
+
};
|
|
188
|
+
cookies: WebCookie[];
|
|
189
|
+
}
|
|
154
190
|
interface PaginationParams {
|
|
155
191
|
limit?: number;
|
|
156
192
|
offset?: number;
|
|
@@ -186,6 +222,34 @@ interface AppFilesParams extends PaginationParams {
|
|
|
186
222
|
min_size?: number;
|
|
187
223
|
max_size?: number;
|
|
188
224
|
}
|
|
225
|
+
interface WebSiteRequestsParams extends PaginationParams {
|
|
226
|
+
site_scope?: ScopeMode;
|
|
227
|
+
request_domain?: string;
|
|
228
|
+
domain_scope?: ScopeMode;
|
|
229
|
+
resource_type?: string[];
|
|
230
|
+
method?: string[];
|
|
231
|
+
third_party_only?: boolean;
|
|
232
|
+
first_party_only?: boolean;
|
|
233
|
+
}
|
|
234
|
+
interface WebDomainRequestsParams extends PaginationParams {
|
|
235
|
+
domain_scope?: ScopeMode;
|
|
236
|
+
site?: string;
|
|
237
|
+
site_scope?: ScopeMode;
|
|
238
|
+
resource_type?: string[];
|
|
239
|
+
method?: string[];
|
|
240
|
+
}
|
|
241
|
+
interface WebSiteCookiesParams extends PaginationParams {
|
|
242
|
+
site_scope?: ScopeMode;
|
|
243
|
+
cookie_domain?: string;
|
|
244
|
+
domain_scope?: ScopeMode;
|
|
245
|
+
include?: string[];
|
|
246
|
+
}
|
|
247
|
+
interface WebDomainCookiesParams extends PaginationParams {
|
|
248
|
+
domain_scope?: ScopeMode;
|
|
249
|
+
site?: string;
|
|
250
|
+
site_scope?: ScopeMode;
|
|
251
|
+
include?: string[];
|
|
252
|
+
}
|
|
189
253
|
interface GenreItem {
|
|
190
254
|
name: string;
|
|
191
255
|
app_count: number;
|
|
@@ -217,6 +281,53 @@ interface MetadataSearchParams extends PaginationParams {
|
|
|
217
281
|
search?: string;
|
|
218
282
|
sort?: "popularity" | "name";
|
|
219
283
|
}
|
|
284
|
+
type JavaScriptSymbolCategory = "canvas" | "audio" | "webrtc" | "navigator" | "screen" | "storage" | "cookie" | "referrer";
|
|
285
|
+
interface JavaScriptSymbolCatalogItem {
|
|
286
|
+
symbol: string;
|
|
287
|
+
category: JavaScriptSymbolCategory;
|
|
288
|
+
description: string;
|
|
289
|
+
}
|
|
290
|
+
interface JavaScriptSymbolCatalogData {
|
|
291
|
+
type: "javascript_symbol_catalog";
|
|
292
|
+
total_symbols: number;
|
|
293
|
+
categories: string[];
|
|
294
|
+
note: string;
|
|
295
|
+
symbols: JavaScriptSymbolCatalogItem[];
|
|
296
|
+
}
|
|
297
|
+
interface JavaScriptSymbolObservation {
|
|
298
|
+
id: string;
|
|
299
|
+
script_etld1: string;
|
|
300
|
+
site_etld1: string;
|
|
301
|
+
script_url: string;
|
|
302
|
+
symbol: string;
|
|
303
|
+
symbol_category: string;
|
|
304
|
+
operation: string | null;
|
|
305
|
+
arguments: string | null;
|
|
306
|
+
value: string | null;
|
|
307
|
+
timestamp: string;
|
|
308
|
+
}
|
|
309
|
+
interface JavaScriptSymbolCollectionData {
|
|
310
|
+
type: "javascript_symbol_collection";
|
|
311
|
+
summary: {
|
|
312
|
+
returned: number;
|
|
313
|
+
};
|
|
314
|
+
symbols: JavaScriptSymbolObservation[];
|
|
315
|
+
}
|
|
316
|
+
interface JavaScriptCatalogParams {
|
|
317
|
+
category?: JavaScriptSymbolCategory;
|
|
318
|
+
}
|
|
319
|
+
interface JavaScriptSymbolParams extends PaginationParams {
|
|
320
|
+
}
|
|
321
|
+
interface JavaScriptScriptsParams extends PaginationParams {
|
|
322
|
+
symbol?: string;
|
|
323
|
+
category?: JavaScriptSymbolCategory;
|
|
324
|
+
}
|
|
325
|
+
interface JavaScriptSitesParams extends PaginationParams {
|
|
326
|
+
symbol?: string;
|
|
327
|
+
category?: JavaScriptSymbolCategory;
|
|
328
|
+
}
|
|
329
|
+
type JavaScriptCatalogResponse = APIResponse<JavaScriptSymbolCatalogData>;
|
|
330
|
+
type JavaScriptSymbolCollectionResponse = APIResponse<JavaScriptSymbolCollectionData>;
|
|
220
331
|
type FileSearchResponse = APIResponse<FileSearchData>;
|
|
221
332
|
type FileHashResponse = APIResponse<FileHashData>;
|
|
222
333
|
type AppSearchResponse = APIResponse<AppSearchData>;
|
|
@@ -226,6 +337,8 @@ type AppFilesResponse = APIResponse<AppFilesData>;
|
|
|
226
337
|
type GenreListResponse = APIResponse<GenreListData>;
|
|
227
338
|
type FrameworkListResponse = APIResponse<FrameworkListData>;
|
|
228
339
|
type EntitlementListResponse = APIResponse<EntitlementListData>;
|
|
340
|
+
type WebRequestCollectionResponse = APIResponse<WebRequestCollectionData>;
|
|
341
|
+
type WebCookieCollectionResponse = APIResponse<WebCookieCollectionData>;
|
|
229
342
|
|
|
230
343
|
interface LightboxClientConfig {
|
|
231
344
|
apiKey: string;
|
|
@@ -311,6 +424,53 @@ declare class LightboxClient {
|
|
|
311
424
|
entitlements: (params?: MetadataSearchParams) => Promise<EntitlementListResponse>;
|
|
312
425
|
};
|
|
313
426
|
};
|
|
427
|
+
/**
|
|
428
|
+
* Web traffic API methods
|
|
429
|
+
*/
|
|
430
|
+
web: {
|
|
431
|
+
sites: {
|
|
432
|
+
/**
|
|
433
|
+
* Get HTTP requests observed when visiting a specific site.
|
|
434
|
+
*/
|
|
435
|
+
requests: (site: string, params?: WebSiteRequestsParams) => Promise<WebRequestCollectionResponse>;
|
|
436
|
+
/**
|
|
437
|
+
* Get cookies observed when visiting a specific site.
|
|
438
|
+
*/
|
|
439
|
+
cookies: (site: string, params?: WebSiteCookiesParams) => Promise<WebCookieCollectionResponse>;
|
|
440
|
+
};
|
|
441
|
+
domains: {
|
|
442
|
+
/**
|
|
443
|
+
* Get HTTP requests made to a specific destination domain.
|
|
444
|
+
*/
|
|
445
|
+
requests: (domain: string, params?: WebDomainRequestsParams) => Promise<WebRequestCollectionResponse>;
|
|
446
|
+
/**
|
|
447
|
+
* Get cookies set by a specific domain.
|
|
448
|
+
*/
|
|
449
|
+
cookies: (domain: string, params?: WebDomainCookiesParams) => Promise<WebCookieCollectionResponse>;
|
|
450
|
+
};
|
|
451
|
+
/**
|
|
452
|
+
* JavaScript API symbol tracking methods
|
|
453
|
+
*/
|
|
454
|
+
javascript: {
|
|
455
|
+
/**
|
|
456
|
+
* Get the catalog of all JavaScript symbols available for querying.
|
|
457
|
+
* This is a static list of browser APIs monitored during web crawls.
|
|
458
|
+
*/
|
|
459
|
+
catalog: (params?: JavaScriptCatalogParams) => Promise<JavaScriptCatalogResponse>;
|
|
460
|
+
/**
|
|
461
|
+
* Get all scripts that access a specific JavaScript API symbol.
|
|
462
|
+
*/
|
|
463
|
+
symbols: (symbol: string, params?: JavaScriptSymbolParams) => Promise<JavaScriptSymbolCollectionResponse>;
|
|
464
|
+
/**
|
|
465
|
+
* Get JavaScript API accesses by scripts from a specific domain.
|
|
466
|
+
*/
|
|
467
|
+
scripts: (domain: string, params?: JavaScriptScriptsParams) => Promise<JavaScriptSymbolCollectionResponse>;
|
|
468
|
+
/**
|
|
469
|
+
* Get JavaScript API accesses observed when visiting a specific site.
|
|
470
|
+
*/
|
|
471
|
+
sites: (site: string, params?: JavaScriptSitesParams) => Promise<JavaScriptSymbolCollectionResponse>;
|
|
472
|
+
};
|
|
473
|
+
};
|
|
314
474
|
}
|
|
315
475
|
|
|
316
|
-
export { type APIError, type APIMetadata, type APIResponse, type AppFile, type AppFilesData, type AppFilesParams, type AppFilesResponse, type AppGetParams, type AppProfile, type AppProfileData, type AppProfileResponse, type AppSearchData, type AppSearchParams, type AppSearchResponse, type AppSummary, type AppVersion, type AppVersionsData, type AppVersionsResponse, type EntitlementItem, type EntitlementListData, type EntitlementListResponse, type FileHashData, type FileHashResponse, type FileHashResult, type FileSearchData, type FileSearchParams, type FileSearchResponse, type FileSearchResult, type FrameworkItem, type FrameworkListData, type FrameworkListResponse, type GenreItem, type GenreListData, type GenreListResponse, LightboxClient, type LightboxClientConfig, LightboxError, type MetadataSearchParams, type Pagination, type PaginationParams };
|
|
476
|
+
export { type APIError, type APIMetadata, type APIResponse, type AppFile, type AppFilesData, type AppFilesParams, type AppFilesResponse, type AppGetParams, type AppProfile, type AppProfileData, type AppProfileResponse, type AppSearchData, type AppSearchParams, type AppSearchResponse, type AppSummary, type AppVersion, type AppVersionsData, type AppVersionsResponse, type EntitlementItem, type EntitlementListData, type EntitlementListResponse, type FileHashData, type FileHashResponse, type FileHashResult, type FileSearchData, type FileSearchParams, type FileSearchResponse, type FileSearchResult, type FrameworkItem, type FrameworkListData, type FrameworkListResponse, type GenreItem, type GenreListData, type GenreListResponse, type JavaScriptCatalogParams, type JavaScriptCatalogResponse, type JavaScriptScriptsParams, type JavaScriptSitesParams, type JavaScriptSymbolCatalogData, type JavaScriptSymbolCatalogItem, type JavaScriptSymbolCategory, type JavaScriptSymbolCollectionData, type JavaScriptSymbolCollectionResponse, type JavaScriptSymbolObservation, type JavaScriptSymbolParams, LightboxClient, type LightboxClientConfig, LightboxError, type MetadataSearchParams, type Pagination, type PaginationParams, type ScopeMode, type WebCookie, type WebCookieCollectionData, type WebCookieCollectionResponse, type WebDomainCookiesParams, type WebDomainRequestsParams, type WebRequest, type WebRequestCollectionData, type WebRequestCollectionResponse, type WebSiteCookiesParams, type WebSiteRequestsParams };
|
package/dist/index.d.ts
CHANGED
|
@@ -151,6 +151,42 @@ interface AppFilesData {
|
|
|
151
151
|
};
|
|
152
152
|
files: AppFile[];
|
|
153
153
|
}
|
|
154
|
+
type ScopeMode = "auto" | "root" | "host";
|
|
155
|
+
interface WebRequest {
|
|
156
|
+
id: string;
|
|
157
|
+
site_etld1: string;
|
|
158
|
+
request_etld1: string;
|
|
159
|
+
url: string;
|
|
160
|
+
method: string;
|
|
161
|
+
resource_type: string | null;
|
|
162
|
+
timestamp: string;
|
|
163
|
+
is_third_party: boolean;
|
|
164
|
+
}
|
|
165
|
+
interface WebRequestCollectionData {
|
|
166
|
+
type: "http_request_collection";
|
|
167
|
+
summary: {
|
|
168
|
+
returned: number;
|
|
169
|
+
};
|
|
170
|
+
requests: WebRequest[];
|
|
171
|
+
}
|
|
172
|
+
interface WebCookie {
|
|
173
|
+
id: string;
|
|
174
|
+
site_etld1: string;
|
|
175
|
+
cookie_etld1: string;
|
|
176
|
+
name: string;
|
|
177
|
+
value?: string | null;
|
|
178
|
+
is_secure: boolean;
|
|
179
|
+
is_http_only: boolean;
|
|
180
|
+
same_site?: string | null;
|
|
181
|
+
timestamp: string;
|
|
182
|
+
}
|
|
183
|
+
interface WebCookieCollectionData {
|
|
184
|
+
type: "cookie_collection";
|
|
185
|
+
summary: {
|
|
186
|
+
returned: number;
|
|
187
|
+
};
|
|
188
|
+
cookies: WebCookie[];
|
|
189
|
+
}
|
|
154
190
|
interface PaginationParams {
|
|
155
191
|
limit?: number;
|
|
156
192
|
offset?: number;
|
|
@@ -186,6 +222,34 @@ interface AppFilesParams extends PaginationParams {
|
|
|
186
222
|
min_size?: number;
|
|
187
223
|
max_size?: number;
|
|
188
224
|
}
|
|
225
|
+
interface WebSiteRequestsParams extends PaginationParams {
|
|
226
|
+
site_scope?: ScopeMode;
|
|
227
|
+
request_domain?: string;
|
|
228
|
+
domain_scope?: ScopeMode;
|
|
229
|
+
resource_type?: string[];
|
|
230
|
+
method?: string[];
|
|
231
|
+
third_party_only?: boolean;
|
|
232
|
+
first_party_only?: boolean;
|
|
233
|
+
}
|
|
234
|
+
interface WebDomainRequestsParams extends PaginationParams {
|
|
235
|
+
domain_scope?: ScopeMode;
|
|
236
|
+
site?: string;
|
|
237
|
+
site_scope?: ScopeMode;
|
|
238
|
+
resource_type?: string[];
|
|
239
|
+
method?: string[];
|
|
240
|
+
}
|
|
241
|
+
interface WebSiteCookiesParams extends PaginationParams {
|
|
242
|
+
site_scope?: ScopeMode;
|
|
243
|
+
cookie_domain?: string;
|
|
244
|
+
domain_scope?: ScopeMode;
|
|
245
|
+
include?: string[];
|
|
246
|
+
}
|
|
247
|
+
interface WebDomainCookiesParams extends PaginationParams {
|
|
248
|
+
domain_scope?: ScopeMode;
|
|
249
|
+
site?: string;
|
|
250
|
+
site_scope?: ScopeMode;
|
|
251
|
+
include?: string[];
|
|
252
|
+
}
|
|
189
253
|
interface GenreItem {
|
|
190
254
|
name: string;
|
|
191
255
|
app_count: number;
|
|
@@ -217,6 +281,53 @@ interface MetadataSearchParams extends PaginationParams {
|
|
|
217
281
|
search?: string;
|
|
218
282
|
sort?: "popularity" | "name";
|
|
219
283
|
}
|
|
284
|
+
type JavaScriptSymbolCategory = "canvas" | "audio" | "webrtc" | "navigator" | "screen" | "storage" | "cookie" | "referrer";
|
|
285
|
+
interface JavaScriptSymbolCatalogItem {
|
|
286
|
+
symbol: string;
|
|
287
|
+
category: JavaScriptSymbolCategory;
|
|
288
|
+
description: string;
|
|
289
|
+
}
|
|
290
|
+
interface JavaScriptSymbolCatalogData {
|
|
291
|
+
type: "javascript_symbol_catalog";
|
|
292
|
+
total_symbols: number;
|
|
293
|
+
categories: string[];
|
|
294
|
+
note: string;
|
|
295
|
+
symbols: JavaScriptSymbolCatalogItem[];
|
|
296
|
+
}
|
|
297
|
+
interface JavaScriptSymbolObservation {
|
|
298
|
+
id: string;
|
|
299
|
+
script_etld1: string;
|
|
300
|
+
site_etld1: string;
|
|
301
|
+
script_url: string;
|
|
302
|
+
symbol: string;
|
|
303
|
+
symbol_category: string;
|
|
304
|
+
operation: string | null;
|
|
305
|
+
arguments: string | null;
|
|
306
|
+
value: string | null;
|
|
307
|
+
timestamp: string;
|
|
308
|
+
}
|
|
309
|
+
interface JavaScriptSymbolCollectionData {
|
|
310
|
+
type: "javascript_symbol_collection";
|
|
311
|
+
summary: {
|
|
312
|
+
returned: number;
|
|
313
|
+
};
|
|
314
|
+
symbols: JavaScriptSymbolObservation[];
|
|
315
|
+
}
|
|
316
|
+
interface JavaScriptCatalogParams {
|
|
317
|
+
category?: JavaScriptSymbolCategory;
|
|
318
|
+
}
|
|
319
|
+
interface JavaScriptSymbolParams extends PaginationParams {
|
|
320
|
+
}
|
|
321
|
+
interface JavaScriptScriptsParams extends PaginationParams {
|
|
322
|
+
symbol?: string;
|
|
323
|
+
category?: JavaScriptSymbolCategory;
|
|
324
|
+
}
|
|
325
|
+
interface JavaScriptSitesParams extends PaginationParams {
|
|
326
|
+
symbol?: string;
|
|
327
|
+
category?: JavaScriptSymbolCategory;
|
|
328
|
+
}
|
|
329
|
+
type JavaScriptCatalogResponse = APIResponse<JavaScriptSymbolCatalogData>;
|
|
330
|
+
type JavaScriptSymbolCollectionResponse = APIResponse<JavaScriptSymbolCollectionData>;
|
|
220
331
|
type FileSearchResponse = APIResponse<FileSearchData>;
|
|
221
332
|
type FileHashResponse = APIResponse<FileHashData>;
|
|
222
333
|
type AppSearchResponse = APIResponse<AppSearchData>;
|
|
@@ -226,6 +337,8 @@ type AppFilesResponse = APIResponse<AppFilesData>;
|
|
|
226
337
|
type GenreListResponse = APIResponse<GenreListData>;
|
|
227
338
|
type FrameworkListResponse = APIResponse<FrameworkListData>;
|
|
228
339
|
type EntitlementListResponse = APIResponse<EntitlementListData>;
|
|
340
|
+
type WebRequestCollectionResponse = APIResponse<WebRequestCollectionData>;
|
|
341
|
+
type WebCookieCollectionResponse = APIResponse<WebCookieCollectionData>;
|
|
229
342
|
|
|
230
343
|
interface LightboxClientConfig {
|
|
231
344
|
apiKey: string;
|
|
@@ -311,6 +424,53 @@ declare class LightboxClient {
|
|
|
311
424
|
entitlements: (params?: MetadataSearchParams) => Promise<EntitlementListResponse>;
|
|
312
425
|
};
|
|
313
426
|
};
|
|
427
|
+
/**
|
|
428
|
+
* Web traffic API methods
|
|
429
|
+
*/
|
|
430
|
+
web: {
|
|
431
|
+
sites: {
|
|
432
|
+
/**
|
|
433
|
+
* Get HTTP requests observed when visiting a specific site.
|
|
434
|
+
*/
|
|
435
|
+
requests: (site: string, params?: WebSiteRequestsParams) => Promise<WebRequestCollectionResponse>;
|
|
436
|
+
/**
|
|
437
|
+
* Get cookies observed when visiting a specific site.
|
|
438
|
+
*/
|
|
439
|
+
cookies: (site: string, params?: WebSiteCookiesParams) => Promise<WebCookieCollectionResponse>;
|
|
440
|
+
};
|
|
441
|
+
domains: {
|
|
442
|
+
/**
|
|
443
|
+
* Get HTTP requests made to a specific destination domain.
|
|
444
|
+
*/
|
|
445
|
+
requests: (domain: string, params?: WebDomainRequestsParams) => Promise<WebRequestCollectionResponse>;
|
|
446
|
+
/**
|
|
447
|
+
* Get cookies set by a specific domain.
|
|
448
|
+
*/
|
|
449
|
+
cookies: (domain: string, params?: WebDomainCookiesParams) => Promise<WebCookieCollectionResponse>;
|
|
450
|
+
};
|
|
451
|
+
/**
|
|
452
|
+
* JavaScript API symbol tracking methods
|
|
453
|
+
*/
|
|
454
|
+
javascript: {
|
|
455
|
+
/**
|
|
456
|
+
* Get the catalog of all JavaScript symbols available for querying.
|
|
457
|
+
* This is a static list of browser APIs monitored during web crawls.
|
|
458
|
+
*/
|
|
459
|
+
catalog: (params?: JavaScriptCatalogParams) => Promise<JavaScriptCatalogResponse>;
|
|
460
|
+
/**
|
|
461
|
+
* Get all scripts that access a specific JavaScript API symbol.
|
|
462
|
+
*/
|
|
463
|
+
symbols: (symbol: string, params?: JavaScriptSymbolParams) => Promise<JavaScriptSymbolCollectionResponse>;
|
|
464
|
+
/**
|
|
465
|
+
* Get JavaScript API accesses by scripts from a specific domain.
|
|
466
|
+
*/
|
|
467
|
+
scripts: (domain: string, params?: JavaScriptScriptsParams) => Promise<JavaScriptSymbolCollectionResponse>;
|
|
468
|
+
/**
|
|
469
|
+
* Get JavaScript API accesses observed when visiting a specific site.
|
|
470
|
+
*/
|
|
471
|
+
sites: (site: string, params?: JavaScriptSitesParams) => Promise<JavaScriptSymbolCollectionResponse>;
|
|
472
|
+
};
|
|
473
|
+
};
|
|
314
474
|
}
|
|
315
475
|
|
|
316
|
-
export { type APIError, type APIMetadata, type APIResponse, type AppFile, type AppFilesData, type AppFilesParams, type AppFilesResponse, type AppGetParams, type AppProfile, type AppProfileData, type AppProfileResponse, type AppSearchData, type AppSearchParams, type AppSearchResponse, type AppSummary, type AppVersion, type AppVersionsData, type AppVersionsResponse, type EntitlementItem, type EntitlementListData, type EntitlementListResponse, type FileHashData, type FileHashResponse, type FileHashResult, type FileSearchData, type FileSearchParams, type FileSearchResponse, type FileSearchResult, type FrameworkItem, type FrameworkListData, type FrameworkListResponse, type GenreItem, type GenreListData, type GenreListResponse, LightboxClient, type LightboxClientConfig, LightboxError, type MetadataSearchParams, type Pagination, type PaginationParams };
|
|
476
|
+
export { type APIError, type APIMetadata, type APIResponse, type AppFile, type AppFilesData, type AppFilesParams, type AppFilesResponse, type AppGetParams, type AppProfile, type AppProfileData, type AppProfileResponse, type AppSearchData, type AppSearchParams, type AppSearchResponse, type AppSummary, type AppVersion, type AppVersionsData, type AppVersionsResponse, type EntitlementItem, type EntitlementListData, type EntitlementListResponse, type FileHashData, type FileHashResponse, type FileHashResult, type FileSearchData, type FileSearchParams, type FileSearchResponse, type FileSearchResult, type FrameworkItem, type FrameworkListData, type FrameworkListResponse, type GenreItem, type GenreListData, type GenreListResponse, type JavaScriptCatalogParams, type JavaScriptCatalogResponse, type JavaScriptScriptsParams, type JavaScriptSitesParams, type JavaScriptSymbolCatalogData, type JavaScriptSymbolCatalogItem, type JavaScriptSymbolCategory, type JavaScriptSymbolCollectionData, type JavaScriptSymbolCollectionResponse, type JavaScriptSymbolObservation, type JavaScriptSymbolParams, LightboxClient, type LightboxClientConfig, LightboxError, type MetadataSearchParams, type Pagination, type PaginationParams, type ScopeMode, type WebCookie, type WebCookieCollectionData, type WebCookieCollectionResponse, type WebDomainCookiesParams, type WebDomainRequestsParams, type WebRequest, type WebRequestCollectionData, type WebRequestCollectionResponse, type WebSiteCookiesParams, type WebSiteRequestsParams };
|
package/dist/index.js
CHANGED
|
@@ -146,6 +146,93 @@ var LightboxClient = class {
|
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
148
|
};
|
|
149
|
+
/**
|
|
150
|
+
* Web traffic API methods
|
|
151
|
+
*/
|
|
152
|
+
web = {
|
|
153
|
+
sites: {
|
|
154
|
+
/**
|
|
155
|
+
* Get HTTP requests observed when visiting a specific site.
|
|
156
|
+
*/
|
|
157
|
+
requests: (site, params) => {
|
|
158
|
+
return this.request(
|
|
159
|
+
`/v1/web/sites/${encodeURIComponent(site)}/requests`,
|
|
160
|
+
params
|
|
161
|
+
);
|
|
162
|
+
},
|
|
163
|
+
/**
|
|
164
|
+
* Get cookies observed when visiting a specific site.
|
|
165
|
+
*/
|
|
166
|
+
cookies: (site, params) => {
|
|
167
|
+
return this.request(
|
|
168
|
+
`/v1/web/sites/${encodeURIComponent(site)}/cookies`,
|
|
169
|
+
params
|
|
170
|
+
);
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
domains: {
|
|
174
|
+
/**
|
|
175
|
+
* Get HTTP requests made to a specific destination domain.
|
|
176
|
+
*/
|
|
177
|
+
requests: (domain, params) => {
|
|
178
|
+
return this.request(
|
|
179
|
+
`/v1/web/domains/${encodeURIComponent(domain)}/requests`,
|
|
180
|
+
params
|
|
181
|
+
);
|
|
182
|
+
},
|
|
183
|
+
/**
|
|
184
|
+
* Get cookies set by a specific domain.
|
|
185
|
+
*/
|
|
186
|
+
cookies: (domain, params) => {
|
|
187
|
+
return this.request(
|
|
188
|
+
`/v1/web/domains/${encodeURIComponent(domain)}/cookies`,
|
|
189
|
+
params
|
|
190
|
+
);
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
/**
|
|
194
|
+
* JavaScript API symbol tracking methods
|
|
195
|
+
*/
|
|
196
|
+
javascript: {
|
|
197
|
+
/**
|
|
198
|
+
* Get the catalog of all JavaScript symbols available for querying.
|
|
199
|
+
* This is a static list of browser APIs monitored during web crawls.
|
|
200
|
+
*/
|
|
201
|
+
catalog: (params) => {
|
|
202
|
+
return this.request(
|
|
203
|
+
"/v1/web/javascript/symbols",
|
|
204
|
+
params
|
|
205
|
+
);
|
|
206
|
+
},
|
|
207
|
+
/**
|
|
208
|
+
* Get all scripts that access a specific JavaScript API symbol.
|
|
209
|
+
*/
|
|
210
|
+
symbols: (symbol, params) => {
|
|
211
|
+
return this.request(
|
|
212
|
+
`/v1/web/javascript/symbols/${encodeURIComponent(symbol)}`,
|
|
213
|
+
params
|
|
214
|
+
);
|
|
215
|
+
},
|
|
216
|
+
/**
|
|
217
|
+
* Get JavaScript API accesses by scripts from a specific domain.
|
|
218
|
+
*/
|
|
219
|
+
scripts: (domain, params) => {
|
|
220
|
+
return this.request(
|
|
221
|
+
`/v1/web/javascript/scripts/${encodeURIComponent(domain)}`,
|
|
222
|
+
params
|
|
223
|
+
);
|
|
224
|
+
},
|
|
225
|
+
/**
|
|
226
|
+
* Get JavaScript API accesses observed when visiting a specific site.
|
|
227
|
+
*/
|
|
228
|
+
sites: (site, params) => {
|
|
229
|
+
return this.request(
|
|
230
|
+
`/v1/web/javascript/sites/${encodeURIComponent(site)}`,
|
|
231
|
+
params
|
|
232
|
+
);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
};
|
|
149
236
|
};
|
|
150
237
|
export {
|
|
151
238
|
LightboxClient,
|