@speechall/sdk 1.0.0 → 2.0.4
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/.beads/README.md +81 -0
- package/.beads/config.yaml +62 -0
- package/.beads/issues.jsonl +46 -0
- package/.beads/metadata.json +4 -0
- package/.env.example +5 -0
- package/.fernignore +45 -0
- package/.gitattributes +3 -0
- package/.github/copilot-instructions.md +78 -0
- package/.github/workflows/auto-release-simple.yml.deprecated +106 -0
- package/.github/workflows/auto-release.yml +67 -0
- package/.github/workflows/ci.yml +41 -0
- package/.github/workflows/release.yml +57 -0
- package/AGENTS.md +94 -0
- package/CHANGELOG.md +58 -0
- package/CLAUDE.md +75 -0
- package/README.md +294 -155
- package/examples/CLAUDE.md +136 -0
- package/examples/advanced-options.ts +213 -0
- package/examples/basic-transcription.ts +66 -0
- package/examples/error-handling.ts +251 -0
- package/examples/list-models.ts +112 -0
- package/examples/remote-transcription.ts +60 -0
- package/fern/fern.config.json +4 -0
- package/fern/generators.yml +43 -0
- package/jest.config.js +11 -0
- package/package.json +26 -46
- package/regenerate.sh +45 -0
- package/scripts/fix-generated-code.sh +25 -0
- package/src/BaseClient.ts +82 -0
- package/src/Client.ts +30 -0
- package/src/api/errors/BadRequestError.ts +22 -0
- package/src/api/errors/GatewayTimeoutError.ts +22 -0
- package/src/api/errors/InternalServerError.ts +22 -0
- package/src/api/errors/NotFoundError.ts +22 -0
- package/src/api/errors/PaymentRequiredError.ts +22 -0
- package/src/api/errors/ServiceUnavailableError.ts +22 -0
- package/src/api/errors/TooManyRequestsError.ts +22 -0
- package/src/api/errors/UnauthorizedError.ts +22 -0
- package/src/api/errors/index.ts +8 -0
- package/src/api/index.ts +3 -0
- package/src/api/resources/index.ts +5 -0
- package/src/api/resources/replacementRules/client/Client.ts +148 -0
- package/src/api/resources/replacementRules/client/index.ts +1 -0
- package/src/api/resources/replacementRules/client/requests/CreateReplacementRulesetRequest.ts +25 -0
- package/src/api/resources/replacementRules/client/requests/index.ts +1 -0
- package/src/api/resources/replacementRules/index.ts +2 -0
- package/src/api/resources/replacementRules/types/CreateReplacementRulesetResponse.ts +6 -0
- package/src/api/resources/replacementRules/types/index.ts +1 -0
- package/src/api/resources/speechToText/client/Client.ts +275 -0
- package/src/api/resources/speechToText/client/index.ts +1 -0
- package/src/api/resources/speechToText/client/requests/RemoteTranscriptionConfiguration.ts +20 -0
- package/src/api/resources/speechToText/client/requests/TranscribeRequest.ts +26 -0
- package/src/api/resources/speechToText/client/requests/index.ts +2 -0
- package/src/api/resources/speechToText/index.ts +1 -0
- package/src/api/types/BaseTranscriptionConfiguration.ts +29 -0
- package/src/api/types/ErrorResponse.ts +11 -0
- package/src/api/types/ExactRule.ts +13 -0
- package/src/api/types/RegexGroupRule.ts +28 -0
- package/src/api/types/RegexRule.ts +28 -0
- package/src/api/types/ReplacementRule.ts +25 -0
- package/src/api/types/SpeechToTextModel.ts +90 -0
- package/src/api/types/TranscriptLanguageCode.ts +114 -0
- package/src/api/types/TranscriptOutputFormat.ts +18 -0
- package/src/api/types/TranscriptionDetailed.ts +19 -0
- package/src/api/types/TranscriptionModelIdentifier.ts +80 -0
- package/src/api/types/TranscriptionOnlyText.ts +11 -0
- package/src/api/types/TranscriptionProvider.ts +23 -0
- package/src/api/types/TranscriptionResponse.ts +8 -0
- package/src/api/types/TranscriptionSegment.ts +17 -0
- package/src/api/types/TranscriptionWord.ts +17 -0
- package/src/api/types/index.ts +16 -0
- package/src/auth/BearerAuthProvider.ts +37 -0
- package/src/auth/index.ts +1 -0
- package/src/core/auth/AuthProvider.ts +6 -0
- package/src/core/auth/AuthRequest.ts +9 -0
- package/src/core/auth/BasicAuth.ts +32 -0
- package/src/core/auth/BearerToken.ts +20 -0
- package/src/core/auth/NoOpAuthProvider.ts +8 -0
- package/src/core/auth/index.ts +5 -0
- package/src/core/base64.ts +27 -0
- package/src/core/exports.ts +2 -0
- package/src/core/fetcher/APIResponse.ts +23 -0
- package/src/core/fetcher/BinaryResponse.ts +34 -0
- package/src/core/fetcher/EndpointMetadata.ts +13 -0
- package/src/core/fetcher/EndpointSupplier.ts +14 -0
- package/src/core/fetcher/Fetcher.ts +391 -0
- package/src/core/fetcher/Headers.ts +93 -0
- package/src/core/fetcher/HttpResponsePromise.ts +116 -0
- package/src/core/fetcher/RawResponse.ts +61 -0
- package/src/core/fetcher/Supplier.ts +11 -0
- package/src/core/fetcher/createRequestUrl.ts +6 -0
- package/src/core/fetcher/getErrorResponseBody.ts +33 -0
- package/src/core/fetcher/getFetchFn.ts +3 -0
- package/src/core/fetcher/getHeader.ts +8 -0
- package/src/core/fetcher/getRequestBody.ts +20 -0
- package/src/core/fetcher/getResponseBody.ts +58 -0
- package/src/core/fetcher/index.ts +11 -0
- package/src/core/fetcher/makeRequest.ts +42 -0
- package/src/core/fetcher/requestWithRetries.ts +64 -0
- package/src/core/fetcher/signals.ts +26 -0
- package/src/core/file/exports.ts +1 -0
- package/src/core/file/file.ts +217 -0
- package/src/core/file/index.ts +2 -0
- package/src/core/file/types.ts +81 -0
- package/src/core/headers.ts +35 -0
- package/src/core/index.ts +7 -0
- package/src/core/json.ts +27 -0
- package/src/core/logging/exports.ts +19 -0
- package/src/core/logging/index.ts +1 -0
- package/src/core/logging/logger.ts +203 -0
- package/src/core/runtime/index.ts +1 -0
- package/src/core/runtime/runtime.ts +134 -0
- package/src/core/url/encodePathParam.ts +18 -0
- package/src/core/url/index.ts +3 -0
- package/src/core/url/join.ts +79 -0
- package/src/core/url/qs.ts +74 -0
- package/src/environments.ts +7 -0
- package/src/errors/SpeechallError.ts +58 -0
- package/src/errors/SpeechallTimeoutError.ts +13 -0
- package/src/errors/handleNonStatusCodeError.ts +37 -0
- package/src/errors/index.ts +2 -0
- package/src/exports.ts +1 -0
- package/src/index.ts +6 -0
- package/test-import.ts +17 -0
- package/tests/integration/api.test.ts +93 -0
- package/tests/unit/client.test.ts +91 -0
- package/tsconfig.json +20 -0
- package/dist/api.d.ts +0 -501
- package/dist/api.d.ts.map +0 -1
- package/dist/api.js +0 -610
- package/dist/base.d.ts +0 -32
- package/dist/base.d.ts.map +0 -1
- package/dist/base.js +0 -35
- package/dist/common.d.ts +0 -14
- package/dist/common.d.ts.map +0 -1
- package/dist/common.js +0 -91
- package/dist/configuration.d.ts +0 -23
- package/dist/configuration.d.ts.map +0 -1
- package/dist/configuration.js +0 -25
- package/dist/esm/api.js +0 -592
- package/dist/esm/base.js +0 -27
- package/dist/esm/common.js +0 -79
- package/dist/esm/configuration.js +0 -21
- package/dist/esm/example.js +0 -131
- package/dist/esm/index.js +0 -2
- package/dist/example.d.ts +0 -3
- package/dist/example.d.ts.map +0 -1
- package/dist/example.js +0 -133
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -18
package/dist/base.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.operationServerMap = exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
|
|
7
|
-
const axios_1 = __importDefault(require("axios"));
|
|
8
|
-
exports.BASE_PATH = "https://api.speechall.com/v1".replace(/\/+$/, "");
|
|
9
|
-
exports.COLLECTION_FORMATS = {
|
|
10
|
-
csv: ",",
|
|
11
|
-
ssv: " ",
|
|
12
|
-
tsv: "\t",
|
|
13
|
-
pipes: "|",
|
|
14
|
-
};
|
|
15
|
-
class BaseAPI {
|
|
16
|
-
constructor(configuration, basePath = exports.BASE_PATH, axios = axios_1.default) {
|
|
17
|
-
this.basePath = basePath;
|
|
18
|
-
this.axios = axios;
|
|
19
|
-
if (configuration) {
|
|
20
|
-
this.configuration = configuration;
|
|
21
|
-
this.basePath = configuration.basePath ?? basePath;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
exports.BaseAPI = BaseAPI;
|
|
26
|
-
;
|
|
27
|
-
class RequiredError extends Error {
|
|
28
|
-
constructor(field, msg) {
|
|
29
|
-
super(msg);
|
|
30
|
-
this.field = field;
|
|
31
|
-
this.name = "RequiredError";
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
exports.RequiredError = RequiredError;
|
|
35
|
-
exports.operationServerMap = {};
|
package/dist/common.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { Configuration } from "./configuration";
|
|
2
|
-
import type { RequestArgs } from "./base";
|
|
3
|
-
import type { AxiosInstance, AxiosResponse } from 'axios';
|
|
4
|
-
export declare const DUMMY_BASE_URL = "https://example.com";
|
|
5
|
-
export declare const assertParamExists: (functionName: string, paramName: string, paramValue: unknown) => void;
|
|
6
|
-
export declare const setApiKeyToObject: (object: any, keyParamName: string, configuration?: Configuration) => Promise<void>;
|
|
7
|
-
export declare const setBasicAuthToObject: (object: any, configuration?: Configuration) => void;
|
|
8
|
-
export declare const setBearerAuthToObject: (object: any, configuration?: Configuration) => Promise<void>;
|
|
9
|
-
export declare const setOAuthToObject: (object: any, name: string, scopes: string[], configuration?: Configuration) => Promise<void>;
|
|
10
|
-
export declare const setSearchParams: (url: URL, ...objects: any[]) => void;
|
|
11
|
-
export declare const serializeDataIfNeeded: (value: any, requestOptions: any, configuration?: Configuration) => any;
|
|
12
|
-
export declare const toPathString: (url: URL) => string;
|
|
13
|
-
export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
|
|
14
|
-
//# sourceMappingURL=common.d.ts.map
|
package/dist/common.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../common.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAC1C,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAO1D,eAAO,MAAM,cAAc,wBAAwB,CAAA;AAOnD,eAAO,MAAM,iBAAiB,GAAa,cAAc,MAAM,EAAE,WAAW,MAAM,EAAE,YAAY,OAAO,SAItG,CAAA;AAMD,eAAO,MAAM,iBAAiB,GAAmB,QAAQ,GAAG,EAAE,cAAc,MAAM,EAAE,gBAAgB,aAAa,kBAOhH,CAAA;AAMD,eAAO,MAAM,oBAAoB,GAAa,QAAQ,GAAG,EAAE,gBAAgB,aAAa,SAIvF,CAAA;AAMD,eAAO,MAAM,qBAAqB,GAAmB,QAAQ,GAAG,EAAE,gBAAgB,aAAa,kBAO9F,CAAA;AAMD,eAAO,MAAM,gBAAgB,GAAmB,QAAQ,GAAG,EAAE,MAAM,MAAM,EAAE,QAAQ,MAAM,EAAE,EAAE,gBAAgB,aAAa,kBAOzH,CAAA;AA4BD,eAAO,MAAM,eAAe,GAAa,KAAK,GAAG,EAAE,GAAG,SAAS,GAAG,EAAE,SAInE,CAAA;AAMD,eAAO,MAAM,qBAAqB,GAAa,OAAO,GAAG,EAAE,gBAAgB,GAAG,EAAE,gBAAgB,aAAa,QAQ5G,CAAA;AAMD,eAAO,MAAM,YAAY,GAAa,KAAK,GAAG,WAE7C,CAAA;AAMD,eAAO,MAAM,qBAAqB,GAAa,WAAW,WAAW,EAAE,aAAa,aAAa,EAAE,WAAW,MAAM,EAAE,gBAAgB,aAAa,MACvI,CAAC,GAAG,OAAO,EAAE,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,EAAE,QAAO,aAA2B,EAAE,WAAU,MAAkB,eAI9G,CAAA"}
|
package/dist/common.js
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createRequestFunction = exports.toPathString = exports.serializeDataIfNeeded = exports.setSearchParams = exports.setOAuthToObject = exports.setBearerAuthToObject = exports.setBasicAuthToObject = exports.setApiKeyToObject = exports.assertParamExists = exports.DUMMY_BASE_URL = void 0;
|
|
4
|
-
const base_1 = require("./base");
|
|
5
|
-
exports.DUMMY_BASE_URL = 'https://example.com';
|
|
6
|
-
const assertParamExists = function (functionName, paramName, paramValue) {
|
|
7
|
-
if (paramValue === null || paramValue === undefined) {
|
|
8
|
-
throw new base_1.RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
exports.assertParamExists = assertParamExists;
|
|
12
|
-
const setApiKeyToObject = async function (object, keyParamName, configuration) {
|
|
13
|
-
if (configuration && configuration.apiKey) {
|
|
14
|
-
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
15
|
-
? await configuration.apiKey(keyParamName)
|
|
16
|
-
: await configuration.apiKey;
|
|
17
|
-
object[keyParamName] = localVarApiKeyValue;
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
exports.setApiKeyToObject = setApiKeyToObject;
|
|
21
|
-
const setBasicAuthToObject = function (object, configuration) {
|
|
22
|
-
if (configuration && (configuration.username || configuration.password)) {
|
|
23
|
-
object["auth"] = { username: configuration.username, password: configuration.password };
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
exports.setBasicAuthToObject = setBasicAuthToObject;
|
|
27
|
-
const setBearerAuthToObject = async function (object, configuration) {
|
|
28
|
-
if (configuration && configuration.accessToken) {
|
|
29
|
-
const accessToken = typeof configuration.accessToken === 'function'
|
|
30
|
-
? await configuration.accessToken()
|
|
31
|
-
: await configuration.accessToken;
|
|
32
|
-
object["Authorization"] = "Bearer " + accessToken;
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
exports.setBearerAuthToObject = setBearerAuthToObject;
|
|
36
|
-
const setOAuthToObject = async function (object, name, scopes, configuration) {
|
|
37
|
-
if (configuration && configuration.accessToken) {
|
|
38
|
-
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
|
39
|
-
? await configuration.accessToken(name, scopes)
|
|
40
|
-
: await configuration.accessToken;
|
|
41
|
-
object["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
exports.setOAuthToObject = setOAuthToObject;
|
|
45
|
-
function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
|
|
46
|
-
if (parameter == null)
|
|
47
|
-
return;
|
|
48
|
-
if (typeof parameter === "object") {
|
|
49
|
-
if (Array.isArray(parameter)) {
|
|
50
|
-
parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
Object.keys(parameter).forEach(currentKey => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`));
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
if (urlSearchParams.has(key)) {
|
|
58
|
-
urlSearchParams.append(key, parameter);
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
urlSearchParams.set(key, parameter);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
const setSearchParams = function (url, ...objects) {
|
|
66
|
-
const searchParams = new URLSearchParams(url.search);
|
|
67
|
-
setFlattenedQueryParams(searchParams, objects);
|
|
68
|
-
url.search = searchParams.toString();
|
|
69
|
-
};
|
|
70
|
-
exports.setSearchParams = setSearchParams;
|
|
71
|
-
const serializeDataIfNeeded = function (value, requestOptions, configuration) {
|
|
72
|
-
const nonString = typeof value !== 'string';
|
|
73
|
-
const needsSerialization = nonString && configuration && configuration.isJsonMime
|
|
74
|
-
? configuration.isJsonMime(requestOptions.headers['Content-Type'])
|
|
75
|
-
: nonString;
|
|
76
|
-
return needsSerialization
|
|
77
|
-
? JSON.stringify(value !== undefined ? value : {})
|
|
78
|
-
: (value || "");
|
|
79
|
-
};
|
|
80
|
-
exports.serializeDataIfNeeded = serializeDataIfNeeded;
|
|
81
|
-
const toPathString = function (url) {
|
|
82
|
-
return url.pathname + url.search + url.hash;
|
|
83
|
-
};
|
|
84
|
-
exports.toPathString = toPathString;
|
|
85
|
-
const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
|
|
86
|
-
return (axios = globalAxios, basePath = BASE_PATH) => {
|
|
87
|
-
const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url };
|
|
88
|
-
return axios.request(axiosRequestArgs);
|
|
89
|
-
};
|
|
90
|
-
};
|
|
91
|
-
exports.createRequestFunction = createRequestFunction;
|
package/dist/configuration.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export interface ConfigurationParameters {
|
|
2
|
-
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
|
3
|
-
username?: string;
|
|
4
|
-
password?: string;
|
|
5
|
-
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
|
6
|
-
basePath?: string;
|
|
7
|
-
serverIndex?: number;
|
|
8
|
-
baseOptions?: any;
|
|
9
|
-
formDataCtor?: new () => any;
|
|
10
|
-
}
|
|
11
|
-
export declare class Configuration {
|
|
12
|
-
apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
|
|
13
|
-
username?: string;
|
|
14
|
-
password?: string;
|
|
15
|
-
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
|
|
16
|
-
basePath?: string;
|
|
17
|
-
serverIndex?: number;
|
|
18
|
-
baseOptions?: any;
|
|
19
|
-
formDataCtor?: new () => any;
|
|
20
|
-
constructor(param?: ConfigurationParameters);
|
|
21
|
-
isJsonMime(mime: string): boolean;
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=configuration.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"configuration.d.ts","sourceRoot":"","sources":["../configuration.ts"],"names":[],"mappings":"AAeA,MAAM,WAAW,uBAAuB;IACpC,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;IACrG,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;IAClJ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,GAAG,CAAC;IAClB,YAAY,CAAC,EAAE,UAAU,GAAG,CAAC;CAChC;AAED,qBAAa,aAAa;IAMtB,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;IAOrG,QAAQ,CAAC,EAAE,MAAM,CAAC;IAOlB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAOlB,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;IAOlJ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAOlB,WAAW,CAAC,EAAE,MAAM,CAAC;IAOrB,WAAW,CAAC,EAAE,GAAG,CAAC;IAQlB,YAAY,CAAC,EAAE,UAAU,GAAG,CAAC;gBAEjB,KAAK,GAAE,uBAA4B;IA0BxC,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;CAI3C"}
|
package/dist/configuration.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Configuration = void 0;
|
|
4
|
-
class Configuration {
|
|
5
|
-
constructor(param = {}) {
|
|
6
|
-
this.apiKey = param.apiKey;
|
|
7
|
-
this.username = param.username;
|
|
8
|
-
this.password = param.password;
|
|
9
|
-
this.accessToken = param.accessToken;
|
|
10
|
-
this.basePath = param.basePath;
|
|
11
|
-
this.serverIndex = param.serverIndex;
|
|
12
|
-
this.baseOptions = {
|
|
13
|
-
...param.baseOptions,
|
|
14
|
-
headers: {
|
|
15
|
-
...param.baseOptions?.headers,
|
|
16
|
-
},
|
|
17
|
-
};
|
|
18
|
-
this.formDataCtor = param.formDataCtor;
|
|
19
|
-
}
|
|
20
|
-
isJsonMime(mime) {
|
|
21
|
-
const jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
|
|
22
|
-
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
exports.Configuration = Configuration;
|