@sokol111/ecommerce-category-query-service-api 1.0.9 → 1.0.10

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/dist/api.d.ts CHANGED
@@ -1,83 +1,6 @@
1
- /**
2
- * Category API
3
- * API for querying categories
4
- *
5
- * The version of the OpenAPI document: 1.0.9
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- import type { Configuration } from './configuration';
13
- import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
14
- import type { RequestArgs } from './base';
15
- import { BaseAPI } from './base';
16
- export interface CategoryResponse {
17
- 'id': string;
18
- 'name': string;
19
- }
20
- /**
21
- * RFC7807 Problem Details
22
- */
23
- export interface Problem {
24
- 'type': string;
25
- 'title': string;
26
- 'status': number;
27
- 'detail'?: string;
28
- 'instance'?: string;
29
- 'traceId'?: string;
30
- 'errors'?: Array<ProblemErrorsInner>;
31
- }
32
- export interface ProblemErrorsInner {
33
- 'field'?: string;
34
- 'message'?: string;
35
- }
36
- /**
37
- * DefaultApi - axios parameter creator
38
- */
39
- export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration) => {
40
- /**
41
- *
42
- * @summary Get a list of all active categories
43
- * @param {*} [options] Override http request option.
44
- * @throws {RequiredError}
45
- */
46
- getAllActiveCategories: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
1
+ import type { AxiosRequestConfig, AxiosResponse } from 'axios';
2
+ import type { CategoryResponse } from './api.schemas';
3
+ export declare const getCategoryAPI: () => {
4
+ getAllActiveCategories: <TData = AxiosResponse<CategoryResponse[], any, {}>>(options?: AxiosRequestConfig) => Promise<TData>;
47
5
  };
48
- /**
49
- * DefaultApi - functional programming interface
50
- */
51
- export declare const DefaultApiFp: (configuration?: Configuration) => {
52
- /**
53
- *
54
- * @summary Get a list of all active categories
55
- * @param {*} [options] Override http request option.
56
- * @throws {RequiredError}
57
- */
58
- getAllActiveCategories(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<CategoryResponse>>>;
59
- };
60
- /**
61
- * DefaultApi - factory interface
62
- */
63
- export declare const DefaultApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
64
- /**
65
- *
66
- * @summary Get a list of all active categories
67
- * @param {*} [options] Override http request option.
68
- * @throws {RequiredError}
69
- */
70
- getAllActiveCategories(options?: RawAxiosRequestConfig): AxiosPromise<Array<CategoryResponse>>;
71
- };
72
- /**
73
- * DefaultApi - object-oriented interface
74
- */
75
- export declare class DefaultApi extends BaseAPI {
76
- /**
77
- *
78
- * @summary Get a list of all active categories
79
- * @param {*} [options] Override http request option.
80
- * @throws {RequiredError}
81
- */
82
- getAllActiveCategories(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<CategoryResponse[], any, {}>>;
83
- }
6
+ export type GetAllActiveCategoriesResult = AxiosResponse<CategoryResponse[]>;
package/dist/api.js CHANGED
@@ -1,114 +1,17 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
1
  /**
2
+ * Generated by orval v7.13.2 🍺
3
+ * Do not edit manually.
4
4
  * Category API
5
5
  * API for querying categories
6
- *
7
- * The version of the OpenAPI document: 1.0.9
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.
6
+ * OpenAPI spec version: 1.0.10
13
7
  */
14
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
- return new (P || (P = Promise))(function (resolve, reject) {
17
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
- step((generator = generator.apply(thisArg, _arguments || [])).next());
21
- });
22
- };
23
- import globalAxios from 'axios';
24
- // Some imports not used depending on template conditions
25
- // @ts-ignore
26
- import { DUMMY_BASE_URL, setSearchParams, toPathString, createRequestFunction } from './common';
27
- // @ts-ignore
28
- import { BASE_PATH, BaseAPI, operationServerMap } from './base';
29
- /**
30
- * DefaultApi - axios parameter creator
31
- */
32
- export const DefaultApiAxiosParamCreator = function (configuration) {
33
- return {
34
- /**
35
- *
36
- * @summary Get a list of all active categories
37
- * @param {*} [options] Override http request option.
38
- * @throws {RequiredError}
39
- */
40
- getAllActiveCategories: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
41
- const localVarPath = `/v1/category/list-active-categories`;
42
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
43
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
44
- let baseOptions;
45
- if (configuration) {
46
- baseOptions = configuration.baseOptions;
47
- }
48
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
49
- const localVarHeaderParameter = {};
50
- const localVarQueryParameter = {};
51
- setSearchParams(localVarUrlObj, localVarQueryParameter);
52
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
53
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
54
- return {
55
- url: toPathString(localVarUrlObj),
56
- options: localVarRequestOptions,
57
- };
58
- }),
59
- };
60
- };
61
- /**
62
- * DefaultApi - functional programming interface
63
- */
64
- export const DefaultApiFp = function (configuration) {
65
- const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration);
66
- return {
67
- /**
68
- *
69
- * @summary Get a list of all active categories
70
- * @param {*} [options] Override http request option.
71
- * @throws {RequiredError}
72
- */
73
- getAllActiveCategories(options) {
74
- return __awaiter(this, void 0, void 0, function* () {
75
- var _a, _b, _c;
76
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getAllActiveCategories(options);
77
- const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
78
- const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DefaultApi.getAllActiveCategories']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
79
- return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
80
- });
81
- },
82
- };
83
- };
84
- /**
85
- * DefaultApi - factory interface
86
- */
87
- export const DefaultApiFactory = function (configuration, basePath, axios) {
88
- const localVarFp = DefaultApiFp(configuration);
89
- return {
90
- /**
91
- *
92
- * @summary Get a list of all active categories
93
- * @param {*} [options] Override http request option.
94
- * @throws {RequiredError}
95
- */
96
- getAllActiveCategories(options) {
97
- return localVarFp.getAllActiveCategories(options).then((request) => request(axios, basePath));
98
- },
99
- };
100
- };
101
- /**
102
- * DefaultApi - object-oriented interface
103
- */
104
- export class DefaultApi extends BaseAPI {
8
+ import axios from 'axios';
9
+ export const getCategoryAPI = () => {
105
10
  /**
106
- *
107
11
  * @summary Get a list of all active categories
108
- * @param {*} [options] Override http request option.
109
- * @throws {RequiredError}
110
12
  */
111
- getAllActiveCategories(options) {
112
- return DefaultApiFp(this.configuration).getAllActiveCategories(options).then((request) => request(this.axios, this.basePath));
113
- }
114
- }
13
+ const getAllActiveCategories = (options) => {
14
+ return axios.get(`/v1/category/list-active-categories`, options);
15
+ };
16
+ return { getAllActiveCategories };
17
+ };
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Generated by orval v7.13.2 🍺
3
+ * Do not edit manually.
4
+ * Category API
5
+ * API for querying categories
6
+ * OpenAPI spec version: 1.0.10
7
+ */
8
+ export interface CategoryResponse {
9
+ id: string;
10
+ name: string;
11
+ }
12
+ export type ProblemErrorsItem = {
13
+ field?: string;
14
+ message?: string;
15
+ };
16
+ /**
17
+ * RFC7807 Problem Details
18
+ */
19
+ export interface Problem {
20
+ type: string;
21
+ title: string;
22
+ status: number;
23
+ detail?: string;
24
+ instance?: string;
25
+ traceId?: string;
26
+ errors?: ProblemErrorsItem[];
27
+ }
@@ -0,0 +1 @@
1
+ export {};
package/dist/index.d.ts CHANGED
@@ -1,13 +1,2 @@
1
- /**
2
- * Category API
3
- * API for querying categories
4
- *
5
- * The version of the OpenAPI document: 1.0.9
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- export * from "./api";
13
- export * from "./configuration";
1
+ export * from './api';
2
+ export * from './api.schemas';
package/dist/index.js CHANGED
@@ -1,15 +1,2 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Category API
5
- * API for querying categories
6
- *
7
- * The version of the OpenAPI document: 1.0.9
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
- export * from "./api";
15
- export * from "./configuration";
1
+ export * from './api';
2
+ export * from './api.schemas';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sokol111/ecommerce-category-query-service-api",
3
3
  "description": "Generated TypeScript Axios client from OpenAPI for ecommerce-category-query-service-api",
4
- "version": "1.0.9",
4
+ "version": "1.0.10",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "module": "dist/index.js",
@@ -10,17 +10,12 @@
10
10
  "prepare": "npm run build"
11
11
  },
12
12
  "keywords": ["openapi", "typescript", "axios", "sdk"],
13
- "author": "Sokol111",
14
13
  "license": "MIT",
15
- "repository": {
16
- "type": "git",
17
- "url": "https://github.com/Sokol111/ecommerce-category-query-service-api.git"
18
- },
19
14
  "dependencies": {
20
- "axios": "^1.6.1"
15
+ "axios": "^1.10.0"
21
16
  },
22
17
  "devDependencies": {
23
- "typescript": "^5.4.0"
18
+ "typescript": "^5"
24
19
  },
25
20
  "publishConfig": {
26
21
  "access": "public"
package/dist/base.d.ts DELETED
@@ -1,42 +0,0 @@
1
- /**
2
- * Category API
3
- * API for querying categories
4
- *
5
- * The version of the OpenAPI document: 1.0.9
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- import type { Configuration } from './configuration';
13
- import type { AxiosInstance, RawAxiosRequestConfig } from 'axios';
14
- export declare const BASE_PATH: string;
15
- export declare const COLLECTION_FORMATS: {
16
- csv: string;
17
- ssv: string;
18
- tsv: string;
19
- pipes: string;
20
- };
21
- export interface RequestArgs {
22
- url: string;
23
- options: RawAxiosRequestConfig;
24
- }
25
- export declare class BaseAPI {
26
- protected basePath: string;
27
- protected axios: AxiosInstance;
28
- protected configuration: Configuration | undefined;
29
- constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
30
- }
31
- export declare class RequiredError extends Error {
32
- field: string;
33
- constructor(field: string, msg?: string);
34
- }
35
- interface ServerMap {
36
- [key: string]: {
37
- url: string;
38
- description: string;
39
- }[];
40
- }
41
- export declare const operationServerMap: ServerMap;
42
- export {};
package/dist/base.js DELETED
@@ -1,41 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Category API
5
- * API for querying categories
6
- *
7
- * The version of the OpenAPI document: 1.0.9
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
- import globalAxios from 'axios';
15
- export const BASE_PATH = "http://localhost".replace(/\/+$/, "");
16
- export const COLLECTION_FORMATS = {
17
- csv: ",",
18
- ssv: " ",
19
- tsv: "\t",
20
- pipes: "|",
21
- };
22
- export class BaseAPI {
23
- constructor(configuration, basePath = BASE_PATH, axios = globalAxios) {
24
- var _a;
25
- this.basePath = basePath;
26
- this.axios = axios;
27
- if (configuration) {
28
- this.configuration = configuration;
29
- this.basePath = (_a = configuration.basePath) !== null && _a !== void 0 ? _a : basePath;
30
- }
31
- }
32
- }
33
- ;
34
- export class RequiredError extends Error {
35
- constructor(field, msg) {
36
- super(msg);
37
- this.field = field;
38
- this.name = "RequiredError";
39
- }
40
- }
41
- export const operationServerMap = {};
package/dist/common.d.ts DELETED
@@ -1,28 +0,0 @@
1
- /**
2
- * Category API
3
- * API for querying categories
4
- *
5
- * The version of the OpenAPI document: 1.0.9
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- import type { Configuration } from "./configuration";
13
- import type { RequestArgs } from "./base";
14
- import type { AxiosInstance, AxiosResponse } from 'axios';
15
- export declare const DUMMY_BASE_URL = "https://example.com";
16
- /**
17
- *
18
- * @throws {RequiredError}
19
- */
20
- export declare const assertParamExists: (functionName: string, paramName: string, paramValue: unknown) => void;
21
- export declare const setApiKeyToObject: (object: any, keyParamName: string, configuration?: Configuration) => Promise<void>;
22
- export declare const setBasicAuthToObject: (object: any, configuration?: Configuration) => void;
23
- export declare const setBearerAuthToObject: (object: any, configuration?: Configuration) => Promise<void>;
24
- export declare const setOAuthToObject: (object: any, name: string, scopes: string[], configuration?: Configuration) => Promise<void>;
25
- export declare const setSearchParams: (url: URL, ...objects: any[]) => void;
26
- export declare const serializeDataIfNeeded: (value: any, requestOptions: any, configuration?: Configuration) => any;
27
- export declare const toPathString: (url: URL) => string;
28
- export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
package/dist/common.js DELETED
@@ -1,112 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * Category API
5
- * API for querying categories
6
- *
7
- * The version of the OpenAPI document: 1.0.9
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
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
- return new (P || (P = Promise))(function (resolve, reject) {
17
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
- step((generator = generator.apply(thisArg, _arguments || [])).next());
21
- });
22
- };
23
- import { RequiredError } from "./base";
24
- export const DUMMY_BASE_URL = 'https://example.com';
25
- /**
26
- *
27
- * @throws {RequiredError}
28
- */
29
- export const assertParamExists = function (functionName, paramName, paramValue) {
30
- if (paramValue === null || paramValue === undefined) {
31
- throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
32
- }
33
- };
34
- export const setApiKeyToObject = function (object, keyParamName, configuration) {
35
- return __awaiter(this, void 0, void 0, function* () {
36
- if (configuration && configuration.apiKey) {
37
- const localVarApiKeyValue = typeof configuration.apiKey === 'function'
38
- ? yield configuration.apiKey(keyParamName)
39
- : yield configuration.apiKey;
40
- object[keyParamName] = localVarApiKeyValue;
41
- }
42
- });
43
- };
44
- export const setBasicAuthToObject = function (object, configuration) {
45
- if (configuration && (configuration.username || configuration.password)) {
46
- object["auth"] = { username: configuration.username, password: configuration.password };
47
- }
48
- };
49
- export const setBearerAuthToObject = function (object, configuration) {
50
- return __awaiter(this, void 0, void 0, function* () {
51
- if (configuration && configuration.accessToken) {
52
- const accessToken = typeof configuration.accessToken === 'function'
53
- ? yield configuration.accessToken()
54
- : yield configuration.accessToken;
55
- object["Authorization"] = "Bearer " + accessToken;
56
- }
57
- });
58
- };
59
- export const setOAuthToObject = function (object, name, scopes, configuration) {
60
- return __awaiter(this, void 0, void 0, function* () {
61
- if (configuration && configuration.accessToken) {
62
- const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
63
- ? yield configuration.accessToken(name, scopes)
64
- : yield configuration.accessToken;
65
- object["Authorization"] = "Bearer " + localVarAccessTokenValue;
66
- }
67
- });
68
- };
69
- function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
70
- if (parameter == null)
71
- return;
72
- if (typeof parameter === "object") {
73
- if (Array.isArray(parameter)) {
74
- parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
75
- }
76
- else {
77
- Object.keys(parameter).forEach(currentKey => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`));
78
- }
79
- }
80
- else {
81
- if (urlSearchParams.has(key)) {
82
- urlSearchParams.append(key, parameter);
83
- }
84
- else {
85
- urlSearchParams.set(key, parameter);
86
- }
87
- }
88
- }
89
- export const setSearchParams = function (url, ...objects) {
90
- const searchParams = new URLSearchParams(url.search);
91
- setFlattenedQueryParams(searchParams, objects);
92
- url.search = searchParams.toString();
93
- };
94
- export const serializeDataIfNeeded = function (value, requestOptions, configuration) {
95
- const nonString = typeof value !== 'string';
96
- const needsSerialization = nonString && configuration && configuration.isJsonMime
97
- ? configuration.isJsonMime(requestOptions.headers['Content-Type'])
98
- : nonString;
99
- return needsSerialization
100
- ? JSON.stringify(value !== undefined ? value : {})
101
- : (value || "");
102
- };
103
- export const toPathString = function (url) {
104
- return url.pathname + url.search + url.hash;
105
- };
106
- export const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
107
- return (axios = globalAxios, basePath = BASE_PATH) => {
108
- var _a;
109
- const axiosRequestArgs = Object.assign(Object.assign({}, axiosArgs.options), { url: (axios.defaults.baseURL ? '' : (_a = configuration === null || configuration === void 0 ? void 0 : configuration.basePath) !== null && _a !== void 0 ? _a : basePath) + axiosArgs.url });
110
- return axios.request(axiosRequestArgs);
111
- };
112
- };
@@ -1,98 +0,0 @@
1
- /**
2
- * Category API
3
- * API for querying categories
4
- *
5
- * The version of the OpenAPI document: 1.0.9
6
- *
7
- *
8
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
- * https://openapi-generator.tech
10
- * Do not edit the class manually.
11
- */
12
- interface AWSv4Configuration {
13
- options?: {
14
- region?: string;
15
- service?: string;
16
- };
17
- credentials?: {
18
- accessKeyId?: string;
19
- secretAccessKey?: string;
20
- sessionToken?: string;
21
- };
22
- }
23
- export interface ConfigurationParameters {
24
- apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
25
- username?: string;
26
- password?: string;
27
- accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
28
- awsv4?: AWSv4Configuration;
29
- basePath?: string;
30
- serverIndex?: number;
31
- baseOptions?: any;
32
- formDataCtor?: new () => any;
33
- }
34
- export declare class Configuration {
35
- /**
36
- * parameter for apiKey security
37
- * @param name security name
38
- */
39
- apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
40
- /**
41
- * parameter for basic security
42
- */
43
- username?: string;
44
- /**
45
- * parameter for basic security
46
- */
47
- password?: string;
48
- /**
49
- * parameter for oauth2 security
50
- * @param name security name
51
- * @param scopes oauth2 scope
52
- */
53
- accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
54
- /**
55
- * parameter for aws4 signature security
56
- * @param {Object} AWS4Signature - AWS4 Signature security
57
- * @param {string} options.region - aws region
58
- * @param {string} options.service - name of the service.
59
- * @param {string} credentials.accessKeyId - aws access key id
60
- * @param {string} credentials.secretAccessKey - aws access key
61
- * @param {string} credentials.sessionToken - aws session token
62
- * @memberof Configuration
63
- */
64
- awsv4?: AWSv4Configuration;
65
- /**
66
- * override base path
67
- */
68
- basePath?: string;
69
- /**
70
- * override server index
71
- */
72
- serverIndex?: number;
73
- /**
74
- * base options for axios calls
75
- */
76
- baseOptions?: any;
77
- /**
78
- * The FormData constructor that will be used to create multipart form data
79
- * requests. You can inject this here so that execution environments that
80
- * do not support the FormData class can still run the generated client.
81
- *
82
- * @type {new () => FormData}
83
- */
84
- formDataCtor?: new () => any;
85
- constructor(param?: ConfigurationParameters);
86
- /**
87
- * Check if the given MIME is a JSON MIME.
88
- * JSON MIME examples:
89
- * application/json
90
- * application/json; charset=UTF8
91
- * APPLICATION/JSON
92
- * application/vnd.company+json
93
- * @param mime - MIME (Multipurpose Internet Mail Extensions)
94
- * @return True if the given MIME is JSON, false otherwise.
95
- */
96
- isJsonMime(mime: string): boolean;
97
- }
98
- export {};
@@ -1,40 +0,0 @@
1
- /* tslint:disable */
2
- /**
3
- * Category API
4
- * API for querying categories
5
- *
6
- * The version of the OpenAPI document: 1.0.9
7
- *
8
- *
9
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
10
- * https://openapi-generator.tech
11
- * Do not edit the class manually.
12
- */
13
- export class Configuration {
14
- constructor(param = {}) {
15
- var _a;
16
- this.apiKey = param.apiKey;
17
- this.username = param.username;
18
- this.password = param.password;
19
- this.accessToken = param.accessToken;
20
- this.awsv4 = param.awsv4;
21
- this.basePath = param.basePath;
22
- this.serverIndex = param.serverIndex;
23
- this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({}, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
24
- this.formDataCtor = param.formDataCtor;
25
- }
26
- /**
27
- * Check if the given MIME is a JSON MIME.
28
- * JSON MIME examples:
29
- * application/json
30
- * application/json; charset=UTF8
31
- * APPLICATION/JSON
32
- * application/vnd.company+json
33
- * @param mime - MIME (Multipurpose Internet Mail Extensions)
34
- * @return True if the given MIME is JSON, false otherwise.
35
- */
36
- isJsonMime(mime) {
37
- const jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
38
- return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
39
- }
40
- }