kitstore-cli 1.0.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.
Files changed (71) hide show
  1. package/.env.test +4 -0
  2. package/.eslintrc.js +29 -0
  3. package/dist/__tests__/commands/init.test.js +76 -0
  4. package/dist/__tests__/commands/install.test.js +422 -0
  5. package/dist/__tests__/commands/list.test.js +173 -0
  6. package/dist/__tests__/commands/login.test.js +281 -0
  7. package/dist/__tests__/commands/rule-check.test.js +72 -0
  8. package/dist/__tests__/commands/search.test.js +175 -0
  9. package/dist/__tests__/commands/upload.test.js +367 -0
  10. package/dist/__tests__/config.test.js +179 -0
  11. package/dist/__tests__/setup.js +8 -0
  12. package/dist/api/client.js +18 -0
  13. package/dist/api/generated/api.js +912 -0
  14. package/dist/api/generated/base.js +48 -0
  15. package/dist/api/generated/common.js +108 -0
  16. package/dist/api/generated/configuration.js +48 -0
  17. package/dist/api/generated/index.js +31 -0
  18. package/dist/commands/init.js +79 -0
  19. package/dist/commands/install.js +150 -0
  20. package/dist/commands/list.js +70 -0
  21. package/dist/commands/login.js +64 -0
  22. package/dist/commands/rule-check.js +81 -0
  23. package/dist/commands/search.js +59 -0
  24. package/dist/commands/upload.js +138 -0
  25. package/dist/config.js +84 -0
  26. package/dist/index.js +71 -0
  27. package/e2e/install.e2e.test.ts +237 -0
  28. package/e2e/integration.e2e.test.ts +346 -0
  29. package/e2e/login.e2e.test.ts +188 -0
  30. package/jest.config.js +24 -0
  31. package/openapitools.json +7 -0
  32. package/package.json +41 -0
  33. package/src/__tests__/commands/init.test.ts +52 -0
  34. package/src/__tests__/commands/install.test.ts +449 -0
  35. package/src/__tests__/commands/list.test.ts +164 -0
  36. package/src/__tests__/commands/login.test.ts +293 -0
  37. package/src/__tests__/commands/rule-check.test.ts +52 -0
  38. package/src/__tests__/commands/search.test.ts +168 -0
  39. package/src/__tests__/commands/upload.test.ts +404 -0
  40. package/src/__tests__/config.test.ts +181 -0
  41. package/src/__tests__/setup.ts +11 -0
  42. package/src/api/client.ts +20 -0
  43. package/src/api/generated/.openapi-generator/FILES +17 -0
  44. package/src/api/generated/.openapi-generator/VERSION +1 -0
  45. package/src/api/generated/.openapi-generator-ignore +23 -0
  46. package/src/api/generated/api.ts +1171 -0
  47. package/src/api/generated/base.ts +62 -0
  48. package/src/api/generated/common.ts +113 -0
  49. package/src/api/generated/configuration.ts +121 -0
  50. package/src/api/generated/docs/AuthApi.md +158 -0
  51. package/src/api/generated/docs/AuthResponseDto.md +22 -0
  52. package/src/api/generated/docs/AuthUserDto.md +24 -0
  53. package/src/api/generated/docs/HealthApi.md +183 -0
  54. package/src/api/generated/docs/LoginDto.md +22 -0
  55. package/src/api/generated/docs/RegisterDto.md +24 -0
  56. package/src/api/generated/docs/RuleAuthorDto.md +22 -0
  57. package/src/api/generated/docs/RuleResponseDto.md +36 -0
  58. package/src/api/generated/docs/RulesApi.md +289 -0
  59. package/src/api/generated/git_push.sh +57 -0
  60. package/src/api/generated/index.ts +18 -0
  61. package/src/commands/init.ts +46 -0
  62. package/src/commands/install.ts +129 -0
  63. package/src/commands/list.ts +71 -0
  64. package/src/commands/login.ts +65 -0
  65. package/src/commands/rule-check.ts +49 -0
  66. package/src/commands/search.ts +66 -0
  67. package/src/commands/upload.ts +117 -0
  68. package/src/config.ts +66 -0
  69. package/src/index.ts +79 -0
  70. package/test-cli-config.js +118 -0
  71. package/tsconfig.json +24 -0
@@ -0,0 +1,1171 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Cursor Kit API
5
+ * API for managing Cursor rules and commands
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import type { Configuration } from './configuration';
17
+ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
18
+ import globalAxios from 'axios';
19
+ // Some imports not used depending on template conditions
20
+ // @ts-ignore
21
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
22
+ import type { RequestArgs } from './base';
23
+ // @ts-ignore
24
+ import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base';
25
+
26
+ export interface AuthResponseDto {
27
+ 'user': AuthUserDto;
28
+ 'token': string;
29
+ }
30
+ export interface AuthUserDto {
31
+ 'id': string;
32
+ 'username': string;
33
+ 'email': string;
34
+ }
35
+ export interface LoginDto {
36
+ 'email': string;
37
+ 'password': string;
38
+ }
39
+ export interface RegisterDto {
40
+ 'username': string;
41
+ 'email': string;
42
+ 'password': string;
43
+ }
44
+ export interface RuleAuthorDto {
45
+ 'id': string;
46
+ 'username': string;
47
+ }
48
+ export interface RuleResponseDto {
49
+ 'id': string;
50
+ 'name': string;
51
+ 'tag': string;
52
+ 'type': RuleResponseDtoTypeEnum;
53
+ 'description'?: string;
54
+ 'version': string;
55
+ 'author': RuleAuthorDto;
56
+ 'createdAt': string;
57
+ 'updatedAt': string;
58
+ }
59
+
60
+ export const RuleResponseDtoTypeEnum = {
61
+ Rule: 'rule',
62
+ Command: 'command'
63
+ } as const;
64
+
65
+ export type RuleResponseDtoTypeEnum = typeof RuleResponseDtoTypeEnum[keyof typeof RuleResponseDtoTypeEnum];
66
+
67
+
68
+ /**
69
+ * AuthApi - axios parameter creator
70
+ */
71
+ export const AuthApiAxiosParamCreator = function (configuration?: Configuration) {
72
+ return {
73
+ /**
74
+ *
75
+ * @summary Login user
76
+ * @param {LoginDto} loginDto
77
+ * @param {*} [options] Override http request option.
78
+ * @throws {RequiredError}
79
+ */
80
+ authControllerLogin: async (loginDto: LoginDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
81
+ // verify required parameter 'loginDto' is not null or undefined
82
+ assertParamExists('authControllerLogin', 'loginDto', loginDto)
83
+ const localVarPath = `/api/auth/login`;
84
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
85
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
86
+ let baseOptions;
87
+ if (configuration) {
88
+ baseOptions = configuration.baseOptions;
89
+ }
90
+
91
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
92
+ const localVarHeaderParameter = {} as any;
93
+ const localVarQueryParameter = {} as any;
94
+
95
+
96
+
97
+ localVarHeaderParameter['Content-Type'] = 'application/json';
98
+
99
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
100
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
101
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
102
+ localVarRequestOptions.data = serializeDataIfNeeded(loginDto, localVarRequestOptions, configuration)
103
+
104
+ return {
105
+ url: toPathString(localVarUrlObj),
106
+ options: localVarRequestOptions,
107
+ };
108
+ },
109
+ /**
110
+ *
111
+ * @summary Register new user
112
+ * @param {RegisterDto} registerDto
113
+ * @param {*} [options] Override http request option.
114
+ * @throws {RequiredError}
115
+ */
116
+ authControllerRegister: async (registerDto: RegisterDto, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
117
+ // verify required parameter 'registerDto' is not null or undefined
118
+ assertParamExists('authControllerRegister', 'registerDto', registerDto)
119
+ const localVarPath = `/api/auth/register`;
120
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
121
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
122
+ let baseOptions;
123
+ if (configuration) {
124
+ baseOptions = configuration.baseOptions;
125
+ }
126
+
127
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
128
+ const localVarHeaderParameter = {} as any;
129
+ const localVarQueryParameter = {} as any;
130
+
131
+
132
+
133
+ localVarHeaderParameter['Content-Type'] = 'application/json';
134
+
135
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
136
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
137
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
138
+ localVarRequestOptions.data = serializeDataIfNeeded(registerDto, localVarRequestOptions, configuration)
139
+
140
+ return {
141
+ url: toPathString(localVarUrlObj),
142
+ options: localVarRequestOptions,
143
+ };
144
+ },
145
+ /**
146
+ *
147
+ * @summary Validate token
148
+ * @param {*} [options] Override http request option.
149
+ * @throws {RequiredError}
150
+ */
151
+ authControllerValidate: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
152
+ const localVarPath = `/api/auth/validate`;
153
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
154
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
155
+ let baseOptions;
156
+ if (configuration) {
157
+ baseOptions = configuration.baseOptions;
158
+ }
159
+
160
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
161
+ const localVarHeaderParameter = {} as any;
162
+ const localVarQueryParameter = {} as any;
163
+
164
+ // authentication bearer required
165
+ // http bearer authentication required
166
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
167
+
168
+
169
+
170
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
171
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
172
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
173
+
174
+ return {
175
+ url: toPathString(localVarUrlObj),
176
+ options: localVarRequestOptions,
177
+ };
178
+ },
179
+ }
180
+ };
181
+
182
+ /**
183
+ * AuthApi - functional programming interface
184
+ */
185
+ export const AuthApiFp = function(configuration?: Configuration) {
186
+ const localVarAxiosParamCreator = AuthApiAxiosParamCreator(configuration)
187
+ return {
188
+ /**
189
+ *
190
+ * @summary Login user
191
+ * @param {LoginDto} loginDto
192
+ * @param {*} [options] Override http request option.
193
+ * @throws {RequiredError}
194
+ */
195
+ async authControllerLogin(loginDto: LoginDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AuthResponseDto>> {
196
+ const localVarAxiosArgs = await localVarAxiosParamCreator.authControllerLogin(loginDto, options);
197
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
198
+ const localVarOperationServerBasePath = operationServerMap['AuthApi.authControllerLogin']?.[localVarOperationServerIndex]?.url;
199
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
200
+ },
201
+ /**
202
+ *
203
+ * @summary Register new user
204
+ * @param {RegisterDto} registerDto
205
+ * @param {*} [options] Override http request option.
206
+ * @throws {RequiredError}
207
+ */
208
+ async authControllerRegister(registerDto: RegisterDto, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AuthResponseDto>> {
209
+ const localVarAxiosArgs = await localVarAxiosParamCreator.authControllerRegister(registerDto, options);
210
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
211
+ const localVarOperationServerBasePath = operationServerMap['AuthApi.authControllerRegister']?.[localVarOperationServerIndex]?.url;
212
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
213
+ },
214
+ /**
215
+ *
216
+ * @summary Validate token
217
+ * @param {*} [options] Override http request option.
218
+ * @throws {RequiredError}
219
+ */
220
+ async authControllerValidate(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
221
+ const localVarAxiosArgs = await localVarAxiosParamCreator.authControllerValidate(options);
222
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
223
+ const localVarOperationServerBasePath = operationServerMap['AuthApi.authControllerValidate']?.[localVarOperationServerIndex]?.url;
224
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
225
+ },
226
+ }
227
+ };
228
+
229
+ /**
230
+ * AuthApi - factory interface
231
+ */
232
+ export const AuthApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
233
+ const localVarFp = AuthApiFp(configuration)
234
+ return {
235
+ /**
236
+ *
237
+ * @summary Login user
238
+ * @param {LoginDto} loginDto
239
+ * @param {*} [options] Override http request option.
240
+ * @throws {RequiredError}
241
+ */
242
+ authControllerLogin(loginDto: LoginDto, options?: RawAxiosRequestConfig): AxiosPromise<AuthResponseDto> {
243
+ return localVarFp.authControllerLogin(loginDto, options).then((request) => request(axios, basePath));
244
+ },
245
+ /**
246
+ *
247
+ * @summary Register new user
248
+ * @param {RegisterDto} registerDto
249
+ * @param {*} [options] Override http request option.
250
+ * @throws {RequiredError}
251
+ */
252
+ authControllerRegister(registerDto: RegisterDto, options?: RawAxiosRequestConfig): AxiosPromise<AuthResponseDto> {
253
+ return localVarFp.authControllerRegister(registerDto, options).then((request) => request(axios, basePath));
254
+ },
255
+ /**
256
+ *
257
+ * @summary Validate token
258
+ * @param {*} [options] Override http request option.
259
+ * @throws {RequiredError}
260
+ */
261
+ authControllerValidate(options?: RawAxiosRequestConfig): AxiosPromise<void> {
262
+ return localVarFp.authControllerValidate(options).then((request) => request(axios, basePath));
263
+ },
264
+ };
265
+ };
266
+
267
+ /**
268
+ * AuthApi - interface
269
+ */
270
+ export interface AuthApiInterface {
271
+ /**
272
+ *
273
+ * @summary Login user
274
+ * @param {LoginDto} loginDto
275
+ * @param {*} [options] Override http request option.
276
+ * @throws {RequiredError}
277
+ */
278
+ authControllerLogin(loginDto: LoginDto, options?: RawAxiosRequestConfig): AxiosPromise<AuthResponseDto>;
279
+
280
+ /**
281
+ *
282
+ * @summary Register new user
283
+ * @param {RegisterDto} registerDto
284
+ * @param {*} [options] Override http request option.
285
+ * @throws {RequiredError}
286
+ */
287
+ authControllerRegister(registerDto: RegisterDto, options?: RawAxiosRequestConfig): AxiosPromise<AuthResponseDto>;
288
+
289
+ /**
290
+ *
291
+ * @summary Validate token
292
+ * @param {*} [options] Override http request option.
293
+ * @throws {RequiredError}
294
+ */
295
+ authControllerValidate(options?: RawAxiosRequestConfig): AxiosPromise<void>;
296
+
297
+ }
298
+
299
+ /**
300
+ * AuthApi - object-oriented interface
301
+ */
302
+ export class AuthApi extends BaseAPI implements AuthApiInterface {
303
+ /**
304
+ *
305
+ * @summary Login user
306
+ * @param {LoginDto} loginDto
307
+ * @param {*} [options] Override http request option.
308
+ * @throws {RequiredError}
309
+ */
310
+ public authControllerLogin(loginDto: LoginDto, options?: RawAxiosRequestConfig) {
311
+ return AuthApiFp(this.configuration).authControllerLogin(loginDto, options).then((request) => request(this.axios, this.basePath));
312
+ }
313
+
314
+ /**
315
+ *
316
+ * @summary Register new user
317
+ * @param {RegisterDto} registerDto
318
+ * @param {*} [options] Override http request option.
319
+ * @throws {RequiredError}
320
+ */
321
+ public authControllerRegister(registerDto: RegisterDto, options?: RawAxiosRequestConfig) {
322
+ return AuthApiFp(this.configuration).authControllerRegister(registerDto, options).then((request) => request(this.axios, this.basePath));
323
+ }
324
+
325
+ /**
326
+ *
327
+ * @summary Validate token
328
+ * @param {*} [options] Override http request option.
329
+ * @throws {RequiredError}
330
+ */
331
+ public authControllerValidate(options?: RawAxiosRequestConfig) {
332
+ return AuthApiFp(this.configuration).authControllerValidate(options).then((request) => request(this.axios, this.basePath));
333
+ }
334
+ }
335
+
336
+
337
+
338
+ /**
339
+ * HealthApi - axios parameter creator
340
+ */
341
+ export const HealthApiAxiosParamCreator = function (configuration?: Configuration) {
342
+ return {
343
+ /**
344
+ *
345
+ * @param {*} [options] Override http request option.
346
+ * @throws {RequiredError}
347
+ */
348
+ healthControllerHealth: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
349
+ const localVarPath = `/api/health`;
350
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
351
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
352
+ let baseOptions;
353
+ if (configuration) {
354
+ baseOptions = configuration.baseOptions;
355
+ }
356
+
357
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
358
+ const localVarHeaderParameter = {} as any;
359
+ const localVarQueryParameter = {} as any;
360
+
361
+
362
+
363
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
364
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
365
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
366
+
367
+ return {
368
+ url: toPathString(localVarUrlObj),
369
+ options: localVarRequestOptions,
370
+ };
371
+ },
372
+ /**
373
+ *
374
+ * @param {*} [options] Override http request option.
375
+ * @throws {RequiredError}
376
+ */
377
+ healthControllerLiveness: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
378
+ const localVarPath = `/api/health/live`;
379
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
380
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
381
+ let baseOptions;
382
+ if (configuration) {
383
+ baseOptions = configuration.baseOptions;
384
+ }
385
+
386
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
387
+ const localVarHeaderParameter = {} as any;
388
+ const localVarQueryParameter = {} as any;
389
+
390
+
391
+
392
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
393
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
394
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
395
+
396
+ return {
397
+ url: toPathString(localVarUrlObj),
398
+ options: localVarRequestOptions,
399
+ };
400
+ },
401
+ /**
402
+ *
403
+ * @param {*} [options] Override http request option.
404
+ * @throws {RequiredError}
405
+ */
406
+ healthControllerPing: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
407
+ const localVarPath = `/api/health/ping`;
408
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
409
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
410
+ let baseOptions;
411
+ if (configuration) {
412
+ baseOptions = configuration.baseOptions;
413
+ }
414
+
415
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
416
+ const localVarHeaderParameter = {} as any;
417
+ const localVarQueryParameter = {} as any;
418
+
419
+
420
+
421
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
422
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
423
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
424
+
425
+ return {
426
+ url: toPathString(localVarUrlObj),
427
+ options: localVarRequestOptions,
428
+ };
429
+ },
430
+ /**
431
+ *
432
+ * @param {*} [options] Override http request option.
433
+ * @throws {RequiredError}
434
+ */
435
+ healthControllerReadiness: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
436
+ const localVarPath = `/api/health/ready`;
437
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
438
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
439
+ let baseOptions;
440
+ if (configuration) {
441
+ baseOptions = configuration.baseOptions;
442
+ }
443
+
444
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
445
+ const localVarHeaderParameter = {} as any;
446
+ const localVarQueryParameter = {} as any;
447
+
448
+
449
+
450
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
451
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
452
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
453
+
454
+ return {
455
+ url: toPathString(localVarUrlObj),
456
+ options: localVarRequestOptions,
457
+ };
458
+ },
459
+ }
460
+ };
461
+
462
+ /**
463
+ * HealthApi - functional programming interface
464
+ */
465
+ export const HealthApiFp = function(configuration?: Configuration) {
466
+ const localVarAxiosParamCreator = HealthApiAxiosParamCreator(configuration)
467
+ return {
468
+ /**
469
+ *
470
+ * @param {*} [options] Override http request option.
471
+ * @throws {RequiredError}
472
+ */
473
+ async healthControllerHealth(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
474
+ const localVarAxiosArgs = await localVarAxiosParamCreator.healthControllerHealth(options);
475
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
476
+ const localVarOperationServerBasePath = operationServerMap['HealthApi.healthControllerHealth']?.[localVarOperationServerIndex]?.url;
477
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
478
+ },
479
+ /**
480
+ *
481
+ * @param {*} [options] Override http request option.
482
+ * @throws {RequiredError}
483
+ */
484
+ async healthControllerLiveness(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
485
+ const localVarAxiosArgs = await localVarAxiosParamCreator.healthControllerLiveness(options);
486
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
487
+ const localVarOperationServerBasePath = operationServerMap['HealthApi.healthControllerLiveness']?.[localVarOperationServerIndex]?.url;
488
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
489
+ },
490
+ /**
491
+ *
492
+ * @param {*} [options] Override http request option.
493
+ * @throws {RequiredError}
494
+ */
495
+ async healthControllerPing(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
496
+ const localVarAxiosArgs = await localVarAxiosParamCreator.healthControllerPing(options);
497
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
498
+ const localVarOperationServerBasePath = operationServerMap['HealthApi.healthControllerPing']?.[localVarOperationServerIndex]?.url;
499
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
500
+ },
501
+ /**
502
+ *
503
+ * @param {*} [options] Override http request option.
504
+ * @throws {RequiredError}
505
+ */
506
+ async healthControllerReadiness(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
507
+ const localVarAxiosArgs = await localVarAxiosParamCreator.healthControllerReadiness(options);
508
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
509
+ const localVarOperationServerBasePath = operationServerMap['HealthApi.healthControllerReadiness']?.[localVarOperationServerIndex]?.url;
510
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
511
+ },
512
+ }
513
+ };
514
+
515
+ /**
516
+ * HealthApi - factory interface
517
+ */
518
+ export const HealthApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
519
+ const localVarFp = HealthApiFp(configuration)
520
+ return {
521
+ /**
522
+ *
523
+ * @param {*} [options] Override http request option.
524
+ * @throws {RequiredError}
525
+ */
526
+ healthControllerHealth(options?: RawAxiosRequestConfig): AxiosPromise<void> {
527
+ return localVarFp.healthControllerHealth(options).then((request) => request(axios, basePath));
528
+ },
529
+ /**
530
+ *
531
+ * @param {*} [options] Override http request option.
532
+ * @throws {RequiredError}
533
+ */
534
+ healthControllerLiveness(options?: RawAxiosRequestConfig): AxiosPromise<void> {
535
+ return localVarFp.healthControllerLiveness(options).then((request) => request(axios, basePath));
536
+ },
537
+ /**
538
+ *
539
+ * @param {*} [options] Override http request option.
540
+ * @throws {RequiredError}
541
+ */
542
+ healthControllerPing(options?: RawAxiosRequestConfig): AxiosPromise<void> {
543
+ return localVarFp.healthControllerPing(options).then((request) => request(axios, basePath));
544
+ },
545
+ /**
546
+ *
547
+ * @param {*} [options] Override http request option.
548
+ * @throws {RequiredError}
549
+ */
550
+ healthControllerReadiness(options?: RawAxiosRequestConfig): AxiosPromise<void> {
551
+ return localVarFp.healthControllerReadiness(options).then((request) => request(axios, basePath));
552
+ },
553
+ };
554
+ };
555
+
556
+ /**
557
+ * HealthApi - interface
558
+ */
559
+ export interface HealthApiInterface {
560
+ /**
561
+ *
562
+ * @param {*} [options] Override http request option.
563
+ * @throws {RequiredError}
564
+ */
565
+ healthControllerHealth(options?: RawAxiosRequestConfig): AxiosPromise<void>;
566
+
567
+ /**
568
+ *
569
+ * @param {*} [options] Override http request option.
570
+ * @throws {RequiredError}
571
+ */
572
+ healthControllerLiveness(options?: RawAxiosRequestConfig): AxiosPromise<void>;
573
+
574
+ /**
575
+ *
576
+ * @param {*} [options] Override http request option.
577
+ * @throws {RequiredError}
578
+ */
579
+ healthControllerPing(options?: RawAxiosRequestConfig): AxiosPromise<void>;
580
+
581
+ /**
582
+ *
583
+ * @param {*} [options] Override http request option.
584
+ * @throws {RequiredError}
585
+ */
586
+ healthControllerReadiness(options?: RawAxiosRequestConfig): AxiosPromise<void>;
587
+
588
+ }
589
+
590
+ /**
591
+ * HealthApi - object-oriented interface
592
+ */
593
+ export class HealthApi extends BaseAPI implements HealthApiInterface {
594
+ /**
595
+ *
596
+ * @param {*} [options] Override http request option.
597
+ * @throws {RequiredError}
598
+ */
599
+ public healthControllerHealth(options?: RawAxiosRequestConfig) {
600
+ return HealthApiFp(this.configuration).healthControllerHealth(options).then((request) => request(this.axios, this.basePath));
601
+ }
602
+
603
+ /**
604
+ *
605
+ * @param {*} [options] Override http request option.
606
+ * @throws {RequiredError}
607
+ */
608
+ public healthControllerLiveness(options?: RawAxiosRequestConfig) {
609
+ return HealthApiFp(this.configuration).healthControllerLiveness(options).then((request) => request(this.axios, this.basePath));
610
+ }
611
+
612
+ /**
613
+ *
614
+ * @param {*} [options] Override http request option.
615
+ * @throws {RequiredError}
616
+ */
617
+ public healthControllerPing(options?: RawAxiosRequestConfig) {
618
+ return HealthApiFp(this.configuration).healthControllerPing(options).then((request) => request(this.axios, this.basePath));
619
+ }
620
+
621
+ /**
622
+ *
623
+ * @param {*} [options] Override http request option.
624
+ * @throws {RequiredError}
625
+ */
626
+ public healthControllerReadiness(options?: RawAxiosRequestConfig) {
627
+ return HealthApiFp(this.configuration).healthControllerReadiness(options).then((request) => request(this.axios, this.basePath));
628
+ }
629
+ }
630
+
631
+
632
+
633
+ /**
634
+ * RulesApi - axios parameter creator
635
+ */
636
+ export const RulesApiAxiosParamCreator = function (configuration?: Configuration) {
637
+ return {
638
+ /**
639
+ *
640
+ * @summary Upload rule/command
641
+ * @param {string} name
642
+ * @param {string} tag
643
+ * @param {RulesControllerCreateTypeEnum} type
644
+ * @param {string} [description]
645
+ * @param {string} [version]
646
+ * @param {*} [options] Override http request option.
647
+ * @throws {RequiredError}
648
+ */
649
+ rulesControllerCreate: async (name: string, tag: string, type: RulesControllerCreateTypeEnum, description?: string, version?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
650
+ // verify required parameter 'name' is not null or undefined
651
+ assertParamExists('rulesControllerCreate', 'name', name)
652
+ // verify required parameter 'tag' is not null or undefined
653
+ assertParamExists('rulesControllerCreate', 'tag', tag)
654
+ // verify required parameter 'type' is not null or undefined
655
+ assertParamExists('rulesControllerCreate', 'type', type)
656
+ const localVarPath = `/api/rules`;
657
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
658
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
659
+ let baseOptions;
660
+ if (configuration) {
661
+ baseOptions = configuration.baseOptions;
662
+ }
663
+
664
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
665
+ const localVarHeaderParameter = {} as any;
666
+ const localVarQueryParameter = {} as any;
667
+ const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
668
+
669
+ // authentication bearer required
670
+ // http bearer authentication required
671
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
672
+
673
+
674
+ if (name !== undefined) {
675
+ localVarFormParams.append('name', name as any);
676
+ }
677
+
678
+ if (tag !== undefined) {
679
+ localVarFormParams.append('tag', tag as any);
680
+ }
681
+
682
+ if (type !== undefined) {
683
+ localVarFormParams.append('type', type as any);
684
+ }
685
+
686
+ if (description !== undefined) {
687
+ localVarFormParams.append('description', description as any);
688
+ }
689
+
690
+ if (version !== undefined) {
691
+ localVarFormParams.append('version', version as any);
692
+ }
693
+
694
+
695
+ localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
696
+
697
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
698
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
699
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
700
+ localVarRequestOptions.data = localVarFormParams;
701
+
702
+ return {
703
+ url: toPathString(localVarUrlObj),
704
+ options: localVarRequestOptions,
705
+ };
706
+ },
707
+ /**
708
+ *
709
+ * @summary Get rules/commands
710
+ * @param {number} [page]
711
+ * @param {number} [limit]
712
+ * @param {string} [tag]
713
+ * @param {string} [name]
714
+ * @param {RulesControllerFindAllTypeEnum} [type]
715
+ * @param {string} [authorId]
716
+ * @param {*} [options] Override http request option.
717
+ * @throws {RequiredError}
718
+ */
719
+ rulesControllerFindAll: async (page?: number, limit?: number, tag?: string, name?: string, type?: RulesControllerFindAllTypeEnum, authorId?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
720
+ const localVarPath = `/api/rules`;
721
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
722
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
723
+ let baseOptions;
724
+ if (configuration) {
725
+ baseOptions = configuration.baseOptions;
726
+ }
727
+
728
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
729
+ const localVarHeaderParameter = {} as any;
730
+ const localVarQueryParameter = {} as any;
731
+
732
+ if (page !== undefined) {
733
+ localVarQueryParameter['page'] = page;
734
+ }
735
+
736
+ if (limit !== undefined) {
737
+ localVarQueryParameter['limit'] = limit;
738
+ }
739
+
740
+ if (tag !== undefined) {
741
+ localVarQueryParameter['tag'] = tag;
742
+ }
743
+
744
+ if (name !== undefined) {
745
+ localVarQueryParameter['name'] = name;
746
+ }
747
+
748
+ if (type !== undefined) {
749
+ localVarQueryParameter['type'] = type;
750
+ }
751
+
752
+ if (authorId !== undefined) {
753
+ localVarQueryParameter['authorId'] = authorId;
754
+ }
755
+
756
+
757
+
758
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
759
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
760
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
761
+
762
+ return {
763
+ url: toPathString(localVarUrlObj),
764
+ options: localVarRequestOptions,
765
+ };
766
+ },
767
+ /**
768
+ *
769
+ * @summary Get rule/command by ID
770
+ * @param {string} id
771
+ * @param {*} [options] Override http request option.
772
+ * @throws {RequiredError}
773
+ */
774
+ rulesControllerFindOne: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
775
+ // verify required parameter 'id' is not null or undefined
776
+ assertParamExists('rulesControllerFindOne', 'id', id)
777
+ const localVarPath = `/api/rules/{id}`
778
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
779
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
780
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
781
+ let baseOptions;
782
+ if (configuration) {
783
+ baseOptions = configuration.baseOptions;
784
+ }
785
+
786
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
787
+ const localVarHeaderParameter = {} as any;
788
+ const localVarQueryParameter = {} as any;
789
+
790
+
791
+
792
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
793
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
794
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
795
+
796
+ return {
797
+ url: toPathString(localVarUrlObj),
798
+ options: localVarRequestOptions,
799
+ };
800
+ },
801
+ /**
802
+ *
803
+ * @summary Get download URL
804
+ * @param {string} id
805
+ * @param {*} [options] Override http request option.
806
+ * @throws {RequiredError}
807
+ */
808
+ rulesControllerGetDownloadUrl: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
809
+ // verify required parameter 'id' is not null or undefined
810
+ assertParamExists('rulesControllerGetDownloadUrl', 'id', id)
811
+ const localVarPath = `/api/rules/{id}/download`
812
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
813
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
814
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
815
+ let baseOptions;
816
+ if (configuration) {
817
+ baseOptions = configuration.baseOptions;
818
+ }
819
+
820
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
821
+ const localVarHeaderParameter = {} as any;
822
+ const localVarQueryParameter = {} as any;
823
+
824
+ // authentication bearer required
825
+ // http bearer authentication required
826
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
827
+
828
+
829
+
830
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
831
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
832
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
833
+
834
+ return {
835
+ url: toPathString(localVarUrlObj),
836
+ options: localVarRequestOptions,
837
+ };
838
+ },
839
+ /**
840
+ *
841
+ * @summary Delete rule/command
842
+ * @param {string} id
843
+ * @param {*} [options] Override http request option.
844
+ * @throws {RequiredError}
845
+ */
846
+ rulesControllerRemove: async (id: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
847
+ // verify required parameter 'id' is not null or undefined
848
+ assertParamExists('rulesControllerRemove', 'id', id)
849
+ const localVarPath = `/api/rules/{id}`
850
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
851
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
852
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
853
+ let baseOptions;
854
+ if (configuration) {
855
+ baseOptions = configuration.baseOptions;
856
+ }
857
+
858
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
859
+ const localVarHeaderParameter = {} as any;
860
+ const localVarQueryParameter = {} as any;
861
+
862
+ // authentication bearer required
863
+ // http bearer authentication required
864
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
865
+
866
+
867
+
868
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
869
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
870
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
871
+
872
+ return {
873
+ url: toPathString(localVarUrlObj),
874
+ options: localVarRequestOptions,
875
+ };
876
+ },
877
+ }
878
+ };
879
+
880
+ /**
881
+ * RulesApi - functional programming interface
882
+ */
883
+ export const RulesApiFp = function(configuration?: Configuration) {
884
+ const localVarAxiosParamCreator = RulesApiAxiosParamCreator(configuration)
885
+ return {
886
+ /**
887
+ *
888
+ * @summary Upload rule/command
889
+ * @param {string} name
890
+ * @param {string} tag
891
+ * @param {RulesControllerCreateTypeEnum} type
892
+ * @param {string} [description]
893
+ * @param {string} [version]
894
+ * @param {*} [options] Override http request option.
895
+ * @throws {RequiredError}
896
+ */
897
+ async rulesControllerCreate(name: string, tag: string, type: RulesControllerCreateTypeEnum, description?: string, version?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RuleResponseDto>> {
898
+ const localVarAxiosArgs = await localVarAxiosParamCreator.rulesControllerCreate(name, tag, type, description, version, options);
899
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
900
+ const localVarOperationServerBasePath = operationServerMap['RulesApi.rulesControllerCreate']?.[localVarOperationServerIndex]?.url;
901
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
902
+ },
903
+ /**
904
+ *
905
+ * @summary Get rules/commands
906
+ * @param {number} [page]
907
+ * @param {number} [limit]
908
+ * @param {string} [tag]
909
+ * @param {string} [name]
910
+ * @param {RulesControllerFindAllTypeEnum} [type]
911
+ * @param {string} [authorId]
912
+ * @param {*} [options] Override http request option.
913
+ * @throws {RequiredError}
914
+ */
915
+ async rulesControllerFindAll(page?: number, limit?: number, tag?: string, name?: string, type?: RulesControllerFindAllTypeEnum, authorId?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<RuleResponseDto>>> {
916
+ const localVarAxiosArgs = await localVarAxiosParamCreator.rulesControllerFindAll(page, limit, tag, name, type, authorId, options);
917
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
918
+ const localVarOperationServerBasePath = operationServerMap['RulesApi.rulesControllerFindAll']?.[localVarOperationServerIndex]?.url;
919
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
920
+ },
921
+ /**
922
+ *
923
+ * @summary Get rule/command by ID
924
+ * @param {string} id
925
+ * @param {*} [options] Override http request option.
926
+ * @throws {RequiredError}
927
+ */
928
+ async rulesControllerFindOne(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<RuleResponseDto>> {
929
+ const localVarAxiosArgs = await localVarAxiosParamCreator.rulesControllerFindOne(id, options);
930
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
931
+ const localVarOperationServerBasePath = operationServerMap['RulesApi.rulesControllerFindOne']?.[localVarOperationServerIndex]?.url;
932
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
933
+ },
934
+ /**
935
+ *
936
+ * @summary Get download URL
937
+ * @param {string} id
938
+ * @param {*} [options] Override http request option.
939
+ * @throws {RequiredError}
940
+ */
941
+ async rulesControllerGetDownloadUrl(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
942
+ const localVarAxiosArgs = await localVarAxiosParamCreator.rulesControllerGetDownloadUrl(id, options);
943
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
944
+ const localVarOperationServerBasePath = operationServerMap['RulesApi.rulesControllerGetDownloadUrl']?.[localVarOperationServerIndex]?.url;
945
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
946
+ },
947
+ /**
948
+ *
949
+ * @summary Delete rule/command
950
+ * @param {string} id
951
+ * @param {*} [options] Override http request option.
952
+ * @throws {RequiredError}
953
+ */
954
+ async rulesControllerRemove(id: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
955
+ const localVarAxiosArgs = await localVarAxiosParamCreator.rulesControllerRemove(id, options);
956
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
957
+ const localVarOperationServerBasePath = operationServerMap['RulesApi.rulesControllerRemove']?.[localVarOperationServerIndex]?.url;
958
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
959
+ },
960
+ }
961
+ };
962
+
963
+ /**
964
+ * RulesApi - factory interface
965
+ */
966
+ export const RulesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
967
+ const localVarFp = RulesApiFp(configuration)
968
+ return {
969
+ /**
970
+ *
971
+ * @summary Upload rule/command
972
+ * @param {string} name
973
+ * @param {string} tag
974
+ * @param {RulesControllerCreateTypeEnum} type
975
+ * @param {string} [description]
976
+ * @param {string} [version]
977
+ * @param {*} [options] Override http request option.
978
+ * @throws {RequiredError}
979
+ */
980
+ rulesControllerCreate(name: string, tag: string, type: RulesControllerCreateTypeEnum, description?: string, version?: string, options?: RawAxiosRequestConfig): AxiosPromise<RuleResponseDto> {
981
+ return localVarFp.rulesControllerCreate(name, tag, type, description, version, options).then((request) => request(axios, basePath));
982
+ },
983
+ /**
984
+ *
985
+ * @summary Get rules/commands
986
+ * @param {number} [page]
987
+ * @param {number} [limit]
988
+ * @param {string} [tag]
989
+ * @param {string} [name]
990
+ * @param {RulesControllerFindAllTypeEnum} [type]
991
+ * @param {string} [authorId]
992
+ * @param {*} [options] Override http request option.
993
+ * @throws {RequiredError}
994
+ */
995
+ rulesControllerFindAll(page?: number, limit?: number, tag?: string, name?: string, type?: RulesControllerFindAllTypeEnum, authorId?: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<RuleResponseDto>> {
996
+ return localVarFp.rulesControllerFindAll(page, limit, tag, name, type, authorId, options).then((request) => request(axios, basePath));
997
+ },
998
+ /**
999
+ *
1000
+ * @summary Get rule/command by ID
1001
+ * @param {string} id
1002
+ * @param {*} [options] Override http request option.
1003
+ * @throws {RequiredError}
1004
+ */
1005
+ rulesControllerFindOne(id: string, options?: RawAxiosRequestConfig): AxiosPromise<RuleResponseDto> {
1006
+ return localVarFp.rulesControllerFindOne(id, options).then((request) => request(axios, basePath));
1007
+ },
1008
+ /**
1009
+ *
1010
+ * @summary Get download URL
1011
+ * @param {string} id
1012
+ * @param {*} [options] Override http request option.
1013
+ * @throws {RequiredError}
1014
+ */
1015
+ rulesControllerGetDownloadUrl(id: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
1016
+ return localVarFp.rulesControllerGetDownloadUrl(id, options).then((request) => request(axios, basePath));
1017
+ },
1018
+ /**
1019
+ *
1020
+ * @summary Delete rule/command
1021
+ * @param {string} id
1022
+ * @param {*} [options] Override http request option.
1023
+ * @throws {RequiredError}
1024
+ */
1025
+ rulesControllerRemove(id: string, options?: RawAxiosRequestConfig): AxiosPromise<void> {
1026
+ return localVarFp.rulesControllerRemove(id, options).then((request) => request(axios, basePath));
1027
+ },
1028
+ };
1029
+ };
1030
+
1031
+ /**
1032
+ * RulesApi - interface
1033
+ */
1034
+ export interface RulesApiInterface {
1035
+ /**
1036
+ *
1037
+ * @summary Upload rule/command
1038
+ * @param {string} name
1039
+ * @param {string} tag
1040
+ * @param {RulesControllerCreateTypeEnum} type
1041
+ * @param {string} [description]
1042
+ * @param {string} [version]
1043
+ * @param {*} [options] Override http request option.
1044
+ * @throws {RequiredError}
1045
+ */
1046
+ rulesControllerCreate(name: string, tag: string, type: RulesControllerCreateTypeEnum, description?: string, version?: string, options?: RawAxiosRequestConfig): AxiosPromise<RuleResponseDto>;
1047
+
1048
+ /**
1049
+ *
1050
+ * @summary Get rules/commands
1051
+ * @param {number} [page]
1052
+ * @param {number} [limit]
1053
+ * @param {string} [tag]
1054
+ * @param {string} [name]
1055
+ * @param {RulesControllerFindAllTypeEnum} [type]
1056
+ * @param {string} [authorId]
1057
+ * @param {*} [options] Override http request option.
1058
+ * @throws {RequiredError}
1059
+ */
1060
+ rulesControllerFindAll(page?: number, limit?: number, tag?: string, name?: string, type?: RulesControllerFindAllTypeEnum, authorId?: string, options?: RawAxiosRequestConfig): AxiosPromise<Array<RuleResponseDto>>;
1061
+
1062
+ /**
1063
+ *
1064
+ * @summary Get rule/command by ID
1065
+ * @param {string} id
1066
+ * @param {*} [options] Override http request option.
1067
+ * @throws {RequiredError}
1068
+ */
1069
+ rulesControllerFindOne(id: string, options?: RawAxiosRequestConfig): AxiosPromise<RuleResponseDto>;
1070
+
1071
+ /**
1072
+ *
1073
+ * @summary Get download URL
1074
+ * @param {string} id
1075
+ * @param {*} [options] Override http request option.
1076
+ * @throws {RequiredError}
1077
+ */
1078
+ rulesControllerGetDownloadUrl(id: string, options?: RawAxiosRequestConfig): AxiosPromise<void>;
1079
+
1080
+ /**
1081
+ *
1082
+ * @summary Delete rule/command
1083
+ * @param {string} id
1084
+ * @param {*} [options] Override http request option.
1085
+ * @throws {RequiredError}
1086
+ */
1087
+ rulesControllerRemove(id: string, options?: RawAxiosRequestConfig): AxiosPromise<void>;
1088
+
1089
+ }
1090
+
1091
+ /**
1092
+ * RulesApi - object-oriented interface
1093
+ */
1094
+ export class RulesApi extends BaseAPI implements RulesApiInterface {
1095
+ /**
1096
+ *
1097
+ * @summary Upload rule/command
1098
+ * @param {string} name
1099
+ * @param {string} tag
1100
+ * @param {RulesControllerCreateTypeEnum} type
1101
+ * @param {string} [description]
1102
+ * @param {string} [version]
1103
+ * @param {*} [options] Override http request option.
1104
+ * @throws {RequiredError}
1105
+ */
1106
+ public rulesControllerCreate(name: string, tag: string, type: RulesControllerCreateTypeEnum, description?: string, version?: string, options?: RawAxiosRequestConfig) {
1107
+ return RulesApiFp(this.configuration).rulesControllerCreate(name, tag, type, description, version, options).then((request) => request(this.axios, this.basePath));
1108
+ }
1109
+
1110
+ /**
1111
+ *
1112
+ * @summary Get rules/commands
1113
+ * @param {number} [page]
1114
+ * @param {number} [limit]
1115
+ * @param {string} [tag]
1116
+ * @param {string} [name]
1117
+ * @param {RulesControllerFindAllTypeEnum} [type]
1118
+ * @param {string} [authorId]
1119
+ * @param {*} [options] Override http request option.
1120
+ * @throws {RequiredError}
1121
+ */
1122
+ public rulesControllerFindAll(page?: number, limit?: number, tag?: string, name?: string, type?: RulesControllerFindAllTypeEnum, authorId?: string, options?: RawAxiosRequestConfig) {
1123
+ return RulesApiFp(this.configuration).rulesControllerFindAll(page, limit, tag, name, type, authorId, options).then((request) => request(this.axios, this.basePath));
1124
+ }
1125
+
1126
+ /**
1127
+ *
1128
+ * @summary Get rule/command by ID
1129
+ * @param {string} id
1130
+ * @param {*} [options] Override http request option.
1131
+ * @throws {RequiredError}
1132
+ */
1133
+ public rulesControllerFindOne(id: string, options?: RawAxiosRequestConfig) {
1134
+ return RulesApiFp(this.configuration).rulesControllerFindOne(id, options).then((request) => request(this.axios, this.basePath));
1135
+ }
1136
+
1137
+ /**
1138
+ *
1139
+ * @summary Get download URL
1140
+ * @param {string} id
1141
+ * @param {*} [options] Override http request option.
1142
+ * @throws {RequiredError}
1143
+ */
1144
+ public rulesControllerGetDownloadUrl(id: string, options?: RawAxiosRequestConfig) {
1145
+ return RulesApiFp(this.configuration).rulesControllerGetDownloadUrl(id, options).then((request) => request(this.axios, this.basePath));
1146
+ }
1147
+
1148
+ /**
1149
+ *
1150
+ * @summary Delete rule/command
1151
+ * @param {string} id
1152
+ * @param {*} [options] Override http request option.
1153
+ * @throws {RequiredError}
1154
+ */
1155
+ public rulesControllerRemove(id: string, options?: RawAxiosRequestConfig) {
1156
+ return RulesApiFp(this.configuration).rulesControllerRemove(id, options).then((request) => request(this.axios, this.basePath));
1157
+ }
1158
+ }
1159
+
1160
+ export const RulesControllerCreateTypeEnum = {
1161
+ Rule: 'rule',
1162
+ Command: 'command'
1163
+ } as const;
1164
+ export type RulesControllerCreateTypeEnum = typeof RulesControllerCreateTypeEnum[keyof typeof RulesControllerCreateTypeEnum];
1165
+ export const RulesControllerFindAllTypeEnum = {
1166
+ Rule: 'rule',
1167
+ Command: 'command'
1168
+ } as const;
1169
+ export type RulesControllerFindAllTypeEnum = typeof RulesControllerFindAllTypeEnum[keyof typeof RulesControllerFindAllTypeEnum];
1170
+
1171
+