diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 870acd7..8a2631e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -13,7 +13,11 @@ jobs: with: node-version: 12 registry-url: https://registry.npmjs.org/ - - run: npm install - - run: npm publish --access public + - name: Install dependencies + run: npm install + - name: Build package + run: npm run build + - name: Publish package + run: npm publish --access public env: NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 54aa57d..8895a6d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,7 +22,8 @@ jobs: node-version: ${{ matrix.node }} - name: Install Node Modules run: npm install - + - name: Build package + run: npm run build - name: Run tests env: SANDBOX_API_KEY: ${{ secrets.SANDBOX_API_KEY }} diff --git a/.gitignore b/.gitignore index a41c358..760b806 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ # OpenAPI Code gen artifacts .openapi-generator .openapi-generator-ignore +dist +node_modules diff --git a/CHANGELOG.md b/CHANGELOG.md index 5f12490..0ac9c46 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.2.1] - 2020-09-18 + +### Fixed + +- Fixing an issue related to the OpenApi code generator. + ## [1.2.0] - 2020-09-17 ### Added diff --git a/dist/ApiClient.js b/dist/ApiClient.js deleted file mode 100644 index ef559bf..0000000 --- a/dist/ApiClient.js +++ /dev/null @@ -1,493 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _superagent = _interopRequireDefault(require("superagent")); - -var _querystring = _interopRequireDefault(require("querystring")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Patch API V1 - * The core API used to integrate with Patch's service - * - * Contact: developers@usepatch.com - */ -class ApiClient { - constructor() { - this.basePath = 'https://api.usepatch.com'.replace(/\/+$/, ''); - this.authentications = { - bearer_auth: { - type: 'bearer' - } - }; - this.defaultHeaders = {}; - /** - * The default HTTP timeout for all API calls. - * @type {Number} - * @default 60000 - */ - - this.timeout = 60000; - /** - * If set to false an additional timestamp parameter is added to all API GET calls to - * prevent browser caching - * @type {Boolean} - * @default true - */ - - this.cache = true; - this.enableCookies = false; - /* - * Used to save and return cookies in a node.js (non-browser) setting, - * if this.enableCookies is set to true. - */ - - if (typeof window === 'undefined') { - this.agent = new _superagent.default.agent(); - } - /* - * Allow user to override superagent agent - */ - - - this.requestAgent = null; - /* - * Allow user to add superagent plugins - */ - - this.plugins = null; - } - - paramToString(param) { - if (param == undefined || param == null) { - return ''; - } - - if (param instanceof Date) { - return param.toJSON(); - } - - return param.toString(); - } - - buildUrl(path, pathParams) { - if (!path.match(/^\//)) { - path = '/' + path; - } - - var url = this.basePath + path; - url = url.replace(/\{([\w-]+)\}/g, (fullMatch, key) => { - var value; - - if (pathParams.hasOwnProperty(key)) { - value = this.paramToString(pathParams[key]); - } else { - value = fullMatch; - } - - return encodeURIComponent(value); - }); - return url; - } - - isJsonMime(contentType) { - return Boolean(contentType != null && contentType.match(/^application\/json(;.*)?$/i)); - } - - jsonPreferredMime(contentTypes) { - for (var i = 0; i < contentTypes.length; i++) { - if (this.isJsonMime(contentTypes[i])) { - return contentTypes[i]; - } - } - - return contentTypes[0]; - } - - isFileParam(param) { - // fs.ReadStream in Node.js and Electron (but not in runtime like browserify) - if (typeof require === 'function') { - let fs; - - try { - fs = require('fs'); - } catch (err) {} - - if (fs && fs.ReadStream && param instanceof fs.ReadStream) { - return true; - } - } // Buffer in Node.js - - - if (typeof Buffer === 'function' && param instanceof Buffer) { - return true; - } // Blob in browser - - - if (typeof Blob === 'function' && param instanceof Blob) { - return true; - } // File in browser (it seems File object is also instance of Blob, but keep this for safe) - - - if (typeof File === 'function' && param instanceof File) { - return true; - } - - return false; - } - - normalizeParams(params) { - var newParams = {}; - - for (var key in params) { - if (params.hasOwnProperty(key) && params[key] != undefined && params[key] != null) { - var value = params[key]; - - if (this.isFileParam(value) || Array.isArray(value)) { - newParams[key] = value; - } else { - newParams[key] = this.paramToString(value); - } - } - } - - return newParams; - } - - buildCollectionParam(param, collectionFormat) { - if (param == null) { - return null; - } - - switch (collectionFormat) { - case 'csv': - return param.map(this.paramToString).join(','); - - case 'ssv': - return param.map(this.paramToString).join(' '); - - case 'tsv': - return param.map(this.paramToString).join('\t'); - - case 'pipes': - return param.map(this.paramToString).join('|'); - - case 'multi': - //return the array directly as SuperAgent will handle it as expected - return param.map(this.paramToString); - - default: - throw new Error('Unknown collection format: ' + collectionFormat); - } - } - - applyAuthToRequest(request, authNames) { - authNames.forEach(authName => { - var auth = this.authentications[authName]; - - switch (auth.type) { - case 'basic': - if (auth.username || auth.password) { - request.auth(auth.username || '', auth.password || ''); - } - - break; - - case 'bearer': - if (auth.accessToken) { - request.set({ - Authorization: 'Bearer ' + auth.accessToken - }); - } - - break; - - case 'apiKey': - if (auth.apiKey) { - var data = {}; - - if (auth.apiKeyPrefix) { - data[auth.name] = auth.apiKeyPrefix + ' ' + auth.apiKey; - } else { - data[auth.name] = auth.apiKey; - } - - if (auth['in'] === 'header') { - request.set(data); - } else { - request.query(data); - } - } - - break; - - case 'oauth2': - if (auth.accessToken) { - request.set({ - Authorization: 'Bearer ' + auth.accessToken - }); - } - - break; - - default: - throw new Error('Unknown authentication type: ' + auth.type); - } - }); - } - - deserialize(response, returnType) { - if (response == null || returnType == null || response.status == 204) { - return null; - } // Rely on SuperAgent for parsing response body. - // See http://visionmedia.github.io/superagent/#parsing-response-bodies - - - var data = response.body; - - if (data == null || typeof data === 'object' && typeof data.length === 'undefined' && !Object.keys(data).length) { - // SuperAgent does not always produce a body; use the unparsed response as a fallback - data = response.text; - } - - return ApiClient.convertToType(data, returnType); - } - - callApi(path, httpMethod, pathParams, queryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts, returnType) { - var url = this.buildUrl(path, pathParams); - var request = (0, _superagent.default)(httpMethod, url); - - if (this.plugins !== null) { - for (var index in this.plugins) { - if (this.plugins.hasOwnProperty(index)) { - request.use(this.plugins[index]); - } - } - } // apply authentications - - - this.applyAuthToRequest(request, authNames); // set query parameters - - if (httpMethod.toUpperCase() === 'GET' && this.cache === false) { - queryParams['_'] = new Date().getTime(); - } - - request.query(this.normalizeParams(queryParams)); // set header parameters - - request.set(this.defaultHeaders).set(this.normalizeParams(headerParams)); // set requestAgent if it is set by user - - if (this.requestAgent) { - request.agent(this.requestAgent); - } // set request timeout - - - request.timeout(this.timeout); - var contentType = this.jsonPreferredMime(contentTypes); - - if (contentType) { - // Issue with superagent and multipart/form-data (https://github.com/visionmedia/superagent/issues/746) - if (contentType != 'multipart/form-data') { - request.type(contentType); - } - } else if (!request.header['Content-Type']) { - request.type('application/json'); - } - - if (contentType === 'application/x-www-form-urlencoded') { - request.send(_querystring.default.stringify(this.normalizeParams(formParams))); - } else if (contentType == 'multipart/form-data') { - var _formParams = this.normalizeParams(formParams); - - for (var key in _formParams) { - if (_formParams.hasOwnProperty(key)) { - if (this.isFileParam(_formParams[key])) { - // file field - request.attach(key, _formParams[key]); - } else { - request.field(key, _formParams[key]); - } - } - } - } else if (bodyParam !== null && bodyParam !== undefined) { - request.send(bodyParam); - } - - var accept = this.jsonPreferredMime(accepts); - - if (accept) { - request.accept(accept); - } - - if (returnType === 'Blob') { - request.responseType('blob'); - } else if (returnType === 'String') { - request.responseType('string'); - } // Attach previously saved cookies, if enabled - - - if (this.enableCookies) { - if (typeof window === 'undefined') { - this.agent._attachCookies(request); - } else { - request.withCredentials(); - } - } - - return new Promise((resolve, reject) => { - request.end((error, response) => { - var data = this.deserialize(response, returnType); - - if (error) { - reject(data); - } else { - if (this.enableCookies && typeof window === 'undefined') { - this.agent._saveCookies(response); - } - - resolve(data); - } - }); - }); - } - - static parseDate(str) { - return new Date(str); - } - - static convertToType(data, type) { - if (data === null || data === undefined) return data; - - switch (type) { - case 'Boolean': - return Boolean(data); - - case 'Integer': - return parseInt(data, 10); - - case 'Number': - return parseFloat(data); - - case 'String': - return String(data); - - case 'Date': - return ApiClient.parseDate(String(data)); - - case 'Blob': - return data; - - default: - if (type === Object) { - // generic object, return directly - return data; - } else if (typeof type.constructFromObject === 'function') { - // for model type like User and enum class - return type.constructFromObject(data); - } else if (Array.isArray(type)) { - // for array type like: ['String'] - var itemType = type[0]; - return data.map(item => { - return ApiClient.convertToType(item, itemType); - }); - } else if (typeof type === 'object') { - // for plain object type like: {'String': 'Integer'} - var keyType, valueType; - - for (var k in type) { - if (type.hasOwnProperty(k)) { - keyType = k; - valueType = type[k]; - break; - } - } - - var result = {}; - - for (var k in data) { - if (data.hasOwnProperty(k)) { - var key = ApiClient.convertToType(k, keyType); - var value = ApiClient.convertToType(data[k], valueType); - result[key] = value; - } - } - - return result; - } else { - // for unknown type, return the data directly - return data; - } - - } - } - - hostSettings() { - return [{ - url: 'https://api.usepatch.com', - description: 'No description provided', - variables: { - defaultHost: { - description: 'No description provided', - default_value: 'api.usepatch.com', - enum_values: [] - } - } - }]; - } - - getBasePathFromSettings(index, variables = {}) { - var servers = this.hostSettings(); // check array index out of bound - - if (index < 0 || index >= servers.length) { - throw new Error('Invalid index ' + index + ' when selecting the host settings. Must be less than ' + servers.length); - } - - var server = servers[index]; - var url = server['url']; // go through variable and assign a value - - for (var variable_name in server['variables']) { - if (variable_name in variables) { - let variable = server['variables'][variable_name]; - - if (!('enum_values' in variable) || variable['enum_values'].includes(variables[variable_name])) { - url = url.replace('{' + variable_name + '}', variables[variable_name]); - } else { - throw new Error('The variable `' + variable_name + '` in the host URL has invalid value ' + variables[variable_name] + '. Must be ' + server['variables'][variable_name]['enum_values'] + '.'); - } - } else { - // use default value - url = url.replace('{' + variable_name + '}', server['variables'][variable_name]['default_value']); - } - } - - return url; - } - - static constructFromObject(data, obj, itemType) { - if (Array.isArray(data)) { - for (var i = 0; i < data.length; i++) { - if (data.hasOwnProperty(i)) obj[i] = ApiClient.convertToType(data[i], itemType); - } - } else { - for (var k in data) { - if (data.hasOwnProperty(k)) obj[k] = ApiClient.convertToType(data[k], itemType); - } - } - } - -} - -ApiClient.CollectionFormatEnum = { - CSV: ',', - SSV: ' ', - TSV: '\t', - PIPES: '|', - MULTI: 'multi' -}; -ApiClient.instance = new ApiClient(); -var _default = ApiClient; -exports.default = _default; \ No newline at end of file diff --git a/dist/api/EstimatesApi.js b/dist/api/EstimatesApi.js deleted file mode 100644 index 21b37a5..0000000 --- a/dist/api/EstimatesApi.js +++ /dev/null @@ -1,105 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _ApiClient = _interopRequireDefault(require("../ApiClient")); - -var _CreateMassEstimateRequest = _interopRequireDefault(require("../model/CreateMassEstimateRequest")); - -var _ErrorResponse = _interopRequireDefault(require("../model/ErrorResponse")); - -var _EstimateListResponse = _interopRequireDefault(require("../model/EstimateListResponse")); - -var _EstimateResponse = _interopRequireDefault(require("../model/EstimateResponse")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Patch API V1 - * The core API used to integrate with Patch's service - * - * Contact: developers@usepatch.com - */ -class EstimatesApi { - constructor(apiClient) { - this.apiClient = apiClient || _ApiClient.default.instance; - this.createMassEstimate = this.createMassEstimate.bind(this); - this.createMassEstimateWithHttpInfo = this.createMassEstimateWithHttpInfo.bind(this); - this.retrieveEstimate = this.retrieveEstimate.bind(this); - this.retrieveEstimateWithHttpInfo = this.retrieveEstimateWithHttpInfo.bind(this); - this.retrieveEstimates = this.retrieveEstimates.bind(this); - this.retrieveEstimatesWithHttpInfo = this.retrieveEstimatesWithHttpInfo.bind(this); - } - - createMassEstimateWithHttpInfo(createMassEstimateRequest) { - let postBody = createMassEstimateRequest; // verify the required parameter 'createMassEstimateRequest' is set - - if (createMassEstimateRequest === undefined || createMassEstimateRequest === null) { - throw new Error("Missing the required parameter 'createMassEstimateRequest' when calling createMassEstimate"); - } - - let pathParams = {}; - let queryParams = {}; - let headerParams = {}; - let formParams = {}; - let authNames = ['bearer_auth']; - let contentTypes = ['application/json']; - let accepts = ['application/json']; - let returnType = _EstimateResponse.default; - return this.apiClient.callApi('/v1/estimates/mass', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType); - } - - createMassEstimate(createMassEstimateRequest) { - return this.createMassEstimateWithHttpInfo(createMassEstimateRequest); - } - - retrieveEstimateWithHttpInfo(id) { - let postBody = null; // verify the required parameter 'id' is set - - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling retrieveEstimate"); - } - - let pathParams = { - id: id - }; - let queryParams = {}; - let headerParams = {}; - let formParams = {}; - let authNames = ['bearer_auth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = _EstimateResponse.default; - return this.apiClient.callApi('/v1/estimates/{id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType); - } - - retrieveEstimate(id) { - return this.retrieveEstimateWithHttpInfo(id); - } - - retrieveEstimatesWithHttpInfo(opts) { - opts = opts || {}; - let postBody = null; - let pathParams = {}; - let queryParams = { - page: opts['page'] - }; - let headerParams = {}; - let formParams = {}; - let authNames = ['bearer_auth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = _EstimateListResponse.default; - return this.apiClient.callApi('/v1/estimates', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType); - } - - retrieveEstimates(opts) { - return this.retrieveEstimatesWithHttpInfo(opts); - } - -} - -exports.default = EstimatesApi; \ No newline at end of file diff --git a/dist/api/OrdersApi.js b/dist/api/OrdersApi.js deleted file mode 100644 index aeb1a21..0000000 --- a/dist/api/OrdersApi.js +++ /dev/null @@ -1,157 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _ApiClient = _interopRequireDefault(require("../ApiClient")); - -var _CreateOrderRequest = _interopRequireDefault(require("../model/CreateOrderRequest")); - -var _ErrorResponse = _interopRequireDefault(require("../model/ErrorResponse")); - -var _OrderListResponse = _interopRequireDefault(require("../model/OrderListResponse")); - -var _OrderResponse = _interopRequireDefault(require("../model/OrderResponse")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Patch API V1 - * The core API used to integrate with Patch's service - * - * Contact: developers@usepatch.com - */ -class OrdersApi { - constructor(apiClient) { - this.apiClient = apiClient || _ApiClient.default.instance; - this.cancelOrder = this.cancelOrder.bind(this); - this.cancelOrderWithHttpInfo = this.cancelOrderWithHttpInfo.bind(this); - this.createOrder = this.createOrder.bind(this); - this.createOrderWithHttpInfo = this.createOrderWithHttpInfo.bind(this); - this.placeOrder = this.placeOrder.bind(this); - this.placeOrderWithHttpInfo = this.placeOrderWithHttpInfo.bind(this); - this.retrieveOrder = this.retrieveOrder.bind(this); - this.retrieveOrderWithHttpInfo = this.retrieveOrderWithHttpInfo.bind(this); - this.retrieveOrders = this.retrieveOrders.bind(this); - this.retrieveOrdersWithHttpInfo = this.retrieveOrdersWithHttpInfo.bind(this); - } - - cancelOrderWithHttpInfo(id) { - let postBody = null; // verify the required parameter 'id' is set - - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling cancelOrder"); - } - - let pathParams = { - id: id - }; - let queryParams = {}; - let headerParams = {}; - let formParams = {}; - let authNames = ['bearer_auth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = _OrderResponse.default; - return this.apiClient.callApi('/v1/orders/{id}/cancel', 'PATCH', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType); - } - - cancelOrder(id) { - return this.cancelOrderWithHttpInfo(id); - } - - createOrderWithHttpInfo(createOrderRequest) { - let postBody = createOrderRequest; // verify the required parameter 'createOrderRequest' is set - - if (createOrderRequest === undefined || createOrderRequest === null) { - throw new Error("Missing the required parameter 'createOrderRequest' when calling createOrder"); - } - - let pathParams = {}; - let queryParams = {}; - let headerParams = {}; - let formParams = {}; - let authNames = ['bearer_auth']; - let contentTypes = ['application/json']; - let accepts = ['application/json']; - let returnType = _OrderResponse.default; - return this.apiClient.callApi('/v1/orders', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType); - } - - createOrder(createOrderRequest) { - return this.createOrderWithHttpInfo(createOrderRequest); - } - - placeOrderWithHttpInfo(id) { - let postBody = null; // verify the required parameter 'id' is set - - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling placeOrder"); - } - - let pathParams = { - id: id - }; - let queryParams = {}; - let headerParams = {}; - let formParams = {}; - let authNames = ['bearer_auth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = _OrderResponse.default; - return this.apiClient.callApi('/v1/orders/{id}/place', 'PATCH', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType); - } - - placeOrder(id) { - return this.placeOrderWithHttpInfo(id); - } - - retrieveOrderWithHttpInfo(id) { - let postBody = null; // verify the required parameter 'id' is set - - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling retrieveOrder"); - } - - let pathParams = { - id: id - }; - let queryParams = {}; - let headerParams = {}; - let formParams = {}; - let authNames = ['bearer_auth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = _OrderResponse.default; - return this.apiClient.callApi('/v1/orders/{id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType); - } - - retrieveOrder(id) { - return this.retrieveOrderWithHttpInfo(id); - } - - retrieveOrdersWithHttpInfo(opts) { - opts = opts || {}; - let postBody = null; - let pathParams = {}; - let queryParams = { - page: opts['page'] - }; - let headerParams = {}; - let formParams = {}; - let authNames = ['bearer_auth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = _OrderListResponse.default; - return this.apiClient.callApi('/v1/orders', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType); - } - - retrieveOrders(opts) { - return this.retrieveOrdersWithHttpInfo(opts); - } - -} - -exports.default = OrdersApi; \ No newline at end of file diff --git a/dist/api/PreferencesApi.js b/dist/api/PreferencesApi.js deleted file mode 100644 index 58365b9..0000000 --- a/dist/api/PreferencesApi.js +++ /dev/null @@ -1,131 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _ApiClient = _interopRequireDefault(require("../ApiClient")); - -var _CreatePreferenceRequest = _interopRequireDefault(require("../model/CreatePreferenceRequest")); - -var _ErrorResponse = _interopRequireDefault(require("../model/ErrorResponse")); - -var _PreferenceListResponse = _interopRequireDefault(require("../model/PreferenceListResponse")); - -var _PreferenceResponse = _interopRequireDefault(require("../model/PreferenceResponse")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Patch API V1 - * The core API used to integrate with Patch's service - * - * Contact: developers@usepatch.com - */ -class PreferencesApi { - constructor(apiClient) { - this.apiClient = apiClient || _ApiClient.default.instance; - this.createPreference = this.createPreference.bind(this); - this.createPreferenceWithHttpInfo = this.createPreferenceWithHttpInfo.bind(this); - this.deletePreference = this.deletePreference.bind(this); - this.deletePreferenceWithHttpInfo = this.deletePreferenceWithHttpInfo.bind(this); - this.retrievePreference = this.retrievePreference.bind(this); - this.retrievePreferenceWithHttpInfo = this.retrievePreferenceWithHttpInfo.bind(this); - this.retrievePreferences = this.retrievePreferences.bind(this); - this.retrievePreferencesWithHttpInfo = this.retrievePreferencesWithHttpInfo.bind(this); - } - - createPreferenceWithHttpInfo(createPreferenceRequest) { - let postBody = createPreferenceRequest; // verify the required parameter 'createPreferenceRequest' is set - - if (createPreferenceRequest === undefined || createPreferenceRequest === null) { - throw new Error("Missing the required parameter 'createPreferenceRequest' when calling createPreference"); - } - - let pathParams = {}; - let queryParams = {}; - let headerParams = {}; - let formParams = {}; - let authNames = ['bearer_auth']; - let contentTypes = ['application/json']; - let accepts = ['application/json']; - let returnType = _PreferenceResponse.default; - return this.apiClient.callApi('/v1/preferences', 'POST', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType); - } - - createPreference(createPreferenceRequest) { - return this.createPreferenceWithHttpInfo(createPreferenceRequest); - } - - deletePreferenceWithHttpInfo(id) { - let postBody = null; // verify the required parameter 'id' is set - - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling deletePreference"); - } - - let pathParams = { - id: id - }; - let queryParams = {}; - let headerParams = {}; - let formParams = {}; - let authNames = ['bearer_auth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = _PreferenceResponse.default; - return this.apiClient.callApi('/v1/preferences/{id}', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType); - } - - deletePreference(id) { - return this.deletePreferenceWithHttpInfo(id); - } - - retrievePreferenceWithHttpInfo(id) { - let postBody = null; // verify the required parameter 'id' is set - - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling retrievePreference"); - } - - let pathParams = { - id: id - }; - let queryParams = {}; - let headerParams = {}; - let formParams = {}; - let authNames = ['bearer_auth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = _PreferenceResponse.default; - return this.apiClient.callApi('/v1/preferences/{id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType); - } - - retrievePreference(id) { - return this.retrievePreferenceWithHttpInfo(id); - } - - retrievePreferencesWithHttpInfo(opts) { - opts = opts || {}; - let postBody = null; - let pathParams = {}; - let queryParams = { - page: opts['page'] - }; - let headerParams = {}; - let formParams = {}; - let authNames = ['bearer_auth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = _PreferenceListResponse.default; - return this.apiClient.callApi('/v1/preferences', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType); - } - - retrievePreferences(opts) { - return this.retrievePreferencesWithHttpInfo(opts); - } - -} - -exports.default = PreferencesApi; \ No newline at end of file diff --git a/dist/api/ProjectsApi.js b/dist/api/ProjectsApi.js deleted file mode 100644 index bd96e27..0000000 --- a/dist/api/ProjectsApi.js +++ /dev/null @@ -1,79 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _ApiClient = _interopRequireDefault(require("../ApiClient")); - -var _ErrorResponse = _interopRequireDefault(require("../model/ErrorResponse")); - -var _ProjectListResponse = _interopRequireDefault(require("../model/ProjectListResponse")); - -var _ProjectResponse = _interopRequireDefault(require("../model/ProjectResponse")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Patch API V1 - * The core API used to integrate with Patch's service - * - * Contact: developers@usepatch.com - */ -class ProjectsApi { - constructor(apiClient) { - this.apiClient = apiClient || _ApiClient.default.instance; - this.retrieveProject = this.retrieveProject.bind(this); - this.retrieveProjectWithHttpInfo = this.retrieveProjectWithHttpInfo.bind(this); - this.retrieveProjects = this.retrieveProjects.bind(this); - this.retrieveProjectsWithHttpInfo = this.retrieveProjectsWithHttpInfo.bind(this); - } - - retrieveProjectWithHttpInfo(id) { - let postBody = null; // verify the required parameter 'id' is set - - if (id === undefined || id === null) { - throw new Error("Missing the required parameter 'id' when calling retrieveProject"); - } - - let pathParams = { - id: id - }; - let queryParams = {}; - let headerParams = {}; - let formParams = {}; - let authNames = ['bearer_auth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = _ProjectResponse.default; - return this.apiClient.callApi('/v1/projects/{id}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType); - } - - retrieveProject(id) { - return this.retrieveProjectWithHttpInfo(id); - } - - retrieveProjectsWithHttpInfo(opts) { - opts = opts || {}; - let postBody = null; - let pathParams = {}; - let queryParams = { - page: opts['page'] - }; - let headerParams = {}; - let formParams = {}; - let authNames = ['bearer_auth']; - let contentTypes = []; - let accepts = ['application/json']; - let returnType = _ProjectListResponse.default; - return this.apiClient.callApi('/v1/projects', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType); - } - - retrieveProjects(opts) { - return this.retrieveProjectsWithHttpInfo(opts); - } - -} - -exports.default = ProjectsApi; \ No newline at end of file diff --git a/dist/index.js b/dist/index.js deleted file mode 100644 index ff86ce1..0000000 --- a/dist/index.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = Patch; - -var _ApiClient = _interopRequireDefault(require("./ApiClient")); - -var _EstimatesApi = _interopRequireDefault(require("./api/EstimatesApi")); - -var _OrdersApi = _interopRequireDefault(require("./api/OrdersApi")); - -var _PreferencesApi = _interopRequireDefault(require("./api/PreferencesApi")); - -var _ProjectsApi = _interopRequireDefault(require("./api/ProjectsApi")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Patch API V1 - * The core API used to integrate with Patch's service - * - * Contact: developers@usepatch.com - */ -function Patch(accessToken) { - if (!(this instanceof Patch)) return new Patch(accessToken); - this.client = _ApiClient.default.instance; - this.client.authentications['bearer_auth'].accessToken = accessToken; - this.estimates = new _EstimatesApi.default(this.client); - this.orders = new _OrdersApi.default(this.client); - this.preferences = new _PreferencesApi.default(this.client); - this.projects = new _ProjectsApi.default(this.client); -} \ No newline at end of file diff --git a/dist/model/Allocation.js b/dist/model/Allocation.js deleted file mode 100644 index fea4642..0000000 --- a/dist/model/Allocation.js +++ /dev/null @@ -1,51 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _ApiClient = _interopRequireDefault(require("../ApiClient")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Patch API V1 - * The core API used to integrate with Patch's service - * - * Contact: developers@usepatch.com - */ -class Allocation { - constructor() { - Allocation.initialize(this); - } - - static initialize(obj) {} - - static constructFromObject(data, obj) { - if (data) { - obj = obj || new Allocation(); - - if (data.hasOwnProperty('id')) { - obj['id'] = _ApiClient.default.convertToType(data['id'], 'String'); - } - - if (data.hasOwnProperty('production')) { - obj['production'] = _ApiClient.default.convertToType(data['production'], 'Boolean'); - } - - if (data.hasOwnProperty('mass_g')) { - obj['mass_g'] = _ApiClient.default.convertToType(data['mass_g'], 'Number'); - } - } - - return obj; - } - -} - -Allocation.prototype['id'] = undefined; -Allocation.prototype['production'] = undefined; -Allocation.prototype['mass_g'] = undefined; -var _default = Allocation; -exports.default = _default; \ No newline at end of file diff --git a/dist/model/CreateMassEstimateRequest.js b/dist/model/CreateMassEstimateRequest.js deleted file mode 100644 index 39acbb9..0000000 --- a/dist/model/CreateMassEstimateRequest.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _ApiClient = _interopRequireDefault(require("../ApiClient")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Patch API V1 - * The core API used to integrate with Patch's service - * - * Contact: developers@usepatch.com - */ -class CreateMassEstimateRequest { - constructor(massG) { - CreateMassEstimateRequest.initialize(this, massG); - } - - static initialize(obj, massG) { - obj['mass_g'] = massG; - } - - static constructFromObject(data, obj) { - if (data) { - obj = obj || new CreateMassEstimateRequest(); - - if (data.hasOwnProperty('mass_g')) { - obj['mass_g'] = _ApiClient.default.convertToType(data['mass_g'], 'Number'); - } - } - - return obj; - } - -} - -CreateMassEstimateRequest.prototype['mass_g'] = undefined; -var _default = CreateMassEstimateRequest; -exports.default = _default; \ No newline at end of file diff --git a/dist/model/CreateOrderRequest.js b/dist/model/CreateOrderRequest.js deleted file mode 100644 index af45f22..0000000 --- a/dist/model/CreateOrderRequest.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _ApiClient = _interopRequireDefault(require("../ApiClient")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Patch API V1 - * The core API used to integrate with Patch's service - * - * Contact: developers@usepatch.com - */ -class CreateOrderRequest { - constructor(massG) { - CreateOrderRequest.initialize(this, massG); - } - - static initialize(obj, massG) { - obj['mass_g'] = massG; - } - - static constructFromObject(data, obj) { - if (data) { - obj = obj || new CreateOrderRequest(); - - if (data.hasOwnProperty('mass_g')) { - obj['mass_g'] = _ApiClient.default.convertToType(data['mass_g'], 'Number'); - } - } - - return obj; - } - -} - -CreateOrderRequest.prototype['mass_g'] = undefined; -var _default = CreateOrderRequest; -exports.default = _default; \ No newline at end of file diff --git a/dist/model/CreatePreferenceRequest.js b/dist/model/CreatePreferenceRequest.js deleted file mode 100644 index 5bfa0a6..0000000 --- a/dist/model/CreatePreferenceRequest.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _ApiClient = _interopRequireDefault(require("../ApiClient")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Patch API V1 - * The core API used to integrate with Patch's service - * - * Contact: developers@usepatch.com - */ -class CreatePreferenceRequest { - constructor(projectId) { - CreatePreferenceRequest.initialize(this, projectId); - } - - static initialize(obj, projectId) { - obj['project_id'] = projectId; - } - - static constructFromObject(data, obj) { - if (data) { - obj = obj || new CreatePreferenceRequest(); - - if (data.hasOwnProperty('project_id')) { - obj['project_id'] = _ApiClient.default.convertToType(data['project_id'], 'String'); - } - } - - return obj; - } - -} - -CreatePreferenceRequest.prototype['project_id'] = undefined; -var _default = CreatePreferenceRequest; -exports.default = _default; \ No newline at end of file diff --git a/dist/model/ErrorResponse.js b/dist/model/ErrorResponse.js deleted file mode 100644 index 844471b..0000000 --- a/dist/model/ErrorResponse.js +++ /dev/null @@ -1,55 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _ApiClient = _interopRequireDefault(require("../ApiClient")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Patch API V1 - * The core API used to integrate with Patch's service - * - * Contact: developers@usepatch.com - */ -class ErrorResponse { - constructor(success, error, data) { - ErrorResponse.initialize(this, success, error, data); - } - - static initialize(obj, success, error, data) { - obj['success'] = success; - obj['error'] = error; - obj['data'] = data; - } - - static constructFromObject(data, obj) { - if (data) { - obj = obj || new ErrorResponse(); - - if (data.hasOwnProperty('success')) { - obj['success'] = _ApiClient.default.convertToType(data['success'], 'Boolean'); - } - - if (data.hasOwnProperty('error')) { - obj['error'] = _ApiClient.default.convertToType(data['error'], Object); - } - - if (data.hasOwnProperty('data')) { - obj['data'] = _ApiClient.default.convertToType(data['data'], Object); - } - } - - return obj; - } - -} - -ErrorResponse.prototype['success'] = undefined; -ErrorResponse.prototype['error'] = undefined; -ErrorResponse.prototype['data'] = undefined; -var _default = ErrorResponse; -exports.default = _default; \ No newline at end of file diff --git a/dist/model/Estimate.js b/dist/model/Estimate.js deleted file mode 100644 index 765b918..0000000 --- a/dist/model/Estimate.js +++ /dev/null @@ -1,58 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _ApiClient = _interopRequireDefault(require("../ApiClient")); - -var _Order = _interopRequireDefault(require("./Order")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Patch API V1 - * The core API used to integrate with Patch's service - * - * Contact: developers@usepatch.com - */ -class Estimate { - constructor() { - Estimate.initialize(this); - } - - static initialize(obj) {} - - static constructFromObject(data, obj) { - if (data) { - obj = obj || new Estimate(); - - if (data.hasOwnProperty('id')) { - obj['id'] = _ApiClient.default.convertToType(data['id'], 'String'); - } - - if (data.hasOwnProperty('production')) { - obj['production'] = _ApiClient.default.convertToType(data['production'], 'Boolean'); - } - - if (data.hasOwnProperty('type')) { - obj['type'] = _ApiClient.default.convertToType(data['type'], 'String'); - } - - if (data.hasOwnProperty('order')) { - obj['order'] = _Order.default.constructFromObject(data['order']); - } - } - - return obj; - } - -} - -Estimate.prototype['id'] = undefined; -Estimate.prototype['production'] = undefined; -Estimate.prototype['type'] = undefined; -Estimate.prototype['order'] = undefined; -var _default = Estimate; -exports.default = _default; \ No newline at end of file diff --git a/dist/model/EstimateListResponse.js b/dist/model/EstimateListResponse.js deleted file mode 100644 index 3974018..0000000 --- a/dist/model/EstimateListResponse.js +++ /dev/null @@ -1,65 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _ApiClient = _interopRequireDefault(require("../ApiClient")); - -var _Estimate = _interopRequireDefault(require("./Estimate")); - -var _MetaIndexObject = _interopRequireDefault(require("./MetaIndexObject")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Patch API V1 - * The core API used to integrate with Patch's service - * - * Contact: developers@usepatch.com - */ -class EstimateListResponse { - constructor(success, error, data, meta) { - EstimateListResponse.initialize(this, success, error, data, meta); - } - - static initialize(obj, success, error, data, meta) { - obj['success'] = success; - obj['error'] = error; - obj['data'] = data; - obj['meta'] = meta; - } - - static constructFromObject(data, obj) { - if (data) { - obj = obj || new EstimateListResponse(); - - if (data.hasOwnProperty('success')) { - obj['success'] = _ApiClient.default.convertToType(data['success'], 'Boolean'); - } - - if (data.hasOwnProperty('error')) { - obj['error'] = _ApiClient.default.convertToType(data['error'], Object); - } - - if (data.hasOwnProperty('data')) { - obj['data'] = _ApiClient.default.convertToType(data['data'], [_Estimate.default]); - } - - if (data.hasOwnProperty('meta')) { - obj['meta'] = _MetaIndexObject.default.constructFromObject(data['meta']); - } - } - - return obj; - } - -} - -EstimateListResponse.prototype['success'] = undefined; -EstimateListResponse.prototype['error'] = undefined; -EstimateListResponse.prototype['data'] = undefined; -EstimateListResponse.prototype['meta'] = undefined; -var _default = EstimateListResponse; -exports.default = _default; \ No newline at end of file diff --git a/dist/model/EstimateResponse.js b/dist/model/EstimateResponse.js deleted file mode 100644 index f04d209..0000000 --- a/dist/model/EstimateResponse.js +++ /dev/null @@ -1,57 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _ApiClient = _interopRequireDefault(require("../ApiClient")); - -var _Estimate = _interopRequireDefault(require("./Estimate")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Patch API V1 - * The core API used to integrate with Patch's service - * - * Contact: developers@usepatch.com - */ -class EstimateResponse { - constructor(success, error, data) { - EstimateResponse.initialize(this, success, error, data); - } - - static initialize(obj, success, error, data) { - obj['success'] = success; - obj['error'] = error; - obj['data'] = data; - } - - static constructFromObject(data, obj) { - if (data) { - obj = obj || new EstimateResponse(); - - if (data.hasOwnProperty('success')) { - obj['success'] = _ApiClient.default.convertToType(data['success'], 'Boolean'); - } - - if (data.hasOwnProperty('error')) { - obj['error'] = _ApiClient.default.convertToType(data['error'], Object); - } - - if (data.hasOwnProperty('data')) { - obj['data'] = _Estimate.default.constructFromObject(data['data']); - } - } - - return obj; - } - -} - -EstimateResponse.prototype['success'] = undefined; -EstimateResponse.prototype['error'] = undefined; -EstimateResponse.prototype['data'] = undefined; -var _default = EstimateResponse; -exports.default = _default; \ No newline at end of file diff --git a/dist/model/MetaIndexObject.js b/dist/model/MetaIndexObject.js deleted file mode 100644 index 0fdeee0..0000000 --- a/dist/model/MetaIndexObject.js +++ /dev/null @@ -1,46 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _ApiClient = _interopRequireDefault(require("../ApiClient")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Patch API V1 - * The core API used to integrate with Patch's service - * - * Contact: developers@usepatch.com - */ -class MetaIndexObject { - constructor() { - MetaIndexObject.initialize(this); - } - - static initialize(obj) {} - - static constructFromObject(data, obj) { - if (data) { - obj = obj || new MetaIndexObject(); - - if (data.hasOwnProperty('prev_page')) { - obj['prev_page'] = _ApiClient.default.convertToType(data['prev_page'], 'Number'); - } - - if (data.hasOwnProperty('next_page')) { - obj['next_page'] = _ApiClient.default.convertToType(data['next_page'], 'Number'); - } - } - - return obj; - } - -} - -MetaIndexObject.prototype['prev_page'] = undefined; -MetaIndexObject.prototype['next_page'] = undefined; -var _default = MetaIndexObject; -exports.default = _default; \ No newline at end of file diff --git a/dist/model/Order.js b/dist/model/Order.js deleted file mode 100644 index 9b8495f..0000000 --- a/dist/model/Order.js +++ /dev/null @@ -1,73 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _ApiClient = _interopRequireDefault(require("../ApiClient")); - -var _Allocation = _interopRequireDefault(require("./Allocation")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Patch API V1 - * The core API used to integrate with Patch's service - * - * Contact: developers@usepatch.com - */ -class Order { - constructor() { - Order.initialize(this); - } - - static initialize(obj) {} - - static constructFromObject(data, obj) { - if (data) { - obj = obj || new Order(); - - if (data.hasOwnProperty('id')) { - obj['id'] = _ApiClient.default.convertToType(data['id'], 'String'); - } - - if (data.hasOwnProperty('mass_g')) { - obj['mass_g'] = _ApiClient.default.convertToType(data['mass_g'], 'Number'); - } - - if (data.hasOwnProperty('production')) { - obj['production'] = _ApiClient.default.convertToType(data['production'], 'Boolean'); - } - - if (data.hasOwnProperty('state')) { - obj['state'] = _ApiClient.default.convertToType(data['state'], 'String'); - } - - if (data.hasOwnProperty('allocation_state')) { - obj['allocation_state'] = _ApiClient.default.convertToType(data['allocation_state'], 'String'); - } - - if (data.hasOwnProperty('price_cents_usd')) { - obj['price_cents_usd'] = _ApiClient.default.convertToType(data['price_cents_usd'], 'String'); - } - - if (data.hasOwnProperty('allocations')) { - obj['allocations'] = _ApiClient.default.convertToType(data['allocations'], [_Allocation.default]); - } - } - - return obj; - } - -} - -Order.prototype['id'] = undefined; -Order.prototype['mass_g'] = undefined; -Order.prototype['production'] = undefined; -Order.prototype['state'] = undefined; -Order.prototype['allocation_state'] = undefined; -Order.prototype['price_cents_usd'] = undefined; -Order.prototype['allocations'] = undefined; -var _default = Order; -exports.default = _default; \ No newline at end of file diff --git a/dist/model/OrderListResponse.js b/dist/model/OrderListResponse.js deleted file mode 100644 index 08ca13a..0000000 --- a/dist/model/OrderListResponse.js +++ /dev/null @@ -1,65 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _ApiClient = _interopRequireDefault(require("../ApiClient")); - -var _MetaIndexObject = _interopRequireDefault(require("./MetaIndexObject")); - -var _Order = _interopRequireDefault(require("./Order")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Patch API V1 - * The core API used to integrate with Patch's service - * - * Contact: developers@usepatch.com - */ -class OrderListResponse { - constructor(success, error, data, meta) { - OrderListResponse.initialize(this, success, error, data, meta); - } - - static initialize(obj, success, error, data, meta) { - obj['success'] = success; - obj['error'] = error; - obj['data'] = data; - obj['meta'] = meta; - } - - static constructFromObject(data, obj) { - if (data) { - obj = obj || new OrderListResponse(); - - if (data.hasOwnProperty('success')) { - obj['success'] = _ApiClient.default.convertToType(data['success'], 'Boolean'); - } - - if (data.hasOwnProperty('error')) { - obj['error'] = _ApiClient.default.convertToType(data['error'], Object); - } - - if (data.hasOwnProperty('data')) { - obj['data'] = _ApiClient.default.convertToType(data['data'], [_Order.default]); - } - - if (data.hasOwnProperty('meta')) { - obj['meta'] = _MetaIndexObject.default.constructFromObject(data['meta']); - } - } - - return obj; - } - -} - -OrderListResponse.prototype['success'] = undefined; -OrderListResponse.prototype['error'] = undefined; -OrderListResponse.prototype['data'] = undefined; -OrderListResponse.prototype['meta'] = undefined; -var _default = OrderListResponse; -exports.default = _default; \ No newline at end of file diff --git a/dist/model/OrderResponse.js b/dist/model/OrderResponse.js deleted file mode 100644 index 776fa14..0000000 --- a/dist/model/OrderResponse.js +++ /dev/null @@ -1,57 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _ApiClient = _interopRequireDefault(require("../ApiClient")); - -var _Order = _interopRequireDefault(require("./Order")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Patch API V1 - * The core API used to integrate with Patch's service - * - * Contact: developers@usepatch.com - */ -class OrderResponse { - constructor(success, error, data) { - OrderResponse.initialize(this, success, error, data); - } - - static initialize(obj, success, error, data) { - obj['success'] = success; - obj['error'] = error; - obj['data'] = data; - } - - static constructFromObject(data, obj) { - if (data) { - obj = obj || new OrderResponse(); - - if (data.hasOwnProperty('success')) { - obj['success'] = _ApiClient.default.convertToType(data['success'], 'Boolean'); - } - - if (data.hasOwnProperty('error')) { - obj['error'] = _ApiClient.default.convertToType(data['error'], Object); - } - - if (data.hasOwnProperty('data')) { - obj['data'] = _Order.default.constructFromObject(data['data']); - } - } - - return obj; - } - -} - -OrderResponse.prototype['success'] = undefined; -OrderResponse.prototype['error'] = undefined; -OrderResponse.prototype['data'] = undefined; -var _default = OrderResponse; -exports.default = _default; \ No newline at end of file diff --git a/dist/model/Preference.js b/dist/model/Preference.js deleted file mode 100644 index 0ea5883..0000000 --- a/dist/model/Preference.js +++ /dev/null @@ -1,53 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _ApiClient = _interopRequireDefault(require("../ApiClient")); - -var _Project = _interopRequireDefault(require("./Project")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Patch API V1 - * The core API used to integrate with Patch's service - * - * Contact: developers@usepatch.com - */ -class Preference { - constructor() { - Preference.initialize(this); - } - - static initialize(obj) {} - - static constructFromObject(data, obj) { - if (data) { - obj = obj || new Preference(); - - if (data.hasOwnProperty('id')) { - obj['id'] = _ApiClient.default.convertToType(data['id'], 'String'); - } - - if (data.hasOwnProperty('allocation_percentage')) { - obj['allocation_percentage'] = _ApiClient.default.convertToType(data['allocation_percentage'], 'Number'); - } - - if (data.hasOwnProperty('project')) { - obj['project'] = _Project.default.constructFromObject(data['project']); - } - } - - return obj; - } - -} - -Preference.prototype['id'] = undefined; -Preference.prototype['allocation_percentage'] = undefined; -Preference.prototype['project'] = undefined; -var _default = Preference; -exports.default = _default; \ No newline at end of file diff --git a/dist/model/PreferenceListResponse.js b/dist/model/PreferenceListResponse.js deleted file mode 100644 index e064c55..0000000 --- a/dist/model/PreferenceListResponse.js +++ /dev/null @@ -1,65 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _ApiClient = _interopRequireDefault(require("../ApiClient")); - -var _MetaIndexObject = _interopRequireDefault(require("./MetaIndexObject")); - -var _Preference = _interopRequireDefault(require("./Preference")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Patch API V1 - * The core API used to integrate with Patch's service - * - * Contact: developers@usepatch.com - */ -class PreferenceListResponse { - constructor(success, error, data, meta) { - PreferenceListResponse.initialize(this, success, error, data, meta); - } - - static initialize(obj, success, error, data, meta) { - obj['success'] = success; - obj['error'] = error; - obj['data'] = data; - obj['meta'] = meta; - } - - static constructFromObject(data, obj) { - if (data) { - obj = obj || new PreferenceListResponse(); - - if (data.hasOwnProperty('success')) { - obj['success'] = _ApiClient.default.convertToType(data['success'], 'Boolean'); - } - - if (data.hasOwnProperty('error')) { - obj['error'] = _ApiClient.default.convertToType(data['error'], Object); - } - - if (data.hasOwnProperty('data')) { - obj['data'] = _ApiClient.default.convertToType(data['data'], [_Preference.default]); - } - - if (data.hasOwnProperty('meta')) { - obj['meta'] = _MetaIndexObject.default.constructFromObject(data['meta']); - } - } - - return obj; - } - -} - -PreferenceListResponse.prototype['success'] = undefined; -PreferenceListResponse.prototype['error'] = undefined; -PreferenceListResponse.prototype['data'] = undefined; -PreferenceListResponse.prototype['meta'] = undefined; -var _default = PreferenceListResponse; -exports.default = _default; \ No newline at end of file diff --git a/dist/model/PreferenceResponse.js b/dist/model/PreferenceResponse.js deleted file mode 100644 index 73cb45e..0000000 --- a/dist/model/PreferenceResponse.js +++ /dev/null @@ -1,57 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _ApiClient = _interopRequireDefault(require("../ApiClient")); - -var _Preference = _interopRequireDefault(require("./Preference")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Patch API V1 - * The core API used to integrate with Patch's service - * - * Contact: developers@usepatch.com - */ -class PreferenceResponse { - constructor(success, error, data) { - PreferenceResponse.initialize(this, success, error, data); - } - - static initialize(obj, success, error, data) { - obj['success'] = success; - obj['error'] = error; - obj['data'] = data; - } - - static constructFromObject(data, obj) { - if (data) { - obj = obj || new PreferenceResponse(); - - if (data.hasOwnProperty('success')) { - obj['success'] = _ApiClient.default.convertToType(data['success'], 'Boolean'); - } - - if (data.hasOwnProperty('error')) { - obj['error'] = _ApiClient.default.convertToType(data['error'], Object); - } - - if (data.hasOwnProperty('data')) { - obj['data'] = _Preference.default.constructFromObject(data['data']); - } - } - - return obj; - } - -} - -PreferenceResponse.prototype['success'] = undefined; -PreferenceResponse.prototype['error'] = undefined; -PreferenceResponse.prototype['data'] = undefined; -var _default = PreferenceResponse; -exports.default = _default; \ No newline at end of file diff --git a/dist/model/Project.js b/dist/model/Project.js deleted file mode 100644 index 490edae..0000000 --- a/dist/model/Project.js +++ /dev/null @@ -1,81 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _ApiClient = _interopRequireDefault(require("../ApiClient")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Patch API V1 - * The core API used to integrate with Patch's service - * - * Contact: developers@usepatch.com - */ -class Project { - constructor() { - Project.initialize(this); - } - - static initialize(obj) {} - - static constructFromObject(data, obj) { - if (data) { - obj = obj || new Project(); - - if (data.hasOwnProperty('id')) { - obj['id'] = _ApiClient.default.convertToType(data['id'], 'String'); - } - - if (data.hasOwnProperty('production')) { - obj['production'] = _ApiClient.default.convertToType(data['production'], 'Boolean'); - } - - if (data.hasOwnProperty('name')) { - obj['name'] = _ApiClient.default.convertToType(data['name'], 'String'); - } - - if (data.hasOwnProperty('description')) { - obj['description'] = _ApiClient.default.convertToType(data['description'], 'String'); - } - - if (data.hasOwnProperty('country')) { - obj['country'] = _ApiClient.default.convertToType(data['country'], 'String'); - } - - if (data.hasOwnProperty('longitude')) { - obj['longitude'] = _ApiClient.default.convertToType(data['longitude'], 'Number'); - } - - if (data.hasOwnProperty('latitude')) { - obj['latitude'] = _ApiClient.default.convertToType(data['latitude'], 'Number'); - } - - if (data.hasOwnProperty('verifier')) { - obj['verifier'] = _ApiClient.default.convertToType(data['verifier'], 'String'); - } - - if (data.hasOwnProperty('developer')) { - obj['developer'] = _ApiClient.default.convertToType(data['developer'], 'String'); - } - } - - return obj; - } - -} - -Project.prototype['id'] = undefined; -Project.prototype['production'] = undefined; -Project.prototype['name'] = undefined; -Project.prototype['description'] = undefined; -Project.prototype['country'] = undefined; -Project.prototype['longitude'] = undefined; -Project.prototype['latitude'] = undefined; -Project.prototype['verifier'] = undefined; -Project.prototype['developer'] = undefined; -var _default = Project; -exports.default = _default; \ No newline at end of file diff --git a/dist/model/ProjectListResponse.js b/dist/model/ProjectListResponse.js deleted file mode 100644 index 8ef5c18..0000000 --- a/dist/model/ProjectListResponse.js +++ /dev/null @@ -1,65 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _ApiClient = _interopRequireDefault(require("../ApiClient")); - -var _MetaIndexObject = _interopRequireDefault(require("./MetaIndexObject")); - -var _Project = _interopRequireDefault(require("./Project")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Patch API V1 - * The core API used to integrate with Patch's service - * - * Contact: developers@usepatch.com - */ -class ProjectListResponse { - constructor(success, error, data, meta) { - ProjectListResponse.initialize(this, success, error, data, meta); - } - - static initialize(obj, success, error, data, meta) { - obj['success'] = success; - obj['error'] = error; - obj['data'] = data; - obj['meta'] = meta; - } - - static constructFromObject(data, obj) { - if (data) { - obj = obj || new ProjectListResponse(); - - if (data.hasOwnProperty('success')) { - obj['success'] = _ApiClient.default.convertToType(data['success'], 'Boolean'); - } - - if (data.hasOwnProperty('error')) { - obj['error'] = _ApiClient.default.convertToType(data['error'], Object); - } - - if (data.hasOwnProperty('data')) { - obj['data'] = _ApiClient.default.convertToType(data['data'], [_Project.default]); - } - - if (data.hasOwnProperty('meta')) { - obj['meta'] = _MetaIndexObject.default.constructFromObject(data['meta']); - } - } - - return obj; - } - -} - -ProjectListResponse.prototype['success'] = undefined; -ProjectListResponse.prototype['error'] = undefined; -ProjectListResponse.prototype['data'] = undefined; -ProjectListResponse.prototype['meta'] = undefined; -var _default = ProjectListResponse; -exports.default = _default; \ No newline at end of file diff --git a/dist/model/ProjectResponse.js b/dist/model/ProjectResponse.js deleted file mode 100644 index 3880a62..0000000 --- a/dist/model/ProjectResponse.js +++ /dev/null @@ -1,57 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _ApiClient = _interopRequireDefault(require("../ApiClient")); - -var _Project = _interopRequireDefault(require("./Project")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -/** - * Patch API V1 - * The core API used to integrate with Patch's service - * - * Contact: developers@usepatch.com - */ -class ProjectResponse { - constructor(success, error, data) { - ProjectResponse.initialize(this, success, error, data); - } - - static initialize(obj, success, error, data) { - obj['success'] = success; - obj['error'] = error; - obj['data'] = data; - } - - static constructFromObject(data, obj) { - if (data) { - obj = obj || new ProjectResponse(); - - if (data.hasOwnProperty('success')) { - obj['success'] = _ApiClient.default.convertToType(data['success'], 'Boolean'); - } - - if (data.hasOwnProperty('error')) { - obj['error'] = _ApiClient.default.convertToType(data['error'], Object); - } - - if (data.hasOwnProperty('data')) { - obj['data'] = _Project.default.constructFromObject(data['data']); - } - } - - return obj; - } - -} - -ProjectResponse.prototype['success'] = undefined; -ProjectResponse.prototype['error'] = undefined; -ProjectResponse.prototype['data'] = undefined; -var _default = ProjectResponse; -exports.default = _default; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index baf6116..35589a6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@patch-technology/patch", - "version": "1.1.1", + "version": "1.2.1", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -1277,29 +1277,25 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", - "dev": true, - "optional": true + "dev": true }, "arr-flatten": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", - "dev": true, - "optional": true + "dev": true }, "arr-union": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", - "dev": true, - "optional": true + "dev": true }, "array-unique": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", - "dev": true, - "optional": true + "dev": true }, "array.prototype.map": { "version": "1.0.2", @@ -1323,8 +1319,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", - "dev": true, - "optional": true + "dev": true }, "async-each": { "version": "1.0.3", @@ -1342,8 +1337,7 @@ "version": "2.1.2", "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "dev": true, - "optional": true + "dev": true }, "babel-plugin-dynamic-import-node": { "version": "2.3.3", @@ -1365,7 +1359,6 @@ "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", "dev": true, - "optional": true, "requires": { "cache-base": "^1.0.1", "class-utils": "^0.3.5", @@ -1381,7 +1374,6 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "dev": true, - "optional": true, "requires": { "is-descriptor": "^1.0.0" } @@ -1391,7 +1383,6 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "dev": true, - "optional": true, "requires": { "kind-of": "^6.0.0" } @@ -1401,7 +1392,6 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "dev": true, - "optional": true, "requires": { "kind-of": "^6.0.0" } @@ -1411,7 +1401,6 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "dev": true, - "optional": true, "requires": { "is-accessor-descriptor": "^1.0.0", "is-data-descriptor": "^1.0.0", @@ -1452,7 +1441,6 @@ "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", "dev": true, - "optional": true, "requires": { "arr-flatten": "^1.1.0", "array-unique": "^0.3.2", @@ -1471,7 +1459,6 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, - "optional": true, "requires": { "is-extendable": "^0.1.0" } @@ -1507,7 +1494,6 @@ "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", "dev": true, - "optional": true, "requires": { "collection-visit": "^1.0.0", "component-emitter": "^1.2.1", @@ -1601,7 +1587,6 @@ "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", "dev": true, - "optional": true, "requires": { "arr-union": "^3.1.0", "define-property": "^0.2.5", @@ -1614,7 +1599,6 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "dev": true, - "optional": true, "requires": { "is-descriptor": "^0.1.0" } @@ -1665,7 +1649,6 @@ "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", "dev": true, - "optional": true, "requires": { "map-visit": "^1.0.0", "object-visit": "^1.0.0" @@ -1741,8 +1724,7 @@ "version": "0.1.1", "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", - "dev": true, - "optional": true + "dev": true }, "core-js-compat": { "version": "3.6.5", @@ -1787,7 +1769,6 @@ "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, - "optional": true, "requires": { "ms": "2.0.0" } @@ -1802,8 +1783,7 @@ "version": "0.2.0", "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", - "dev": true, - "optional": true + "dev": true }, "deep-eql": { "version": "3.0.1", @@ -1828,7 +1808,6 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", "dev": true, - "optional": true, "requires": { "is-descriptor": "^1.0.2", "isobject": "^3.0.1" @@ -1839,7 +1818,6 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "dev": true, - "optional": true, "requires": { "kind-of": "^6.0.0" } @@ -1849,7 +1827,6 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "dev": true, - "optional": true, "requires": { "kind-of": "^6.0.0" } @@ -1859,7 +1836,6 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "dev": true, - "optional": true, "requires": { "is-accessor-descriptor": "^1.0.0", "is-data-descriptor": "^1.0.0", @@ -1988,7 +1964,6 @@ "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", "dev": true, - "optional": true, "requires": { "debug": "^2.3.3", "define-property": "^0.2.5", @@ -2004,7 +1979,6 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "dev": true, - "optional": true, "requires": { "is-descriptor": "^0.1.0" } @@ -2014,7 +1988,6 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, - "optional": true, "requires": { "is-extendable": "^0.1.0" } @@ -2026,7 +1999,6 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", "dev": true, - "optional": true, "requires": { "assign-symbols": "^1.0.0", "is-extendable": "^1.0.1" @@ -2037,7 +2009,6 @@ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "dev": true, - "optional": true, "requires": { "is-plain-object": "^2.0.4" } @@ -2049,7 +2020,6 @@ "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", "dev": true, - "optional": true, "requires": { "array-unique": "^0.3.2", "define-property": "^1.0.0", @@ -2066,7 +2036,6 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "dev": true, - "optional": true, "requires": { "is-descriptor": "^1.0.0" } @@ -2076,7 +2045,6 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, - "optional": true, "requires": { "is-extendable": "^0.1.0" } @@ -2086,7 +2054,6 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "dev": true, - "optional": true, "requires": { "kind-of": "^6.0.0" } @@ -2096,7 +2063,6 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "dev": true, - "optional": true, "requires": { "kind-of": "^6.0.0" } @@ -2106,7 +2072,6 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "dev": true, - "optional": true, "requires": { "is-accessor-descriptor": "^1.0.0", "is-data-descriptor": "^1.0.0", @@ -2132,7 +2097,6 @@ "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", "dev": true, - "optional": true, "requires": { "extend-shallow": "^2.0.1", "is-number": "^3.0.0", @@ -2145,7 +2109,6 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, - "optional": true, "requires": { "is-extendable": "^0.1.0" } @@ -2202,8 +2165,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true, - "optional": true + "dev": true }, "form-data": { "version": "3.0.0", @@ -2225,7 +2187,6 @@ "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", "dev": true, - "optional": true, "requires": { "map-cache": "^0.2.2" } @@ -2281,8 +2242,7 @@ "version": "2.0.6", "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", - "dev": true, - "optional": true + "dev": true }, "glob": { "version": "7.1.6", @@ -2366,7 +2326,6 @@ "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", "dev": true, - "optional": true, "requires": { "get-value": "^2.0.6", "has-values": "^1.0.0", @@ -2378,7 +2337,6 @@ "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", "dev": true, - "optional": true, "requires": { "is-number": "^3.0.0", "kind-of": "^4.0.0" @@ -2389,7 +2347,6 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", "dev": true, - "optional": true, "requires": { "is-buffer": "^1.1.5" } @@ -2560,7 +2517,6 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "dev": true, - "optional": true, "requires": { "kind-of": "^3.0.2" }, @@ -2570,7 +2526,6 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, - "optional": true, "requires": { "is-buffer": "^1.1.5" } @@ -2603,8 +2558,7 @@ "version": "1.1.6", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true, - "optional": true + "dev": true }, "is-callable": { "version": "1.2.0", @@ -2617,7 +2571,6 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", "dev": true, - "optional": true, "requires": { "kind-of": "^3.0.2" }, @@ -2627,7 +2580,6 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, - "optional": true, "requires": { "is-buffer": "^1.1.5" } @@ -2645,7 +2597,6 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", "dev": true, - "optional": true, "requires": { "is-accessor-descriptor": "^0.1.6", "is-data-descriptor": "^0.1.4", @@ -2656,8 +2607,7 @@ "version": "5.1.0", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", - "dev": true, - "optional": true + "dev": true } } }, @@ -2665,8 +2615,7 @@ "version": "0.1.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true, - "optional": true + "dev": true }, "is-extglob": { "version": "2.1.1", @@ -2700,7 +2649,6 @@ "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "dev": true, - "optional": true, "requires": { "kind-of": "^3.0.2" }, @@ -2710,7 +2658,6 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, - "optional": true, "requires": { "is-buffer": "^1.1.5" } @@ -2728,7 +2675,6 @@ "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "dev": true, - "optional": true, "requires": { "isobject": "^3.0.1" } @@ -2767,15 +2713,13 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true, - "optional": true + "dev": true }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true, - "optional": true + "dev": true }, "isexe": { "version": "2.0.0", @@ -2787,8 +2731,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true, - "optional": true + "dev": true }, "iterate-iterator": { "version": "1.0.1", @@ -2847,8 +2790,7 @@ "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, - "optional": true + "dev": true }, "leven": { "version": "3.1.0", @@ -2971,15 +2913,13 @@ "version": "0.2.2", "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", - "dev": true, - "optional": true + "dev": true }, "map-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", "dev": true, - "optional": true, "requires": { "object-visit": "^1.0.0" } @@ -2994,7 +2934,6 @@ "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", "dev": true, - "optional": true, "requires": { "arr-diff": "^4.0.0", "array-unique": "^0.3.2", @@ -3049,7 +2988,6 @@ "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", "dev": true, - "optional": true, "requires": { "for-in": "^1.0.2", "is-extendable": "^1.0.1" @@ -3060,7 +2998,6 @@ "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "dev": true, - "optional": true, "requires": { "is-plain-object": "^2.0.4" } @@ -3284,8 +3221,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true, - "optional": true + "dev": true }, "nan": { "version": "2.14.1", @@ -3299,7 +3235,6 @@ "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", "dev": true, - "optional": true, "requires": { "arr-diff": "^4.0.0", "array-unique": "^0.3.2", @@ -3337,7 +3272,6 @@ "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", "dev": true, - "optional": true, "requires": { "copy-descriptor": "^0.1.0", "define-property": "^0.2.5", @@ -3349,7 +3283,6 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "dev": true, - "optional": true, "requires": { "is-descriptor": "^0.1.0" } @@ -3359,7 +3292,6 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, - "optional": true, "requires": { "is-buffer": "^1.1.5" } @@ -3383,7 +3315,6 @@ "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", "dev": true, - "optional": true, "requires": { "isobject": "^3.0.0" } @@ -3405,7 +3336,6 @@ "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", "dev": true, - "optional": true, "requires": { "isobject": "^3.0.1" } @@ -3474,8 +3404,7 @@ "version": "0.1.1", "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", - "dev": true, - "optional": true + "dev": true }, "path-dirname": { "version": "1.0.2", @@ -3557,8 +3486,7 @@ "version": "0.1.1", "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", - "dev": true, - "optional": true + "dev": true }, "prettier": { "version": "2.0.5", @@ -3663,7 +3591,6 @@ "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", "dev": true, - "optional": true, "requires": { "extend-shallow": "^3.0.2", "safe-regex": "^1.1.0" @@ -3717,15 +3644,13 @@ "version": "1.1.3", "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", - "dev": true, - "optional": true + "dev": true }, "repeat-string": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true, - "optional": true + "dev": true }, "require-directory": { "version": "2.1.1", @@ -3758,15 +3683,13 @@ "version": "0.2.1", "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", - "dev": true, - "optional": true + "dev": true }, "ret": { "version": "0.1.15", "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", - "dev": true, - "optional": true + "dev": true }, "safe-buffer": { "version": "5.1.2", @@ -3778,7 +3701,6 @@ "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "dev": true, - "optional": true, "requires": { "ret": "~0.1.10" } @@ -3821,7 +3743,6 @@ "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", "dev": true, - "optional": true, "requires": { "extend-shallow": "^2.0.1", "is-extendable": "^0.1.1", @@ -3834,7 +3755,6 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, - "optional": true, "requires": { "is-extendable": "^0.1.0" } @@ -3852,7 +3772,6 @@ "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", "dev": true, - "optional": true, "requires": { "base": "^0.11.1", "debug": "^2.2.0", @@ -3869,7 +3788,6 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "dev": true, - "optional": true, "requires": { "is-descriptor": "^0.1.0" } @@ -3879,7 +3797,6 @@ "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "dev": true, - "optional": true, "requires": { "is-extendable": "^0.1.0" } @@ -3891,7 +3808,6 @@ "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", "dev": true, - "optional": true, "requires": { "define-property": "^1.0.0", "isobject": "^3.0.0", @@ -3903,7 +3819,6 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "dev": true, - "optional": true, "requires": { "is-descriptor": "^1.0.0" } @@ -3913,7 +3828,6 @@ "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "dev": true, - "optional": true, "requires": { "kind-of": "^6.0.0" } @@ -3923,7 +3837,6 @@ "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "dev": true, - "optional": true, "requires": { "kind-of": "^6.0.0" } @@ -3933,7 +3846,6 @@ "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "dev": true, - "optional": true, "requires": { "is-accessor-descriptor": "^1.0.0", "is-data-descriptor": "^1.0.0", @@ -3947,7 +3859,6 @@ "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", "dev": true, - "optional": true, "requires": { "kind-of": "^3.2.0" }, @@ -3957,7 +3868,6 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, - "optional": true, "requires": { "is-buffer": "^1.1.5" } @@ -3975,7 +3885,6 @@ "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", "dev": true, - "optional": true, "requires": { "atob": "^2.1.2", "decode-uri-component": "^0.2.0", @@ -4006,15 +3915,13 @@ "version": "0.4.0", "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", - "dev": true, - "optional": true + "dev": true }, "split-string": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", "dev": true, - "optional": true, "requires": { "extend-shallow": "^3.0.0" } @@ -4030,7 +3937,6 @@ "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", "dev": true, - "optional": true, "requires": { "define-property": "^0.2.5", "object-copy": "^0.1.0" @@ -4041,7 +3947,6 @@ "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "dev": true, - "optional": true, "requires": { "is-descriptor": "^0.1.0" } @@ -4169,7 +4074,6 @@ "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", "dev": true, - "optional": true, "requires": { "kind-of": "^3.0.2" }, @@ -4179,7 +4083,6 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, - "optional": true, "requires": { "is-buffer": "^1.1.5" } @@ -4191,7 +4094,6 @@ "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", "dev": true, - "optional": true, "requires": { "define-property": "^2.0.2", "extend-shallow": "^3.0.2", @@ -4204,7 +4106,6 @@ "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", "dev": true, - "optional": true, "requires": { "is-number": "^3.0.0", "repeat-string": "^1.6.1" @@ -4249,7 +4150,6 @@ "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", "dev": true, - "optional": true, "requires": { "arr-union": "^3.1.0", "get-value": "^2.0.6", @@ -4262,7 +4162,6 @@ "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", "dev": true, - "optional": true, "requires": { "has-value": "^0.3.1", "isobject": "^3.0.0" @@ -4273,7 +4172,6 @@ "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", "dev": true, - "optional": true, "requires": { "get-value": "^2.0.3", "has-values": "^0.1.4", @@ -4285,7 +4183,6 @@ "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", "dev": true, - "optional": true, "requires": { "isarray": "1.0.0" } @@ -4296,8 +4193,7 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", - "dev": true, - "optional": true + "dev": true } } }, @@ -4312,15 +4208,13 @@ "version": "0.1.0", "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", - "dev": true, - "optional": true + "dev": true }, "use": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", - "dev": true, - "optional": true + "dev": true }, "util-deprecate": { "version": "1.0.2", diff --git a/package.json b/package.json index f1bb22f..3a60ceb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@patch-technology/patch", - "version": "1.2.0", + "version": "1.2.1", "description": "Javascript wrapper for the Patch API", "license": "MIT", "repository": { diff --git a/src/ApiClient.js b/src/ApiClient.js index a3db3b3..3e3fd9d 100644 --- a/src/ApiClient.js +++ b/src/ApiClient.js @@ -411,7 +411,7 @@ class ApiClient { hostSettings() { return [ { - url: 'https://{api.usepatch.com}', + url: 'https://api.usepatch.com', description: 'No description provided', variables: { diff --git a/src/model/Project.js b/src/model/Project.js index d38f69e..66c39b7 100644 --- a/src/model/Project.js +++ b/src/model/Project.js @@ -6,8 +6,8 @@ */ import ApiClient from '../ApiClient'; -import OneOfstandard from './OneOfstandard'; import Photo from './Photo'; +import Standard from './Standard'; class Project { constructor( @@ -111,10 +111,7 @@ class Project { } if (data.hasOwnProperty('standard')) { - obj['standard'] = ApiClient.convertToType( - data['standard'], - OneOfstandard - ); + obj['standard'] = ApiClient.convertToType(data['standard'], Standard); } } return obj;