@alexrockshouts/miri-sdk 1.0.2 → 1.0.3

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.

Potentially problematic release.


This version of @alexrockshouts/miri-sdk might be problematic. Click here for more details.

@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  /* tslint:disable */
2
3
  /* eslint-disable */
3
4
  /**
@@ -11,19 +12,24 @@
11
12
  * https://openapi-generator.tech
12
13
  * Do not edit the class manually.
13
14
  */
14
- import globalAxios from 'axios';
15
- export const BASE_PATH = "http://localhost:8080".replace(/\/+$/, "");
16
- export const COLLECTION_FORMATS = {
15
+ var __importDefault = (this && this.__importDefault) || function (mod) {
16
+ return (mod && mod.__esModule) ? mod : { "default": mod };
17
+ };
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.operationServerMap = exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
20
+ const axios_1 = __importDefault(require("axios"));
21
+ exports.BASE_PATH = "http://localhost:8080".replace(/\/+$/, "");
22
+ exports.COLLECTION_FORMATS = {
17
23
  csv: ",",
18
24
  ssv: " ",
19
25
  tsv: "\t",
20
26
  pipes: "|",
21
27
  };
22
- export class BaseAPI {
28
+ class BaseAPI {
23
29
  basePath;
24
30
  axios;
25
31
  configuration;
26
- constructor(configuration, basePath = BASE_PATH, axios = globalAxios) {
32
+ constructor(configuration, basePath = exports.BASE_PATH, axios = axios_1.default) {
27
33
  this.basePath = basePath;
28
34
  this.axios = axios;
29
35
  if (configuration) {
@@ -32,8 +38,9 @@ export class BaseAPI {
32
38
  }
33
39
  }
34
40
  }
41
+ exports.BaseAPI = BaseAPI;
35
42
  ;
36
- export class RequiredError extends Error {
43
+ class RequiredError extends Error {
37
44
  field;
38
45
  constructor(field, msg) {
39
46
  super(msg);
@@ -41,4 +48,5 @@ export class RequiredError extends Error {
41
48
  this.name = "RequiredError";
42
49
  }
43
50
  }
44
- export const operationServerMap = {};
51
+ exports.RequiredError = RequiredError;
52
+ exports.operationServerMap = {};
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  /* tslint:disable */
2
3
  /* eslint-disable */
3
4
  /**
@@ -11,18 +12,21 @@
11
12
  * https://openapi-generator.tech
12
13
  * Do not edit the class manually.
13
14
  */
14
- import { RequiredError } from "./base";
15
- export const DUMMY_BASE_URL = 'https://example.com';
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.createRequestFunction = exports.toPathString = exports.serializeDataIfNeeded = exports.replaceWithSerializableTypeIfNeeded = 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
+ exports.DUMMY_BASE_URL = 'https://example.com';
16
19
  /**
17
20
  *
18
21
  * @throws {RequiredError}
19
22
  */
20
- export const assertParamExists = function (functionName, paramName, paramValue) {
23
+ const assertParamExists = function (functionName, paramName, paramValue) {
21
24
  if (paramValue === null || paramValue === undefined) {
22
- throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
25
+ throw new base_1.RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
23
26
  }
24
27
  };
25
- export const setApiKeyToObject = async function (object, keyParamName, configuration) {
28
+ exports.assertParamExists = assertParamExists;
29
+ const setApiKeyToObject = async function (object, keyParamName, configuration) {
26
30
  if (configuration && configuration.apiKey) {
27
31
  const localVarApiKeyValue = typeof configuration.apiKey === 'function'
28
32
  ? await configuration.apiKey(keyParamName)
@@ -30,12 +34,14 @@ export const setApiKeyToObject = async function (object, keyParamName, configura
30
34
  object[keyParamName] = localVarApiKeyValue;
31
35
  }
32
36
  };
33
- export const setBasicAuthToObject = function (object, configuration) {
37
+ exports.setApiKeyToObject = setApiKeyToObject;
38
+ const setBasicAuthToObject = function (object, configuration) {
34
39
  if (configuration && (configuration.username || configuration.password)) {
35
40
  object["auth"] = { username: configuration.username, password: configuration.password };
36
41
  }
37
42
  };
38
- export const setBearerAuthToObject = async function (object, configuration) {
43
+ exports.setBasicAuthToObject = setBasicAuthToObject;
44
+ const setBearerAuthToObject = async function (object, configuration) {
39
45
  if (configuration && configuration.accessToken) {
40
46
  const accessToken = typeof configuration.accessToken === 'function'
41
47
  ? await configuration.accessToken()
@@ -43,7 +49,8 @@ export const setBearerAuthToObject = async function (object, configuration) {
43
49
  object["Authorization"] = "Bearer " + accessToken;
44
50
  }
45
51
  };
46
- export const setOAuthToObject = async function (object, name, scopes, configuration) {
52
+ exports.setBearerAuthToObject = setBearerAuthToObject;
53
+ const setOAuthToObject = async function (object, name, scopes, configuration) {
47
54
  if (configuration && configuration.accessToken) {
48
55
  const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
49
56
  ? await configuration.accessToken(name, scopes)
@@ -51,6 +58,7 @@ export const setOAuthToObject = async function (object, name, scopes, configurat
51
58
  object["Authorization"] = "Bearer " + localVarAccessTokenValue;
52
59
  }
53
60
  };
61
+ exports.setOAuthToObject = setOAuthToObject;
54
62
  function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
55
63
  if (parameter == null)
56
64
  return;
@@ -71,18 +79,19 @@ function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
71
79
  }
72
80
  }
73
81
  }
74
- export const setSearchParams = function (url, ...objects) {
82
+ const setSearchParams = function (url, ...objects) {
75
83
  const searchParams = new URLSearchParams(url.search);
76
84
  setFlattenedQueryParams(searchParams, objects);
77
85
  url.search = searchParams.toString();
78
86
  };
87
+ exports.setSearchParams = setSearchParams;
79
88
  /**
80
89
  * JSON serialization helper function which replaces instances of unserializable types with serializable ones.
81
90
  * This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
82
91
  * Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
83
92
  */
84
93
  // @ts-ignore
85
- export const replaceWithSerializableTypeIfNeeded = function (key, value) {
94
+ const replaceWithSerializableTypeIfNeeded = function (key, value) {
86
95
  if (value instanceof Set) {
87
96
  return Array.from(value);
88
97
  }
@@ -90,21 +99,25 @@ export const replaceWithSerializableTypeIfNeeded = function (key, value) {
90
99
  return value;
91
100
  }
92
101
  };
93
- export const serializeDataIfNeeded = function (value, requestOptions, configuration) {
102
+ exports.replaceWithSerializableTypeIfNeeded = replaceWithSerializableTypeIfNeeded;
103
+ const serializeDataIfNeeded = function (value, requestOptions, configuration) {
94
104
  const nonString = typeof value !== 'string';
95
105
  const needsSerialization = nonString && configuration && configuration.isJsonMime
96
106
  ? configuration.isJsonMime(requestOptions.headers['Content-Type'])
97
107
  : nonString;
98
108
  return needsSerialization
99
- ? JSON.stringify(value !== undefined ? value : {}, replaceWithSerializableTypeIfNeeded)
109
+ ? JSON.stringify(value !== undefined ? value : {}, exports.replaceWithSerializableTypeIfNeeded)
100
110
  : (value || "");
101
111
  };
102
- export const toPathString = function (url) {
112
+ exports.serializeDataIfNeeded = serializeDataIfNeeded;
113
+ const toPathString = function (url) {
103
114
  return url.pathname + url.search + url.hash;
104
115
  };
105
- export const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
116
+ exports.toPathString = toPathString;
117
+ const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
106
118
  return (axios = globalAxios, basePath = BASE_PATH) => {
107
119
  const axiosRequestArgs = { ...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url };
108
120
  return axios.request(axiosRequestArgs);
109
121
  };
110
122
  };
123
+ exports.createRequestFunction = createRequestFunction;
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  /* tslint:disable */
2
3
  /**
3
4
  * Miri Autonomous Agent API
@@ -10,7 +11,9 @@
10
11
  * https://openapi-generator.tech
11
12
  * Do not edit the class manually.
12
13
  */
13
- export class Configuration {
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.Configuration = void 0;
16
+ class Configuration {
14
17
  /**
15
18
  * parameter for apiKey security
16
19
  * @param name security name
@@ -92,3 +95,4 @@ export class Configuration {
92
95
  return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
93
96
  }
94
97
  }
98
+ exports.Configuration = Configuration;
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  /* tslint:disable */
2
3
  /* eslint-disable */
3
4
  /**
@@ -11,5 +12,20 @@
11
12
  * https://openapi-generator.tech
12
13
  * Do not edit the class manually.
13
14
  */
14
- export * from "./api";
15
- export * from "./configuration";
15
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ var desc = Object.getOwnPropertyDescriptor(m, k);
18
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
19
+ desc = { enumerable: true, get: function() { return m[k]; } };
20
+ }
21
+ Object.defineProperty(o, k2, desc);
22
+ }) : (function(o, m, k, k2) {
23
+ if (k2 === undefined) k2 = k;
24
+ o[k2] = m[k];
25
+ }));
26
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
27
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
28
+ };
29
+ Object.defineProperty(exports, "__esModule", { value: true });
30
+ __exportStar(require("./api"), exports);
31
+ __exportStar(require("./configuration"), exports);
package/dist/index.js CHANGED
@@ -1,2 +1,18 @@
1
- export * from "./miri-sdk.js";
2
- export * from "./generated";
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./miri-sdk.js"), exports);
18
+ __exportStar(require("./generated"), exports);
package/dist/miri-sdk.js CHANGED
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  /* eslint-disable */
2
3
  /* tslint:disable */
3
4
  // @ts-nocheck
@@ -9,23 +10,28 @@
9
10
  * ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
10
11
  * ---------------------------------------------------------------
11
12
  */
12
- import axios from "axios";
13
- export var ContentType;
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.Api = exports.HttpClient = exports.ContentType = void 0;
18
+ const axios_1 = __importDefault(require("axios"));
19
+ var ContentType;
14
20
  (function (ContentType) {
15
21
  ContentType["Json"] = "application/json";
16
22
  ContentType["JsonApi"] = "application/vnd.api+json";
17
23
  ContentType["FormData"] = "multipart/form-data";
18
24
  ContentType["UrlEncoded"] = "application/x-www-form-urlencoded";
19
25
  ContentType["Text"] = "text/plain";
20
- })(ContentType || (ContentType = {}));
21
- export class HttpClient {
26
+ })(ContentType || (exports.ContentType = ContentType = {}));
27
+ class HttpClient {
22
28
  instance;
23
29
  securityData = null;
24
30
  securityWorker;
25
31
  secure;
26
32
  format;
27
33
  constructor({ securityWorker, secure, format, ...axiosConfig } = {}) {
28
- this.instance = axios.create({
34
+ this.instance = axios_1.default.create({
29
35
  ...axiosConfig,
30
36
  baseURL: axiosConfig.baseURL || "http://localhost:8080",
31
37
  });
@@ -105,6 +111,7 @@ export class HttpClient {
105
111
  });
106
112
  };
107
113
  }
114
+ exports.HttpClient = HttpClient;
108
115
  /**
109
116
  * @title Miri Autonomous Agent API
110
117
  * @version 1.0.0
@@ -112,7 +119,7 @@ export class HttpClient {
112
119
  *
113
120
  * API for interacting with the Miri autonomous agent service.
114
121
  */
115
- export class Api extends HttpClient {
122
+ class Api extends HttpClient {
116
123
  api = {
117
124
  /**
118
125
  * No description
@@ -334,3 +341,4 @@ export class Api extends HttpClient {
334
341
  }),
335
342
  };
336
343
  }
344
+ exports.Api = Api;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexrockshouts/miri-sdk",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "TypeScript SDK for Miri Autonomous Agent",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -27,6 +27,5 @@
27
27
  },
28
28
  "devDependencies": {
29
29
  "typescript": "^5.0.0"
30
- },
31
- "type": "module"
30
+ }
32
31
  }