@flashstart/client 0.1.1 → 0.2.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.
- package/README.md +9 -2
- package/dist/src/generated/authentication/client/client.gen.d.ts +2 -0
- package/dist/src/generated/authentication/client/client.gen.js +216 -0
- package/dist/src/generated/authentication/client/index.d.ts +10 -0
- package/dist/src/generated/authentication/client/index.js +6 -0
- package/dist/src/generated/authentication/client/types.gen.d.ts +120 -0
- package/dist/src/generated/authentication/client/types.gen.js +2 -0
- package/dist/src/generated/authentication/client/utils.gen.d.ts +37 -0
- package/dist/src/generated/authentication/client/utils.gen.js +228 -0
- package/dist/src/generated/authentication/client.gen.d.ts +12 -0
- package/dist/src/generated/authentication/client.gen.js +3 -0
- package/dist/src/generated/authentication/core/auth.gen.d.ts +25 -0
- package/dist/src/generated/authentication/core/auth.gen.js +14 -0
- package/dist/src/generated/authentication/core/bodySerializer.gen.d.ts +25 -0
- package/dist/src/generated/authentication/core/bodySerializer.gen.js +57 -0
- package/dist/src/generated/authentication/core/params.gen.d.ts +43 -0
- package/dist/src/generated/authentication/core/params.gen.js +109 -0
- package/dist/src/generated/authentication/core/pathSerializer.gen.d.ts +33 -0
- package/dist/src/generated/authentication/core/pathSerializer.gen.js +106 -0
- package/dist/src/generated/authentication/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/src/generated/authentication/core/queryKeySerializer.gen.js +92 -0
- package/dist/src/generated/authentication/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/src/generated/authentication/core/serverSentEvents.gen.js +132 -0
- package/dist/src/generated/authentication/core/types.gen.d.ts +83 -0
- package/dist/src/generated/authentication/core/types.gen.js +2 -0
- package/dist/src/generated/authentication/core/utils.gen.d.ts +19 -0
- package/dist/src/generated/authentication/core/utils.gen.js +87 -0
- package/dist/src/generated/authentication/index.d.ts +2 -0
- package/dist/src/generated/authentication/index.js +2 -0
- package/dist/src/generated/authentication/sdk.gen.d.ts +151 -0
- package/dist/src/generated/authentication/sdk.gen.js +359 -0
- package/dist/src/generated/authentication/types.gen.d.ts +1135 -0
- package/dist/src/generated/authentication/types.gen.js +2 -0
- package/dist/src/generated/integration/client/client.gen.d.ts +2 -0
- package/dist/src/generated/integration/client/client.gen.js +216 -0
- package/dist/src/generated/integration/client/index.d.ts +10 -0
- package/dist/src/generated/integration/client/index.js +6 -0
- package/dist/src/generated/integration/client/types.gen.d.ts +120 -0
- package/dist/src/generated/integration/client/types.gen.js +2 -0
- package/dist/src/generated/integration/client/utils.gen.d.ts +37 -0
- package/dist/src/generated/integration/client/utils.gen.js +228 -0
- package/dist/src/generated/integration/client.gen.d.ts +12 -0
- package/dist/src/generated/integration/client.gen.js +3 -0
- package/dist/src/generated/integration/core/auth.gen.d.ts +25 -0
- package/dist/src/generated/integration/core/auth.gen.js +14 -0
- package/dist/src/generated/integration/core/bodySerializer.gen.d.ts +25 -0
- package/dist/src/generated/integration/core/bodySerializer.gen.js +57 -0
- package/dist/src/generated/integration/core/params.gen.d.ts +43 -0
- package/dist/src/generated/integration/core/params.gen.js +109 -0
- package/dist/src/generated/integration/core/pathSerializer.gen.d.ts +33 -0
- package/dist/src/generated/integration/core/pathSerializer.gen.js +106 -0
- package/dist/src/generated/integration/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/src/generated/integration/core/queryKeySerializer.gen.js +92 -0
- package/dist/src/generated/integration/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/src/generated/integration/core/serverSentEvents.gen.js +132 -0
- package/dist/src/generated/integration/core/types.gen.d.ts +83 -0
- package/dist/src/generated/integration/core/types.gen.js +2 -0
- package/dist/src/generated/integration/core/utils.gen.d.ts +19 -0
- package/dist/src/generated/integration/core/utils.gen.js +87 -0
- package/dist/src/generated/integration/index.d.ts +2 -0
- package/dist/src/generated/integration/index.js +2 -0
- package/dist/src/generated/integration/sdk.gen.d.ts +207 -0
- package/dist/src/generated/integration/sdk.gen.js +527 -0
- package/dist/src/generated/integration/types.gen.d.ts +2604 -0
- package/dist/src/generated/integration/types.gen.js +2 -0
- package/dist/src/generated/network/index.d.ts +1 -1
- package/dist/src/generated/network/types.gen.d.ts +751 -55
- package/dist/src/generated/protection/index.d.ts +1 -1
- package/dist/src/generated/protection/types.gen.d.ts +627 -357
- package/dist/src/generated/report/client/client.gen.d.ts +2 -0
- package/dist/src/generated/report/client/client.gen.js +216 -0
- package/dist/src/generated/report/client/index.d.ts +10 -0
- package/dist/src/generated/report/client/index.js +6 -0
- package/dist/src/generated/report/client/types.gen.d.ts +120 -0
- package/dist/src/generated/report/client/types.gen.js +2 -0
- package/dist/src/generated/report/client/utils.gen.d.ts +37 -0
- package/dist/src/generated/report/client/utils.gen.js +228 -0
- package/dist/src/generated/report/client.gen.d.ts +12 -0
- package/dist/src/generated/report/client.gen.js +3 -0
- package/dist/src/generated/report/core/auth.gen.d.ts +25 -0
- package/dist/src/generated/report/core/auth.gen.js +14 -0
- package/dist/src/generated/report/core/bodySerializer.gen.d.ts +25 -0
- package/dist/src/generated/report/core/bodySerializer.gen.js +57 -0
- package/dist/src/generated/report/core/params.gen.d.ts +43 -0
- package/dist/src/generated/report/core/params.gen.js +109 -0
- package/dist/src/generated/report/core/pathSerializer.gen.d.ts +33 -0
- package/dist/src/generated/report/core/pathSerializer.gen.js +106 -0
- package/dist/src/generated/report/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/src/generated/report/core/queryKeySerializer.gen.js +92 -0
- package/dist/src/generated/report/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/src/generated/report/core/serverSentEvents.gen.js +132 -0
- package/dist/src/generated/report/core/types.gen.d.ts +83 -0
- package/dist/src/generated/report/core/types.gen.js +2 -0
- package/dist/src/generated/report/core/utils.gen.d.ts +19 -0
- package/dist/src/generated/report/core/utils.gen.js +87 -0
- package/dist/src/generated/report/index.d.ts +2 -0
- package/dist/src/generated/report/index.js +2 -0
- package/dist/src/generated/report/sdk.gen.d.ts +59 -0
- package/dist/src/generated/report/sdk.gen.js +89 -0
- package/dist/src/generated/report/types.gen.d.ts +389 -0
- package/dist/src/generated/report/types.gen.js +2 -0
- package/dist/src/index.d.ts +13 -1
- package/dist/src/index.js +39 -4
- package/package.json +3 -1
|
@@ -0,0 +1,389 @@
|
|
|
1
|
+
export type ClientOptions = {
|
|
2
|
+
baseUrl: 'https://core.flashstart.com/report' | (string & {});
|
|
3
|
+
};
|
|
4
|
+
export type FlashStartErrorBody = {
|
|
5
|
+
code: string;
|
|
6
|
+
message?: string;
|
|
7
|
+
details?: unknown;
|
|
8
|
+
};
|
|
9
|
+
export type MissingCredentialsErrorBody = {
|
|
10
|
+
message: string;
|
|
11
|
+
};
|
|
12
|
+
export type GetStatisticsData = {
|
|
13
|
+
body?: never;
|
|
14
|
+
path?: never;
|
|
15
|
+
query: {
|
|
16
|
+
start: string;
|
|
17
|
+
end: string;
|
|
18
|
+
granularity?: 'hourly' | 'daily' | 'monthly';
|
|
19
|
+
networkIds?: Array<string>;
|
|
20
|
+
organizationIds?: Array<string>;
|
|
21
|
+
policyIds?: Array<string>;
|
|
22
|
+
};
|
|
23
|
+
url: '/v1/statistics';
|
|
24
|
+
};
|
|
25
|
+
export type GetStatisticsErrors = {
|
|
26
|
+
/**
|
|
27
|
+
* Unauthorized
|
|
28
|
+
*/
|
|
29
|
+
401: MissingCredentialsErrorBody | FlashStartErrorBody;
|
|
30
|
+
/**
|
|
31
|
+
* Forbidden
|
|
32
|
+
*/
|
|
33
|
+
403: FlashStartErrorBody;
|
|
34
|
+
/**
|
|
35
|
+
* Not found
|
|
36
|
+
*/
|
|
37
|
+
404: FlashStartErrorBody;
|
|
38
|
+
/**
|
|
39
|
+
* Invalid request
|
|
40
|
+
*/
|
|
41
|
+
422: FlashStartErrorBody;
|
|
42
|
+
/**
|
|
43
|
+
* Internal server error
|
|
44
|
+
*/
|
|
45
|
+
500: FlashStartErrorBody;
|
|
46
|
+
};
|
|
47
|
+
export type GetStatisticsError = GetStatisticsErrors[keyof GetStatisticsErrors];
|
|
48
|
+
export type GetStatisticsResponses = {
|
|
49
|
+
/**
|
|
50
|
+
* Statistics report
|
|
51
|
+
*/
|
|
52
|
+
200: {
|
|
53
|
+
filters: {
|
|
54
|
+
categoryIds?: Array<string>;
|
|
55
|
+
end: string;
|
|
56
|
+
granularity?: 'hourly' | 'daily' | 'monthly';
|
|
57
|
+
limit?: number;
|
|
58
|
+
metric?: 'blocked' | 'unresolved' | 'allowed' | 'requests';
|
|
59
|
+
networkIds?: Array<string>;
|
|
60
|
+
organizationIds?: Array<string>;
|
|
61
|
+
policyIds?: Array<string>;
|
|
62
|
+
protectionModule?: 'content_filter' | 'malware_protection' | 'app_blocker';
|
|
63
|
+
reason?: 'ip_blocker';
|
|
64
|
+
start: string;
|
|
65
|
+
};
|
|
66
|
+
intervals: Array<{
|
|
67
|
+
allowed: number;
|
|
68
|
+
blocked: number;
|
|
69
|
+
requests: number;
|
|
70
|
+
unresolved: number;
|
|
71
|
+
end: string;
|
|
72
|
+
start: string;
|
|
73
|
+
}>;
|
|
74
|
+
statistics: {
|
|
75
|
+
allowed: number;
|
|
76
|
+
blocked: number;
|
|
77
|
+
requests: number;
|
|
78
|
+
unresolved: number;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
export type GetStatisticsResponse = GetStatisticsResponses[keyof GetStatisticsResponses];
|
|
83
|
+
export type GetTopCategoriesData = {
|
|
84
|
+
body?: never;
|
|
85
|
+
path?: never;
|
|
86
|
+
query: {
|
|
87
|
+
start: string;
|
|
88
|
+
end: string;
|
|
89
|
+
metric?: 'blocked' | 'unresolved' | 'allowed' | 'requests';
|
|
90
|
+
limit?: number;
|
|
91
|
+
categoryIds?: Array<string>;
|
|
92
|
+
networkIds?: Array<string>;
|
|
93
|
+
organizationIds?: Array<string>;
|
|
94
|
+
policyIds?: Array<string>;
|
|
95
|
+
protectionModule?: 'content_filter' | 'malware_protection' | 'app_blocker';
|
|
96
|
+
reason?: 'ip_blocker';
|
|
97
|
+
};
|
|
98
|
+
url: '/v1/categories';
|
|
99
|
+
};
|
|
100
|
+
export type GetTopCategoriesErrors = {
|
|
101
|
+
/**
|
|
102
|
+
* Unauthorized
|
|
103
|
+
*/
|
|
104
|
+
401: MissingCredentialsErrorBody | FlashStartErrorBody;
|
|
105
|
+
/**
|
|
106
|
+
* Forbidden
|
|
107
|
+
*/
|
|
108
|
+
403: FlashStartErrorBody;
|
|
109
|
+
/**
|
|
110
|
+
* Not found
|
|
111
|
+
*/
|
|
112
|
+
404: FlashStartErrorBody;
|
|
113
|
+
/**
|
|
114
|
+
* Invalid request
|
|
115
|
+
*/
|
|
116
|
+
422: FlashStartErrorBody;
|
|
117
|
+
/**
|
|
118
|
+
* Internal server error
|
|
119
|
+
*/
|
|
120
|
+
500: FlashStartErrorBody;
|
|
121
|
+
};
|
|
122
|
+
export type GetTopCategoriesError = GetTopCategoriesErrors[keyof GetTopCategoriesErrors];
|
|
123
|
+
export type GetTopCategoriesResponses = {
|
|
124
|
+
/**
|
|
125
|
+
* Top categories report
|
|
126
|
+
*/
|
|
127
|
+
200: {
|
|
128
|
+
categories: Array<{
|
|
129
|
+
allowed: number;
|
|
130
|
+
blocked: number;
|
|
131
|
+
requests: number;
|
|
132
|
+
unresolved: number;
|
|
133
|
+
category: string;
|
|
134
|
+
}>;
|
|
135
|
+
filters: {
|
|
136
|
+
categoryIds?: Array<string>;
|
|
137
|
+
end: string;
|
|
138
|
+
granularity?: 'hourly' | 'daily' | 'monthly';
|
|
139
|
+
limit?: number;
|
|
140
|
+
metric?: 'blocked' | 'unresolved' | 'allowed' | 'requests';
|
|
141
|
+
networkIds?: Array<string>;
|
|
142
|
+
organizationIds?: Array<string>;
|
|
143
|
+
policyIds?: Array<string>;
|
|
144
|
+
protectionModule?: 'content_filter' | 'malware_protection' | 'app_blocker';
|
|
145
|
+
reason?: 'ip_blocker';
|
|
146
|
+
start: string;
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
export type GetTopCategoriesResponse = GetTopCategoriesResponses[keyof GetTopCategoriesResponses];
|
|
151
|
+
export type GetTopDomainsByCategoryData = {
|
|
152
|
+
body?: never;
|
|
153
|
+
path?: never;
|
|
154
|
+
query: {
|
|
155
|
+
start: string;
|
|
156
|
+
end: string;
|
|
157
|
+
categoryIds: Array<string>;
|
|
158
|
+
metric?: 'blocked' | 'unresolved' | 'allowed' | 'requests';
|
|
159
|
+
limit?: number;
|
|
160
|
+
networkIds?: Array<string>;
|
|
161
|
+
organizationIds?: Array<string>;
|
|
162
|
+
policyIds?: Array<string>;
|
|
163
|
+
protectionModule?: 'content_filter' | 'malware_protection' | 'app_blocker';
|
|
164
|
+
reason?: 'ip_blocker';
|
|
165
|
+
};
|
|
166
|
+
url: '/v1/categories/domains';
|
|
167
|
+
};
|
|
168
|
+
export type GetTopDomainsByCategoryErrors = {
|
|
169
|
+
/**
|
|
170
|
+
* Unauthorized
|
|
171
|
+
*/
|
|
172
|
+
401: MissingCredentialsErrorBody | FlashStartErrorBody;
|
|
173
|
+
/**
|
|
174
|
+
* Forbidden
|
|
175
|
+
*/
|
|
176
|
+
403: FlashStartErrorBody;
|
|
177
|
+
/**
|
|
178
|
+
* Not found
|
|
179
|
+
*/
|
|
180
|
+
404: FlashStartErrorBody;
|
|
181
|
+
/**
|
|
182
|
+
* Invalid request
|
|
183
|
+
*/
|
|
184
|
+
422: FlashStartErrorBody;
|
|
185
|
+
/**
|
|
186
|
+
* Internal server error
|
|
187
|
+
*/
|
|
188
|
+
500: FlashStartErrorBody;
|
|
189
|
+
};
|
|
190
|
+
export type GetTopDomainsByCategoryError = GetTopDomainsByCategoryErrors[keyof GetTopDomainsByCategoryErrors];
|
|
191
|
+
export type GetTopDomainsByCategoryResponses = {
|
|
192
|
+
/**
|
|
193
|
+
* Top domains by category report
|
|
194
|
+
*/
|
|
195
|
+
200: {
|
|
196
|
+
domainsByCategory: Array<{
|
|
197
|
+
category: string;
|
|
198
|
+
domains: Array<{
|
|
199
|
+
allowed: number;
|
|
200
|
+
blocked: number;
|
|
201
|
+
requests: number;
|
|
202
|
+
unresolved: number;
|
|
203
|
+
domain: string;
|
|
204
|
+
}>;
|
|
205
|
+
}>;
|
|
206
|
+
filters: {
|
|
207
|
+
categoryIds?: Array<string>;
|
|
208
|
+
end: string;
|
|
209
|
+
granularity?: 'hourly' | 'daily' | 'monthly';
|
|
210
|
+
limit?: number;
|
|
211
|
+
metric?: 'blocked' | 'unresolved' | 'allowed' | 'requests';
|
|
212
|
+
networkIds?: Array<string>;
|
|
213
|
+
organizationIds?: Array<string>;
|
|
214
|
+
policyIds?: Array<string>;
|
|
215
|
+
protectionModule?: 'content_filter' | 'malware_protection' | 'app_blocker';
|
|
216
|
+
reason?: 'ip_blocker';
|
|
217
|
+
start: string;
|
|
218
|
+
};
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
export type GetTopDomainsByCategoryResponse = GetTopDomainsByCategoryResponses[keyof GetTopDomainsByCategoryResponses];
|
|
222
|
+
export type GetTopDomainsData = {
|
|
223
|
+
body?: never;
|
|
224
|
+
path?: never;
|
|
225
|
+
query: {
|
|
226
|
+
start: string;
|
|
227
|
+
end: string;
|
|
228
|
+
metric?: 'blocked' | 'unresolved' | 'allowed' | 'requests';
|
|
229
|
+
limit?: number;
|
|
230
|
+
categoryIds?: Array<string>;
|
|
231
|
+
networkIds?: Array<string>;
|
|
232
|
+
organizationIds?: Array<string>;
|
|
233
|
+
policyIds?: Array<string>;
|
|
234
|
+
protectionModule?: 'content_filter' | 'malware_protection' | 'app_blocker';
|
|
235
|
+
reason?: 'ip_blocker';
|
|
236
|
+
};
|
|
237
|
+
url: '/v1/domains';
|
|
238
|
+
};
|
|
239
|
+
export type GetTopDomainsErrors = {
|
|
240
|
+
/**
|
|
241
|
+
* Unauthorized
|
|
242
|
+
*/
|
|
243
|
+
401: MissingCredentialsErrorBody | FlashStartErrorBody;
|
|
244
|
+
/**
|
|
245
|
+
* Forbidden
|
|
246
|
+
*/
|
|
247
|
+
403: FlashStartErrorBody;
|
|
248
|
+
/**
|
|
249
|
+
* Not found
|
|
250
|
+
*/
|
|
251
|
+
404: FlashStartErrorBody;
|
|
252
|
+
/**
|
|
253
|
+
* Invalid request
|
|
254
|
+
*/
|
|
255
|
+
422: FlashStartErrorBody;
|
|
256
|
+
/**
|
|
257
|
+
* Internal server error
|
|
258
|
+
*/
|
|
259
|
+
500: FlashStartErrorBody;
|
|
260
|
+
};
|
|
261
|
+
export type GetTopDomainsError = GetTopDomainsErrors[keyof GetTopDomainsErrors];
|
|
262
|
+
export type GetTopDomainsResponses = {
|
|
263
|
+
/**
|
|
264
|
+
* Top domains report
|
|
265
|
+
*/
|
|
266
|
+
200: {
|
|
267
|
+
domains: Array<{
|
|
268
|
+
allowed: number;
|
|
269
|
+
blocked: number;
|
|
270
|
+
requests: number;
|
|
271
|
+
unresolved: number;
|
|
272
|
+
domain: string;
|
|
273
|
+
}>;
|
|
274
|
+
filters: {
|
|
275
|
+
categoryIds?: Array<string>;
|
|
276
|
+
end: string;
|
|
277
|
+
granularity?: 'hourly' | 'daily' | 'monthly';
|
|
278
|
+
limit?: number;
|
|
279
|
+
metric?: 'blocked' | 'unresolved' | 'allowed' | 'requests';
|
|
280
|
+
networkIds?: Array<string>;
|
|
281
|
+
organizationIds?: Array<string>;
|
|
282
|
+
policyIds?: Array<string>;
|
|
283
|
+
protectionModule?: 'content_filter' | 'malware_protection' | 'app_blocker';
|
|
284
|
+
reason?: 'ip_blocker';
|
|
285
|
+
start: string;
|
|
286
|
+
};
|
|
287
|
+
};
|
|
288
|
+
};
|
|
289
|
+
export type GetTopDomainsResponse = GetTopDomainsResponses[keyof GetTopDomainsResponses];
|
|
290
|
+
export type GetCustomersReportDashboardData = {
|
|
291
|
+
body?: never;
|
|
292
|
+
path?: never;
|
|
293
|
+
query?: never;
|
|
294
|
+
url: '/v1/customers-dashboard';
|
|
295
|
+
};
|
|
296
|
+
export type GetCustomersReportDashboardErrors = {
|
|
297
|
+
/**
|
|
298
|
+
* Unauthorized
|
|
299
|
+
*/
|
|
300
|
+
401: MissingCredentialsErrorBody | FlashStartErrorBody;
|
|
301
|
+
/**
|
|
302
|
+
* Forbidden
|
|
303
|
+
*/
|
|
304
|
+
403: FlashStartErrorBody;
|
|
305
|
+
/**
|
|
306
|
+
* Not found
|
|
307
|
+
*/
|
|
308
|
+
404: FlashStartErrorBody;
|
|
309
|
+
/**
|
|
310
|
+
* Internal server error
|
|
311
|
+
*/
|
|
312
|
+
500: FlashStartErrorBody;
|
|
313
|
+
};
|
|
314
|
+
export type GetCustomersReportDashboardError = GetCustomersReportDashboardErrors[keyof GetCustomersReportDashboardErrors];
|
|
315
|
+
export type GetCustomersReportDashboardResponses = {
|
|
316
|
+
/**
|
|
317
|
+
* Customers report dashboard
|
|
318
|
+
*/
|
|
319
|
+
200: Array<{
|
|
320
|
+
allowed: number;
|
|
321
|
+
blocked: number;
|
|
322
|
+
organizationId: string;
|
|
323
|
+
requests: number;
|
|
324
|
+
unresolved: number;
|
|
325
|
+
}>;
|
|
326
|
+
};
|
|
327
|
+
export type GetCustomersReportDashboardResponse = GetCustomersReportDashboardResponses[keyof GetCustomersReportDashboardResponses];
|
|
328
|
+
export type GetHistoricalDnsLogsData = {
|
|
329
|
+
body?: never;
|
|
330
|
+
path?: never;
|
|
331
|
+
query: {
|
|
332
|
+
start: string;
|
|
333
|
+
end: string;
|
|
334
|
+
limit?: number;
|
|
335
|
+
offset?: number;
|
|
336
|
+
actions?: Array<'UNRESOLVED' | 'GRANTED' | 'DENIED'>;
|
|
337
|
+
categoryIds?: Array<string>;
|
|
338
|
+
fqdnSearch?: string;
|
|
339
|
+
networkIds?: Array<string>;
|
|
340
|
+
organizationIds?: Array<string>;
|
|
341
|
+
policyIds?: Array<string>;
|
|
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
|
+
};
|
|
344
|
+
url: '/v1/dns-logs';
|
|
345
|
+
};
|
|
346
|
+
export type GetHistoricalDnsLogsErrors = {
|
|
347
|
+
/**
|
|
348
|
+
* Unauthorized
|
|
349
|
+
*/
|
|
350
|
+
401: MissingCredentialsErrorBody | FlashStartErrorBody;
|
|
351
|
+
/**
|
|
352
|
+
* Forbidden
|
|
353
|
+
*/
|
|
354
|
+
403: FlashStartErrorBody;
|
|
355
|
+
/**
|
|
356
|
+
* Not found
|
|
357
|
+
*/
|
|
358
|
+
404: FlashStartErrorBody;
|
|
359
|
+
/**
|
|
360
|
+
* Invalid request
|
|
361
|
+
*/
|
|
362
|
+
422: FlashStartErrorBody;
|
|
363
|
+
/**
|
|
364
|
+
* Internal server error
|
|
365
|
+
*/
|
|
366
|
+
500: FlashStartErrorBody;
|
|
367
|
+
};
|
|
368
|
+
export type GetHistoricalDnsLogsError = GetHistoricalDnsLogsErrors[keyof GetHistoricalDnsLogsErrors];
|
|
369
|
+
export type GetHistoricalDnsLogsResponses = {
|
|
370
|
+
/**
|
|
371
|
+
* Historical DNS logs
|
|
372
|
+
*/
|
|
373
|
+
200: Array<{
|
|
374
|
+
action: 'UNRESOLVED' | 'GRANTED' | 'DENIED';
|
|
375
|
+
categoryCode: string;
|
|
376
|
+
countryCode?: string;
|
|
377
|
+
ednsTag: string | null;
|
|
378
|
+
fullyQualifiedDomainName: string;
|
|
379
|
+
networkId: string;
|
|
380
|
+
organizationId: string;
|
|
381
|
+
policyId: string;
|
|
382
|
+
queryType: 'A' | 'AAAA' | 'CNAME' | 'MX' | 'NS' | 'PTR' | 'SOA' | 'TXT';
|
|
383
|
+
reason: 'CATEGORY' | 'BLOCK_LIST' | 'ALLOW_LIST' | 'GEO_BLOCK' | 'IP_BLOCK' | 'IP_REMOVED' | 'YOUTUBE_SAFESEARCH' | 'BING_SAFESEARCH' | 'GOOGLE_SAFESEARCH' | 'NO_POLICY' | 'DUCKDCUCKGO_SAFESEARCH';
|
|
384
|
+
serverId: string;
|
|
385
|
+
sourceIpAddress: string;
|
|
386
|
+
timestamp: string;
|
|
387
|
+
}>;
|
|
388
|
+
};
|
|
389
|
+
export type GetHistoricalDnsLogsResponse = GetHistoricalDnsLogsResponses[keyof GetHistoricalDnsLogsResponses];
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
+
import { AuthenticationSdk } from "./generated/authentication/index.js";
|
|
2
|
+
import { IntegrationSdk } from "./generated/integration/index.js";
|
|
1
3
|
import { NetworkSdk } from "./generated/network/index.js";
|
|
2
4
|
import { ProtectionSdk } from "./generated/protection/index.js";
|
|
5
|
+
import { ReportSdk } from "./generated/report/index.js";
|
|
3
6
|
export * from "./generated/network/index.js";
|
|
7
|
+
export * as authentication from "./generated/authentication/index.js";
|
|
8
|
+
export * as integration from "./generated/integration/index.js";
|
|
4
9
|
export * as protection from "./generated/protection/index.js";
|
|
10
|
+
export * as report from "./generated/report/index.js";
|
|
5
11
|
export declare const listNetworks: NetworkSdk["listNetworks"];
|
|
6
12
|
export declare const listNetworkDns: NetworkSdk["listNetworkDns"];
|
|
7
13
|
export declare const listAvailableNetworkDns: NetworkSdk["listAvailableNetworkDns"];
|
|
@@ -30,10 +36,13 @@ export declare const updateEncryptedNetwork: NetworkSdk["updateEncryptedNetwork"
|
|
|
30
36
|
type Methods<T> = {
|
|
31
37
|
[Key in keyof T as T[Key] extends (...args: any[]) => any ? Key : never]: T[Key];
|
|
32
38
|
};
|
|
33
|
-
export type FlashStartClient = Methods<NetworkSdk> & Methods<ProtectionSdk>;
|
|
39
|
+
export type FlashStartClient = Methods<NetworkSdk> & Methods<ProtectionSdk> & Methods<AuthenticationSdk> & Methods<IntegrationSdk> & Methods<ReportSdk>;
|
|
34
40
|
export type FlashStartClientOptions = {
|
|
35
41
|
networkBaseUrl?: string;
|
|
36
42
|
protectionBaseUrl?: string;
|
|
43
|
+
authenticationBaseUrl?: string;
|
|
44
|
+
integrationBaseUrl?: string;
|
|
45
|
+
reportBaseUrl?: string;
|
|
37
46
|
fetch?: typeof globalThis.fetch;
|
|
38
47
|
} & ({
|
|
39
48
|
apiKey: string;
|
|
@@ -41,6 +50,9 @@ export type FlashStartClientOptions = {
|
|
|
41
50
|
} | {
|
|
42
51
|
accessToken: string;
|
|
43
52
|
apiKey?: never;
|
|
53
|
+
} | {
|
|
54
|
+
apiKey?: never;
|
|
55
|
+
accessToken?: never;
|
|
44
56
|
});
|
|
45
57
|
export declare class FlashStartError extends Error {
|
|
46
58
|
readonly status: number;
|
package/dist/src/index.js
CHANGED
|
@@ -1,9 +1,18 @@
|
|
|
1
|
+
import { createClient as createAuthenticationClient } from "./generated/authentication/client/index.js";
|
|
2
|
+
import { AuthenticationSdk } from "./generated/authentication/index.js";
|
|
3
|
+
import { createClient as createIntegrationClient } from "./generated/integration/client/index.js";
|
|
4
|
+
import { IntegrationSdk } from "./generated/integration/index.js";
|
|
1
5
|
import { createClient as createNetworkClient } from "./generated/network/client/index.js";
|
|
2
6
|
import { NetworkSdk } from "./generated/network/index.js";
|
|
3
7
|
import { createClient as createProtectionClient } from "./generated/protection/client/index.js";
|
|
4
8
|
import { ProtectionSdk } from "./generated/protection/index.js";
|
|
9
|
+
import { createClient as createReportClient } from "./generated/report/client/index.js";
|
|
10
|
+
import { ReportSdk } from "./generated/report/index.js";
|
|
5
11
|
export * from "./generated/network/index.js";
|
|
12
|
+
export * as authentication from "./generated/authentication/index.js";
|
|
13
|
+
export * as integration from "./generated/integration/index.js";
|
|
6
14
|
export * as protection from "./generated/protection/index.js";
|
|
15
|
+
export * as report from "./generated/report/index.js";
|
|
7
16
|
const networkSdk = new NetworkSdk();
|
|
8
17
|
export const listNetworks = networkSdk.listNetworks.bind(networkSdk);
|
|
9
18
|
export const listNetworkDns = networkSdk.listNetworkDns.bind(networkSdk);
|
|
@@ -55,12 +64,12 @@ async function throwFlashStartError(response) {
|
|
|
55
64
|
export function createFlashStartClient(options) {
|
|
56
65
|
const apiKey = "apiKey" in options ? options.apiKey : undefined;
|
|
57
66
|
const accessToken = "accessToken" in options ? options.accessToken : undefined;
|
|
58
|
-
if (
|
|
59
|
-
throw new TypeError("Provide
|
|
67
|
+
if (apiKey && accessToken) {
|
|
68
|
+
throw new TypeError("Provide only one of apiKey or accessToken");
|
|
60
69
|
}
|
|
61
70
|
const config = {
|
|
62
71
|
fetch: options.fetch,
|
|
63
|
-
headers: apiKey ? { "x-api-key": apiKey } : { authorization: `Bearer ${accessToken}` },
|
|
72
|
+
headers: apiKey ? { "x-api-key": apiKey } : accessToken ? { authorization: `Bearer ${accessToken}` } : undefined,
|
|
64
73
|
throwOnError: true,
|
|
65
74
|
};
|
|
66
75
|
const networkClient = createNetworkClient({
|
|
@@ -71,13 +80,39 @@ export function createFlashStartClient(options) {
|
|
|
71
80
|
...config,
|
|
72
81
|
baseUrl: options.protectionBaseUrl ?? "https://core.flashstart.com/protection",
|
|
73
82
|
});
|
|
83
|
+
const authenticationClient = createAuthenticationClient({
|
|
84
|
+
...config,
|
|
85
|
+
baseUrl: options.authenticationBaseUrl ?? "https://core.flashstart.com/authentication",
|
|
86
|
+
});
|
|
87
|
+
const integrationClient = createIntegrationClient({
|
|
88
|
+
...config,
|
|
89
|
+
baseUrl: options.integrationBaseUrl ?? "https://core.flashstart.com/integration",
|
|
90
|
+
});
|
|
91
|
+
const reportClient = createReportClient({
|
|
92
|
+
...config,
|
|
93
|
+
baseUrl: options.reportBaseUrl ?? "https://core.flashstart.com/report",
|
|
94
|
+
});
|
|
74
95
|
networkClient.interceptors.response.use(throwFlashStartError);
|
|
75
96
|
protectionClient.interceptors.response.use(throwFlashStartError);
|
|
97
|
+
authenticationClient.interceptors.response.use(throwFlashStartError);
|
|
98
|
+
integrationClient.interceptors.response.use(throwFlashStartError);
|
|
99
|
+
reportClient.interceptors.response.use(throwFlashStartError);
|
|
76
100
|
const network = new NetworkSdk({ client: networkClient });
|
|
77
101
|
const protection = new ProtectionSdk({ client: protectionClient });
|
|
102
|
+
const authentication = new AuthenticationSdk({ client: authenticationClient });
|
|
103
|
+
const integration = new IntegrationSdk({ client: integrationClient });
|
|
104
|
+
const report = new ReportSdk({ client: reportClient });
|
|
78
105
|
return new Proxy(network, {
|
|
79
106
|
get(target, property, receiver) {
|
|
80
|
-
const owner = property in
|
|
107
|
+
const owner = property in target
|
|
108
|
+
? target
|
|
109
|
+
: property in protection
|
|
110
|
+
? protection
|
|
111
|
+
: property in authentication
|
|
112
|
+
? authentication
|
|
113
|
+
: property in integration
|
|
114
|
+
? integration
|
|
115
|
+
: report;
|
|
81
116
|
const value = Reflect.get(owner, property, owner === target ? receiver : owner);
|
|
82
117
|
return typeof value === "function" ? value.bind(owner) : value;
|
|
83
118
|
},
|
package/package.json
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flashstart/client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": ">=18.0.0"
|
|
8
8
|
},
|
|
9
|
+
"main": "./dist/src/index.js",
|
|
10
|
+
"types": "./dist/src/index.d.ts",
|
|
9
11
|
"files": [
|
|
10
12
|
"dist/**",
|
|
11
13
|
"README.md"
|