@flashstart/client 8.13.1 → 8.14.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.
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { type Options, ReportSdk } from './sdk.gen.js';
|
|
2
|
-
export type { ClientOptions, FlashStartErrorBody, GetCustomersReportDashboardData, GetCustomersReportDashboardError, GetCustomersReportDashboardErrors, GetCustomersReportDashboardResponse, GetCustomersReportDashboardResponses, GetHistoricalDnsLogsData, GetHistoricalDnsLogsError, GetHistoricalDnsLogsErrors, GetHistoricalDnsLogsResponse, GetHistoricalDnsLogsResponses, GetRequestsPerEdnsData, GetRequestsPerEdnsError, GetRequestsPerEdnsErrors, GetRequestsPerEdnsResponse, GetRequestsPerEdnsResponses, GetStatisticsData, GetStatisticsError, GetStatisticsErrors, GetStatisticsResponse, GetStatisticsResponses, GetTopCategoriesData, GetTopCategoriesError, GetTopCategoriesErrors, GetTopCategoriesResponse, GetTopCategoriesResponses, GetTopDomainsByCategoryData, GetTopDomainsByCategoryError, GetTopDomainsByCategoryErrors, GetTopDomainsByCategoryResponse, GetTopDomainsByCategoryResponses, GetTopDomainsData, GetTopDomainsError, GetTopDomainsErrors, GetTopDomainsResponse, GetTopDomainsResponses, MissingCredentialsErrorBody } from './types.gen.js';
|
|
2
|
+
export type { ClientOptions, FlashStartErrorBody, GetCustomersReportDashboardData, GetCustomersReportDashboardError, GetCustomersReportDashboardErrors, GetCustomersReportDashboardResponse, GetCustomersReportDashboardResponses, GetHistoricalDnsLogsData, GetHistoricalDnsLogsError, GetHistoricalDnsLogsErrors, GetHistoricalDnsLogsResponse, GetHistoricalDnsLogsResponses, GetProfilesReportData, GetProfilesReportError, GetProfilesReportErrors, GetProfilesReportResponse, GetProfilesReportResponses, GetRequestsPerEdnsData, GetRequestsPerEdnsError, GetRequestsPerEdnsErrors, GetRequestsPerEdnsResponse, GetRequestsPerEdnsResponses, GetStatisticsData, GetStatisticsError, GetStatisticsErrors, GetStatisticsResponse, GetStatisticsResponses, GetTopCategoriesData, GetTopCategoriesError, GetTopCategoriesErrors, GetTopCategoriesResponse, GetTopCategoriesResponses, GetTopDomainsByCategoryData, GetTopDomainsByCategoryError, GetTopDomainsByCategoryErrors, GetTopDomainsByCategoryResponse, GetTopDomainsByCategoryResponses, GetTopDomainsData, GetTopDomainsError, GetTopDomainsErrors, GetTopDomainsResponse, GetTopDomainsResponses, MissingCredentialsErrorBody } from './types.gen.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Client, ClientMeta, Options as Options2, RequestResult, TDataShape } from './client/index.js';
|
|
2
|
-
import type { GetCustomersReportDashboardData, GetCustomersReportDashboardErrors, GetCustomersReportDashboardResponses, GetHistoricalDnsLogsData, GetHistoricalDnsLogsErrors, GetHistoricalDnsLogsResponses, GetRequestsPerEdnsData, GetRequestsPerEdnsErrors, GetRequestsPerEdnsResponses, GetStatisticsData, GetStatisticsErrors, GetStatisticsResponses, GetTopCategoriesData, GetTopCategoriesErrors, GetTopCategoriesResponses, GetTopDomainsByCategoryData, GetTopDomainsByCategoryErrors, GetTopDomainsByCategoryResponses, GetTopDomainsData, GetTopDomainsErrors, GetTopDomainsResponses } from './types.gen.js';
|
|
2
|
+
import type { GetCustomersReportDashboardData, GetCustomersReportDashboardErrors, GetCustomersReportDashboardResponses, GetHistoricalDnsLogsData, GetHistoricalDnsLogsErrors, GetHistoricalDnsLogsResponses, GetProfilesReportData, GetProfilesReportErrors, GetProfilesReportResponses, GetRequestsPerEdnsData, GetRequestsPerEdnsErrors, GetRequestsPerEdnsResponses, GetStatisticsData, GetStatisticsErrors, GetStatisticsResponses, GetTopCategoriesData, GetTopCategoriesErrors, GetTopCategoriesResponses, GetTopDomainsByCategoryData, GetTopDomainsByCategoryErrors, GetTopDomainsByCategoryResponses, GetTopDomainsData, GetTopDomainsErrors, GetTopDomainsResponses } from './types.gen.js';
|
|
3
3
|
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
|
|
4
4
|
/**
|
|
5
5
|
* You can provide a client instance returned by `createClient()` instead of
|
|
@@ -59,5 +59,9 @@ export declare class ReportSdk extends HeyApiClient {
|
|
|
59
59
|
* Get requests per EDNS report
|
|
60
60
|
*/
|
|
61
61
|
getRequestsPerEdns<ThrowOnError extends boolean = false>(options: Options<GetRequestsPerEdnsData, ThrowOnError>): RequestResult<GetRequestsPerEdnsResponses, GetRequestsPerEdnsErrors, ThrowOnError>;
|
|
62
|
+
/**
|
|
63
|
+
* Get requests per profile report
|
|
64
|
+
*/
|
|
65
|
+
getProfilesReport<ThrowOnError extends boolean = false>(options: Options<GetProfilesReportData, ThrowOnError>): RequestResult<GetProfilesReportResponses, GetProfilesReportErrors, ThrowOnError>;
|
|
62
66
|
}
|
|
63
67
|
export {};
|
|
@@ -96,4 +96,14 @@ export class ReportSdk extends HeyApiClient {
|
|
|
96
96
|
...options
|
|
97
97
|
});
|
|
98
98
|
}
|
|
99
|
+
/**
|
|
100
|
+
* Get requests per profile report
|
|
101
|
+
*/
|
|
102
|
+
getProfilesReport(options) {
|
|
103
|
+
return (options.client ?? this.client).get({
|
|
104
|
+
security: [{ name: 'x-api-key', type: 'apiKey' }, { scheme: 'bearer', type: 'http' }],
|
|
105
|
+
url: '/v1/profiles',
|
|
106
|
+
...options
|
|
107
|
+
});
|
|
108
|
+
}
|
|
99
109
|
}
|
|
@@ -59,7 +59,7 @@ export type GetStatisticsResponses = {
|
|
|
59
59
|
networkIds?: Array<string>;
|
|
60
60
|
organizationIds?: Array<string>;
|
|
61
61
|
policyIds?: Array<string>;
|
|
62
|
-
protectionModule?: 'content_filter' | 'malware_protection' | 'app_blocker';
|
|
62
|
+
protectionModule?: 'content_filter' | 'malware_protection' | 'app_blocker' | 'beta_list';
|
|
63
63
|
reason?: 'ip_blocker';
|
|
64
64
|
start: string;
|
|
65
65
|
};
|
|
@@ -92,7 +92,7 @@ export type GetTopCategoriesData = {
|
|
|
92
92
|
networkIds?: Array<string>;
|
|
93
93
|
organizationIds?: Array<string>;
|
|
94
94
|
policyIds?: Array<string>;
|
|
95
|
-
protectionModule?: 'content_filter' | 'malware_protection' | 'app_blocker';
|
|
95
|
+
protectionModule?: 'content_filter' | 'malware_protection' | 'app_blocker' | 'beta_list';
|
|
96
96
|
reason?: 'ip_blocker';
|
|
97
97
|
};
|
|
98
98
|
url: '/v1/categories';
|
|
@@ -141,7 +141,7 @@ export type GetTopCategoriesResponses = {
|
|
|
141
141
|
networkIds?: Array<string>;
|
|
142
142
|
organizationIds?: Array<string>;
|
|
143
143
|
policyIds?: Array<string>;
|
|
144
|
-
protectionModule?: 'content_filter' | 'malware_protection' | 'app_blocker';
|
|
144
|
+
protectionModule?: 'content_filter' | 'malware_protection' | 'app_blocker' | 'beta_list';
|
|
145
145
|
reason?: 'ip_blocker';
|
|
146
146
|
start: string;
|
|
147
147
|
};
|
|
@@ -160,7 +160,7 @@ export type GetTopDomainsByCategoryData = {
|
|
|
160
160
|
networkIds?: Array<string>;
|
|
161
161
|
organizationIds?: Array<string>;
|
|
162
162
|
policyIds?: Array<string>;
|
|
163
|
-
protectionModule?: 'content_filter' | 'malware_protection' | 'app_blocker';
|
|
163
|
+
protectionModule?: 'content_filter' | 'malware_protection' | 'app_blocker' | 'beta_list';
|
|
164
164
|
reason?: 'ip_blocker';
|
|
165
165
|
};
|
|
166
166
|
url: '/v1/categories/domains';
|
|
@@ -212,7 +212,7 @@ export type GetTopDomainsByCategoryResponses = {
|
|
|
212
212
|
networkIds?: Array<string>;
|
|
213
213
|
organizationIds?: Array<string>;
|
|
214
214
|
policyIds?: Array<string>;
|
|
215
|
-
protectionModule?: 'content_filter' | 'malware_protection' | 'app_blocker';
|
|
215
|
+
protectionModule?: 'content_filter' | 'malware_protection' | 'app_blocker' | 'beta_list';
|
|
216
216
|
reason?: 'ip_blocker';
|
|
217
217
|
start: string;
|
|
218
218
|
};
|
|
@@ -231,7 +231,7 @@ export type GetTopDomainsData = {
|
|
|
231
231
|
networkIds?: Array<string>;
|
|
232
232
|
organizationIds?: Array<string>;
|
|
233
233
|
policyIds?: Array<string>;
|
|
234
|
-
protectionModule?: 'content_filter' | 'malware_protection' | 'app_blocker';
|
|
234
|
+
protectionModule?: 'content_filter' | 'malware_protection' | 'app_blocker' | 'beta_list';
|
|
235
235
|
reason?: 'ip_blocker';
|
|
236
236
|
};
|
|
237
237
|
url: '/v1/domains';
|
|
@@ -280,7 +280,7 @@ export type GetTopDomainsResponses = {
|
|
|
280
280
|
networkIds?: Array<string>;
|
|
281
281
|
organizationIds?: Array<string>;
|
|
282
282
|
policyIds?: Array<string>;
|
|
283
|
-
protectionModule?: 'content_filter' | 'malware_protection' | 'app_blocker';
|
|
283
|
+
protectionModule?: 'content_filter' | 'malware_protection' | 'app_blocker' | 'beta_list';
|
|
284
284
|
reason?: 'ip_blocker';
|
|
285
285
|
start: string;
|
|
286
286
|
};
|
|
@@ -340,6 +340,7 @@ export type GetHistoricalDnsLogsData = {
|
|
|
340
340
|
organizationIds?: Array<string>;
|
|
341
341
|
policyIds?: Array<string>;
|
|
342
342
|
reasons?: Array<'CATEGORY' | 'BLOCK_LIST' | 'ALLOW_LIST' | 'GEO_BLOCK' | 'IP_BLOCK' | 'IP_REMOVED' | 'YOUTUBE_SAFESEARCH' | 'BING_SAFESEARCH' | 'GOOGLE_SAFESEARCH' | 'NO_POLICY' | 'DUCKDCUCKGO_SAFESEARCH'>;
|
|
343
|
+
sourceIp?: string;
|
|
343
344
|
};
|
|
344
345
|
url: '/v1/dns-logs';
|
|
345
346
|
};
|
|
@@ -434,8 +435,8 @@ export type GetRequestsPerEdnsResponses = {
|
|
|
434
435
|
requests: number;
|
|
435
436
|
unresolved: number;
|
|
436
437
|
ednsTag: string;
|
|
437
|
-
networkId
|
|
438
|
-
organizationId
|
|
438
|
+
networkId?: string;
|
|
439
|
+
organizationId?: string;
|
|
439
440
|
}>;
|
|
440
441
|
filters: {
|
|
441
442
|
categoryIds?: Array<string>;
|
|
@@ -446,10 +447,76 @@ export type GetRequestsPerEdnsResponses = {
|
|
|
446
447
|
networkIds?: Array<string>;
|
|
447
448
|
organizationIds?: Array<string>;
|
|
448
449
|
policyIds?: Array<string>;
|
|
449
|
-
protectionModule?: 'content_filter' | 'malware_protection' | 'app_blocker';
|
|
450
|
+
protectionModule?: 'content_filter' | 'malware_protection' | 'app_blocker' | 'beta_list';
|
|
450
451
|
reason?: 'ip_blocker';
|
|
451
452
|
start: string;
|
|
452
453
|
};
|
|
453
454
|
};
|
|
454
455
|
};
|
|
455
456
|
export type GetRequestsPerEdnsResponse = GetRequestsPerEdnsResponses[keyof GetRequestsPerEdnsResponses];
|
|
457
|
+
export type GetProfilesReportData = {
|
|
458
|
+
body?: never;
|
|
459
|
+
path?: never;
|
|
460
|
+
query: {
|
|
461
|
+
limit?: number;
|
|
462
|
+
metric?: 'blocked' | 'unresolved' | 'allowed' | 'requests';
|
|
463
|
+
networkIds?: string | Array<string>;
|
|
464
|
+
organizationIds?: string | Array<string>;
|
|
465
|
+
policyIds?: string | Array<string>;
|
|
466
|
+
start: string;
|
|
467
|
+
end: string;
|
|
468
|
+
};
|
|
469
|
+
url: '/v1/profiles';
|
|
470
|
+
};
|
|
471
|
+
export type GetProfilesReportErrors = {
|
|
472
|
+
/**
|
|
473
|
+
* Unauthorized
|
|
474
|
+
*/
|
|
475
|
+
401: MissingCredentialsErrorBody | FlashStartErrorBody;
|
|
476
|
+
/**
|
|
477
|
+
* Forbidden
|
|
478
|
+
*/
|
|
479
|
+
403: FlashStartErrorBody;
|
|
480
|
+
/**
|
|
481
|
+
* Not found
|
|
482
|
+
*/
|
|
483
|
+
404: FlashStartErrorBody;
|
|
484
|
+
/**
|
|
485
|
+
* Invalid request
|
|
486
|
+
*/
|
|
487
|
+
422: FlashStartErrorBody;
|
|
488
|
+
/**
|
|
489
|
+
* Internal server error
|
|
490
|
+
*/
|
|
491
|
+
500: FlashStartErrorBody;
|
|
492
|
+
};
|
|
493
|
+
export type GetProfilesReportError = GetProfilesReportErrors[keyof GetProfilesReportErrors];
|
|
494
|
+
export type GetProfilesReportResponses = {
|
|
495
|
+
/**
|
|
496
|
+
* Requests per profile report
|
|
497
|
+
*/
|
|
498
|
+
200: {
|
|
499
|
+
profiles: Array<{
|
|
500
|
+
allowed: number;
|
|
501
|
+
blocked: number;
|
|
502
|
+
requests: number;
|
|
503
|
+
unresolved: number;
|
|
504
|
+
policyId: string;
|
|
505
|
+
organizationId?: string;
|
|
506
|
+
}>;
|
|
507
|
+
filters: {
|
|
508
|
+
categoryIds?: Array<string>;
|
|
509
|
+
end: string;
|
|
510
|
+
granularity?: 'hourly' | 'daily' | 'monthly';
|
|
511
|
+
limit?: number;
|
|
512
|
+
metric?: 'blocked' | 'unresolved' | 'allowed' | 'requests';
|
|
513
|
+
networkIds?: Array<string>;
|
|
514
|
+
organizationIds?: Array<string>;
|
|
515
|
+
policyIds?: Array<string>;
|
|
516
|
+
protectionModule?: 'content_filter' | 'malware_protection' | 'app_blocker' | 'beta_list';
|
|
517
|
+
reason?: 'ip_blocker';
|
|
518
|
+
start: string;
|
|
519
|
+
};
|
|
520
|
+
};
|
|
521
|
+
};
|
|
522
|
+
export type GetProfilesReportResponse = GetProfilesReportResponses[keyof GetProfilesReportResponses];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flashstart/client",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.14.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@hey-api/openapi-ts": "0.99.0",
|
|
26
|
-
"@repo/typescript-config": "8.
|
|
26
|
+
"@repo/typescript-config": "8.14.1",
|
|
27
27
|
"tsx": "4.23.13",
|
|
28
28
|
"typescript": "6.0.3"
|
|
29
29
|
},
|