@flashstart/client 0.1.0
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 +37 -0
- package/dist/src/generated/client/client.gen.d.ts +2 -0
- package/dist/src/generated/client/client.gen.js +216 -0
- package/dist/src/generated/client/index.d.ts +10 -0
- package/dist/src/generated/client/index.js +6 -0
- package/dist/src/generated/client/types.gen.d.ts +120 -0
- package/dist/src/generated/client/types.gen.js +2 -0
- package/dist/src/generated/client/utils.gen.d.ts +37 -0
- package/dist/src/generated/client/utils.gen.js +228 -0
- package/dist/src/generated/client.gen.d.ts +12 -0
- package/dist/src/generated/client.gen.js +3 -0
- package/dist/src/generated/core/auth.gen.d.ts +25 -0
- package/dist/src/generated/core/auth.gen.js +14 -0
- package/dist/src/generated/core/bodySerializer.gen.d.ts +25 -0
- package/dist/src/generated/core/bodySerializer.gen.js +57 -0
- package/dist/src/generated/core/params.gen.d.ts +43 -0
- package/dist/src/generated/core/params.gen.js +109 -0
- package/dist/src/generated/core/pathSerializer.gen.d.ts +33 -0
- package/dist/src/generated/core/pathSerializer.gen.js +106 -0
- package/dist/src/generated/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/src/generated/core/queryKeySerializer.gen.js +92 -0
- package/dist/src/generated/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/src/generated/core/serverSentEvents.gen.js +132 -0
- package/dist/src/generated/core/types.gen.d.ts +83 -0
- package/dist/src/generated/core/types.gen.js +2 -0
- package/dist/src/generated/core/utils.gen.d.ts +19 -0
- package/dist/src/generated/core/utils.gen.js +87 -0
- package/dist/src/generated/index.d.ts +2 -0
- package/dist/src/generated/index.js +2 -0
- package/dist/src/generated/network/client/client.gen.d.ts +2 -0
- package/dist/src/generated/network/client/client.gen.js +216 -0
- package/dist/src/generated/network/client/index.d.ts +10 -0
- package/dist/src/generated/network/client/index.js +6 -0
- package/dist/src/generated/network/client/types.gen.d.ts +120 -0
- package/dist/src/generated/network/client/types.gen.js +2 -0
- package/dist/src/generated/network/client/utils.gen.d.ts +37 -0
- package/dist/src/generated/network/client/utils.gen.js +228 -0
- package/dist/src/generated/network/client.gen.d.ts +12 -0
- package/dist/src/generated/network/client.gen.js +3 -0
- package/dist/src/generated/network/core/auth.gen.d.ts +25 -0
- package/dist/src/generated/network/core/auth.gen.js +14 -0
- package/dist/src/generated/network/core/bodySerializer.gen.d.ts +25 -0
- package/dist/src/generated/network/core/bodySerializer.gen.js +57 -0
- package/dist/src/generated/network/core/params.gen.d.ts +43 -0
- package/dist/src/generated/network/core/params.gen.js +109 -0
- package/dist/src/generated/network/core/pathSerializer.gen.d.ts +33 -0
- package/dist/src/generated/network/core/pathSerializer.gen.js +106 -0
- package/dist/src/generated/network/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/src/generated/network/core/queryKeySerializer.gen.js +92 -0
- package/dist/src/generated/network/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/src/generated/network/core/serverSentEvents.gen.js +132 -0
- package/dist/src/generated/network/core/types.gen.d.ts +83 -0
- package/dist/src/generated/network/core/types.gen.js +2 -0
- package/dist/src/generated/network/core/utils.gen.d.ts +19 -0
- package/dist/src/generated/network/core/utils.gen.js +87 -0
- package/dist/src/generated/network/index.d.ts +2 -0
- package/dist/src/generated/network/index.js +2 -0
- package/dist/src/generated/network/sdk.gen.d.ts +135 -0
- package/dist/src/generated/network/sdk.gen.js +339 -0
- package/dist/src/generated/network/types.gen.d.ts +1188 -0
- package/dist/src/generated/network/types.gen.js +2 -0
- package/dist/src/generated/protection/client/client.gen.d.ts +2 -0
- package/dist/src/generated/protection/client/client.gen.js +216 -0
- package/dist/src/generated/protection/client/index.d.ts +10 -0
- package/dist/src/generated/protection/client/index.js +6 -0
- package/dist/src/generated/protection/client/types.gen.d.ts +120 -0
- package/dist/src/generated/protection/client/types.gen.js +2 -0
- package/dist/src/generated/protection/client/utils.gen.d.ts +37 -0
- package/dist/src/generated/protection/client/utils.gen.js +228 -0
- package/dist/src/generated/protection/client.gen.d.ts +12 -0
- package/dist/src/generated/protection/client.gen.js +3 -0
- package/dist/src/generated/protection/core/auth.gen.d.ts +25 -0
- package/dist/src/generated/protection/core/auth.gen.js +14 -0
- package/dist/src/generated/protection/core/bodySerializer.gen.d.ts +25 -0
- package/dist/src/generated/protection/core/bodySerializer.gen.js +57 -0
- package/dist/src/generated/protection/core/params.gen.d.ts +43 -0
- package/dist/src/generated/protection/core/params.gen.js +109 -0
- package/dist/src/generated/protection/core/pathSerializer.gen.d.ts +33 -0
- package/dist/src/generated/protection/core/pathSerializer.gen.js +106 -0
- package/dist/src/generated/protection/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/src/generated/protection/core/queryKeySerializer.gen.js +92 -0
- package/dist/src/generated/protection/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/src/generated/protection/core/serverSentEvents.gen.js +132 -0
- package/dist/src/generated/protection/core/types.gen.d.ts +83 -0
- package/dist/src/generated/protection/core/types.gen.js +2 -0
- package/dist/src/generated/protection/core/utils.gen.d.ts +19 -0
- package/dist/src/generated/protection/core/utils.gen.js +87 -0
- package/dist/src/generated/protection/index.d.ts +2 -0
- package/dist/src/generated/protection/index.js +2 -0
- package/dist/src/generated/protection/sdk.gen.d.ts +255 -0
- package/dist/src/generated/protection/sdk.gen.js +663 -0
- package/dist/src/generated/protection/types.gen.d.ts +2199 -0
- package/dist/src/generated/protection/types.gen.js +2 -0
- package/dist/src/generated/sdk.gen.d.ts +91 -0
- package/dist/src/generated/sdk.gen.js +206 -0
- package/dist/src/generated/types.gen.d.ts +909 -0
- package/dist/src/generated/types.gen.js +2 -0
- package/dist/src/index.d.ts +50 -0
- package/dist/src/index.js +85 -0
- package/package.json +34 -0
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
+
export function createSseClient({ onRequest, onSseError, onSseEvent, responseTransformer, responseValidator, sseDefaultRetryDelay, sseMaxRetryAttempts, sseMaxRetryDelay, sseSleepFn, url, ...options }) {
|
|
3
|
+
let lastEventId;
|
|
4
|
+
const sleep = sseSleepFn ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
|
|
5
|
+
const createStream = async function* () {
|
|
6
|
+
let retryDelay = sseDefaultRetryDelay ?? 3000;
|
|
7
|
+
let attempt = 0;
|
|
8
|
+
const signal = options.signal ?? new AbortController().signal;
|
|
9
|
+
while (true) {
|
|
10
|
+
if (signal.aborted)
|
|
11
|
+
break;
|
|
12
|
+
attempt++;
|
|
13
|
+
const headers = options.headers instanceof Headers
|
|
14
|
+
? options.headers
|
|
15
|
+
: new Headers(options.headers);
|
|
16
|
+
if (lastEventId !== undefined) {
|
|
17
|
+
headers.set('Last-Event-ID', lastEventId);
|
|
18
|
+
}
|
|
19
|
+
try {
|
|
20
|
+
const requestInit = {
|
|
21
|
+
redirect: 'follow',
|
|
22
|
+
...options,
|
|
23
|
+
body: options.serializedBody,
|
|
24
|
+
headers,
|
|
25
|
+
signal,
|
|
26
|
+
};
|
|
27
|
+
let request = new Request(url, requestInit);
|
|
28
|
+
if (onRequest) {
|
|
29
|
+
request = await onRequest(url, requestInit);
|
|
30
|
+
}
|
|
31
|
+
// fetch must be assigned here, otherwise it would throw the error:
|
|
32
|
+
// TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation
|
|
33
|
+
const _fetch = options.fetch ?? globalThis.fetch;
|
|
34
|
+
const response = await _fetch(request);
|
|
35
|
+
if (!response.ok)
|
|
36
|
+
throw new Error(`SSE failed: ${response.status} ${response.statusText}`);
|
|
37
|
+
if (!response.body)
|
|
38
|
+
throw new Error('No body in SSE response');
|
|
39
|
+
const reader = response.body.pipeThrough(new TextDecoderStream()).getReader();
|
|
40
|
+
let buffer = '';
|
|
41
|
+
const abortHandler = () => {
|
|
42
|
+
try {
|
|
43
|
+
reader.cancel();
|
|
44
|
+
}
|
|
45
|
+
catch {
|
|
46
|
+
// noop
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
signal.addEventListener('abort', abortHandler);
|
|
50
|
+
try {
|
|
51
|
+
while (true) {
|
|
52
|
+
const { done, value } = await reader.read();
|
|
53
|
+
if (done)
|
|
54
|
+
break;
|
|
55
|
+
buffer += value;
|
|
56
|
+
buffer = buffer.replace(/\r\n?/g, '\n'); // normalize line endings
|
|
57
|
+
const chunks = buffer.split('\n\n');
|
|
58
|
+
buffer = chunks.pop() ?? '';
|
|
59
|
+
for (const chunk of chunks) {
|
|
60
|
+
const lines = chunk.split('\n');
|
|
61
|
+
const dataLines = [];
|
|
62
|
+
let eventName;
|
|
63
|
+
for (const line of lines) {
|
|
64
|
+
if (line.startsWith('data:')) {
|
|
65
|
+
dataLines.push(line.replace(/^data:\s*/, ''));
|
|
66
|
+
}
|
|
67
|
+
else if (line.startsWith('event:')) {
|
|
68
|
+
eventName = line.replace(/^event:\s*/, '');
|
|
69
|
+
}
|
|
70
|
+
else if (line.startsWith('id:')) {
|
|
71
|
+
lastEventId = line.replace(/^id:\s*/, '');
|
|
72
|
+
}
|
|
73
|
+
else if (line.startsWith('retry:')) {
|
|
74
|
+
const parsed = Number.parseInt(line.replace(/^retry:\s*/, ''), 10);
|
|
75
|
+
if (!Number.isNaN(parsed)) {
|
|
76
|
+
retryDelay = parsed;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
let data;
|
|
81
|
+
let parsedJson = false;
|
|
82
|
+
if (dataLines.length) {
|
|
83
|
+
const rawData = dataLines.join('\n');
|
|
84
|
+
try {
|
|
85
|
+
data = JSON.parse(rawData);
|
|
86
|
+
parsedJson = true;
|
|
87
|
+
}
|
|
88
|
+
catch {
|
|
89
|
+
data = rawData;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
if (parsedJson) {
|
|
93
|
+
if (responseValidator) {
|
|
94
|
+
await responseValidator(data);
|
|
95
|
+
}
|
|
96
|
+
if (responseTransformer) {
|
|
97
|
+
data = await responseTransformer(data);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
onSseEvent?.({
|
|
101
|
+
data,
|
|
102
|
+
event: eventName,
|
|
103
|
+
id: lastEventId,
|
|
104
|
+
retry: retryDelay,
|
|
105
|
+
});
|
|
106
|
+
if (dataLines.length) {
|
|
107
|
+
yield data;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
finally {
|
|
113
|
+
signal.removeEventListener('abort', abortHandler);
|
|
114
|
+
reader.releaseLock();
|
|
115
|
+
}
|
|
116
|
+
break; // exit loop on normal completion
|
|
117
|
+
}
|
|
118
|
+
catch (error) {
|
|
119
|
+
// connection failed or aborted; retry after delay
|
|
120
|
+
onSseError?.(error);
|
|
121
|
+
if (sseMaxRetryAttempts !== undefined && attempt >= sseMaxRetryAttempts) {
|
|
122
|
+
break; // stop after firing error
|
|
123
|
+
}
|
|
124
|
+
// exponential backoff: double retry each attempt, cap at 30s
|
|
125
|
+
const backoff = Math.min(retryDelay * 2 ** (attempt - 1), sseMaxRetryDelay ?? 30000);
|
|
126
|
+
await sleep(backoff);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
const stream = createStream();
|
|
131
|
+
return { stream };
|
|
132
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import type { Auth, AuthToken } from './auth.gen.js';
|
|
2
|
+
import type { BodySerializer, QuerySerializer, QuerySerializerOptions } from './bodySerializer.gen.js';
|
|
3
|
+
export type HttpMethod = 'connect' | 'delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put' | 'trace';
|
|
4
|
+
export type Client<RequestFn = never, Config = unknown, MethodFn = never, BuildUrlFn = never, SseFn = never> = {
|
|
5
|
+
/**
|
|
6
|
+
* Returns the final request URL.
|
|
7
|
+
*/
|
|
8
|
+
buildUrl: BuildUrlFn;
|
|
9
|
+
getConfig: () => Config;
|
|
10
|
+
request: RequestFn;
|
|
11
|
+
setConfig: (config: Config) => Config;
|
|
12
|
+
} & {
|
|
13
|
+
[K in HttpMethod]: MethodFn;
|
|
14
|
+
} & ([SseFn] extends [never] ? {
|
|
15
|
+
sse?: never;
|
|
16
|
+
} : {
|
|
17
|
+
sse: {
|
|
18
|
+
[K in HttpMethod]: SseFn;
|
|
19
|
+
};
|
|
20
|
+
});
|
|
21
|
+
export interface Config {
|
|
22
|
+
/**
|
|
23
|
+
* Auth token or a function returning auth token. The resolved value will be
|
|
24
|
+
* added to the request payload as defined by its `security` array.
|
|
25
|
+
*/
|
|
26
|
+
auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;
|
|
27
|
+
/**
|
|
28
|
+
* A function for serializing request body parameter. By default,
|
|
29
|
+
* {@link JSON.stringify()} will be used.
|
|
30
|
+
*/
|
|
31
|
+
bodySerializer?: BodySerializer | null;
|
|
32
|
+
/**
|
|
33
|
+
* An object containing any HTTP headers that you want to pre-populate your
|
|
34
|
+
* `Headers` object with.
|
|
35
|
+
*
|
|
36
|
+
* {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}
|
|
37
|
+
*/
|
|
38
|
+
headers?: RequestInit['headers'] | Record<string, string | number | boolean | (string | number | boolean)[] | null | undefined | unknown>;
|
|
39
|
+
/**
|
|
40
|
+
* The request method.
|
|
41
|
+
*
|
|
42
|
+
* {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}
|
|
43
|
+
*/
|
|
44
|
+
method?: Uppercase<HttpMethod>;
|
|
45
|
+
/**
|
|
46
|
+
* A function for serializing request query parameters. By default, arrays
|
|
47
|
+
* will be exploded in form style, objects will be exploded in deepObject
|
|
48
|
+
* style, and reserved characters are percent-encoded.
|
|
49
|
+
*
|
|
50
|
+
* This method will have no effect if the native `paramsSerializer()` Axios
|
|
51
|
+
* API function is used.
|
|
52
|
+
*
|
|
53
|
+
* {@link https://swagger.io/docs/specification/serialization/#query View examples}
|
|
54
|
+
*/
|
|
55
|
+
querySerializer?: QuerySerializer | QuerySerializerOptions;
|
|
56
|
+
/**
|
|
57
|
+
* A function validating request data. This is useful if you want to ensure
|
|
58
|
+
* the request conforms to the desired shape, so it can be safely sent to
|
|
59
|
+
* the server.
|
|
60
|
+
*/
|
|
61
|
+
requestValidator?: (data: unknown) => Promise<unknown>;
|
|
62
|
+
/**
|
|
63
|
+
* A function transforming response data before it's returned. This is useful
|
|
64
|
+
* for post-processing data, e.g., converting ISO strings into Date objects.
|
|
65
|
+
*/
|
|
66
|
+
responseTransformer?: (data: unknown) => Promise<unknown>;
|
|
67
|
+
/**
|
|
68
|
+
* A function validating response data. This is useful if you want to ensure
|
|
69
|
+
* the response conforms to the desired shape, so it can be safely passed to
|
|
70
|
+
* the transformers and returned to the user.
|
|
71
|
+
*/
|
|
72
|
+
responseValidator?: (data: unknown) => Promise<unknown>;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Arbitrary metadata passed through the `meta` request option.
|
|
76
|
+
*/
|
|
77
|
+
export interface ClientMeta {
|
|
78
|
+
}
|
|
79
|
+
type IsExactlyNeverOrNeverUndefined<T> = [T] extends [never] ? true : [T] extends [never | undefined] ? [undefined] extends [T] ? false : true : false;
|
|
80
|
+
export type OmitNever<T extends Record<string, unknown>> = {
|
|
81
|
+
[K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];
|
|
82
|
+
};
|
|
83
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { BodySerializer, QuerySerializer } from './bodySerializer.gen.js';
|
|
2
|
+
export interface PathSerializer {
|
|
3
|
+
path: Record<string, unknown>;
|
|
4
|
+
url: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const PATH_PARAM_RE: RegExp;
|
|
7
|
+
export declare const defaultPathSerializer: ({ path, url: _url }: PathSerializer) => string;
|
|
8
|
+
export declare const getUrl: ({ baseUrl, path, query, querySerializer, url: _url, }: {
|
|
9
|
+
baseUrl?: string;
|
|
10
|
+
path?: Record<string, unknown>;
|
|
11
|
+
query?: Record<string, unknown>;
|
|
12
|
+
querySerializer: QuerySerializer;
|
|
13
|
+
url: string;
|
|
14
|
+
}) => string;
|
|
15
|
+
export declare function getValidRequestBody(options: {
|
|
16
|
+
body?: unknown;
|
|
17
|
+
bodySerializer?: BodySerializer | null;
|
|
18
|
+
serializedBody?: unknown;
|
|
19
|
+
}): unknown;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
+
import { serializeArrayParam, serializeObjectParam, serializePrimitiveParam, } from './pathSerializer.gen.js';
|
|
3
|
+
export const PATH_PARAM_RE = /\{[^{}]+\}/g;
|
|
4
|
+
export const defaultPathSerializer = ({ path, url: _url }) => {
|
|
5
|
+
let url = _url;
|
|
6
|
+
const matches = _url.match(PATH_PARAM_RE);
|
|
7
|
+
if (matches) {
|
|
8
|
+
for (const match of matches) {
|
|
9
|
+
let explode = false;
|
|
10
|
+
let name = match.substring(1, match.length - 1);
|
|
11
|
+
let style = 'simple';
|
|
12
|
+
if (name.endsWith('*')) {
|
|
13
|
+
explode = true;
|
|
14
|
+
name = name.substring(0, name.length - 1);
|
|
15
|
+
}
|
|
16
|
+
if (name.startsWith('.')) {
|
|
17
|
+
name = name.substring(1);
|
|
18
|
+
style = 'label';
|
|
19
|
+
}
|
|
20
|
+
else if (name.startsWith(';')) {
|
|
21
|
+
name = name.substring(1);
|
|
22
|
+
style = 'matrix';
|
|
23
|
+
}
|
|
24
|
+
const value = path[name];
|
|
25
|
+
if (value === undefined || value === null) {
|
|
26
|
+
continue;
|
|
27
|
+
}
|
|
28
|
+
if (Array.isArray(value)) {
|
|
29
|
+
url = url.replace(match, serializeArrayParam({ explode, name, style, value }));
|
|
30
|
+
continue;
|
|
31
|
+
}
|
|
32
|
+
if (typeof value === 'object') {
|
|
33
|
+
url = url.replace(match, serializeObjectParam({
|
|
34
|
+
explode,
|
|
35
|
+
name,
|
|
36
|
+
style,
|
|
37
|
+
value: value,
|
|
38
|
+
valueOnly: true,
|
|
39
|
+
}));
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
if (style === 'matrix') {
|
|
43
|
+
url = url.replace(match, `;${serializePrimitiveParam({
|
|
44
|
+
name,
|
|
45
|
+
value: value,
|
|
46
|
+
})}`);
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
const replaceValue = encodeURIComponent(style === 'label' ? `.${value}` : value);
|
|
50
|
+
url = url.replace(match, replaceValue);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return url;
|
|
54
|
+
};
|
|
55
|
+
export const getUrl = ({ baseUrl, path, query, querySerializer, url: _url, }) => {
|
|
56
|
+
const pathUrl = _url.startsWith('/') ? _url : `/${_url}`;
|
|
57
|
+
let url = (baseUrl ?? '') + pathUrl;
|
|
58
|
+
if (path) {
|
|
59
|
+
url = defaultPathSerializer({ path, url });
|
|
60
|
+
}
|
|
61
|
+
let search = query ? querySerializer(query) : '';
|
|
62
|
+
if (search.startsWith('?')) {
|
|
63
|
+
search = search.substring(1);
|
|
64
|
+
}
|
|
65
|
+
if (search) {
|
|
66
|
+
url += `?${search}`;
|
|
67
|
+
}
|
|
68
|
+
return url;
|
|
69
|
+
};
|
|
70
|
+
export function getValidRequestBody(options) {
|
|
71
|
+
const hasBody = options.body !== undefined;
|
|
72
|
+
const isSerializedBody = hasBody && options.bodySerializer;
|
|
73
|
+
if (isSerializedBody) {
|
|
74
|
+
if ('serializedBody' in options) {
|
|
75
|
+
const hasSerializedBody = options.serializedBody !== undefined && options.serializedBody !== '';
|
|
76
|
+
return hasSerializedBody ? options.serializedBody : null;
|
|
77
|
+
}
|
|
78
|
+
// not all clients implement a serializedBody property (i.e., client-axios)
|
|
79
|
+
return options.body !== '' ? options.body : null;
|
|
80
|
+
}
|
|
81
|
+
// plain/text body
|
|
82
|
+
if (hasBody) {
|
|
83
|
+
return options.body;
|
|
84
|
+
}
|
|
85
|
+
// no body was provided
|
|
86
|
+
return undefined;
|
|
87
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { type Options, ProtectionSdk } from './sdk.gen.js';
|
|
2
|
+
export type { AddExceptionGroupDomainsData, AddExceptionGroupDomainsError, AddExceptionGroupDomainsErrors, AddExceptionGroupDomainsResponse, AddExceptionGroupDomainsResponses, AddPolicyExceptionGroupData, AddPolicyExceptionGroupError, AddPolicyExceptionGroupErrors, AddPolicyExceptionGroupResponse, AddPolicyExceptionGroupResponses, AllowAppBlockerCategoriesData, AllowAppBlockerCategoriesError, AllowAppBlockerCategoriesErrors, AllowAppBlockerCategoriesResponse, AllowAppBlockerCategoriesResponses, AllowCategoriesData, AllowCategoriesError, AllowCategoriesErrors, AllowCategoriesResponse, AllowCategoriesResponses, AllowCountriesData, AllowCountriesError, AllowCountriesErrors, AllowCountriesResponse, AllowCountriesResponses, AllowMalwareCategoriesData, AllowMalwareCategoriesError, AllowMalwareCategoriesErrors, AllowMalwareCategoriesResponse, AllowMalwareCategoriesResponses, AllowTldsData, AllowTldsError, AllowTldsErrors, AllowTldsResponse, AllowTldsResponses, BaseNetwork, BlockAppBlockerCategoriesData, BlockAppBlockerCategoriesError, BlockAppBlockerCategoriesErrors, BlockAppBlockerCategoriesResponse, BlockAppBlockerCategoriesResponses, BlockCategoriesData, BlockCategoriesError, BlockCategoriesErrors, BlockCategoriesResponse, BlockCategoriesResponses, BlockCountriesData, BlockCountriesError, BlockCountriesErrors, BlockCountriesResponse, BlockCountriesResponses, BlockedCategoryWithSchedule, BlockedCategoryWithTimeBlock, BlockedCountry, BlockMalwareCategoriesData, BlockMalwareCategoriesError, BlockMalwareCategoriesErrors, BlockMalwareCategoriesResponse, BlockMalwareCategoriesResponses, BlockTldsData, BlockTldsError, BlockTldsErrors, BlockTldsResponse, BlockTldsResponses, Category, CategoryBlockedOnPolicy, CategoryIds, CategoryMultiStatus, CategorySchedule, CategoryScheduleRequest, ClientOptions, ContinentWithCountries, Country, CountryIds, CountryMultiStatus, CreateExceptionGroupData, CreateExceptionGroupError, CreateExceptionGroupErrors, CreateExceptionGroupResponse, CreateExceptionGroupResponses, CreatePolicyData, CreatePolicyError, CreatePolicyErrors, CreatePolicyResponse, CreatePolicyResponses, DeleteExceptionGroupData, DeleteExceptionGroupError, DeleteExceptionGroupErrors, DeleteExceptionGroupResponse, DeleteExceptionGroupResponses, DeletePolicyData, DeletePolicyError, DeletePolicyErrors, DeletePolicyResponse, DeletePolicyResponses, DisableDynamicDnsRedirectData, DisableDynamicDnsRedirectError, DisableDynamicDnsRedirectErrors, DisableDynamicDnsRedirectResponse, DisableDynamicDnsRedirectResponses, Domain, DomainId, DomainInExceptionGroup, DomainInput, DomainNote, Domains, DynamicDnsRedirect, EnableDynamicDnsRedirectData, EnableDynamicDnsRedirectError, EnableDynamicDnsRedirectErrors, EnableDynamicDnsRedirectResponse, EnableDynamicDnsRedirectResponses, ExceptionGroup, ExceptionGroupCreation, ExceptionGroupCreation2, ExceptionGroupId, ExceptionGroupId2, ExceptionGroupUpdate, ExceptionGroupUpdate2, ExceptionGroupWithDomains, ExceptionGroupWithDomainsAndPolicies, FlashStartErrorBody, GetDynamicDnsRedirectData, GetDynamicDnsRedirectError, GetDynamicDnsRedirectErrors, GetDynamicDnsRedirectResponse, GetDynamicDnsRedirectResponses, GetPolicyData, GetPolicyError, GetPolicyErrors, GetPolicyResponse, GetPolicyResponses, GetPolicySettingsData, GetPolicySettingsError, GetPolicySettingsErrors, GetPolicySettingsResponse, GetPolicySettingsResponses, GetTldData, GetTldError, GetTldErrors, GetTldResponse, GetTldResponses, IncludeAssociatedPolicies, IncludeNetworkCount, Lang, ListAppBlockerCategoriesData, ListAppBlockerCategoriesError, ListAppBlockerCategoriesErrors, ListAppBlockerCategoriesResponse, ListAppBlockerCategoriesResponses, ListAppBlockerCategoryMacrosData, ListAppBlockerCategoryMacrosError, ListAppBlockerCategoryMacrosErrors, ListAppBlockerCategoryMacrosResponse, ListAppBlockerCategoryMacrosResponses, ListBlockedAppBlockerCategoriesData, ListBlockedAppBlockerCategoriesError, ListBlockedAppBlockerCategoriesErrors, ListBlockedAppBlockerCategoriesResponse, ListBlockedAppBlockerCategoriesResponses, ListBlockedCategoriesData, ListBlockedCategoriesError, ListBlockedCategoriesErrors, ListBlockedCategoriesResponse, ListBlockedCategoriesResponses, ListBlockedCountriesData, ListBlockedCountriesError, ListBlockedCountriesErrors, ListBlockedCountriesResponse, ListBlockedCountriesResponses, ListBlockedMalwareCategoriesData, ListBlockedMalwareCategoriesError, ListBlockedMalwareCategoriesErrors, ListBlockedMalwareCategoriesResponse, ListBlockedMalwareCategoriesResponses, ListBlockedTldsData, ListBlockedTldsError, ListBlockedTldsErrors, ListBlockedTldsResponse, ListBlockedTldsResponses, ListCategoriesData, ListCategoriesError, ListCategoriesErrors, ListCategoriesResponse, ListCategoriesResponses, ListCategoryMacrosData, ListCategoryMacrosError, ListCategoryMacrosErrors, ListCategoryMacrosResponse, ListCategoryMacrosResponses, ListContinentsData, ListContinentsError, ListContinentsErrors, ListContinentsResponse, ListContinentsResponses, ListCountriesData, ListCountriesError, ListCountriesErrors, ListCountriesResponse, ListCountriesResponses, ListExceptionGroupDomainsData, ListExceptionGroupDomainsError, ListExceptionGroupDomainsErrors, ListExceptionGroupDomainsResponse, ListExceptionGroupDomainsResponses, ListExceptionGroupsData, ListExceptionGroupsError, ListExceptionGroupsErrors, ListExceptionGroupsResponse, ListExceptionGroupsResponses, ListMalwareCategoriesData, ListMalwareCategoriesError, ListMalwareCategoriesErrors, ListMalwareCategoriesResponse, ListMalwareCategoriesResponses, ListMalwareCategoryMacrosData, ListMalwareCategoryMacrosError, ListMalwareCategoryMacrosErrors, ListMalwareCategoryMacrosResponse, ListMalwareCategoryMacrosResponses, ListPoliciesData, ListPoliciesError, ListPoliciesErrors, ListPoliciesResponse, ListPoliciesResponses, ListPolicyExceptionGroupsData, ListPolicyExceptionGroupsError, ListPolicyExceptionGroupsErrors, ListPolicyExceptionGroupsResponse, ListPolicyExceptionGroupsResponses, ListProtectionTemplatesData, ListProtectionTemplatesError, ListProtectionTemplatesErrors, ListProtectionTemplatesResponse, ListProtectionTemplatesResponses, ListTemplateCategoriesData, ListTemplateCategoriesError, ListTemplateCategoriesErrors, ListTemplateCategoriesResponse, ListTemplateCategoriesResponses, ListTldMacrosData, ListTldMacrosError, ListTldMacrosErrors, ListTldMacrosResponse, ListTldMacrosResponses, ListTldsData, ListTldsError, ListTldsErrors, ListTldsResponse, ListTldsResponses, MacroCategoryWithCategories, MacroTldWithTlds, MissingCredentialsErrorBody, MultiStatusBlockedCountry, MultiStatusCategoryBlockedOnPolicy, MultiStatusTldBlockedOnPolicy, OrganizationId, Policy, PolicyCreation, PolicyCreation2, PolicyExceptionGroup, PolicyId, PolicySettings, PolicySettingsUpdate, PolicySettingsUpdate2, PolicyUpdate, PolicyUpdate2, PolicyWithNetworks, RemoveAppBlockerCategoryBlockScheduleData, RemoveAppBlockerCategoryBlockScheduleError, RemoveAppBlockerCategoryBlockScheduleErrors, RemoveAppBlockerCategoryBlockScheduleResponse, RemoveAppBlockerCategoryBlockScheduleResponses, RemoveCategoryBlockScheduleData, RemoveCategoryBlockScheduleError, RemoveCategoryBlockScheduleErrors, RemoveCategoryBlockScheduleResponse, RemoveCategoryBlockScheduleResponses, RemoveExceptionGroupDomainData, RemoveExceptionGroupDomainError, RemoveExceptionGroupDomainErrors, RemoveExceptionGroupDomainResponse, RemoveExceptionGroupDomainResponses, RemoveMalwareCategoryBlockScheduleData, RemoveMalwareCategoryBlockScheduleError, RemoveMalwareCategoryBlockScheduleErrors, RemoveMalwareCategoryBlockScheduleResponse, RemoveMalwareCategoryBlockScheduleResponses, RemovePolicyExceptionGroupData, RemovePolicyExceptionGroupError, RemovePolicyExceptionGroupErrors, RemovePolicyExceptionGroupResponse, RemovePolicyExceptionGroupResponses, SchedulationId, ScheduleAppBlockerCategoryBlockData, ScheduleAppBlockerCategoryBlockError, ScheduleAppBlockerCategoryBlockErrors, ScheduleAppBlockerCategoryBlockResponse, ScheduleAppBlockerCategoryBlockResponses, ScheduleCategoryBlockData, ScheduleCategoryBlockError, ScheduleCategoryBlockErrors, ScheduleCategoryBlockResponse, ScheduleCategoryBlockResponses, ScheduleMalwareCategoryBlockData, ScheduleMalwareCategoryBlockError, ScheduleMalwareCategoryBlockErrors, ScheduleMalwareCategoryBlockResponse, ScheduleMalwareCategoryBlockResponses, TemplateId, TemplateWithConfigData, TimeBlock, TimeBlockRequest, Tld, TldBlockedOnPolicy, TldIds, TldMultiStatus, TldName, UpdateExceptionGroupData, UpdateExceptionGroupDomainNoteData, UpdateExceptionGroupDomainNoteError, UpdateExceptionGroupDomainNoteErrors, UpdateExceptionGroupDomainNoteResponse, UpdateExceptionGroupDomainNoteResponses, UpdateExceptionGroupError, UpdateExceptionGroupErrors, UpdateExceptionGroupResponse, UpdateExceptionGroupResponses, UpdatePolicyData, UpdatePolicyError, UpdatePolicyErrors, UpdatePolicyResponse, UpdatePolicyResponses, UpdatePolicySettingsData, UpdatePolicySettingsError, UpdatePolicySettingsErrors, UpdatePolicySettingsResponse, UpdatePolicySettingsResponses, Uuid } from './types.gen.js';
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
import type { Client, ClientMeta, Options as Options2, RequestResult, TDataShape } from './client/index.js';
|
|
2
|
+
import type { AddExceptionGroupDomainsData, AddExceptionGroupDomainsErrors, AddExceptionGroupDomainsResponses, AddPolicyExceptionGroupData, AddPolicyExceptionGroupErrors, AddPolicyExceptionGroupResponses, AllowAppBlockerCategoriesData, AllowAppBlockerCategoriesErrors, AllowAppBlockerCategoriesResponses, AllowCategoriesData, AllowCategoriesErrors, AllowCategoriesResponses, AllowCountriesData, AllowCountriesErrors, AllowCountriesResponses, AllowMalwareCategoriesData, AllowMalwareCategoriesErrors, AllowMalwareCategoriesResponses, AllowTldsData, AllowTldsErrors, AllowTldsResponses, BlockAppBlockerCategoriesData, BlockAppBlockerCategoriesErrors, BlockAppBlockerCategoriesResponses, BlockCategoriesData, BlockCategoriesErrors, BlockCategoriesResponses, BlockCountriesData, BlockCountriesErrors, BlockCountriesResponses, BlockMalwareCategoriesData, BlockMalwareCategoriesErrors, BlockMalwareCategoriesResponses, BlockTldsData, BlockTldsErrors, BlockTldsResponses, CreateExceptionGroupData, CreateExceptionGroupErrors, CreateExceptionGroupResponses, CreatePolicyData, CreatePolicyErrors, CreatePolicyResponses, DeleteExceptionGroupData, DeleteExceptionGroupErrors, DeleteExceptionGroupResponses, DeletePolicyData, DeletePolicyErrors, DeletePolicyResponses, DisableDynamicDnsRedirectData, DisableDynamicDnsRedirectErrors, DisableDynamicDnsRedirectResponses, EnableDynamicDnsRedirectData, EnableDynamicDnsRedirectErrors, EnableDynamicDnsRedirectResponses, GetDynamicDnsRedirectData, GetDynamicDnsRedirectErrors, GetDynamicDnsRedirectResponses, GetPolicyData, GetPolicyErrors, GetPolicyResponses, GetPolicySettingsData, GetPolicySettingsErrors, GetPolicySettingsResponses, GetTldData, GetTldErrors, GetTldResponses, ListAppBlockerCategoriesData, ListAppBlockerCategoriesErrors, ListAppBlockerCategoriesResponses, ListAppBlockerCategoryMacrosData, ListAppBlockerCategoryMacrosErrors, ListAppBlockerCategoryMacrosResponses, ListBlockedAppBlockerCategoriesData, ListBlockedAppBlockerCategoriesErrors, ListBlockedAppBlockerCategoriesResponses, ListBlockedCategoriesData, ListBlockedCategoriesErrors, ListBlockedCategoriesResponses, ListBlockedCountriesData, ListBlockedCountriesErrors, ListBlockedCountriesResponses, ListBlockedMalwareCategoriesData, ListBlockedMalwareCategoriesErrors, ListBlockedMalwareCategoriesResponses, ListBlockedTldsData, ListBlockedTldsErrors, ListBlockedTldsResponses, ListCategoriesData, ListCategoriesErrors, ListCategoriesResponses, ListCategoryMacrosData, ListCategoryMacrosErrors, ListCategoryMacrosResponses, ListContinentsData, ListContinentsErrors, ListContinentsResponses, ListCountriesData, ListCountriesErrors, ListCountriesResponses, ListExceptionGroupDomainsData, ListExceptionGroupDomainsErrors, ListExceptionGroupDomainsResponses, ListExceptionGroupsData, ListExceptionGroupsErrors, ListExceptionGroupsResponses, ListMalwareCategoriesData, ListMalwareCategoriesErrors, ListMalwareCategoriesResponses, ListMalwareCategoryMacrosData, ListMalwareCategoryMacrosErrors, ListMalwareCategoryMacrosResponses, ListPoliciesData, ListPoliciesErrors, ListPoliciesResponses, ListPolicyExceptionGroupsData, ListPolicyExceptionGroupsErrors, ListPolicyExceptionGroupsResponses, ListProtectionTemplatesData, ListProtectionTemplatesErrors, ListProtectionTemplatesResponses, ListTemplateCategoriesData, ListTemplateCategoriesErrors, ListTemplateCategoriesResponses, ListTldMacrosData, ListTldMacrosErrors, ListTldMacrosResponses, ListTldsData, ListTldsErrors, ListTldsResponses, RemoveAppBlockerCategoryBlockScheduleData, RemoveAppBlockerCategoryBlockScheduleErrors, RemoveAppBlockerCategoryBlockScheduleResponses, RemoveCategoryBlockScheduleData, RemoveCategoryBlockScheduleErrors, RemoveCategoryBlockScheduleResponses, RemoveExceptionGroupDomainData, RemoveExceptionGroupDomainErrors, RemoveExceptionGroupDomainResponses, RemoveMalwareCategoryBlockScheduleData, RemoveMalwareCategoryBlockScheduleErrors, RemoveMalwareCategoryBlockScheduleResponses, RemovePolicyExceptionGroupData, RemovePolicyExceptionGroupErrors, RemovePolicyExceptionGroupResponses, ScheduleAppBlockerCategoryBlockData, ScheduleAppBlockerCategoryBlockErrors, ScheduleAppBlockerCategoryBlockResponses, ScheduleCategoryBlockData, ScheduleCategoryBlockErrors, ScheduleCategoryBlockResponses, ScheduleMalwareCategoryBlockData, ScheduleMalwareCategoryBlockErrors, ScheduleMalwareCategoryBlockResponses, UpdateExceptionGroupData, UpdateExceptionGroupDomainNoteData, UpdateExceptionGroupDomainNoteErrors, UpdateExceptionGroupDomainNoteResponses, UpdateExceptionGroupErrors, UpdateExceptionGroupResponses, UpdatePolicyData, UpdatePolicyErrors, UpdatePolicyResponses, UpdatePolicySettingsData, UpdatePolicySettingsErrors, UpdatePolicySettingsResponses } from './types.gen.js';
|
|
3
|
+
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
|
|
4
|
+
/**
|
|
5
|
+
* You can provide a client instance returned by `createClient()` instead of
|
|
6
|
+
* individual options. This might be also useful if you want to implement a
|
|
7
|
+
* custom client.
|
|
8
|
+
*/
|
|
9
|
+
client?: Client;
|
|
10
|
+
/**
|
|
11
|
+
* You can pass arbitrary values through the `meta` object. This can be
|
|
12
|
+
* used to access values that aren't defined as part of the SDK function.
|
|
13
|
+
*/
|
|
14
|
+
meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;
|
|
15
|
+
};
|
|
16
|
+
declare class HeyApiClient {
|
|
17
|
+
protected client: Client;
|
|
18
|
+
constructor(args?: {
|
|
19
|
+
client?: Client;
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
declare class HeyApiRegistry<T> {
|
|
23
|
+
private readonly defaultKey;
|
|
24
|
+
private readonly instances;
|
|
25
|
+
get(key?: string): T;
|
|
26
|
+
set(value: T, key?: string): void;
|
|
27
|
+
}
|
|
28
|
+
export declare class ProtectionSdk extends HeyApiClient {
|
|
29
|
+
static readonly __registry: HeyApiRegistry<ProtectionSdk>;
|
|
30
|
+
constructor(args?: {
|
|
31
|
+
client?: Client;
|
|
32
|
+
key?: string;
|
|
33
|
+
});
|
|
34
|
+
/**
|
|
35
|
+
* List policies
|
|
36
|
+
*/
|
|
37
|
+
listPolicies<ThrowOnError extends boolean = false>(options?: Options<ListPoliciesData, ThrowOnError>): RequestResult<ListPoliciesResponses, ListPoliciesErrors, ThrowOnError>;
|
|
38
|
+
/**
|
|
39
|
+
* Create a policy
|
|
40
|
+
*/
|
|
41
|
+
createPolicy<ThrowOnError extends boolean = false>(options: Options<CreatePolicyData, ThrowOnError>): RequestResult<CreatePolicyResponses, CreatePolicyErrors, ThrowOnError>;
|
|
42
|
+
/**
|
|
43
|
+
* Delete a policy
|
|
44
|
+
*/
|
|
45
|
+
deletePolicy<ThrowOnError extends boolean = false>(options: Options<DeletePolicyData, ThrowOnError>): RequestResult<DeletePolicyResponses, DeletePolicyErrors, ThrowOnError>;
|
|
46
|
+
/**
|
|
47
|
+
* Get a policy
|
|
48
|
+
*/
|
|
49
|
+
getPolicy<ThrowOnError extends boolean = false>(options: Options<GetPolicyData, ThrowOnError>): RequestResult<GetPolicyResponses, GetPolicyErrors, ThrowOnError>;
|
|
50
|
+
/**
|
|
51
|
+
* Update a policy
|
|
52
|
+
*/
|
|
53
|
+
updatePolicy<ThrowOnError extends boolean = false>(options: Options<UpdatePolicyData, ThrowOnError>): RequestResult<UpdatePolicyResponses, UpdatePolicyErrors, ThrowOnError>;
|
|
54
|
+
/**
|
|
55
|
+
* Get policy settings
|
|
56
|
+
*/
|
|
57
|
+
getPolicySettings<ThrowOnError extends boolean = false>(options: Options<GetPolicySettingsData, ThrowOnError>): RequestResult<GetPolicySettingsResponses, GetPolicySettingsErrors, ThrowOnError>;
|
|
58
|
+
/**
|
|
59
|
+
* Update policy settings
|
|
60
|
+
*/
|
|
61
|
+
updatePolicySettings<ThrowOnError extends boolean = false>(options: Options<UpdatePolicySettingsData, ThrowOnError>): RequestResult<UpdatePolicySettingsResponses, UpdatePolicySettingsErrors, ThrowOnError>;
|
|
62
|
+
/**
|
|
63
|
+
* List a policy's exception groups
|
|
64
|
+
*/
|
|
65
|
+
listPolicyExceptionGroups<ThrowOnError extends boolean = false>(options: Options<ListPolicyExceptionGroupsData, ThrowOnError>): RequestResult<ListPolicyExceptionGroupsResponses, ListPolicyExceptionGroupsErrors, ThrowOnError>;
|
|
66
|
+
/**
|
|
67
|
+
* Add an exception group to a policy
|
|
68
|
+
*/
|
|
69
|
+
addPolicyExceptionGroup<ThrowOnError extends boolean = false>(options: Options<AddPolicyExceptionGroupData, ThrowOnError>): RequestResult<AddPolicyExceptionGroupResponses, AddPolicyExceptionGroupErrors, ThrowOnError>;
|
|
70
|
+
/**
|
|
71
|
+
* Remove an exception group from a policy
|
|
72
|
+
*/
|
|
73
|
+
removePolicyExceptionGroup<ThrowOnError extends boolean = false>(options: Options<RemovePolicyExceptionGroupData, ThrowOnError>): RequestResult<RemovePolicyExceptionGroupResponses, RemovePolicyExceptionGroupErrors, ThrowOnError>;
|
|
74
|
+
/**
|
|
75
|
+
* Disable dynamic DNS redirect
|
|
76
|
+
*/
|
|
77
|
+
disableDynamicDnsRedirect<ThrowOnError extends boolean = false>(options: Options<DisableDynamicDnsRedirectData, ThrowOnError>): RequestResult<DisableDynamicDnsRedirectResponses, DisableDynamicDnsRedirectErrors, ThrowOnError>;
|
|
78
|
+
/**
|
|
79
|
+
* Get dynamic DNS redirect status
|
|
80
|
+
*/
|
|
81
|
+
getDynamicDnsRedirect<ThrowOnError extends boolean = false>(options: Options<GetDynamicDnsRedirectData, ThrowOnError>): RequestResult<GetDynamicDnsRedirectResponses, GetDynamicDnsRedirectErrors, ThrowOnError>;
|
|
82
|
+
/**
|
|
83
|
+
* Enable dynamic DNS redirect
|
|
84
|
+
*/
|
|
85
|
+
enableDynamicDnsRedirect<ThrowOnError extends boolean = false>(options: Options<EnableDynamicDnsRedirectData, ThrowOnError>): RequestResult<EnableDynamicDnsRedirectResponses, EnableDynamicDnsRedirectErrors, ThrowOnError>;
|
|
86
|
+
/**
|
|
87
|
+
* Allow categories
|
|
88
|
+
*/
|
|
89
|
+
allowCategories<ThrowOnError extends boolean = false>(options: Options<AllowCategoriesData, ThrowOnError>): RequestResult<AllowCategoriesResponses, AllowCategoriesErrors, ThrowOnError>;
|
|
90
|
+
/**
|
|
91
|
+
* List blocked categories
|
|
92
|
+
*/
|
|
93
|
+
listBlockedCategories<ThrowOnError extends boolean = false>(options: Options<ListBlockedCategoriesData, ThrowOnError>): RequestResult<ListBlockedCategoriesResponses, ListBlockedCategoriesErrors, ThrowOnError>;
|
|
94
|
+
/**
|
|
95
|
+
* Block categories
|
|
96
|
+
*/
|
|
97
|
+
blockCategories<ThrowOnError extends boolean = false>(options: Options<BlockCategoriesData, ThrowOnError>): RequestResult<BlockCategoriesResponses, BlockCategoriesErrors, ThrowOnError>;
|
|
98
|
+
/**
|
|
99
|
+
* Allow app blocker categories
|
|
100
|
+
*/
|
|
101
|
+
allowAppBlockerCategories<ThrowOnError extends boolean = false>(options: Options<AllowAppBlockerCategoriesData, ThrowOnError>): RequestResult<AllowAppBlockerCategoriesResponses, AllowAppBlockerCategoriesErrors, ThrowOnError>;
|
|
102
|
+
/**
|
|
103
|
+
* List blocked app blocker categories
|
|
104
|
+
*/
|
|
105
|
+
listBlockedAppBlockerCategories<ThrowOnError extends boolean = false>(options: Options<ListBlockedAppBlockerCategoriesData, ThrowOnError>): RequestResult<ListBlockedAppBlockerCategoriesResponses, ListBlockedAppBlockerCategoriesErrors, ThrowOnError>;
|
|
106
|
+
/**
|
|
107
|
+
* Block app blocker categories
|
|
108
|
+
*/
|
|
109
|
+
blockAppBlockerCategories<ThrowOnError extends boolean = false>(options: Options<BlockAppBlockerCategoriesData, ThrowOnError>): RequestResult<BlockAppBlockerCategoriesResponses, BlockAppBlockerCategoriesErrors, ThrowOnError>;
|
|
110
|
+
/**
|
|
111
|
+
* Allow malware categories
|
|
112
|
+
*/
|
|
113
|
+
allowMalwareCategories<ThrowOnError extends boolean = false>(options: Options<AllowMalwareCategoriesData, ThrowOnError>): RequestResult<AllowMalwareCategoriesResponses, AllowMalwareCategoriesErrors, ThrowOnError>;
|
|
114
|
+
/**
|
|
115
|
+
* List blocked malware categories
|
|
116
|
+
*/
|
|
117
|
+
listBlockedMalwareCategories<ThrowOnError extends boolean = false>(options: Options<ListBlockedMalwareCategoriesData, ThrowOnError>): RequestResult<ListBlockedMalwareCategoriesResponses, ListBlockedMalwareCategoriesErrors, ThrowOnError>;
|
|
118
|
+
/**
|
|
119
|
+
* Block malware categories
|
|
120
|
+
*/
|
|
121
|
+
blockMalwareCategories<ThrowOnError extends boolean = false>(options: Options<BlockMalwareCategoriesData, ThrowOnError>): RequestResult<BlockMalwareCategoriesResponses, BlockMalwareCategoriesErrors, ThrowOnError>;
|
|
122
|
+
/**
|
|
123
|
+
* Schedule a category block
|
|
124
|
+
*/
|
|
125
|
+
scheduleCategoryBlock<ThrowOnError extends boolean = false>(options: Options<ScheduleCategoryBlockData, ThrowOnError>): RequestResult<ScheduleCategoryBlockResponses, ScheduleCategoryBlockErrors, ThrowOnError>;
|
|
126
|
+
/**
|
|
127
|
+
* Remove a category block schedule
|
|
128
|
+
*/
|
|
129
|
+
removeCategoryBlockSchedule<ThrowOnError extends boolean = false>(options: Options<RemoveCategoryBlockScheduleData, ThrowOnError>): RequestResult<RemoveCategoryBlockScheduleResponses, RemoveCategoryBlockScheduleErrors, ThrowOnError>;
|
|
130
|
+
/**
|
|
131
|
+
* Schedule an app blocker category block
|
|
132
|
+
*/
|
|
133
|
+
scheduleAppBlockerCategoryBlock<ThrowOnError extends boolean = false>(options: Options<ScheduleAppBlockerCategoryBlockData, ThrowOnError>): RequestResult<ScheduleAppBlockerCategoryBlockResponses, ScheduleAppBlockerCategoryBlockErrors, ThrowOnError>;
|
|
134
|
+
/**
|
|
135
|
+
* Remove an app blocker category block schedule
|
|
136
|
+
*/
|
|
137
|
+
removeAppBlockerCategoryBlockSchedule<ThrowOnError extends boolean = false>(options: Options<RemoveAppBlockerCategoryBlockScheduleData, ThrowOnError>): RequestResult<RemoveAppBlockerCategoryBlockScheduleResponses, RemoveAppBlockerCategoryBlockScheduleErrors, ThrowOnError>;
|
|
138
|
+
/**
|
|
139
|
+
* Schedule a malware category block
|
|
140
|
+
*/
|
|
141
|
+
scheduleMalwareCategoryBlock<ThrowOnError extends boolean = false>(options: Options<ScheduleMalwareCategoryBlockData, ThrowOnError>): RequestResult<ScheduleMalwareCategoryBlockResponses, ScheduleMalwareCategoryBlockErrors, ThrowOnError>;
|
|
142
|
+
/**
|
|
143
|
+
* Remove a malware category block schedule
|
|
144
|
+
*/
|
|
145
|
+
removeMalwareCategoryBlockSchedule<ThrowOnError extends boolean = false>(options: Options<RemoveMalwareCategoryBlockScheduleData, ThrowOnError>): RequestResult<RemoveMalwareCategoryBlockScheduleResponses, RemoveMalwareCategoryBlockScheduleErrors, ThrowOnError>;
|
|
146
|
+
/**
|
|
147
|
+
* Allow countries
|
|
148
|
+
*/
|
|
149
|
+
allowCountries<ThrowOnError extends boolean = false>(options: Options<AllowCountriesData, ThrowOnError>): RequestResult<AllowCountriesResponses, AllowCountriesErrors, ThrowOnError>;
|
|
150
|
+
/**
|
|
151
|
+
* List blocked countries
|
|
152
|
+
*/
|
|
153
|
+
listBlockedCountries<ThrowOnError extends boolean = false>(options: Options<ListBlockedCountriesData, ThrowOnError>): RequestResult<ListBlockedCountriesResponses, ListBlockedCountriesErrors, ThrowOnError>;
|
|
154
|
+
/**
|
|
155
|
+
* Block countries
|
|
156
|
+
*/
|
|
157
|
+
blockCountries<ThrowOnError extends boolean = false>(options: Options<BlockCountriesData, ThrowOnError>): RequestResult<BlockCountriesResponses, BlockCountriesErrors, ThrowOnError>;
|
|
158
|
+
/**
|
|
159
|
+
* Allow TLDs
|
|
160
|
+
*/
|
|
161
|
+
allowTlds<ThrowOnError extends boolean = false>(options: Options<AllowTldsData, ThrowOnError>): RequestResult<AllowTldsResponses, AllowTldsErrors, ThrowOnError>;
|
|
162
|
+
/**
|
|
163
|
+
* List blocked TLDs
|
|
164
|
+
*/
|
|
165
|
+
listBlockedTlds<ThrowOnError extends boolean = false>(options: Options<ListBlockedTldsData, ThrowOnError>): RequestResult<ListBlockedTldsResponses, ListBlockedTldsErrors, ThrowOnError>;
|
|
166
|
+
/**
|
|
167
|
+
* Block TLDs
|
|
168
|
+
*/
|
|
169
|
+
blockTlds<ThrowOnError extends boolean = false>(options: Options<BlockTldsData, ThrowOnError>): RequestResult<BlockTldsResponses, BlockTldsErrors, ThrowOnError>;
|
|
170
|
+
/**
|
|
171
|
+
* List categories
|
|
172
|
+
*/
|
|
173
|
+
listCategories<ThrowOnError extends boolean = false>(options?: Options<ListCategoriesData, ThrowOnError>): RequestResult<ListCategoriesResponses, ListCategoriesErrors, ThrowOnError>;
|
|
174
|
+
/**
|
|
175
|
+
* List category macros
|
|
176
|
+
*/
|
|
177
|
+
listCategoryMacros<ThrowOnError extends boolean = false>(options?: Options<ListCategoryMacrosData, ThrowOnError>): RequestResult<ListCategoryMacrosResponses, ListCategoryMacrosErrors, ThrowOnError>;
|
|
178
|
+
/**
|
|
179
|
+
* List app blocker categories
|
|
180
|
+
*/
|
|
181
|
+
listAppBlockerCategories<ThrowOnError extends boolean = false>(options?: Options<ListAppBlockerCategoriesData, ThrowOnError>): RequestResult<ListAppBlockerCategoriesResponses, ListAppBlockerCategoriesErrors, ThrowOnError>;
|
|
182
|
+
/**
|
|
183
|
+
* List app blocker category macros
|
|
184
|
+
*/
|
|
185
|
+
listAppBlockerCategoryMacros<ThrowOnError extends boolean = false>(options?: Options<ListAppBlockerCategoryMacrosData, ThrowOnError>): RequestResult<ListAppBlockerCategoryMacrosResponses, ListAppBlockerCategoryMacrosErrors, ThrowOnError>;
|
|
186
|
+
/**
|
|
187
|
+
* List malware categories
|
|
188
|
+
*/
|
|
189
|
+
listMalwareCategories<ThrowOnError extends boolean = false>(options?: Options<ListMalwareCategoriesData, ThrowOnError>): RequestResult<ListMalwareCategoriesResponses, ListMalwareCategoriesErrors, ThrowOnError>;
|
|
190
|
+
/**
|
|
191
|
+
* List malware category macros
|
|
192
|
+
*/
|
|
193
|
+
listMalwareCategoryMacros<ThrowOnError extends boolean = false>(options?: Options<ListMalwareCategoryMacrosData, ThrowOnError>): RequestResult<ListMalwareCategoryMacrosResponses, ListMalwareCategoryMacrosErrors, ThrowOnError>;
|
|
194
|
+
/**
|
|
195
|
+
* List continents with countries
|
|
196
|
+
*/
|
|
197
|
+
listContinents<ThrowOnError extends boolean = false>(options?: Options<ListContinentsData, ThrowOnError>): RequestResult<ListContinentsResponses, ListContinentsErrors, ThrowOnError>;
|
|
198
|
+
/**
|
|
199
|
+
* List countries
|
|
200
|
+
*/
|
|
201
|
+
listCountries<ThrowOnError extends boolean = false>(options?: Options<ListCountriesData, ThrowOnError>): RequestResult<ListCountriesResponses, ListCountriesErrors, ThrowOnError>;
|
|
202
|
+
/**
|
|
203
|
+
* List exception groups
|
|
204
|
+
*/
|
|
205
|
+
listExceptionGroups<ThrowOnError extends boolean = false>(options?: Options<ListExceptionGroupsData, ThrowOnError>): RequestResult<ListExceptionGroupsResponses, ListExceptionGroupsErrors, ThrowOnError>;
|
|
206
|
+
/**
|
|
207
|
+
* Create an exception group
|
|
208
|
+
*/
|
|
209
|
+
createExceptionGroup<ThrowOnError extends boolean = false>(options: Options<CreateExceptionGroupData, ThrowOnError>): RequestResult<CreateExceptionGroupResponses, CreateExceptionGroupErrors, ThrowOnError>;
|
|
210
|
+
/**
|
|
211
|
+
* Delete an exception group
|
|
212
|
+
*/
|
|
213
|
+
deleteExceptionGroup<ThrowOnError extends boolean = false>(options: Options<DeleteExceptionGroupData, ThrowOnError>): RequestResult<DeleteExceptionGroupResponses, DeleteExceptionGroupErrors, ThrowOnError>;
|
|
214
|
+
/**
|
|
215
|
+
* Update an exception group
|
|
216
|
+
*/
|
|
217
|
+
updateExceptionGroup<ThrowOnError extends boolean = false>(options: Options<UpdateExceptionGroupData, ThrowOnError>): RequestResult<UpdateExceptionGroupResponses, UpdateExceptionGroupErrors, ThrowOnError>;
|
|
218
|
+
/**
|
|
219
|
+
* List exception group domains
|
|
220
|
+
*/
|
|
221
|
+
listExceptionGroupDomains<ThrowOnError extends boolean = false>(options: Options<ListExceptionGroupDomainsData, ThrowOnError>): RequestResult<ListExceptionGroupDomainsResponses, ListExceptionGroupDomainsErrors, ThrowOnError>;
|
|
222
|
+
/**
|
|
223
|
+
* Add domains to an exception group
|
|
224
|
+
*/
|
|
225
|
+
addExceptionGroupDomains<ThrowOnError extends boolean = false>(options: Options<AddExceptionGroupDomainsData, ThrowOnError>): RequestResult<AddExceptionGroupDomainsResponses, AddExceptionGroupDomainsErrors, ThrowOnError>;
|
|
226
|
+
/**
|
|
227
|
+
* Remove a domain from an exception group
|
|
228
|
+
*/
|
|
229
|
+
removeExceptionGroupDomain<ThrowOnError extends boolean = false>(options: Options<RemoveExceptionGroupDomainData, ThrowOnError>): RequestResult<RemoveExceptionGroupDomainResponses, RemoveExceptionGroupDomainErrors, ThrowOnError>;
|
|
230
|
+
/**
|
|
231
|
+
* Update an exception group domain note
|
|
232
|
+
*/
|
|
233
|
+
updateExceptionGroupDomainNote<ThrowOnError extends boolean = false>(options: Options<UpdateExceptionGroupDomainNoteData, ThrowOnError>): RequestResult<UpdateExceptionGroupDomainNoteResponses, UpdateExceptionGroupDomainNoteErrors, ThrowOnError>;
|
|
234
|
+
/**
|
|
235
|
+
* List protection templates
|
|
236
|
+
*/
|
|
237
|
+
listProtectionTemplates<ThrowOnError extends boolean = false>(options?: Options<ListProtectionTemplatesData, ThrowOnError>): RequestResult<ListProtectionTemplatesResponses, ListProtectionTemplatesErrors, ThrowOnError>;
|
|
238
|
+
/**
|
|
239
|
+
* List template categories
|
|
240
|
+
*/
|
|
241
|
+
listTemplateCategories<ThrowOnError extends boolean = false>(options: Options<ListTemplateCategoriesData, ThrowOnError>): RequestResult<ListTemplateCategoriesResponses, ListTemplateCategoriesErrors, ThrowOnError>;
|
|
242
|
+
/**
|
|
243
|
+
* List TLDs
|
|
244
|
+
*/
|
|
245
|
+
listTlds<ThrowOnError extends boolean = false>(options?: Options<ListTldsData, ThrowOnError>): RequestResult<ListTldsResponses, ListTldsErrors, ThrowOnError>;
|
|
246
|
+
/**
|
|
247
|
+
* List TLD macros
|
|
248
|
+
*/
|
|
249
|
+
listTldMacros<ThrowOnError extends boolean = false>(options?: Options<ListTldMacrosData, ThrowOnError>): RequestResult<ListTldMacrosResponses, ListTldMacrosErrors, ThrowOnError>;
|
|
250
|
+
/**
|
|
251
|
+
* Get a TLD by name
|
|
252
|
+
*/
|
|
253
|
+
getTld<ThrowOnError extends boolean = false>(options: Options<GetTldData, ThrowOnError>): RequestResult<GetTldResponses, GetTldErrors, ThrowOnError>;
|
|
254
|
+
}
|
|
255
|
+
export {};
|