diff --git a/sdk/docs/Link.md b/sdk/docs/Link.md new file mode 100644 index 00000000..68446e0b --- /dev/null +++ b/sdk/docs/Link.md @@ -0,0 +1,18 @@ +# EchaloasuerteJsSdk.Link + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [optional] [readonly] +**createdAt** | **Date** | | [optional] [readonly] +**updatedAt** | **Date** | | [optional] [readonly] +**title** | **String** | | [optional] +**description** | **String** | | [optional] +**privateId** | **String** | | [optional] [readonly] +**metadata** | [**[DrawMetadata]**](DrawMetadata.md) | | [optional] +**itemsSet1** | **[String]** | | [optional] +**itemsSet2** | **[String]** | | [optional] +**results** | [**[LinkResult]**](LinkResult.md) | | [optional] [readonly] + + diff --git a/sdk/docs/LinkAllOf.md b/sdk/docs/LinkAllOf.md new file mode 100644 index 00000000..e48df33a --- /dev/null +++ b/sdk/docs/LinkAllOf.md @@ -0,0 +1,11 @@ +# EchaloasuerteJsSdk.LinkAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**itemsSet1** | **[String]** | | [optional] +**itemsSet2** | **[String]** | | [optional] +**results** | [**[LinkResult]**](LinkResult.md) | | [optional] [readonly] + + diff --git a/sdk/docs/LinkApi.md b/sdk/docs/LinkApi.md new file mode 100644 index 00000000..4b30df02 --- /dev/null +++ b/sdk/docs/LinkApi.md @@ -0,0 +1,139 @@ +# EchaloasuerteJsSdk.LinkApi + +All URIs are relative to *http://localhost/should-be-overriden* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**linkCreate**](LinkApi.md#linkCreate) | **POST** /link/ | +[**linkRead**](LinkApi.md#linkRead) | **GET** /link/{id}/ | +[**linkToss**](LinkApi.md#linkToss) | **POST** /link/{id}/toss/ | + + + +## linkCreate + +> Link linkCreate(link) + + + +### Example + +```javascript +import EchaloasuerteJsSdk from 'echaloasuerte-js-sdk'; + +let apiInstance = new EchaloasuerteJsSdk.LinkApi(); +let link = new EchaloasuerteJsSdk.Link(); // Link | +apiInstance.linkCreate(link).then((data) => { + console.log('API called successfully. Returned data: ' + data); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **link** | [**Link**](Link.md)| | + +### Return type + +[**Link**](Link.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## linkRead + +> Link linkRead(id) + + + +### Example + +```javascript +import EchaloasuerteJsSdk from 'echaloasuerte-js-sdk'; + +let apiInstance = new EchaloasuerteJsSdk.LinkApi(); +let id = "id_example"; // String | +apiInstance.linkRead(id).then((data) => { + console.log('API called successfully. Returned data: ' + data); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| | + +### Return type + +[**Link**](Link.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## linkToss + +> LinkResult linkToss(id, drawTossPayload) + + + +### Example + +```javascript +import EchaloasuerteJsSdk from 'echaloasuerte-js-sdk'; + +let apiInstance = new EchaloasuerteJsSdk.LinkApi(); +let id = "id_example"; // String | +let drawTossPayload = new EchaloasuerteJsSdk.DrawTossPayload(); // DrawTossPayload | +apiInstance.linkToss(id, drawTossPayload).then((data) => { + console.log('API called successfully. Returned data: ' + data); +}, (error) => { + console.error(error); +}); + +``` + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **String**| | + **drawTossPayload** | [**DrawTossPayload**](DrawTossPayload.md)| | + +### Return type + +[**LinkResult**](LinkResult.md) + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + diff --git a/sdk/docs/LinkResult.md b/sdk/docs/LinkResult.md new file mode 100644 index 00000000..bd68f809 --- /dev/null +++ b/sdk/docs/LinkResult.md @@ -0,0 +1,12 @@ +# EchaloasuerteJsSdk.LinkResult + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [optional] [readonly] +**createdAt** | **Date** | | [optional] [readonly] +**scheduleDate** | **Date** | | [optional] +**value** | [**[LinkResultAllOfValue]**](LinkResultAllOfValue.md) | | [optional] + + diff --git a/sdk/docs/LinkResultAllOf.md b/sdk/docs/LinkResultAllOf.md new file mode 100644 index 00000000..0e2f87c1 --- /dev/null +++ b/sdk/docs/LinkResultAllOf.md @@ -0,0 +1,9 @@ +# EchaloasuerteJsSdk.LinkResultAllOf + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | [**[LinkResultAllOfValue]**](LinkResultAllOfValue.md) | | [optional] + + diff --git a/sdk/docs/LinkResultAllOfValue.md b/sdk/docs/LinkResultAllOfValue.md new file mode 100644 index 00000000..246873db --- /dev/null +++ b/sdk/docs/LinkResultAllOfValue.md @@ -0,0 +1,10 @@ +# EchaloasuerteJsSdk.LinkResultAllOfValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**element1** | **String** | | [optional] +**element2** | **String** | | [optional] + + diff --git a/sdk/src/api/LinkApi.js b/sdk/src/api/LinkApi.js new file mode 100644 index 00000000..67647194 --- /dev/null +++ b/sdk/src/api/LinkApi.js @@ -0,0 +1,177 @@ +/** + * EAS API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + + +import ApiClient from "../ApiClient"; +import DrawTossPayload from '../model/DrawTossPayload'; +import Link from '../model/Link'; +import LinkResult from '../model/LinkResult'; + +/** +* Link service. +* @module api/LinkApi +* @version 0.0.1 +*/ +export default class LinkApi { + + /** + * Constructs a new LinkApi. + * @alias module:api/LinkApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + constructor(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + } + + + + /** + * @param {module:model/Link} link + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Link} and HTTP response + */ + linkCreateWithHttpInfo(link) { + let postBody = link; + // verify the required parameter 'link' is set + if (link === undefined || link === null) { + throw new Error("Missing the required parameter 'link' when calling linkCreate"); + } + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = []; + let contentTypes = ['application/json']; + let accepts = ['application/json']; + let returnType = Link; + return this.apiClient.callApi( + '/link/', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * @param {module:model/Link} link + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Link} + */ + linkCreate(link) { + return this.linkCreateWithHttpInfo(link) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * @param {String} id + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Link} and HTTP response + */ + linkReadWithHttpInfo(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 linkRead"); + } + + let pathParams = { + 'id': id + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = []; + let contentTypes = []; + let accepts = ['application/json']; + let returnType = Link; + return this.apiClient.callApi( + '/link/{id}/', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * @param {String} id + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Link} + */ + linkRead(id) { + return this.linkReadWithHttpInfo(id) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * @param {String} id + * @param {module:model/DrawTossPayload} drawTossPayload + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/LinkResult} and HTTP response + */ + linkTossWithHttpInfo(id, drawTossPayload) { + let postBody = drawTossPayload; + // verify the required parameter 'id' is set + if (id === undefined || id === null) { + throw new Error("Missing the required parameter 'id' when calling linkToss"); + } + // verify the required parameter 'drawTossPayload' is set + if (drawTossPayload === undefined || drawTossPayload === null) { + throw new Error("Missing the required parameter 'drawTossPayload' when calling linkToss"); + } + + let pathParams = { + 'id': id + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = []; + let contentTypes = ['application/json']; + let accepts = ['application/json']; + let returnType = LinkResult; + return this.apiClient.callApi( + '/link/{id}/toss/', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * @param {String} id + * @param {module:model/DrawTossPayload} drawTossPayload + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/LinkResult} + */ + linkToss(id, drawTossPayload) { + return this.linkTossWithHttpInfo(id, drawTossPayload) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + +} diff --git a/sdk/src/model/Link.js b/sdk/src/model/Link.js new file mode 100644 index 00000000..f00d5009 --- /dev/null +++ b/sdk/src/model/Link.js @@ -0,0 +1,193 @@ +/** + * EAS API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import BaseDraw from './BaseDraw'; +import DrawMetadata from './DrawMetadata'; +import LinkAllOf from './LinkAllOf'; +import LinkResult from './LinkResult'; + +/** + * The Link model module. + * @module model/Link + * @version 0.0.1 + */ +class Link { + /** + * Constructs a new Link. + * @alias module:model/Link + * @implements module:model/BaseDraw + * @implements module:model/LinkAllOf + */ + constructor() { + BaseDraw.initialize(this);LinkAllOf.initialize(this); + Link.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a Link from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/Link} obj Optional instance to populate. + * @return {module:model/Link} The populated Link instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new Link(); + BaseDraw.constructFromObject(data, obj); + LinkAllOf.constructFromObject(data, obj); + + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'String'); + } + if (data.hasOwnProperty('created_at')) { + obj['created_at'] = ApiClient.convertToType(data['created_at'], 'Date'); + } + if (data.hasOwnProperty('updated_at')) { + obj['updated_at'] = ApiClient.convertToType(data['updated_at'], 'Date'); + } + if (data.hasOwnProperty('title')) { + obj['title'] = ApiClient.convertToType(data['title'], 'String'); + } + if (data.hasOwnProperty('description')) { + obj['description'] = ApiClient.convertToType(data['description'], 'String'); + } + if (data.hasOwnProperty('private_id')) { + obj['private_id'] = ApiClient.convertToType(data['private_id'], 'String'); + } + if (data.hasOwnProperty('metadata')) { + obj['metadata'] = ApiClient.convertToType(data['metadata'], [DrawMetadata]); + } + if (data.hasOwnProperty('items_set1')) { + obj['items_set1'] = ApiClient.convertToType(data['items_set1'], ['String']); + } + if (data.hasOwnProperty('items_set2')) { + obj['items_set2'] = ApiClient.convertToType(data['items_set2'], ['String']); + } + if (data.hasOwnProperty('results')) { + obj['results'] = ApiClient.convertToType(data['results'], [LinkResult]); + } + } + return obj; + } + + +} + +/** + * @member {String} id + */ +Link.prototype['id'] = undefined; + +/** + * @member {Date} created_at + */ +Link.prototype['created_at'] = undefined; + +/** + * @member {Date} updated_at + */ +Link.prototype['updated_at'] = undefined; + +/** + * @member {String} title + */ +Link.prototype['title'] = undefined; + +/** + * @member {String} description + */ +Link.prototype['description'] = undefined; + +/** + * @member {String} private_id + */ +Link.prototype['private_id'] = undefined; + +/** + * @member {Array.} metadata + */ +Link.prototype['metadata'] = undefined; + +/** + * @member {Array.} items_set1 + */ +Link.prototype['items_set1'] = undefined; + +/** + * @member {Array.} items_set2 + */ +Link.prototype['items_set2'] = undefined; + +/** + * @member {Array.} results + */ +Link.prototype['results'] = undefined; + + +// Implement BaseDraw interface: +/** + * @member {String} id + */ +BaseDraw.prototype['id'] = undefined; +/** + * @member {Date} created_at + */ +BaseDraw.prototype['created_at'] = undefined; +/** + * @member {Date} updated_at + */ +BaseDraw.prototype['updated_at'] = undefined; +/** + * @member {String} title + */ +BaseDraw.prototype['title'] = undefined; +/** + * @member {String} description + */ +BaseDraw.prototype['description'] = undefined; +/** + * @member {String} private_id + */ +BaseDraw.prototype['private_id'] = undefined; +/** + * @member {Array.} metadata + */ +BaseDraw.prototype['metadata'] = undefined; +// Implement LinkAllOf interface: +/** + * @member {Array.} items_set1 + */ +LinkAllOf.prototype['items_set1'] = undefined; +/** + * @member {Array.} items_set2 + */ +LinkAllOf.prototype['items_set2'] = undefined; +/** + * @member {Array.} results + */ +LinkAllOf.prototype['results'] = undefined; + + + + +export default Link; + diff --git a/sdk/src/model/LinkAllOf.js b/sdk/src/model/LinkAllOf.js new file mode 100644 index 00000000..f8af2762 --- /dev/null +++ b/sdk/src/model/LinkAllOf.js @@ -0,0 +1,88 @@ +/** + * EAS API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import LinkResult from './LinkResult'; + +/** + * The LinkAllOf model module. + * @module model/LinkAllOf + * @version 0.0.1 + */ +class LinkAllOf { + /** + * Constructs a new LinkAllOf. + * @alias module:model/LinkAllOf + */ + constructor() { + + LinkAllOf.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a LinkAllOf from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/LinkAllOf} obj Optional instance to populate. + * @return {module:model/LinkAllOf} The populated LinkAllOf instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new LinkAllOf(); + + if (data.hasOwnProperty('items_set1')) { + obj['items_set1'] = ApiClient.convertToType(data['items_set1'], ['String']); + } + if (data.hasOwnProperty('items_set2')) { + obj['items_set2'] = ApiClient.convertToType(data['items_set2'], ['String']); + } + if (data.hasOwnProperty('results')) { + obj['results'] = ApiClient.convertToType(data['results'], [LinkResult]); + } + } + return obj; + } + + +} + +/** + * @member {Array.} items_set1 + */ +LinkAllOf.prototype['items_set1'] = undefined; + +/** + * @member {Array.} items_set2 + */ +LinkAllOf.prototype['items_set2'] = undefined; + +/** + * @member {Array.} results + */ +LinkAllOf.prototype['results'] = undefined; + + + + + + +export default LinkAllOf; + diff --git a/sdk/src/model/LinkResult.js b/sdk/src/model/LinkResult.js new file mode 100644 index 00000000..0247709e --- /dev/null +++ b/sdk/src/model/LinkResult.js @@ -0,0 +1,120 @@ +/** + * EAS API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import BaseResult from './BaseResult'; +import LinkResultAllOf from './LinkResultAllOf'; +import LinkResultAllOfValue from './LinkResultAllOfValue'; + +/** + * The LinkResult model module. + * @module model/LinkResult + * @version 0.0.1 + */ +class LinkResult { + /** + * Constructs a new LinkResult. + * @alias module:model/LinkResult + * @implements module:model/BaseResult + * @implements module:model/LinkResultAllOf + */ + constructor() { + BaseResult.initialize(this);LinkResultAllOf.initialize(this); + LinkResult.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a LinkResult from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/LinkResult} obj Optional instance to populate. + * @return {module:model/LinkResult} The populated LinkResult instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new LinkResult(); + BaseResult.constructFromObject(data, obj); + LinkResultAllOf.constructFromObject(data, obj); + + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'String'); + } + if (data.hasOwnProperty('created_at')) { + obj['created_at'] = ApiClient.convertToType(data['created_at'], 'Date'); + } + if (data.hasOwnProperty('schedule_date')) { + obj['schedule_date'] = ApiClient.convertToType(data['schedule_date'], 'Date'); + } + if (data.hasOwnProperty('value')) { + obj['value'] = ApiClient.convertToType(data['value'], [LinkResultAllOfValue]); + } + } + return obj; + } + + +} + +/** + * @member {String} id + */ +LinkResult.prototype['id'] = undefined; + +/** + * @member {Date} created_at + */ +LinkResult.prototype['created_at'] = undefined; + +/** + * @member {Date} schedule_date + */ +LinkResult.prototype['schedule_date'] = undefined; + +/** + * @member {Array.} value + */ +LinkResult.prototype['value'] = undefined; + + +// Implement BaseResult interface: +/** + * @member {String} id + */ +BaseResult.prototype['id'] = undefined; +/** + * @member {Date} created_at + */ +BaseResult.prototype['created_at'] = undefined; +/** + * @member {Date} schedule_date + */ +BaseResult.prototype['schedule_date'] = undefined; +// Implement LinkResultAllOf interface: +/** + * @member {Array.} value + */ +LinkResultAllOf.prototype['value'] = undefined; + + + + +export default LinkResult; + diff --git a/sdk/src/model/LinkResultAllOf.js b/sdk/src/model/LinkResultAllOf.js new file mode 100644 index 00000000..1f0297f9 --- /dev/null +++ b/sdk/src/model/LinkResultAllOf.js @@ -0,0 +1,72 @@ +/** + * EAS API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import LinkResultAllOfValue from './LinkResultAllOfValue'; + +/** + * The LinkResultAllOf model module. + * @module model/LinkResultAllOf + * @version 0.0.1 + */ +class LinkResultAllOf { + /** + * Constructs a new LinkResultAllOf. + * @alias module:model/LinkResultAllOf + */ + constructor() { + + LinkResultAllOf.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a LinkResultAllOf from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/LinkResultAllOf} obj Optional instance to populate. + * @return {module:model/LinkResultAllOf} The populated LinkResultAllOf instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new LinkResultAllOf(); + + if (data.hasOwnProperty('value')) { + obj['value'] = ApiClient.convertToType(data['value'], [LinkResultAllOfValue]); + } + } + return obj; + } + + +} + +/** + * @member {Array.} value + */ +LinkResultAllOf.prototype['value'] = undefined; + + + + + + +export default LinkResultAllOf; + diff --git a/sdk/src/model/LinkResultAllOfValue.js b/sdk/src/model/LinkResultAllOfValue.js new file mode 100644 index 00000000..5ab78c5a --- /dev/null +++ b/sdk/src/model/LinkResultAllOfValue.js @@ -0,0 +1,79 @@ +/** + * EAS API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The LinkResultAllOfValue model module. + * @module model/LinkResultAllOfValue + * @version 0.0.1 + */ +class LinkResultAllOfValue { + /** + * Constructs a new LinkResultAllOfValue. + * @alias module:model/LinkResultAllOfValue + */ + constructor() { + + LinkResultAllOfValue.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a LinkResultAllOfValue from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/LinkResultAllOfValue} obj Optional instance to populate. + * @return {module:model/LinkResultAllOfValue} The populated LinkResultAllOfValue instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new LinkResultAllOfValue(); + + if (data.hasOwnProperty('element1')) { + obj['element1'] = ApiClient.convertToType(data['element1'], 'String'); + } + if (data.hasOwnProperty('element2')) { + obj['element2'] = ApiClient.convertToType(data['element2'], 'String'); + } + } + return obj; + } + + +} + +/** + * @member {String} element1 + */ +LinkResultAllOfValue.prototype['element1'] = undefined; + +/** + * @member {String} element2 + */ +LinkResultAllOfValue.prototype['element2'] = undefined; + + + + + + +export default LinkResultAllOfValue; + diff --git a/sdk/test/api/LinkApi.spec.js b/sdk/test/api/LinkApi.spec.js new file mode 100644 index 00000000..146173b3 --- /dev/null +++ b/sdk/test/api/LinkApi.spec.js @@ -0,0 +1,83 @@ +/** + * EAS API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.EchaloasuerteJsSdk); + } +}(this, function(expect, EchaloasuerteJsSdk) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new EchaloasuerteJsSdk.LinkApi(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('LinkApi', function() { + describe('linkCreate', function() { + it('should call linkCreate successfully', function(done) { + //uncomment below and update the code to test linkCreate + //instance.linkCreate(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('linkRead', function() { + it('should call linkRead successfully', function(done) { + //uncomment below and update the code to test linkRead + //instance.linkRead(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('linkToss', function() { + it('should call linkToss successfully', function(done) { + //uncomment below and update the code to test linkToss + //instance.linkToss(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + }); + +})); diff --git a/sdk/test/model/Link.spec.js b/sdk/test/model/Link.spec.js new file mode 100644 index 00000000..c861bc7f --- /dev/null +++ b/sdk/test/model/Link.spec.js @@ -0,0 +1,119 @@ +/** + * EAS API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.EchaloasuerteJsSdk); + } +}(this, function(expect, EchaloasuerteJsSdk) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new EchaloasuerteJsSdk.Link(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('Link', function() { + it('should create an instance of Link', function() { + // uncomment below and update the code to test Link + //var instane = new EchaloasuerteJsSdk.Link(); + //expect(instance).to.be.a(EchaloasuerteJsSdk.Link); + }); + + it('should have the property id (base name: "id")', function() { + // uncomment below and update the code to test the property id + //var instane = new EchaloasuerteJsSdk.Link(); + //expect(instance).to.be(); + }); + + it('should have the property createdAt (base name: "created_at")', function() { + // uncomment below and update the code to test the property createdAt + //var instane = new EchaloasuerteJsSdk.Link(); + //expect(instance).to.be(); + }); + + it('should have the property updatedAt (base name: "updated_at")', function() { + // uncomment below and update the code to test the property updatedAt + //var instane = new EchaloasuerteJsSdk.Link(); + //expect(instance).to.be(); + }); + + it('should have the property title (base name: "title")', function() { + // uncomment below and update the code to test the property title + //var instane = new EchaloasuerteJsSdk.Link(); + //expect(instance).to.be(); + }); + + it('should have the property description (base name: "description")', function() { + // uncomment below and update the code to test the property description + //var instane = new EchaloasuerteJsSdk.Link(); + //expect(instance).to.be(); + }); + + it('should have the property privateId (base name: "private_id")', function() { + // uncomment below and update the code to test the property privateId + //var instane = new EchaloasuerteJsSdk.Link(); + //expect(instance).to.be(); + }); + + it('should have the property metadata (base name: "metadata")', function() { + // uncomment below and update the code to test the property metadata + //var instane = new EchaloasuerteJsSdk.Link(); + //expect(instance).to.be(); + }); + + it('should have the property itemsSet1 (base name: "items_set1")', function() { + // uncomment below and update the code to test the property itemsSet1 + //var instane = new EchaloasuerteJsSdk.Link(); + //expect(instance).to.be(); + }); + + it('should have the property itemsSet2 (base name: "items_set2")', function() { + // uncomment below and update the code to test the property itemsSet2 + //var instane = new EchaloasuerteJsSdk.Link(); + //expect(instance).to.be(); + }); + + it('should have the property results (base name: "results")', function() { + // uncomment below and update the code to test the property results + //var instane = new EchaloasuerteJsSdk.Link(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/sdk/test/model/LinkAllOf.spec.js b/sdk/test/model/LinkAllOf.spec.js new file mode 100644 index 00000000..6276ba60 --- /dev/null +++ b/sdk/test/model/LinkAllOf.spec.js @@ -0,0 +1,77 @@ +/** + * EAS API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.EchaloasuerteJsSdk); + } +}(this, function(expect, EchaloasuerteJsSdk) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new EchaloasuerteJsSdk.LinkAllOf(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('LinkAllOf', function() { + it('should create an instance of LinkAllOf', function() { + // uncomment below and update the code to test LinkAllOf + //var instane = new EchaloasuerteJsSdk.LinkAllOf(); + //expect(instance).to.be.a(EchaloasuerteJsSdk.LinkAllOf); + }); + + it('should have the property itemsSet1 (base name: "items_set1")', function() { + // uncomment below and update the code to test the property itemsSet1 + //var instane = new EchaloasuerteJsSdk.LinkAllOf(); + //expect(instance).to.be(); + }); + + it('should have the property itemsSet2 (base name: "items_set2")', function() { + // uncomment below and update the code to test the property itemsSet2 + //var instane = new EchaloasuerteJsSdk.LinkAllOf(); + //expect(instance).to.be(); + }); + + it('should have the property results (base name: "results")', function() { + // uncomment below and update the code to test the property results + //var instane = new EchaloasuerteJsSdk.LinkAllOf(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/sdk/test/model/LinkResult.spec.js b/sdk/test/model/LinkResult.spec.js new file mode 100644 index 00000000..5474d7e0 --- /dev/null +++ b/sdk/test/model/LinkResult.spec.js @@ -0,0 +1,83 @@ +/** + * EAS API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.EchaloasuerteJsSdk); + } +}(this, function(expect, EchaloasuerteJsSdk) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new EchaloasuerteJsSdk.LinkResult(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('LinkResult', function() { + it('should create an instance of LinkResult', function() { + // uncomment below and update the code to test LinkResult + //var instane = new EchaloasuerteJsSdk.LinkResult(); + //expect(instance).to.be.a(EchaloasuerteJsSdk.LinkResult); + }); + + it('should have the property id (base name: "id")', function() { + // uncomment below and update the code to test the property id + //var instane = new EchaloasuerteJsSdk.LinkResult(); + //expect(instance).to.be(); + }); + + it('should have the property createdAt (base name: "created_at")', function() { + // uncomment below and update the code to test the property createdAt + //var instane = new EchaloasuerteJsSdk.LinkResult(); + //expect(instance).to.be(); + }); + + it('should have the property scheduleDate (base name: "schedule_date")', function() { + // uncomment below and update the code to test the property scheduleDate + //var instane = new EchaloasuerteJsSdk.LinkResult(); + //expect(instance).to.be(); + }); + + it('should have the property value (base name: "value")', function() { + // uncomment below and update the code to test the property value + //var instane = new EchaloasuerteJsSdk.LinkResult(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/sdk/test/model/LinkResultAllOf.spec.js b/sdk/test/model/LinkResultAllOf.spec.js new file mode 100644 index 00000000..67642551 --- /dev/null +++ b/sdk/test/model/LinkResultAllOf.spec.js @@ -0,0 +1,65 @@ +/** + * EAS API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.EchaloasuerteJsSdk); + } +}(this, function(expect, EchaloasuerteJsSdk) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new EchaloasuerteJsSdk.LinkResultAllOf(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('LinkResultAllOf', function() { + it('should create an instance of LinkResultAllOf', function() { + // uncomment below and update the code to test LinkResultAllOf + //var instane = new EchaloasuerteJsSdk.LinkResultAllOf(); + //expect(instance).to.be.a(EchaloasuerteJsSdk.LinkResultAllOf); + }); + + it('should have the property value (base name: "value")', function() { + // uncomment below and update the code to test the property value + //var instane = new EchaloasuerteJsSdk.LinkResultAllOf(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/sdk/test/model/LinkResultAllOfValue.spec.js b/sdk/test/model/LinkResultAllOfValue.spec.js new file mode 100644 index 00000000..f3bc9cb7 --- /dev/null +++ b/sdk/test/model/LinkResultAllOfValue.spec.js @@ -0,0 +1,71 @@ +/** + * EAS API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. + define(['expect.js', process.cwd()+'/src/index'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + factory(require('expect.js'), require(process.cwd()+'/src/index')); + } else { + // Browser globals (root is window) + factory(root.expect, root.EchaloasuerteJsSdk); + } +}(this, function(expect, EchaloasuerteJsSdk) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new EchaloasuerteJsSdk.LinkResultAllOfValue(); + }); + + var getProperty = function(object, getter, property) { + // Use getter method if present; otherwise, get the property directly. + if (typeof object[getter] === 'function') + return object[getter](); + else + return object[property]; + } + + var setProperty = function(object, setter, property, value) { + // Use setter method if present; otherwise, set the property directly. + if (typeof object[setter] === 'function') + object[setter](value); + else + object[property] = value; + } + + describe('LinkResultAllOfValue', function() { + it('should create an instance of LinkResultAllOfValue', function() { + // uncomment below and update the code to test LinkResultAllOfValue + //var instane = new EchaloasuerteJsSdk.LinkResultAllOfValue(); + //expect(instance).to.be.a(EchaloasuerteJsSdk.LinkResultAllOfValue); + }); + + it('should have the property element1 (base name: "element1")', function() { + // uncomment below and update the code to test the property element1 + //var instane = new EchaloasuerteJsSdk.LinkResultAllOfValue(); + //expect(instance).to.be(); + }); + + it('should have the property element2 (base name: "element2")', function() { + // uncomment below and update the code to test the property element2 + //var instane = new EchaloasuerteJsSdk.LinkResultAllOfValue(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/swagger.yaml b/swagger.yaml index 463b4f4d..ac78eb7d 100644 --- a/swagger.yaml +++ b/swagger.yaml @@ -1,7 +1,7 @@ openapi: 3.0.0 info: title: EAS API - version: 0.0.10 + version: 0.0.1 servers: - url: '/should-be-overriden' paths: @@ -470,6 +470,63 @@ paths: required: true schema: type: string + /link/: + post: + operationId: link_create + responses: + '201': + description: Links successfully created + content: + application/json: + schema: + $ref: '#/components/schemas/Link' + tags: + - link + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Link' + required: true + parameters: [] + '/link/{id}/': + get: + operationId: link_read + responses: + '200': + description: The details of the requested link + content: + application/json: + schema: + $ref: '#/components/schemas/Link' + tags: + - link + parameters: + - name: id + in: path + required: true + schema: + type: string + '/link/{id}/toss/': + post: + operationId: link_toss + responses: + '201': + description: A result of the link + content: + application/json: + schema: + $ref: '#/components/schemas/LinkResult' + tags: + - link + requestBody: + $ref: '#/components/requestBodies/DrawTossPayload' + parameters: + - name: id + in: path + required: true + schema: + type: string components: requestBodies: DrawTossPayload: @@ -594,6 +651,9 @@ components: required: - participants properties: + number_of_results: + type: integer + default: 1 participants: type: array items: @@ -603,6 +663,26 @@ components: items: $ref: '#/components/schemas/LotteryResult' readOnly: true + Link: + allOf: + - $ref: '#/components/schemas/BaseDraw' + - type: object + required: + - items + properties: + items_set1: + type: array + items: + type: string + items_set2: + type: array + items: + type: string + results: + type: array + items: + $ref: '#/components/schemas/LinkResult' + readOnly: true Groups: allOf: - $ref: '#/components/schemas/BaseDraw' @@ -704,6 +784,21 @@ components: $ref: '#/components/schemas/Participant' prize: $ref: '#/components/schemas/Prize' + LinkResult: + allOf: + - $ref: '#/components/schemas/BaseResult' + - type: object + properties: + value: + nullable: true + type: array + items: + type: object + properties: + element1: + type: string + element2: + type: string LotteryResult: allOf: - $ref: '#/components/schemas/BaseResult' @@ -769,3 +864,4 @@ components: enum: - HEAD - TAIL +