@autifyhq/autify-sdk 0.1.0-beta.2

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 (31) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +18 -0
  3. package/dist/debug.d.ts +1 -0
  4. package/dist/debug.js +11 -0
  5. package/dist/generated/mobile/client.d.ts +32 -0
  6. package/dist/generated/mobile/client.js +62 -0
  7. package/dist/generated/mobile/openapi/api.d.ts +316 -0
  8. package/dist/generated/mobile/openapi/api.js +277 -0
  9. package/dist/generated/mobile/openapi/base.d.ts +55 -0
  10. package/dist/generated/mobile/openapi/base.js +61 -0
  11. package/dist/generated/mobile/openapi/common.d.ts +66 -0
  12. package/dist/generated/mobile/openapi/common.js +144 -0
  13. package/dist/generated/mobile/openapi/configuration.d.ts +83 -0
  14. package/dist/generated/mobile/openapi/configuration.js +44 -0
  15. package/dist/generated/mobile/openapi/index.d.ts +13 -0
  16. package/dist/generated/mobile/openapi/index.js +18 -0
  17. package/dist/generated/web/client.d.ts +117 -0
  18. package/dist/generated/web/client.js +165 -0
  19. package/dist/generated/web/openapi/api.d.ts +1402 -0
  20. package/dist/generated/web/openapi/api.js +1135 -0
  21. package/dist/generated/web/openapi/base.d.ts +55 -0
  22. package/dist/generated/web/openapi/base.js +61 -0
  23. package/dist/generated/web/openapi/common.d.ts +66 -0
  24. package/dist/generated/web/openapi/common.js +144 -0
  25. package/dist/generated/web/openapi/configuration.d.ts +83 -0
  26. package/dist/generated/web/openapi/configuration.js +44 -0
  27. package/dist/generated/web/openapi/index.d.ts +13 -0
  28. package/dist/generated/web/openapi/index.js +18 -0
  29. package/dist/index.d.ts +3 -0
  30. package/dist/index.js +10 -0
  31. package/package.json +60 -0
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Autify API
3
+ * ## Authorization You can authenticate the API by using a personal access token and passing it to the Bearer header. To generate or manage API keys、please visit [your account page](https://app.autify.com/settings). Example of using a personal access token in the header: ``` curl -H \"Authorization: Bearer YOUR_PERSONAL_ACCESS_TOKEN\" https://app.autify.com/api/v1/ ``` If the credentials are invalid or omitted, an error message is returned with status code 401: ``` { \"errors\":[{ \"message\": \"Bad credentials\" }] } ```
4
+ *
5
+ * The version of the OpenAPI document: v1
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 { Configuration } from "./configuration";
13
+ import { AxiosInstance, AxiosRequestConfig } from "axios";
14
+ export declare const BASE_PATH: string;
15
+ /**
16
+ *
17
+ * @export
18
+ */
19
+ export declare const COLLECTION_FORMATS: {
20
+ csv: string;
21
+ ssv: string;
22
+ tsv: string;
23
+ pipes: string;
24
+ };
25
+ /**
26
+ *
27
+ * @export
28
+ * @interface RequestArgs
29
+ */
30
+ export interface RequestArgs {
31
+ url: string;
32
+ options: AxiosRequestConfig;
33
+ }
34
+ /**
35
+ *
36
+ * @export
37
+ * @class BaseAPI
38
+ */
39
+ export declare class BaseAPI {
40
+ protected basePath: string;
41
+ protected axios: AxiosInstance;
42
+ protected configuration: Configuration | undefined;
43
+ constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
44
+ }
45
+ /**
46
+ *
47
+ * @export
48
+ * @class RequiredError
49
+ * @extends {Error}
50
+ */
51
+ export declare class RequiredError extends Error {
52
+ field: string;
53
+ name: "RequiredError";
54
+ constructor(field: string, msg?: string);
55
+ }
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Autify API
6
+ * ## Authorization You can authenticate the API by using a personal access token and passing it to the Bearer header. To generate or manage API keys、please visit [your account page](https://app.autify.com/settings). Example of using a personal access token in the header: ``` curl -H \"Authorization: Bearer YOUR_PERSONAL_ACCESS_TOKEN\" https://app.autify.com/api/v1/ ``` If the credentials are invalid or omitted, an error message is returned with status code 401: ``` { \"errors\":[{ \"message\": \"Bad credentials\" }] } ```
7
+ *
8
+ * The version of the OpenAPI document: v1
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
17
+ const tslib_1 = require("tslib");
18
+ // Some imports not used depending on template conditions
19
+ // @ts-ignore
20
+ const axios_1 = tslib_1.__importDefault(require("axios"));
21
+ exports.BASE_PATH = "https://app.autify.com/api/v1".replace(/\/+$/, "");
22
+ /**
23
+ *
24
+ * @export
25
+ */
26
+ exports.COLLECTION_FORMATS = {
27
+ csv: ",",
28
+ ssv: " ",
29
+ tsv: "\t",
30
+ pipes: "|",
31
+ };
32
+ /**
33
+ *
34
+ * @export
35
+ * @class BaseAPI
36
+ */
37
+ class BaseAPI {
38
+ constructor(configuration, basePath = exports.BASE_PATH, axios = axios_1.default) {
39
+ this.basePath = basePath;
40
+ this.axios = axios;
41
+ if (configuration) {
42
+ this.configuration = configuration;
43
+ this.basePath = configuration.basePath || this.basePath;
44
+ }
45
+ }
46
+ }
47
+ exports.BaseAPI = BaseAPI;
48
+ /**
49
+ *
50
+ * @export
51
+ * @class RequiredError
52
+ * @extends {Error}
53
+ */
54
+ class RequiredError extends Error {
55
+ constructor(field, msg) {
56
+ super(msg);
57
+ this.field = field;
58
+ this.name = "RequiredError";
59
+ }
60
+ }
61
+ exports.RequiredError = RequiredError;
@@ -0,0 +1,66 @@
1
+ /**
2
+ * Autify API
3
+ * ## Authorization You can authenticate the API by using a personal access token and passing it to the Bearer header. To generate or manage API keys、please visit [your account page](https://app.autify.com/settings). Example of using a personal access token in the header: ``` curl -H \"Authorization: Bearer YOUR_PERSONAL_ACCESS_TOKEN\" https://app.autify.com/api/v1/ ``` If the credentials are invalid or omitted, an error message is returned with status code 401: ``` { \"errors\":[{ \"message\": \"Bad credentials\" }] } ```
4
+ *
5
+ * The version of the OpenAPI document: v1
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 { Configuration } from "./configuration";
13
+ import { RequestArgs } from "./base";
14
+ import { AxiosInstance, AxiosResponse } from "axios";
15
+ import { URL } from "url";
16
+ /**
17
+ *
18
+ * @export
19
+ */
20
+ export declare const DUMMY_BASE_URL = "https://example.com";
21
+ /**
22
+ *
23
+ * @throws {RequiredError}
24
+ * @export
25
+ */
26
+ export declare const assertParamExists: (functionName: string, paramName: string, paramValue: unknown) => void;
27
+ /**
28
+ *
29
+ * @export
30
+ */
31
+ export declare const setApiKeyToObject: (object: any, keyParamName: string, configuration?: Configuration) => Promise<void>;
32
+ /**
33
+ *
34
+ * @export
35
+ */
36
+ export declare const setBasicAuthToObject: (object: any, configuration?: Configuration) => void;
37
+ /**
38
+ *
39
+ * @export
40
+ */
41
+ export declare const setBearerAuthToObject: (object: any, configuration?: Configuration) => Promise<void>;
42
+ /**
43
+ *
44
+ * @export
45
+ */
46
+ export declare const setOAuthToObject: (object: any, name: string, scopes: string[], configuration?: Configuration) => Promise<void>;
47
+ /**
48
+ *
49
+ * @export
50
+ */
51
+ export declare const setSearchParams: (url: URL, ...objects: any[]) => void;
52
+ /**
53
+ *
54
+ * @export
55
+ */
56
+ export declare const serializeDataIfNeeded: (value: any, requestOptions: any, configuration?: Configuration) => any;
57
+ /**
58
+ *
59
+ * @export
60
+ */
61
+ export declare const toPathString: (url: URL) => string;
62
+ /**
63
+ *
64
+ * @export
65
+ */
66
+ export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T, any>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
@@ -0,0 +1,144 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Autify API
6
+ * ## Authorization You can authenticate the API by using a personal access token and passing it to the Bearer header. To generate or manage API keys、please visit [your account page](https://app.autify.com/settings). Example of using a personal access token in the header: ``` curl -H \"Authorization: Bearer YOUR_PERSONAL_ACCESS_TOKEN\" https://app.autify.com/api/v1/ ``` If the credentials are invalid or omitted, an error message is returned with status code 401: ``` { \"errors\":[{ \"message\": \"Bad credentials\" }] } ```
7
+ *
8
+ * The version of the OpenAPI document: v1
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.createRequestFunction = exports.toPathString = exports.serializeDataIfNeeded = exports.setSearchParams = exports.setOAuthToObject = exports.setBearerAuthToObject = exports.setBasicAuthToObject = exports.setApiKeyToObject = exports.assertParamExists = exports.DUMMY_BASE_URL = void 0;
17
+ const base_1 = require("./base");
18
+ const url_1 = require("url");
19
+ /**
20
+ *
21
+ * @export
22
+ */
23
+ exports.DUMMY_BASE_URL = "https://example.com";
24
+ /**
25
+ *
26
+ * @throws {RequiredError}
27
+ * @export
28
+ */
29
+ const assertParamExists = function (functionName, paramName, paramValue) {
30
+ if (paramValue === null || paramValue === undefined) {
31
+ throw new base_1.RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
32
+ }
33
+ };
34
+ exports.assertParamExists = assertParamExists;
35
+ /**
36
+ *
37
+ * @export
38
+ */
39
+ const setApiKeyToObject = async function (object, keyParamName, configuration) {
40
+ if (configuration && configuration.apiKey) {
41
+ const localVarApiKeyValue = typeof configuration.apiKey === "function"
42
+ ? await configuration.apiKey(keyParamName)
43
+ : await configuration.apiKey;
44
+ object[keyParamName] = localVarApiKeyValue;
45
+ }
46
+ };
47
+ exports.setApiKeyToObject = setApiKeyToObject;
48
+ /**
49
+ *
50
+ * @export
51
+ */
52
+ const setBasicAuthToObject = function (object, configuration) {
53
+ if (configuration && (configuration.username || configuration.password)) {
54
+ object["auth"] = {
55
+ username: configuration.username,
56
+ password: configuration.password,
57
+ };
58
+ }
59
+ };
60
+ exports.setBasicAuthToObject = setBasicAuthToObject;
61
+ /**
62
+ *
63
+ * @export
64
+ */
65
+ const setBearerAuthToObject = async function (object, configuration) {
66
+ if (configuration && configuration.accessToken) {
67
+ const accessToken = typeof configuration.accessToken === "function"
68
+ ? await configuration.accessToken()
69
+ : await configuration.accessToken;
70
+ object["Authorization"] = "Bearer " + accessToken;
71
+ }
72
+ };
73
+ exports.setBearerAuthToObject = setBearerAuthToObject;
74
+ /**
75
+ *
76
+ * @export
77
+ */
78
+ const setOAuthToObject = async function (object, name, scopes, configuration) {
79
+ if (configuration && configuration.accessToken) {
80
+ const localVarAccessTokenValue = typeof configuration.accessToken === "function"
81
+ ? await configuration.accessToken(name, scopes)
82
+ : await configuration.accessToken;
83
+ object["Authorization"] = "Bearer " + localVarAccessTokenValue;
84
+ }
85
+ };
86
+ exports.setOAuthToObject = setOAuthToObject;
87
+ /**
88
+ *
89
+ * @export
90
+ */
91
+ const setSearchParams = function (url, ...objects) {
92
+ const searchParams = new url_1.URLSearchParams(url.search);
93
+ for (const object of objects) {
94
+ for (const key in object) {
95
+ if (Array.isArray(object[key])) {
96
+ searchParams.delete(key);
97
+ for (const item of object[key]) {
98
+ searchParams.append(key, item);
99
+ }
100
+ }
101
+ else {
102
+ searchParams.set(key, object[key]);
103
+ }
104
+ }
105
+ }
106
+ url.search = searchParams.toString();
107
+ };
108
+ exports.setSearchParams = setSearchParams;
109
+ /**
110
+ *
111
+ * @export
112
+ */
113
+ const serializeDataIfNeeded = function (value, requestOptions, configuration) {
114
+ const nonString = typeof value !== "string";
115
+ const needsSerialization = nonString && configuration && configuration.isJsonMime
116
+ ? configuration.isJsonMime(requestOptions.headers["Content-Type"])
117
+ : nonString;
118
+ return needsSerialization
119
+ ? JSON.stringify(value !== undefined ? value : {})
120
+ : value || "";
121
+ };
122
+ exports.serializeDataIfNeeded = serializeDataIfNeeded;
123
+ /**
124
+ *
125
+ * @export
126
+ */
127
+ const toPathString = function (url) {
128
+ return url.pathname + url.search + url.hash;
129
+ };
130
+ exports.toPathString = toPathString;
131
+ /**
132
+ *
133
+ * @export
134
+ */
135
+ const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
136
+ return (axios = globalAxios, basePath = BASE_PATH) => {
137
+ const axiosRequestArgs = {
138
+ ...axiosArgs.options,
139
+ url: ((configuration === null || configuration === void 0 ? void 0 : configuration.basePath) || basePath) + axiosArgs.url,
140
+ };
141
+ return axios.request(axiosRequestArgs);
142
+ };
143
+ };
144
+ exports.createRequestFunction = createRequestFunction;
@@ -0,0 +1,83 @@
1
+ /**
2
+ * Autify API
3
+ * ## Authorization You can authenticate the API by using a personal access token and passing it to the Bearer header. To generate or manage API keys、please visit [your account page](https://app.autify.com/settings). Example of using a personal access token in the header: ``` curl -H \"Authorization: Bearer YOUR_PERSONAL_ACCESS_TOKEN\" https://app.autify.com/api/v1/ ``` If the credentials are invalid or omitted, an error message is returned with status code 401: ``` { \"errors\":[{ \"message\": \"Bad credentials\" }] } ```
4
+ *
5
+ * The version of the OpenAPI document: v1
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 interface ConfigurationParameters {
13
+ apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
14
+ username?: string;
15
+ password?: string;
16
+ accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
17
+ basePath?: string;
18
+ baseOptions?: any;
19
+ formDataCtor?: new () => any;
20
+ }
21
+ export declare class Configuration {
22
+ /**
23
+ * parameter for apiKey security
24
+ * @param name security name
25
+ * @memberof Configuration
26
+ */
27
+ apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
28
+ /**
29
+ * parameter for basic security
30
+ *
31
+ * @type {string}
32
+ * @memberof Configuration
33
+ */
34
+ username?: string;
35
+ /**
36
+ * parameter for basic security
37
+ *
38
+ * @type {string}
39
+ * @memberof Configuration
40
+ */
41
+ password?: string;
42
+ /**
43
+ * parameter for oauth2 security
44
+ * @param name security name
45
+ * @param scopes oauth2 scope
46
+ * @memberof Configuration
47
+ */
48
+ accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
49
+ /**
50
+ * override base path
51
+ *
52
+ * @type {string}
53
+ * @memberof Configuration
54
+ */
55
+ basePath?: string;
56
+ /**
57
+ * base options for axios calls
58
+ *
59
+ * @type {any}
60
+ * @memberof Configuration
61
+ */
62
+ baseOptions?: any;
63
+ /**
64
+ * The FormData constructor that will be used to create multipart form data
65
+ * requests. You can inject this here so that execution environments that
66
+ * do not support the FormData class can still run the generated client.
67
+ *
68
+ * @type {new () => FormData}
69
+ */
70
+ formDataCtor?: new () => any;
71
+ constructor(param?: ConfigurationParameters);
72
+ /**
73
+ * Check if the given MIME is a JSON MIME.
74
+ * JSON MIME examples:
75
+ * application/json
76
+ * application/json; charset=UTF8
77
+ * APPLICATION/JSON
78
+ * application/vnd.company+json
79
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
80
+ * @return True if the given MIME is JSON, false otherwise.
81
+ */
82
+ isJsonMime(mime: string): boolean;
83
+ }
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Autify API
6
+ * ## Authorization You can authenticate the API by using a personal access token and passing it to the Bearer header. To generate or manage API keys、please visit [your account page](https://app.autify.com/settings). Example of using a personal access token in the header: ``` curl -H \"Authorization: Bearer YOUR_PERSONAL_ACCESS_TOKEN\" https://app.autify.com/api/v1/ ``` If the credentials are invalid or omitted, an error message is returned with status code 401: ``` { \"errors\":[{ \"message\": \"Bad credentials\" }] } ```
7
+ *
8
+ * The version of the OpenAPI document: v1
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.Configuration = void 0;
17
+ class Configuration {
18
+ constructor(param = {}) {
19
+ this.apiKey = param.apiKey;
20
+ this.username = param.username;
21
+ this.password = param.password;
22
+ this.accessToken = param.accessToken;
23
+ this.basePath = param.basePath;
24
+ this.baseOptions = param.baseOptions;
25
+ this.formDataCtor = param.formDataCtor;
26
+ }
27
+ /**
28
+ * Check if the given MIME is a JSON MIME.
29
+ * JSON MIME examples:
30
+ * application/json
31
+ * application/json; charset=UTF8
32
+ * APPLICATION/JSON
33
+ * application/vnd.company+json
34
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
35
+ * @return True if the given MIME is JSON, false otherwise.
36
+ */
37
+ isJsonMime(mime) {
38
+ const jsonMime = new RegExp("^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$", "i");
39
+ return (mime !== null &&
40
+ (jsonMime.test(mime) ||
41
+ mime.toLowerCase() === "application/json-patch+json"));
42
+ }
43
+ }
44
+ exports.Configuration = Configuration;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Autify API
3
+ * ## Authorization You can authenticate the API by using a personal access token and passing it to the Bearer header. To generate or manage API keys、please visit [your account page](https://app.autify.com/settings). Example of using a personal access token in the header: ``` curl -H \"Authorization: Bearer YOUR_PERSONAL_ACCESS_TOKEN\" https://app.autify.com/api/v1/ ``` If the credentials are invalid or omitted, an error message is returned with status code 401: ``` { \"errors\":[{ \"message\": \"Bad credentials\" }] } ```
4
+ *
5
+ * The version of the OpenAPI document: v1
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";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Autify API
6
+ * ## Authorization You can authenticate the API by using a personal access token and passing it to the Bearer header. To generate or manage API keys、please visit [your account page](https://app.autify.com/settings). Example of using a personal access token in the header: ``` curl -H \"Authorization: Bearer YOUR_PERSONAL_ACCESS_TOKEN\" https://app.autify.com/api/v1/ ``` If the credentials are invalid or omitted, an error message is returned with status code 401: ``` { \"errors\":[{ \"message\": \"Bad credentials\" }] } ```
7
+ *
8
+ * The version of the OpenAPI document: v1
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ const tslib_1 = require("tslib");
17
+ tslib_1.__exportStar(require("./api"), exports);
18
+ tslib_1.__exportStar(require("./configuration"), exports);
@@ -0,0 +1,3 @@
1
+ import "./debug";
2
+ export { Client as WebClient, BASE_PATH as WEB_BASE_PATH, } from "./generated/web/client";
3
+ export { Client as MobileClient, BASE_PATH as MOBILE_BASE_PATH, } from "./generated/mobile/client";
package/dist/index.js ADDED
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MOBILE_BASE_PATH = exports.MobileClient = exports.WEB_BASE_PATH = exports.WebClient = void 0;
4
+ require("./debug");
5
+ var client_1 = require("./generated/web/client");
6
+ Object.defineProperty(exports, "WebClient", { enumerable: true, get: function () { return client_1.Client; } });
7
+ Object.defineProperty(exports, "WEB_BASE_PATH", { enumerable: true, get: function () { return client_1.BASE_PATH; } });
8
+ var client_2 = require("./generated/mobile/client");
9
+ Object.defineProperty(exports, "MobileClient", { enumerable: true, get: function () { return client_2.Client; } });
10
+ Object.defineProperty(exports, "MOBILE_BASE_PATH", { enumerable: true, get: function () { return client_2.BASE_PATH; } });
package/package.json ADDED
@@ -0,0 +1,60 @@
1
+ {
2
+ "name": "@autifyhq/autify-sdk",
3
+ "version": "0.1.0-beta.2",
4
+ "description": "Autify SDK for JavaScript",
5
+ "author": "Autify",
6
+ "homepage": "https://github.com/autifyhq/autify-sdk-js",
7
+ "license": "MIT",
8
+ "main": "dist/index.js",
9
+ "types": "dist/index.d.ts",
10
+ "repository": "autifyhq/autify-sdk-js",
11
+ "bugs": "https://github.com/autifyhq/autify-sdk-js/issues",
12
+ "files": [
13
+ "/dist"
14
+ ],
15
+ "engines": {
16
+ "node": ">=12.0.0"
17
+ },
18
+ "dependencies": {
19
+ "axios": "^0.27.2",
20
+ "axios-logger": "^2.6.1",
21
+ "debug": "^4.3.4",
22
+ "form-data": "^4.0.0",
23
+ "tslib": "^2.4.0"
24
+ },
25
+ "devDependencies": {
26
+ "@openapitools/openapi-generator-cli": "^2.5.1",
27
+ "@types/debug": "^4.1.7",
28
+ "@types/node": "^16.11.39",
29
+ "@typescript-eslint/eslint-plugin": "^5.27.1",
30
+ "@typescript-eslint/parser": "^5.27.1",
31
+ "eslint": "^8.17.0",
32
+ "eslint-config-prettier": "^8.5.0",
33
+ "eslint-plugin-unused-imports": "^2.0.0",
34
+ "husky": "^8.0.1",
35
+ "lint-staged": "^13.0.1",
36
+ "prettier": "^2.6.2",
37
+ "shx": "^0.3.4",
38
+ "ts-morph": "^14.0.0",
39
+ "ts-node": "^10.8.1",
40
+ "typescript": "^4.7.3"
41
+ },
42
+ "scripts": {
43
+ "generate:openapi-client:web": "openapi-generator-cli generate -i ./swagger-web.yml -g typescript-axios -o src/generated/web/openapi --additional-properties withNodeImports=true,multipartFormData=true",
44
+ "generate:openapi-client:mobile": "openapi-generator-cli generate -i ./swagger-mobile.yml -g typescript-axios -o src/generated/mobile/openapi --additional-properties withNodeImports=true,multipartFormData=true",
45
+ "generate:sdk-client": "ts-node scripts/generate.ts",
46
+ "generate:client:web": "npm run generate:openapi-client:web && npm run generate:sdk-client web",
47
+ "generate:client:mobile": "npm run generate:openapi-client:mobile && npm run generate:sdk-client mobile",
48
+ "generate": "npm run generate:client:web && npm run generate:client:mobile && npm run lint && npm run format",
49
+ "build": "shx rm -rf dist && tsc -b",
50
+ "prepack": "npm run build",
51
+ "lint": "eslint . --ext .ts --fix",
52
+ "format": "prettier --write .",
53
+ "prepare": "husky install",
54
+ "test": "true"
55
+ },
56
+ "lint-staged": {
57
+ "**/*": "prettier --write --ignore-unknown",
58
+ "**/*.ts": "eslint --fix"
59
+ }
60
+ }