@disconnectme/lightbox-sdk 0.1.1 → 0.1.2
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 +45 -0
- package/dist/index.d.cts +92 -1
- package/dist/index.d.ts +92 -1
- package/dist/index.js +45 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -173,6 +173,51 @@ 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
|
+
};
|
|
176
221
|
};
|
|
177
222
|
// Annotate the CommonJS export names for ESM import in node:
|
|
178
223
|
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;
|
|
@@ -226,6 +290,8 @@ type AppFilesResponse = APIResponse<AppFilesData>;
|
|
|
226
290
|
type GenreListResponse = APIResponse<GenreListData>;
|
|
227
291
|
type FrameworkListResponse = APIResponse<FrameworkListData>;
|
|
228
292
|
type EntitlementListResponse = APIResponse<EntitlementListData>;
|
|
293
|
+
type WebRequestCollectionResponse = APIResponse<WebRequestCollectionData>;
|
|
294
|
+
type WebCookieCollectionResponse = APIResponse<WebCookieCollectionData>;
|
|
229
295
|
|
|
230
296
|
interface LightboxClientConfig {
|
|
231
297
|
apiKey: string;
|
|
@@ -311,6 +377,31 @@ declare class LightboxClient {
|
|
|
311
377
|
entitlements: (params?: MetadataSearchParams) => Promise<EntitlementListResponse>;
|
|
312
378
|
};
|
|
313
379
|
};
|
|
380
|
+
/**
|
|
381
|
+
* Web traffic API methods
|
|
382
|
+
*/
|
|
383
|
+
web: {
|
|
384
|
+
sites: {
|
|
385
|
+
/**
|
|
386
|
+
* Get HTTP requests observed when visiting a specific site.
|
|
387
|
+
*/
|
|
388
|
+
requests: (site: string, params?: WebSiteRequestsParams) => Promise<WebRequestCollectionResponse>;
|
|
389
|
+
/**
|
|
390
|
+
* Get cookies observed when visiting a specific site.
|
|
391
|
+
*/
|
|
392
|
+
cookies: (site: string, params?: WebSiteCookiesParams) => Promise<WebCookieCollectionResponse>;
|
|
393
|
+
};
|
|
394
|
+
domains: {
|
|
395
|
+
/**
|
|
396
|
+
* Get HTTP requests made to a specific destination domain.
|
|
397
|
+
*/
|
|
398
|
+
requests: (domain: string, params?: WebDomainRequestsParams) => Promise<WebRequestCollectionResponse>;
|
|
399
|
+
/**
|
|
400
|
+
* Get cookies set by a specific domain.
|
|
401
|
+
*/
|
|
402
|
+
cookies: (domain: string, params?: WebDomainCookiesParams) => Promise<WebCookieCollectionResponse>;
|
|
403
|
+
};
|
|
404
|
+
};
|
|
314
405
|
}
|
|
315
406
|
|
|
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 };
|
|
407
|
+
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, 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;
|
|
@@ -226,6 +290,8 @@ type AppFilesResponse = APIResponse<AppFilesData>;
|
|
|
226
290
|
type GenreListResponse = APIResponse<GenreListData>;
|
|
227
291
|
type FrameworkListResponse = APIResponse<FrameworkListData>;
|
|
228
292
|
type EntitlementListResponse = APIResponse<EntitlementListData>;
|
|
293
|
+
type WebRequestCollectionResponse = APIResponse<WebRequestCollectionData>;
|
|
294
|
+
type WebCookieCollectionResponse = APIResponse<WebCookieCollectionData>;
|
|
229
295
|
|
|
230
296
|
interface LightboxClientConfig {
|
|
231
297
|
apiKey: string;
|
|
@@ -311,6 +377,31 @@ declare class LightboxClient {
|
|
|
311
377
|
entitlements: (params?: MetadataSearchParams) => Promise<EntitlementListResponse>;
|
|
312
378
|
};
|
|
313
379
|
};
|
|
380
|
+
/**
|
|
381
|
+
* Web traffic API methods
|
|
382
|
+
*/
|
|
383
|
+
web: {
|
|
384
|
+
sites: {
|
|
385
|
+
/**
|
|
386
|
+
* Get HTTP requests observed when visiting a specific site.
|
|
387
|
+
*/
|
|
388
|
+
requests: (site: string, params?: WebSiteRequestsParams) => Promise<WebRequestCollectionResponse>;
|
|
389
|
+
/**
|
|
390
|
+
* Get cookies observed when visiting a specific site.
|
|
391
|
+
*/
|
|
392
|
+
cookies: (site: string, params?: WebSiteCookiesParams) => Promise<WebCookieCollectionResponse>;
|
|
393
|
+
};
|
|
394
|
+
domains: {
|
|
395
|
+
/**
|
|
396
|
+
* Get HTTP requests made to a specific destination domain.
|
|
397
|
+
*/
|
|
398
|
+
requests: (domain: string, params?: WebDomainRequestsParams) => Promise<WebRequestCollectionResponse>;
|
|
399
|
+
/**
|
|
400
|
+
* Get cookies set by a specific domain.
|
|
401
|
+
*/
|
|
402
|
+
cookies: (domain: string, params?: WebDomainCookiesParams) => Promise<WebCookieCollectionResponse>;
|
|
403
|
+
};
|
|
404
|
+
};
|
|
314
405
|
}
|
|
315
406
|
|
|
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 };
|
|
407
|
+
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, 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,51 @@ 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
|
+
};
|
|
149
194
|
};
|
|
150
195
|
export {
|
|
151
196
|
LightboxClient,
|