@flashstart/client 0.1.0 → 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/LICENSE +201 -0
- 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 +5 -2
|
@@ -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 { IntegrationSdk, type Options } from './sdk.gen.js';
|
|
2
|
+
export type { AssociateCloudBoxDnsRouteData, AssociateCloudBoxDnsRouteError, AssociateCloudBoxDnsRouteErrors, AssociateCloudBoxDnsRouteResponse, AssociateCloudBoxDnsRouteResponses, AssociateDeviceToRuleData, AssociateDeviceToRuleError, AssociateDeviceToRuleErrors, AssociateDeviceToRuleResponse, AssociateDeviceToRuleResponses, AssociateEndPointDnsRouteData, AssociateEndPointDnsRouteError, AssociateEndPointDnsRouteErrors, AssociateEndPointDnsRouteResponse, AssociateEndPointDnsRouteResponses, AssociateRouterNetworkPolicyData, AssociateRouterNetworkPolicyError, AssociateRouterNetworkPolicyErrors, AssociateRouterNetworkPolicyResponse, AssociateRouterNetworkPolicyResponses, ClientOptions, CreateCloudBoxDnsRouteData, CreateCloudBoxDnsRouteError, CreateCloudBoxDnsRouteErrors, CreateCloudBoxDnsRouteResponse, CreateCloudBoxDnsRouteResponses, CreateDeviceData, CreateDeviceError, CreateDeviceErrors, CreateDeviceResponse, CreateDeviceResponses, CreateEndPointDnsRouteData, CreateEndPointDnsRouteError, CreateEndPointDnsRouteErrors, CreateEndPointDnsRouteResponse, CreateEndPointDnsRouteResponses, CreateRouterData, CreateRouterError, CreateRouterErrors, CreateRouterResponse, CreateRouterResponses, CreateRuleData, CreateRuleError, CreateRuleErrors, CreateRuleResponse, CreateRuleResponses, DeleteCloudBoxDnsRouteData, DeleteCloudBoxDnsRouteError, DeleteCloudBoxDnsRouteErrors, DeleteCloudBoxDnsRouteResponse, DeleteCloudBoxDnsRouteResponses, DeleteDeviceData, DeleteDeviceError, DeleteDeviceErrors, DeleteDeviceResponse, DeleteDeviceResponses, DeleteDnsRouteData, DeleteDnsRouteError, DeleteDnsRouteErrors, DeleteDnsRouteResponse, DeleteDnsRouteResponses, DeleteEndpointData, DeleteEndPointDnsRouteData, DeleteEndPointDnsRouteError, DeleteEndPointDnsRouteErrors, DeleteEndPointDnsRouteResponse, DeleteEndPointDnsRouteResponses, DeleteEndpointError, DeleteEndpointErrors, DeleteEndpointResponse, DeleteEndpointResponses, DeleteRouterData, DeleteRouterError, DeleteRouterErrors, DeleteRouterResponse, DeleteRouterResponses, DeleteRuleData, DeleteRuleError, DeleteRuleErrors, DeleteRuleResponse, DeleteRuleResponses, DisassociateCloudBoxDnsRouteData, DisassociateCloudBoxDnsRouteError, DisassociateCloudBoxDnsRouteErrors, DisassociateCloudBoxDnsRouteResponse, DisassociateCloudBoxDnsRouteResponses, DisassociateEndPointDnsRouteData, DisassociateEndPointDnsRouteError, DisassociateEndPointDnsRouteErrors, DisassociateEndPointDnsRouteResponse, DisassociateEndPointDnsRouteResponses, DissociateDeviceFromRuleData, DissociateDeviceFromRuleError, DissociateDeviceFromRuleErrors, DissociateDeviceFromRuleResponse, DissociateDeviceFromRuleResponses, DissociateRouterNetworkPolicyData, DissociateRouterNetworkPolicyError, DissociateRouterNetworkPolicyErrors, DissociateRouterNetworkPolicyResponse, DissociateRouterNetworkPolicyResponses, FlashStartErrorBody, GetCloudBoxDnsRoutesData, GetCloudBoxDnsRoutesError, GetCloudBoxDnsRoutesErrors, GetCloudBoxDnsRoutesResponse, GetCloudBoxDnsRoutesResponses, GetDeviceCredentialsData, GetDeviceCredentialsError, GetDeviceCredentialsErrors, GetDeviceCredentialsResponse, GetDeviceCredentialsResponses, GetDeviceData, GetDeviceError, GetDeviceErrors, GetDeviceResponse, GetDeviceResponses, GetDevicesData, GetDevicesError, GetDevicesErrors, GetDevicesResponse, GetDevicesResponses, GetEndpointByIdData, GetEndpointByIdError, GetEndpointByIdErrors, GetEndpointByIdResponse, GetEndpointByIdResponses, GetEndPointDnsRoutesData, GetEndPointDnsRoutesError, GetEndPointDnsRoutesErrors, GetEndPointDnsRoutesResponse, GetEndPointDnsRoutesResponses, GetEndpointPoliciesData, GetEndpointPoliciesError, GetEndpointPoliciesErrors, GetEndpointPoliciesResponse, GetEndpointPoliciesResponses, GetEndpointPolicyByIdData, GetEndpointPolicyByIdError, GetEndpointPolicyByIdErrors, GetEndpointPolicyByIdResponse, GetEndpointPolicyByIdResponses, GetEndpointsData, GetEndpointsError, GetEndpointsErrors, GetEndpointsResponse, GetEndpointsResponses, GetPhysicalDevicesData, GetPhysicalDevicesError, GetPhysicalDevicesErrors, GetPhysicalDevicesResponse, GetPhysicalDevicesResponses, GetRouterData, GetRouterError, GetRouterErrors, GetRouterNetworksData, GetRouterNetworksError, GetRouterNetworksErrors, GetRouterNetworksResponse, GetRouterNetworksResponses, GetRouterPoliciesData, GetRouterPoliciesError, GetRouterPoliciesErrors, GetRouterPoliciesResponse, GetRouterPoliciesResponses, GetRouterResponse, GetRouterResponses, GetRoutersData, GetRoutersError, GetRoutersErrors, GetRoutersResponse, GetRoutersResponses, GetRulesData, GetRulesError, GetRulesErrors, GetRulesResponse, GetRulesResponses, MissingCredentialsErrorBody, UpdateDeviceCatchAllData, UpdateDeviceCatchAllError, UpdateDeviceCatchAllErrors, UpdateDeviceCatchAllResponse, UpdateDeviceCatchAllResponses, UpdateDeviceCredentialsData, UpdateDeviceCredentialsError, UpdateDeviceCredentialsErrors, UpdateDeviceCredentialsResponse, UpdateDeviceCredentialsResponses, UpdateDeviceData, UpdateDeviceError, UpdateDeviceErrors, UpdateDeviceResponse, UpdateDeviceResponses, UpdateDynamicInternalRouterNetworkData, UpdateDynamicInternalRouterNetworkError, UpdateDynamicInternalRouterNetworkErrors, UpdateDynamicInternalRouterNetworkResponse, UpdateDynamicInternalRouterNetworkResponses, UpdateEncryptedRouterNetworkData, UpdateEncryptedRouterNetworkError, UpdateEncryptedRouterNetworkErrors, UpdateEncryptedRouterNetworkResponse, UpdateEncryptedRouterNetworkResponses, UpdateEndpointData, UpdateEndpointError, UpdateEndpointErrors, UpdateEndpointPolicyData, UpdateEndpointPolicyError, UpdateEndpointPolicyErrors, UpdateEndpointPolicyResponse, UpdateEndpointPolicyResponses, UpdateEndpointResponse, UpdateEndpointResponses, UpdateRouterData, UpdateRouterError, UpdateRouterErrors, UpdateRouterResponse, UpdateRouterResponses } from './types.gen.js';
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import type { Client, ClientMeta, Options as Options2, RequestResult, TDataShape } from './client/index.js';
|
|
2
|
+
import type { AssociateCloudBoxDnsRouteData, AssociateCloudBoxDnsRouteErrors, AssociateCloudBoxDnsRouteResponses, AssociateDeviceToRuleData, AssociateDeviceToRuleErrors, AssociateDeviceToRuleResponses, AssociateEndPointDnsRouteData, AssociateEndPointDnsRouteErrors, AssociateEndPointDnsRouteResponses, AssociateRouterNetworkPolicyData, AssociateRouterNetworkPolicyErrors, AssociateRouterNetworkPolicyResponses, CreateCloudBoxDnsRouteData, CreateCloudBoxDnsRouteErrors, CreateCloudBoxDnsRouteResponses, CreateDeviceData, CreateDeviceErrors, CreateDeviceResponses, CreateEndPointDnsRouteData, CreateEndPointDnsRouteErrors, CreateEndPointDnsRouteResponses, CreateRouterData, CreateRouterErrors, CreateRouterResponses, CreateRuleData, CreateRuleErrors, CreateRuleResponses, DeleteCloudBoxDnsRouteData, DeleteCloudBoxDnsRouteErrors, DeleteCloudBoxDnsRouteResponses, DeleteDeviceData, DeleteDeviceErrors, DeleteDeviceResponses, DeleteDnsRouteData, DeleteDnsRouteErrors, DeleteDnsRouteResponses, DeleteEndpointData, DeleteEndPointDnsRouteData, DeleteEndPointDnsRouteErrors, DeleteEndPointDnsRouteResponses, DeleteEndpointErrors, DeleteEndpointResponses, DeleteRouterData, DeleteRouterErrors, DeleteRouterResponses, DeleteRuleData, DeleteRuleErrors, DeleteRuleResponses, DisassociateCloudBoxDnsRouteData, DisassociateCloudBoxDnsRouteErrors, DisassociateCloudBoxDnsRouteResponses, DisassociateEndPointDnsRouteData, DisassociateEndPointDnsRouteErrors, DisassociateEndPointDnsRouteResponses, DissociateDeviceFromRuleData, DissociateDeviceFromRuleErrors, DissociateDeviceFromRuleResponses, DissociateRouterNetworkPolicyData, DissociateRouterNetworkPolicyErrors, DissociateRouterNetworkPolicyResponses, GetCloudBoxDnsRoutesData, GetCloudBoxDnsRoutesErrors, GetCloudBoxDnsRoutesResponses, GetDeviceCredentialsData, GetDeviceCredentialsErrors, GetDeviceCredentialsResponses, GetDeviceData, GetDeviceErrors, GetDeviceResponses, GetDevicesData, GetDevicesErrors, GetDevicesResponses, GetEndpointByIdData, GetEndpointByIdErrors, GetEndpointByIdResponses, GetEndPointDnsRoutesData, GetEndPointDnsRoutesErrors, GetEndPointDnsRoutesResponses, GetEndpointPoliciesData, GetEndpointPoliciesErrors, GetEndpointPoliciesResponses, GetEndpointPolicyByIdData, GetEndpointPolicyByIdErrors, GetEndpointPolicyByIdResponses, GetEndpointsData, GetEndpointsErrors, GetEndpointsResponses, GetPhysicalDevicesData, GetPhysicalDevicesErrors, GetPhysicalDevicesResponses, GetRouterData, GetRouterErrors, GetRouterNetworksData, GetRouterNetworksErrors, GetRouterNetworksResponses, GetRouterPoliciesData, GetRouterPoliciesErrors, GetRouterPoliciesResponses, GetRouterResponses, GetRoutersData, GetRoutersErrors, GetRoutersResponses, GetRulesData, GetRulesErrors, GetRulesResponses, UpdateDeviceCatchAllData, UpdateDeviceCatchAllErrors, UpdateDeviceCatchAllResponses, UpdateDeviceCredentialsData, UpdateDeviceCredentialsErrors, UpdateDeviceCredentialsResponses, UpdateDeviceData, UpdateDeviceErrors, UpdateDeviceResponses, UpdateDynamicInternalRouterNetworkData, UpdateDynamicInternalRouterNetworkErrors, UpdateDynamicInternalRouterNetworkResponses, UpdateEncryptedRouterNetworkData, UpdateEncryptedRouterNetworkErrors, UpdateEncryptedRouterNetworkResponses, UpdateEndpointData, UpdateEndpointErrors, UpdateEndpointPolicyData, UpdateEndpointPolicyErrors, UpdateEndpointPolicyResponses, UpdateEndpointResponses, UpdateRouterData, UpdateRouterErrors, UpdateRouterResponses } 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 IntegrationSdk extends HeyApiClient {
|
|
29
|
+
static readonly __registry: HeyApiRegistry<IntegrationSdk>;
|
|
30
|
+
constructor(args?: {
|
|
31
|
+
client?: Client;
|
|
32
|
+
key?: string;
|
|
33
|
+
});
|
|
34
|
+
/**
|
|
35
|
+
* Get CloudBox DNS routes
|
|
36
|
+
*/
|
|
37
|
+
getCloudBoxDnsRoutes<ThrowOnError extends boolean = false>(options?: Options<GetCloudBoxDnsRoutesData, ThrowOnError>): RequestResult<GetCloudBoxDnsRoutesResponses, GetCloudBoxDnsRoutesErrors, ThrowOnError>;
|
|
38
|
+
/**
|
|
39
|
+
* Create a CloudBox DNS route
|
|
40
|
+
*/
|
|
41
|
+
createCloudBoxDnsRoute<ThrowOnError extends boolean = false>(options: Options<CreateCloudBoxDnsRouteData, ThrowOnError>): RequestResult<CreateCloudBoxDnsRouteResponses, CreateCloudBoxDnsRouteErrors, ThrowOnError>;
|
|
42
|
+
/**
|
|
43
|
+
* Delete a CloudBox DNS route
|
|
44
|
+
*/
|
|
45
|
+
deleteCloudBoxDnsRoute<ThrowOnError extends boolean = false>(options: Options<DeleteCloudBoxDnsRouteData, ThrowOnError>): RequestResult<DeleteCloudBoxDnsRouteResponses, DeleteCloudBoxDnsRouteErrors, ThrowOnError>;
|
|
46
|
+
/**
|
|
47
|
+
* Get Endpoint DNS routes
|
|
48
|
+
*/
|
|
49
|
+
getEndPointDnsRoutes<ThrowOnError extends boolean = false>(options?: Options<GetEndPointDnsRoutesData, ThrowOnError>): RequestResult<GetEndPointDnsRoutesResponses, GetEndPointDnsRoutesErrors, ThrowOnError>;
|
|
50
|
+
/**
|
|
51
|
+
* Create an Endpoint DNS route
|
|
52
|
+
*/
|
|
53
|
+
createEndPointDnsRoute<ThrowOnError extends boolean = false>(options: Options<CreateEndPointDnsRouteData, ThrowOnError>): RequestResult<CreateEndPointDnsRouteResponses, CreateEndPointDnsRouteErrors, ThrowOnError>;
|
|
54
|
+
/**
|
|
55
|
+
* Delete an Endpoint DNS route
|
|
56
|
+
*/
|
|
57
|
+
deleteEndPointDnsRoute<ThrowOnError extends boolean = false>(options: Options<DeleteEndPointDnsRouteData, ThrowOnError>): RequestResult<DeleteEndPointDnsRouteResponses, DeleteEndPointDnsRouteErrors, ThrowOnError>;
|
|
58
|
+
/**
|
|
59
|
+
* Associate a CloudBox device with a DNS route
|
|
60
|
+
*/
|
|
61
|
+
associateCloudBoxDnsRoute<ThrowOnError extends boolean = false>(options: Options<AssociateCloudBoxDnsRouteData, ThrowOnError>): RequestResult<AssociateCloudBoxDnsRouteResponses, AssociateCloudBoxDnsRouteErrors, ThrowOnError>;
|
|
62
|
+
/**
|
|
63
|
+
* Associate an endpoint policy with a DNS route
|
|
64
|
+
*/
|
|
65
|
+
associateEndPointDnsRoute<ThrowOnError extends boolean = false>(options: Options<AssociateEndPointDnsRouteData, ThrowOnError>): RequestResult<AssociateEndPointDnsRouteResponses, AssociateEndPointDnsRouteErrors, ThrowOnError>;
|
|
66
|
+
/**
|
|
67
|
+
* Disassociate a CloudBox device from a DNS route
|
|
68
|
+
*/
|
|
69
|
+
disassociateCloudBoxDnsRoute<ThrowOnError extends boolean = false>(options: Options<DisassociateCloudBoxDnsRouteData, ThrowOnError>): RequestResult<DisassociateCloudBoxDnsRouteResponses, DisassociateCloudBoxDnsRouteErrors, ThrowOnError>;
|
|
70
|
+
/**
|
|
71
|
+
* Disassociate an endpoint policy from a DNS route
|
|
72
|
+
*/
|
|
73
|
+
disassociateEndPointDnsRoute<ThrowOnError extends boolean = false>(options: Options<DisassociateEndPointDnsRouteData, ThrowOnError>): RequestResult<DisassociateEndPointDnsRouteResponses, DisassociateEndPointDnsRouteErrors, ThrowOnError>;
|
|
74
|
+
/**
|
|
75
|
+
* Delete a DNS route
|
|
76
|
+
*/
|
|
77
|
+
deleteDnsRoute<ThrowOnError extends boolean = false>(options: Options<DeleteDnsRouteData, ThrowOnError>): RequestResult<DeleteDnsRouteResponses, DeleteDnsRouteErrors, ThrowOnError>;
|
|
78
|
+
/**
|
|
79
|
+
* Get devices by type
|
|
80
|
+
*/
|
|
81
|
+
getDevices<ThrowOnError extends boolean = false>(options?: Options<GetDevicesData, ThrowOnError>): RequestResult<GetDevicesResponses, GetDevicesErrors, ThrowOnError>;
|
|
82
|
+
/**
|
|
83
|
+
* Create a device
|
|
84
|
+
*/
|
|
85
|
+
createDevice<ThrowOnError extends boolean = false>(options: Options<CreateDeviceData, ThrowOnError>): RequestResult<CreateDeviceResponses, CreateDeviceErrors, ThrowOnError>;
|
|
86
|
+
/**
|
|
87
|
+
* Delete a device
|
|
88
|
+
*/
|
|
89
|
+
deleteDevice<ThrowOnError extends boolean = false>(options: Options<DeleteDeviceData, ThrowOnError>): RequestResult<DeleteDeviceResponses, DeleteDeviceErrors, ThrowOnError>;
|
|
90
|
+
/**
|
|
91
|
+
* Get a device by ID
|
|
92
|
+
*/
|
|
93
|
+
getDevice<ThrowOnError extends boolean = false>(options: Options<GetDeviceData, ThrowOnError>): RequestResult<GetDeviceResponses, GetDeviceErrors, ThrowOnError>;
|
|
94
|
+
/**
|
|
95
|
+
* Update a device
|
|
96
|
+
*/
|
|
97
|
+
updateDevice<ThrowOnError extends boolean = false>(options: Options<UpdateDeviceData, ThrowOnError>): RequestResult<UpdateDeviceResponses, UpdateDeviceErrors, ThrowOnError>;
|
|
98
|
+
/**
|
|
99
|
+
* Update a device's catch-all policy
|
|
100
|
+
*/
|
|
101
|
+
updateDeviceCatchAll<ThrowOnError extends boolean = false>(options: Options<UpdateDeviceCatchAllData, ThrowOnError>): RequestResult<UpdateDeviceCatchAllResponses, UpdateDeviceCatchAllErrors, ThrowOnError>;
|
|
102
|
+
/**
|
|
103
|
+
* Get a device's credentials
|
|
104
|
+
*/
|
|
105
|
+
getDeviceCredentials<ThrowOnError extends boolean = false>(options: Options<GetDeviceCredentialsData, ThrowOnError>): RequestResult<GetDeviceCredentialsResponses, GetDeviceCredentialsErrors, ThrowOnError>;
|
|
106
|
+
/**
|
|
107
|
+
* Update a device's credentials
|
|
108
|
+
*/
|
|
109
|
+
updateDeviceCredentials<ThrowOnError extends boolean = false>(options: Options<UpdateDeviceCredentialsData, ThrowOnError>): RequestResult<UpdateDeviceCredentialsResponses, UpdateDeviceCredentialsErrors, ThrowOnError>;
|
|
110
|
+
/**
|
|
111
|
+
* Get rules
|
|
112
|
+
*/
|
|
113
|
+
getRules<ThrowOnError extends boolean = false>(options?: Options<GetRulesData, ThrowOnError>): RequestResult<GetRulesResponses, GetRulesErrors, ThrowOnError>;
|
|
114
|
+
/**
|
|
115
|
+
* Create a rule
|
|
116
|
+
*/
|
|
117
|
+
createRule<ThrowOnError extends boolean = false>(options: Options<CreateRuleData, ThrowOnError>): RequestResult<CreateRuleResponses, CreateRuleErrors, ThrowOnError>;
|
|
118
|
+
/**
|
|
119
|
+
* Delete a rule
|
|
120
|
+
*/
|
|
121
|
+
deleteRule<ThrowOnError extends boolean = false>(options: Options<DeleteRuleData, ThrowOnError>): RequestResult<DeleteRuleResponses, DeleteRuleErrors, ThrowOnError>;
|
|
122
|
+
/**
|
|
123
|
+
* Associate a device with a rule
|
|
124
|
+
*/
|
|
125
|
+
associateDeviceToRule<ThrowOnError extends boolean = false>(options: Options<AssociateDeviceToRuleData, ThrowOnError>): RequestResult<AssociateDeviceToRuleResponses, AssociateDeviceToRuleErrors, ThrowOnError>;
|
|
126
|
+
/**
|
|
127
|
+
* Dissociate a device from a rule
|
|
128
|
+
*/
|
|
129
|
+
dissociateDeviceFromRule<ThrowOnError extends boolean = false>(options: Options<DissociateDeviceFromRuleData, ThrowOnError>): RequestResult<DissociateDeviceFromRuleResponses, DissociateDeviceFromRuleErrors, ThrowOnError>;
|
|
130
|
+
/**
|
|
131
|
+
* Get all physical devices
|
|
132
|
+
*/
|
|
133
|
+
getPhysicalDevices<ThrowOnError extends boolean = false>(options?: Options<GetPhysicalDevicesData, ThrowOnError>): RequestResult<GetPhysicalDevicesResponses, GetPhysicalDevicesErrors, ThrowOnError>;
|
|
134
|
+
/**
|
|
135
|
+
* Get all routers for an organization
|
|
136
|
+
*/
|
|
137
|
+
getRouters<ThrowOnError extends boolean = false>(options?: Options<GetRoutersData, ThrowOnError>): RequestResult<GetRoutersResponses, GetRoutersErrors, ThrowOnError>;
|
|
138
|
+
/**
|
|
139
|
+
* Create a router
|
|
140
|
+
*/
|
|
141
|
+
createRouter<ThrowOnError extends boolean = false>(options: Options<CreateRouterData, ThrowOnError>): RequestResult<CreateRouterResponses, CreateRouterErrors, ThrowOnError>;
|
|
142
|
+
/**
|
|
143
|
+
* Delete a router
|
|
144
|
+
*/
|
|
145
|
+
deleteRouter<ThrowOnError extends boolean = false>(options: Options<DeleteRouterData, ThrowOnError>): RequestResult<DeleteRouterResponses, DeleteRouterErrors, ThrowOnError>;
|
|
146
|
+
/**
|
|
147
|
+
* Get a router by ID
|
|
148
|
+
*/
|
|
149
|
+
getRouter<ThrowOnError extends boolean = false>(options: Options<GetRouterData, ThrowOnError>): RequestResult<GetRouterResponses, GetRouterErrors, ThrowOnError>;
|
|
150
|
+
/**
|
|
151
|
+
* Update a router
|
|
152
|
+
*/
|
|
153
|
+
updateRouter<ThrowOnError extends boolean = false>(options: Options<UpdateRouterData, ThrowOnError>): RequestResult<UpdateRouterResponses, UpdateRouterErrors, ThrowOnError>;
|
|
154
|
+
/**
|
|
155
|
+
* Get a router's networks
|
|
156
|
+
*/
|
|
157
|
+
getRouterNetworks<ThrowOnError extends boolean = false>(options: Options<GetRouterNetworksData, ThrowOnError>): RequestResult<GetRouterNetworksResponses, GetRouterNetworksErrors, ThrowOnError>;
|
|
158
|
+
/**
|
|
159
|
+
* Update dynamic internal router network
|
|
160
|
+
*/
|
|
161
|
+
updateDynamicInternalRouterNetwork<ThrowOnError extends boolean = false>(options: Options<UpdateDynamicInternalRouterNetworkData, ThrowOnError>): RequestResult<UpdateDynamicInternalRouterNetworkResponses, UpdateDynamicInternalRouterNetworkErrors, ThrowOnError>;
|
|
162
|
+
/**
|
|
163
|
+
* Update encrypted router network
|
|
164
|
+
*/
|
|
165
|
+
updateEncryptedRouterNetwork<ThrowOnError extends boolean = false>(options: Options<UpdateEncryptedRouterNetworkData, ThrowOnError>): RequestResult<UpdateEncryptedRouterNetworkResponses, UpdateEncryptedRouterNetworkErrors, ThrowOnError>;
|
|
166
|
+
/**
|
|
167
|
+
* Get policies associated with a router
|
|
168
|
+
*/
|
|
169
|
+
getRouterPolicies<ThrowOnError extends boolean = false>(options: Options<GetRouterPoliciesData, ThrowOnError>): RequestResult<GetRouterPoliciesResponses, GetRouterPoliciesErrors, ThrowOnError>;
|
|
170
|
+
/**
|
|
171
|
+
* Associate a policy with a router network
|
|
172
|
+
*/
|
|
173
|
+
associateRouterNetworkPolicy<ThrowOnError extends boolean = false>(options: Options<AssociateRouterNetworkPolicyData, ThrowOnError>): RequestResult<AssociateRouterNetworkPolicyResponses, AssociateRouterNetworkPolicyErrors, ThrowOnError>;
|
|
174
|
+
/**
|
|
175
|
+
* Dissociate a policy from a router network
|
|
176
|
+
*/
|
|
177
|
+
dissociateRouterNetworkPolicy<ThrowOnError extends boolean = false>(options: Options<DissociateRouterNetworkPolicyData, ThrowOnError>): RequestResult<DissociateRouterNetworkPolicyResponses, DissociateRouterNetworkPolicyErrors, ThrowOnError>;
|
|
178
|
+
/**
|
|
179
|
+
* Get all endpoint policies for an organization
|
|
180
|
+
*/
|
|
181
|
+
getEndpointPolicies<ThrowOnError extends boolean = false>(options?: Options<GetEndpointPoliciesData, ThrowOnError>): RequestResult<GetEndpointPoliciesResponses, GetEndpointPoliciesErrors, ThrowOnError>;
|
|
182
|
+
/**
|
|
183
|
+
* Get endpoint policy by ID
|
|
184
|
+
*/
|
|
185
|
+
getEndpointPolicyById<ThrowOnError extends boolean = false>(options: Options<GetEndpointPolicyByIdData, ThrowOnError>): RequestResult<GetEndpointPolicyByIdResponses, GetEndpointPolicyByIdErrors, ThrowOnError>;
|
|
186
|
+
/**
|
|
187
|
+
* Update endpoint policy by ID
|
|
188
|
+
*/
|
|
189
|
+
updateEndpointPolicy<ThrowOnError extends boolean = false>(options: Options<UpdateEndpointPolicyData, ThrowOnError>): RequestResult<UpdateEndpointPolicyResponses, UpdateEndpointPolicyErrors, ThrowOnError>;
|
|
190
|
+
/**
|
|
191
|
+
* Get all endpoints for an organization
|
|
192
|
+
*/
|
|
193
|
+
getEndpoints<ThrowOnError extends boolean = false>(options?: Options<GetEndpointsData, ThrowOnError>): RequestResult<GetEndpointsResponses, GetEndpointsErrors, ThrowOnError>;
|
|
194
|
+
/**
|
|
195
|
+
* Delete endpoint by ID
|
|
196
|
+
*/
|
|
197
|
+
deleteEndpoint<ThrowOnError extends boolean = false>(options: Options<DeleteEndpointData, ThrowOnError>): RequestResult<DeleteEndpointResponses, DeleteEndpointErrors, ThrowOnError>;
|
|
198
|
+
/**
|
|
199
|
+
* Get endpoint by ID
|
|
200
|
+
*/
|
|
201
|
+
getEndpointById<ThrowOnError extends boolean = false>(options: Options<GetEndpointByIdData, ThrowOnError>): RequestResult<GetEndpointByIdResponses, GetEndpointByIdErrors, ThrowOnError>;
|
|
202
|
+
/**
|
|
203
|
+
* Update endpoint by ID
|
|
204
|
+
*/
|
|
205
|
+
updateEndpoint<ThrowOnError extends boolean = false>(options: Options<UpdateEndpointData, ThrowOnError>): RequestResult<UpdateEndpointResponses, UpdateEndpointErrors, ThrowOnError>;
|
|
206
|
+
}
|
|
207
|
+
export {};
|