From 6abaf327cb725f3cc370ea502881a75a8166693f Mon Sep 17 00:00:00 2001 From: Adam Dobrawy Date: Mon, 6 Jan 2020 23:12:20 +0100 Subject: [PATCH] Add initial commit of API --- .openapi-generator-ignore | 28 + .openapi-generator/VERSION | 1 + Dockerfile | 5 + Makefile | 26 + README.md | 228 ++++++ config.yml | 5 + docs/AddressData.md | 16 + docs/AdministrativeUnit.md | 13 + docs/AdministrativeUnitApi.md | 214 ++++++ docs/CaseApi.md | 268 +++++++ docs/CaseAuditedInstitution.md | 10 + docs/CaseMatrix.md | 11 + docs/Channel.md | 61 ++ docs/Collection.md | 33 + docs/CollectionApi.md | 489 +++++++++++++ docs/Description.md | 15 + docs/DescriptionApi.md | 214 ++++++ docs/Dictionary.md | 18 + docs/DictionaryApi.md | 214 ++++++ docs/DictionaryValue.md | 10 + docs/Error.md | 10 + docs/Event.md | 17 + docs/EventApi.md | 216 ++++++ docs/File.md | 11 + docs/FileApi.md | 162 +++++ docs/FileSigner.md | 23 + docs/Institution.md | 17 + docs/InstitutionApi.md | 112 +++ docs/InstitutionExternalIdentifier.md | 10 + docs/Letter.md | 38 + docs/LetterApi.md | 216 ++++++ docs/ModelCase.md | 22 + docs/Note.md | 15 + docs/NoteApi.md | 216 ++++++ docs/NotifiedUserApi.md | 166 +++++ docs/ResponsibleUserApi.md | 166 +++++ docs/Session.md | 14 + docs/SessionApi.md | 215 ++++++ docs/TagNamespace.md | 15 + docs/TagNamespaceApi.md | 214 ++++++ docs/User.md | 14 + docs/UserApi.md | 214 ++++++ docs/UserRef.md | 10 + git_push.sh | 58 ++ mocha.opts | 1 + package.json | 21 + src/ApiClient.js | 664 ++++++++++++++++++ src/api/AdministrativeUnitApi.js | 246 +++++++ src/api/CaseApi.js | 303 ++++++++ src/api/CollectionApi.js | 516 ++++++++++++++ src/api/DescriptionApi.js | 246 +++++++ src/api/DictionaryApi.js | 246 +++++++ src/api/EventApi.js | 249 +++++++ src/api/FileApi.js | 209 ++++++ src/api/InstitutionApi.js | 150 ++++ src/api/LetterApi.js | 249 +++++++ src/api/NoteApi.js | 249 +++++++ src/api/NotifiedUserApi.js | 217 ++++++ src/api/ResponsibleUserApi.js | 217 ++++++ src/api/SessionApi.js | 265 +++++++ src/api/TagNamespaceApi.js | 246 +++++++ src/api/UserApi.js | 246 +++++++ src/index.js | 253 +++++++ src/model/AddressData.js | 128 ++++ src/model/AdministrativeUnit.js | 117 +++ src/model/CaseAuditedInstitution.js | 86 +++ src/model/CaseMatrix.js | 93 +++ src/model/Channel.js | 221 ++++++ src/model/Collection.js | 185 +++++ src/model/Description.js | 134 ++++ src/model/Dictionary.js | 164 +++++ src/model/DictionaryValue.js | 90 +++ src/model/Error.js | 90 +++ src/model/Event.js | 150 ++++ src/model/File.js | 99 +++ src/model/FileSigner.js | 120 ++++ src/model/Institution.js | 149 ++++ src/model/InstitutionExternalIdentifier.js | 87 +++ src/model/Letter.js | 245 +++++++ src/model/ModelCase.js | 192 +++++ src/model/Note.js | 134 ++++ src/model/Session.js | 119 ++++ src/model/TagNamespace.js | 134 ++++ src/model/User.js | 124 ++++ src/model/UserRef.js | 90 +++ src/small_eod/AdministrativeUnitApi.js | 246 +++++++ src/small_eod/CaseApi.js | 303 ++++++++ src/small_eod/CollectionApi.js | 516 ++++++++++++++ src/small_eod/DescriptionApi.js | 246 +++++++ src/small_eod/DictionaryApi.js | 246 +++++++ src/small_eod/EventApi.js | 249 +++++++ src/small_eod/FileApi.js | 209 ++++++ src/small_eod/InstitutionApi.js | 150 ++++ src/small_eod/LetterApi.js | 249 +++++++ src/small_eod/NoteApi.js | 249 +++++++ src/small_eod/NotifiedUserApi.js | 217 ++++++ src/small_eod/ResponsibleUserApi.js | 217 ++++++ src/small_eod/SessionApi.js | 265 +++++++ src/small_eod/TagNamespaceApi.js | 246 +++++++ src/small_eod/UserApi.js | 246 +++++++ src/small_eod_client/AdministrativeUnitApi.js | 246 +++++++ src/small_eod_client/CaseApi.js | 303 ++++++++ src/small_eod_client/CollectionApi.js | 516 ++++++++++++++ src/small_eod_client/DescriptionApi.js | 246 +++++++ src/small_eod_client/DictionaryApi.js | 246 +++++++ src/small_eod_client/EventApi.js | 249 +++++++ src/small_eod_client/FileApi.js | 209 ++++++ src/small_eod_client/InstitutionApi.js | 150 ++++ src/small_eod_client/LetterApi.js | 249 +++++++ src/small_eod_client/NoteApi.js | 249 +++++++ src/small_eod_client/NotifiedUserApi.js | 217 ++++++ src/small_eod_client/ResponsibleUserApi.js | 217 ++++++ src/small_eod_client/SessionApi.js | 265 +++++++ src/small_eod_client/TagNamespaceApi.js | 246 +++++++ src/small_eod_client/UserApi.js | 246 +++++++ test/api/AdministrativeUnitApi.spec.js | 96 +++ test/api/CaseApi.spec.js | 106 +++ test/api/CollectionApi.spec.js | 146 ++++ test/api/DescriptionApi.spec.js | 96 +++ test/api/DictionaryApi.spec.js | 96 +++ test/api/EventApi.spec.js | 96 +++ test/api/FileApi.spec.js | 86 +++ test/api/InstitutionApi.spec.js | 76 ++ test/api/LetterApi.spec.js | 96 +++ test/api/NoteApi.spec.js | 96 +++ test/api/NotifiedUserApi.spec.js | 86 +++ test/api/ResponsibleUserApi.spec.js | 86 +++ test/api/SessionApi.spec.js | 96 +++ test/api/TagNamespaceApi.spec.js | 96 +++ test/api/UserApi.spec.js | 96 +++ test/model/AddressData.spec.js | 110 +++ test/model/AdministrativeUnit.spec.js | 92 +++ test/model/CaseAuditedInstitution.spec.js | 74 ++ test/model/CaseMatrix.spec.js | 80 +++ test/model/Channel.spec.js | 104 +++ test/model/Collection.spec.js | 122 ++++ test/model/Description.spec.js | 104 +++ test/model/Dictionary.spec.js | 122 ++++ test/model/DictionaryValue.spec.js | 74 ++ test/model/Error.spec.js | 74 ++ test/model/Event.spec.js | 116 +++ test/model/File.spec.js | 80 +++ test/model/FileSigner.spec.js | 86 +++ test/model/Institution.spec.js | 116 +++ .../InstitutionExternalIdentifier.spec.js | 74 ++ test/model/Letter.spec.js | 176 +++++ test/model/ModelCase.spec.js | 146 ++++ test/model/Note.spec.js | 104 +++ test/model/Session.spec.js | 98 +++ test/model/TagNamespace.spec.js | 104 +++ test/model/User.spec.js | 98 +++ test/model/UserRef.spec.js | 74 ++ 152 files changed, 23180 insertions(+) create mode 100644 .openapi-generator-ignore create mode 100644 .openapi-generator/VERSION create mode 100644 Dockerfile create mode 100644 Makefile create mode 100644 README.md create mode 100644 config.yml create mode 100644 docs/AddressData.md create mode 100644 docs/AdministrativeUnit.md create mode 100644 docs/AdministrativeUnitApi.md create mode 100644 docs/CaseApi.md create mode 100644 docs/CaseAuditedInstitution.md create mode 100644 docs/CaseMatrix.md create mode 100644 docs/Channel.md create mode 100644 docs/Collection.md create mode 100644 docs/CollectionApi.md create mode 100644 docs/Description.md create mode 100644 docs/DescriptionApi.md create mode 100644 docs/Dictionary.md create mode 100644 docs/DictionaryApi.md create mode 100644 docs/DictionaryValue.md create mode 100644 docs/Error.md create mode 100644 docs/Event.md create mode 100644 docs/EventApi.md create mode 100644 docs/File.md create mode 100644 docs/FileApi.md create mode 100644 docs/FileSigner.md create mode 100644 docs/Institution.md create mode 100644 docs/InstitutionApi.md create mode 100644 docs/InstitutionExternalIdentifier.md create mode 100644 docs/Letter.md create mode 100644 docs/LetterApi.md create mode 100644 docs/ModelCase.md create mode 100644 docs/Note.md create mode 100644 docs/NoteApi.md create mode 100644 docs/NotifiedUserApi.md create mode 100644 docs/ResponsibleUserApi.md create mode 100644 docs/Session.md create mode 100644 docs/SessionApi.md create mode 100644 docs/TagNamespace.md create mode 100644 docs/TagNamespaceApi.md create mode 100644 docs/User.md create mode 100644 docs/UserApi.md create mode 100644 docs/UserRef.md create mode 100644 git_push.sh create mode 100644 mocha.opts create mode 100644 package.json create mode 100644 src/ApiClient.js create mode 100644 src/api/AdministrativeUnitApi.js create mode 100644 src/api/CaseApi.js create mode 100644 src/api/CollectionApi.js create mode 100644 src/api/DescriptionApi.js create mode 100644 src/api/DictionaryApi.js create mode 100644 src/api/EventApi.js create mode 100644 src/api/FileApi.js create mode 100644 src/api/InstitutionApi.js create mode 100644 src/api/LetterApi.js create mode 100644 src/api/NoteApi.js create mode 100644 src/api/NotifiedUserApi.js create mode 100644 src/api/ResponsibleUserApi.js create mode 100644 src/api/SessionApi.js create mode 100644 src/api/TagNamespaceApi.js create mode 100644 src/api/UserApi.js create mode 100644 src/index.js create mode 100644 src/model/AddressData.js create mode 100644 src/model/AdministrativeUnit.js create mode 100644 src/model/CaseAuditedInstitution.js create mode 100644 src/model/CaseMatrix.js create mode 100644 src/model/Channel.js create mode 100644 src/model/Collection.js create mode 100644 src/model/Description.js create mode 100644 src/model/Dictionary.js create mode 100644 src/model/DictionaryValue.js create mode 100644 src/model/Error.js create mode 100644 src/model/Event.js create mode 100644 src/model/File.js create mode 100644 src/model/FileSigner.js create mode 100644 src/model/Institution.js create mode 100644 src/model/InstitutionExternalIdentifier.js create mode 100644 src/model/Letter.js create mode 100644 src/model/ModelCase.js create mode 100644 src/model/Note.js create mode 100644 src/model/Session.js create mode 100644 src/model/TagNamespace.js create mode 100644 src/model/User.js create mode 100644 src/model/UserRef.js create mode 100644 src/small_eod/AdministrativeUnitApi.js create mode 100644 src/small_eod/CaseApi.js create mode 100644 src/small_eod/CollectionApi.js create mode 100644 src/small_eod/DescriptionApi.js create mode 100644 src/small_eod/DictionaryApi.js create mode 100644 src/small_eod/EventApi.js create mode 100644 src/small_eod/FileApi.js create mode 100644 src/small_eod/InstitutionApi.js create mode 100644 src/small_eod/LetterApi.js create mode 100644 src/small_eod/NoteApi.js create mode 100644 src/small_eod/NotifiedUserApi.js create mode 100644 src/small_eod/ResponsibleUserApi.js create mode 100644 src/small_eod/SessionApi.js create mode 100644 src/small_eod/TagNamespaceApi.js create mode 100644 src/small_eod/UserApi.js create mode 100644 src/small_eod_client/AdministrativeUnitApi.js create mode 100644 src/small_eod_client/CaseApi.js create mode 100644 src/small_eod_client/CollectionApi.js create mode 100644 src/small_eod_client/DescriptionApi.js create mode 100644 src/small_eod_client/DictionaryApi.js create mode 100644 src/small_eod_client/EventApi.js create mode 100644 src/small_eod_client/FileApi.js create mode 100644 src/small_eod_client/InstitutionApi.js create mode 100644 src/small_eod_client/LetterApi.js create mode 100644 src/small_eod_client/NoteApi.js create mode 100644 src/small_eod_client/NotifiedUserApi.js create mode 100644 src/small_eod_client/ResponsibleUserApi.js create mode 100644 src/small_eod_client/SessionApi.js create mode 100644 src/small_eod_client/TagNamespaceApi.js create mode 100644 src/small_eod_client/UserApi.js create mode 100644 test/api/AdministrativeUnitApi.spec.js create mode 100644 test/api/CaseApi.spec.js create mode 100644 test/api/CollectionApi.spec.js create mode 100644 test/api/DescriptionApi.spec.js create mode 100644 test/api/DictionaryApi.spec.js create mode 100644 test/api/EventApi.spec.js create mode 100644 test/api/FileApi.spec.js create mode 100644 test/api/InstitutionApi.spec.js create mode 100644 test/api/LetterApi.spec.js create mode 100644 test/api/NoteApi.spec.js create mode 100644 test/api/NotifiedUserApi.spec.js create mode 100644 test/api/ResponsibleUserApi.spec.js create mode 100644 test/api/SessionApi.spec.js create mode 100644 test/api/TagNamespaceApi.spec.js create mode 100644 test/api/UserApi.spec.js create mode 100644 test/model/AddressData.spec.js create mode 100644 test/model/AdministrativeUnit.spec.js create mode 100644 test/model/CaseAuditedInstitution.spec.js create mode 100644 test/model/CaseMatrix.spec.js create mode 100644 test/model/Channel.spec.js create mode 100644 test/model/Collection.spec.js create mode 100644 test/model/Description.spec.js create mode 100644 test/model/Dictionary.spec.js create mode 100644 test/model/DictionaryValue.spec.js create mode 100644 test/model/Error.spec.js create mode 100644 test/model/Event.spec.js create mode 100644 test/model/File.spec.js create mode 100644 test/model/FileSigner.spec.js create mode 100644 test/model/Institution.spec.js create mode 100644 test/model/InstitutionExternalIdentifier.spec.js create mode 100644 test/model/Letter.spec.js create mode 100644 test/model/ModelCase.spec.js create mode 100644 test/model/Note.spec.js create mode 100644 test/model/Session.spec.js create mode 100644 test/model/TagNamespace.spec.js create mode 100644 test/model/User.spec.js create mode 100644 test/model/UserRef.spec.js diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore new file mode 100644 index 0000000..b756850 --- /dev/null +++ b/.openapi-generator-ignore @@ -0,0 +1,28 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md +Dockerfile +Makefile +config.yml +.travis.yml +.github \ No newline at end of file diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION new file mode 100644 index 0000000..58592f0 --- /dev/null +++ b/.openapi-generator/VERSION @@ -0,0 +1 @@ +4.2.3-SNAPSHOT \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b9ebb1a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM node:latest +WORKDIR /src +ADD . . +RUN npm install +RUN npm test diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..e5faefe --- /dev/null +++ b/Makefile @@ -0,0 +1,26 @@ +spec_url = https://raw.githubusercontent.com/watchdogpolska/small_eod/master/docs/swagger.yaml + +.PHONY: build test + +config-help: + docker run openapitools/openapi-generator-cli config-help -g javascript + +build: + curl -s $(spec_url) | yq '.' > swagger.json + docker run --user $(id -u):$(id -g) --rm \ + -v $$(pwd)/swagger.json:/openapi.json -v $$(pwd):/out \ + -e JS_POST_PROCESS_FILE="/usr/local/bin/js-beautify -r -f" \ + openapitools/openapi-generator-cli \ + generate \ + --git-user-id "watchdogpolska" \ + --git-repo-id "small-eod-sdk-javascript" \ + --release-note "Github integration demo" \ + -g javascript \ + -i /openapi.json \ + -c /out/config.yml \ + -o /out + rm swagger.json + +test: + docker build -t sdk-javascript . + docker run sdk-javascript \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..1eeb67f --- /dev/null +++ b/README.md @@ -0,0 +1,228 @@ +# small_eod + +SmallEod - JavaScript client for small_eod +No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: + +- API version: 1.0.0 +- Package version: 1.0.0 +- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen + +## Installation + +### For [Node.js](https://nodejs.org/) + +#### npm + +To publish the library as a [npm](https://www.npmjs.com/), please follow the procedure in ["Publishing npm packages"](https://docs.npmjs.com/getting-started/publishing-npm-packages). + +Then install it via: + +```shell +npm install small_eod --save +``` + +##### Local development + +To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing `package.json` (and this README). Let's call this `JAVASCRIPT_CLIENT_DIR`. Then run: + +```shell +npm install +``` + +Next, [link](https://docs.npmjs.com/cli/link) it globally in npm with the following, also from `JAVASCRIPT_CLIENT_DIR`: + +```shell +npm link +``` + +Finally, switch to the directory you want to use your small_eod from, and run: + +```shell +npm link /path/to/ +``` + +You should now be able to `require('small_eod')` in javascript files from the directory you ran the last command above from. + +### git + +If the library is hosted at a git repository, e.g. https://github.com/watchdogpolska/small-eod-sdk-javascript +then install it via: + +```shell + npm install watchdogpolska/small-eod-sdk-javascript --save +``` + +### For browser + +The library also works in the browser environment via npm and [browserify](http://browserify.org/). After following the above steps with Node.js and installing browserify with `npm install -g browserify`, perform the following (assuming *main.js* is your entry file, that's to say your javascript file where you actually use this library): + +```shell +browserify main.js > bundle.js +``` + +Then include *bundle.js* in the HTML pages. + +### Webpack Configuration + +Using Webpack you may encounter the following error: "Module not found: Error: +Cannot resolve module", most certainly you should disable AMD loader. Add/merge +the following section to your webpack config: + +```javascript +module: { + rules: [ + { + parser: { + amd: false + } + } + ] +} +``` + +## Getting Started + +Please follow the [installation](#installation) instruction and execute the following JS code: + +```javascript +var SmallEod = require('small_eod'); + +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = "YOUR API KEY" +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix['session'] = "Token" + +var api = new SmallEod.AdministrativeUnitApi() +var administrativeUnit = new SmallEod.AdministrativeUnit(); // {AdministrativeUnit} New administrative unit +api.createAdministrativeUnit(administrativeUnit).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + + +``` + +## Documentation for API Endpoints + +All URIs are relative to *https://small-eod.siecobywatelska.pl/v1* + +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*SmallEod.AdministrativeUnitApi* | [**createAdministrativeUnit**](docs/AdministrativeUnitApi.md#createAdministrativeUnit) | **POST** /administrativeUnit | Create a administrative unit +*SmallEod.AdministrativeUnitApi* | [**deleteAdministrativeUnit**](docs/AdministrativeUnitApi.md#deleteAdministrativeUnit) | **DELETE** /administrativeUnit/{administrativeUnitId} | +*SmallEod.AdministrativeUnitApi* | [**listAdministrativeUnit**](docs/AdministrativeUnitApi.md#listAdministrativeUnit) | **GET** /administrativeUnit | List all administrative units +*SmallEod.AdministrativeUnitApi* | [**showAdministrativeUnitById**](docs/AdministrativeUnitApi.md#showAdministrativeUnitById) | **GET** /administrativeUnit/{administrativeUnitId} | Info for a specific administrative unit +*SmallEod.CaseApi* | [**createCase**](docs/CaseApi.md#createCase) | **POST** /case | Create a case +*SmallEod.CaseApi* | [**deleteCase**](docs/CaseApi.md#deleteCase) | **DELETE** /case/{caseId} | +*SmallEod.CaseApi* | [**listCase**](docs/CaseApi.md#listCase) | **GET** /case | List all cases +*SmallEod.CaseApi* | [**showCaseById**](docs/CaseApi.md#showCaseById) | **GET** /case/{caseId} | Info for a specific case +*SmallEod.CaseApi* | [**updateCaseById**](docs/CaseApi.md#updateCaseById) | **PATCH** /case/{caseId} | Updated case +*SmallEod.CollectionApi* | [**createCollection**](docs/CollectionApi.md#createCollection) | **POST** /collection | Create a collection +*SmallEod.CollectionApi* | [**deleteCollection**](docs/CollectionApi.md#deleteCollection) | **DELETE** /collection/{collectionId} | +*SmallEod.CollectionApi* | [**listCollection**](docs/CollectionApi.md#listCollection) | **GET** /collection | List all collections +*SmallEod.CollectionApi* | [**showCaseByCollection**](docs/CollectionApi.md#showCaseByCollection) | **GET** /collection/{collectionId}/case | Cases match query for a specific collection +*SmallEod.CollectionApi* | [**showCollectionById**](docs/CollectionApi.md#showCollectionById) | **GET** /collection/{collectionId} | Info for a specific collection +*SmallEod.CollectionApi* | [**showEventCaseByCollection**](docs/CollectionApi.md#showEventCaseByCollection) | **GET** /collection/{collectionId}/case/{caseId}/event | Events of case match query for a specific collection +*SmallEod.CollectionApi* | [**showLetterCaseByCollection**](docs/CollectionApi.md#showLetterCaseByCollection) | **GET** /collection/{collectionId}/case/{caseId}/letter | Letters of cases match query for a specific collection +*SmallEod.CollectionApi* | [**showNoteCaseByCollection**](docs/CollectionApi.md#showNoteCaseByCollection) | **GET** /collection/{collectionId}/case/{caseId}/note | Notes of case match query for a specific collection +*SmallEod.CollectionApi* | [**updateCollectionById**](docs/CollectionApi.md#updateCollectionById) | **PATCH** /collection/{collectionId} | Updated collection +*SmallEod.DescriptionApi* | [**createDescription**](docs/DescriptionApi.md#createDescription) | **POST** /description | Create a description +*SmallEod.DescriptionApi* | [**deleteDescription**](docs/DescriptionApi.md#deleteDescription) | **DELETE** /description/{descriptionId} | +*SmallEod.DescriptionApi* | [**listDescription**](docs/DescriptionApi.md#listDescription) | **GET** /description | List all descriptions +*SmallEod.DescriptionApi* | [**showDescriptionById**](docs/DescriptionApi.md#showDescriptionById) | **GET** /description/{descriptionId} | Info for a specific description +*SmallEod.DictionaryApi* | [**createDictionary**](docs/DictionaryApi.md#createDictionary) | **POST** /dictionary | Create a dictionary +*SmallEod.DictionaryApi* | [**deleteDictionary**](docs/DictionaryApi.md#deleteDictionary) | **DELETE** /dictionary/{dictionaryId} | +*SmallEod.DictionaryApi* | [**listDictionary**](docs/DictionaryApi.md#listDictionary) | **GET** /dictionary | List all dictionaries +*SmallEod.DictionaryApi* | [**showDictionaryById**](docs/DictionaryApi.md#showDictionaryById) | **GET** /dictionary/{dictionaryId} | Info for a specific dictionary +*SmallEod.EventApi* | [**createEvent**](docs/EventApi.md#createEvent) | **POST** /event | Create a event +*SmallEod.EventApi* | [**deleteEvent**](docs/EventApi.md#deleteEvent) | **DELETE** /event/{eventId} | +*SmallEod.EventApi* | [**listEvent**](docs/EventApi.md#listEvent) | **GET** /event | List all events of case +*SmallEod.EventApi* | [**showEventById**](docs/EventApi.md#showEventById) | **GET** /event/{eventId} | Info for a specific event +*SmallEod.FileApi* | [**createFile**](docs/FileApi.md#createFile) | **POST** /letter/{letterId}/file | Create a file +*SmallEod.FileApi* | [**createPreSignedUrl**](docs/FileApi.md#createPreSignedUrl) | **POST** /letter/file/sign | Create a pre-signed URLs for file +*SmallEod.FileApi* | [**showFileByLetterId**](docs/FileApi.md#showFileByLetterId) | **GET** /letter/{letterId}/file/{fileId} | Info for a specific file +*SmallEod.InstitutionApi* | [**createInstitution**](docs/InstitutionApi.md#createInstitution) | **POST** /institution | Create a institution +*SmallEod.InstitutionApi* | [**listInstitution**](docs/InstitutionApi.md#listInstitution) | **GET** /institution | List all institutions +*SmallEod.LetterApi* | [**createLetter**](docs/LetterApi.md#createLetter) | **POST** /letter | Create a letter +*SmallEod.LetterApi* | [**deleteLetter**](docs/LetterApi.md#deleteLetter) | **DELETE** /letter/{letterId} | +*SmallEod.LetterApi* | [**listLetter**](docs/LetterApi.md#listLetter) | **GET** /letter | List all letters +*SmallEod.LetterApi* | [**showLetterById**](docs/LetterApi.md#showLetterById) | **GET** /letter/{letterId} | Info for a specific letter +*SmallEod.NoteApi* | [**createNote**](docs/NoteApi.md#createNote) | **POST** /note | Create a note +*SmallEod.NoteApi* | [**deleteNote**](docs/NoteApi.md#deleteNote) | **DELETE** /note/{noteId} | +*SmallEod.NoteApi* | [**listNote**](docs/NoteApi.md#listNote) | **GET** /note | List all notes of case +*SmallEod.NoteApi* | [**showNoteById**](docs/NoteApi.md#showNoteById) | **GET** /note/{noteId} | Info for a specific note +*SmallEod.NotifiedUserApi* | [**createNotifiedUser**](docs/NotifiedUserApi.md#createNotifiedUser) | **POST** /case/{caseId}/notifiedUser | Create a notified user reference of case +*SmallEod.NotifiedUserApi* | [**deleteNotifiedUser**](docs/NotifiedUserApi.md#deleteNotifiedUser) | **DELETE** /case/{caseId}/notifiedUser/{notifiedUserId} | +*SmallEod.NotifiedUserApi* | [**shownotifiedUserById**](docs/NotifiedUserApi.md#shownotifiedUserById) | **GET** /case/{caseId}/notifiedUser/{notifiedUserId} | Info for a specific notified user of case +*SmallEod.ResponsibleUserApi* | [**createResponsibleUser**](docs/ResponsibleUserApi.md#createResponsibleUser) | **POST** /case/{caseId}/responsibleUser | Create a responsible user reference of case +*SmallEod.ResponsibleUserApi* | [**deleteResponsibleUser**](docs/ResponsibleUserApi.md#deleteResponsibleUser) | **DELETE** /case/{caseId}/responsibleUser/{responsibleUserId} | +*SmallEod.ResponsibleUserApi* | [**showcaseById**](docs/ResponsibleUserApi.md#showcaseById) | **GET** /case/{caseId}/responsibleUser/{responsibleUserId} | Info for a specific responsible user of case +*SmallEod.SessionApi* | [**createSession**](docs/SessionApi.md#createSession) | **POST** /user/{userId}/session | Create a session +*SmallEod.SessionApi* | [**deleteSession**](docs/SessionApi.md#deleteSession) | **DELETE** /user/{userId}/session/{sessionId} | +*SmallEod.SessionApi* | [**listSessionOfUser**](docs/SessionApi.md#listSessionOfUser) | **GET** /user/{userId}/session | List all sessions +*SmallEod.SessionApi* | [**showSessionById**](docs/SessionApi.md#showSessionById) | **GET** /user/{userId}/session/{sessionId} | Info for a specific session of user +*SmallEod.TagNamespaceApi* | [**createTagNamespace**](docs/TagNamespaceApi.md#createTagNamespace) | **POST** /tagNamespace | Create a tag namespace +*SmallEod.TagNamespaceApi* | [**deleteTagNamespace**](docs/TagNamespaceApi.md#deleteTagNamespace) | **DELETE** /tagNamespace/{tagNamespaceId} | +*SmallEod.TagNamespaceApi* | [**listTagNamespace**](docs/TagNamespaceApi.md#listTagNamespace) | **GET** /tagNamespace | List all tag namespaces +*SmallEod.TagNamespaceApi* | [**showTagNamespaceById**](docs/TagNamespaceApi.md#showTagNamespaceById) | **GET** /tagNamespace/{tagNamespaceId} | Info for a specific tag namespace +*SmallEod.UserApi* | [**createUser**](docs/UserApi.md#createUser) | **POST** /user | Create a user +*SmallEod.UserApi* | [**deleteUser**](docs/UserApi.md#deleteUser) | **DELETE** /user/{userId} | +*SmallEod.UserApi* | [**listUser**](docs/UserApi.md#listUser) | **GET** /user | List all users +*SmallEod.UserApi* | [**showUserById**](docs/UserApi.md#showUserById) | **GET** /user/{userId} | Info for a specific user + + +## Documentation for Models + + - [SmallEod.AddressData](docs/AddressData.md) + - [SmallEod.AdministrativeUnit](docs/AdministrativeUnit.md) + - [SmallEod.CaseAuditedInstitution](docs/CaseAuditedInstitution.md) + - [SmallEod.CaseMatrix](docs/CaseMatrix.md) + - [SmallEod.Channel](docs/Channel.md) + - [SmallEod.Collection](docs/Collection.md) + - [SmallEod.Description](docs/Description.md) + - [SmallEod.Dictionary](docs/Dictionary.md) + - [SmallEod.DictionaryValue](docs/DictionaryValue.md) + - [SmallEod.Error](docs/Error.md) + - [SmallEod.Event](docs/Event.md) + - [SmallEod.File](docs/File.md) + - [SmallEod.FileSigner](docs/FileSigner.md) + - [SmallEod.Institution](docs/Institution.md) + - [SmallEod.InstitutionExternalIdentifier](docs/InstitutionExternalIdentifier.md) + - [SmallEod.Letter](docs/Letter.md) + - [SmallEod.ModelCase](docs/ModelCase.md) + - [SmallEod.Note](docs/Note.md) + - [SmallEod.Session](docs/Session.md) + - [SmallEod.TagNamespace](docs/TagNamespace.md) + - [SmallEod.User](docs/User.md) + - [SmallEod.UserRef](docs/UserRef.md) + + +## Documentation for Authorization + + + +### basicAuth + + +- **Type**: HTTP basic authentication + + + +### bearerAuth + + +- **Type**: Bearer authentication (JWT) + + + +### sessionAuth + + +- **Type**: API key +- **API key parameter name**: session +- **Location**: + diff --git a/config.yml b/config.yml new file mode 100644 index 0000000..177476b --- /dev/null +++ b/config.yml @@ -0,0 +1,5 @@ +apiPackage: "small_eod_client" +projectVersion: 1.0.0 +additionalProperties: + usePromises: true + useES6: false diff --git a/docs/AddressData.md b/docs/AddressData.md new file mode 100644 index 0000000..b86661b --- /dev/null +++ b/docs/AddressData.md @@ -0,0 +1,16 @@ +# SmallEod.AddressData + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **String** | | [optional] +**epuap** | **String** | | [optional] +**street** | **String** | | [optional] +**postalCode** | **String** | | [optional] +**city** | **String** | | [optional] +**voivodeship** | **String** | | [optional] +**houseNo** | **String** | | [optional] +**flatNo** | **String** | | [optional] + + diff --git a/docs/AdministrativeUnit.md b/docs/AdministrativeUnit.md new file mode 100644 index 0000000..afade04 --- /dev/null +++ b/docs/AdministrativeUnit.md @@ -0,0 +1,13 @@ +# SmallEod.AdministrativeUnit + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**name** | **String** | | +**level** | **Number** | | +**category** | **String** | | +**terc** | **String** | | + + diff --git a/docs/AdministrativeUnitApi.md b/docs/AdministrativeUnitApi.md new file mode 100644 index 0000000..57de438 --- /dev/null +++ b/docs/AdministrativeUnitApi.md @@ -0,0 +1,214 @@ +# SmallEod.AdministrativeUnitApi + +All URIs are relative to *https://small-eod.siecobywatelska.pl/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createAdministrativeUnit**](AdministrativeUnitApi.md#createAdministrativeUnit) | **POST** /administrativeUnit | Create a administrative unit +[**deleteAdministrativeUnit**](AdministrativeUnitApi.md#deleteAdministrativeUnit) | **DELETE** /administrativeUnit/{administrativeUnitId} | +[**listAdministrativeUnit**](AdministrativeUnitApi.md#listAdministrativeUnit) | **GET** /administrativeUnit | List all administrative units +[**showAdministrativeUnitById**](AdministrativeUnitApi.md#showAdministrativeUnitById) | **GET** /administrativeUnit/{administrativeUnitId} | Info for a specific administrative unit + + + +## createAdministrativeUnit + +> AdministrativeUnit createAdministrativeUnit(administrativeUnit) + +Create a administrative unit + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.AdministrativeUnitApi(); +var administrativeUnit = new SmallEod.AdministrativeUnit(); // AdministrativeUnit | New administrative unit +apiInstance.createAdministrativeUnit(administrativeUnit).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **administrativeUnit** | [**AdministrativeUnit**](AdministrativeUnit.md)| New administrative unit | + +### Return type + +[**AdministrativeUnit**](AdministrativeUnit.md) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## deleteAdministrativeUnit + +> deleteAdministrativeUnit(administrativeUnitId) + + + +Deletes a single administrative unit based on the ID supplied + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.AdministrativeUnitApi(); +var administrativeUnitId = 789; // Number | The id of the administrativeUnit to delete +apiInstance.deleteAdministrativeUnit(administrativeUnitId).then(function() { + console.log('API called successfully.'); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **administrativeUnitId** | **Number**| The id of the administrativeUnit to delete | + +### Return type + +null (empty response body) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## listAdministrativeUnit + +> [AdministrativeUnit] listAdministrativeUnit(opts) + +List all administrative units + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.AdministrativeUnitApi(); +var opts = { + 'limit': 56, // Number | How many items to return at one time (max 100) + 'offset': 56 // Number | How many items skip in return +}; +apiInstance.listAdministrativeUnit(opts).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **Number**| How many items to return at one time (max 100) | [optional] + **offset** | **Number**| How many items skip in return | [optional] + +### Return type + +[**[AdministrativeUnit]**](AdministrativeUnit.md) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## showAdministrativeUnitById + +> AdministrativeUnit showAdministrativeUnitById(administrativeUnitId) + +Info for a specific administrative unit + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.AdministrativeUnitApi(); +var administrativeUnitId = 3.4; // Number | The id of the administrative unit to retrieve +apiInstance.showAdministrativeUnitById(administrativeUnitId).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **administrativeUnitId** | **Number**| The id of the administrative unit to retrieve | + +### Return type + +[**AdministrativeUnit**](AdministrativeUnit.md) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + diff --git a/docs/CaseApi.md b/docs/CaseApi.md new file mode 100644 index 0000000..6432dd4 --- /dev/null +++ b/docs/CaseApi.md @@ -0,0 +1,268 @@ +# SmallEod.CaseApi + +All URIs are relative to *https://small-eod.siecobywatelska.pl/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createCase**](CaseApi.md#createCase) | **POST** /case | Create a case +[**deleteCase**](CaseApi.md#deleteCase) | **DELETE** /case/{caseId} | +[**listCase**](CaseApi.md#listCase) | **GET** /case | List all cases +[**showCaseById**](CaseApi.md#showCaseById) | **GET** /case/{caseId} | Info for a specific case +[**updateCaseById**](CaseApi.md#updateCaseById) | **PATCH** /case/{caseId} | Updated case + + + +## createCase + +> ModelCase createCase(modelCase) + +Create a case + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.CaseApi(); +var modelCase = new SmallEod.ModelCase(); // ModelCase | New case +apiInstance.createCase(modelCase).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **modelCase** | [**ModelCase**](ModelCase.md)| New case | + +### Return type + +[**ModelCase**](ModelCase.md) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## deleteCase + +> deleteCase(caseId) + + + +Deletes a single case based on the ID supplied + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.CaseApi(); +var caseId = 789; // Number | The id of the case to delete +apiInstance.deleteCase(caseId).then(function() { + console.log('API called successfully.'); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **caseId** | **Number**| The id of the case to delete | + +### Return type + +null (empty response body) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## listCase + +> [ModelCase] listCase(opts) + +List all cases + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.CaseApi(); +var opts = { + 'limit': 56, // Number | How many items to return at one time (max 100) + 'offset': 56, // Number | How many items skip in return + 'institution': 56 // Number | Institution ID or NULL +}; +apiInstance.listCase(opts).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **Number**| How many items to return at one time (max 100) | [optional] + **offset** | **Number**| How many items skip in return | [optional] + **institution** | **Number**| Institution ID or NULL | [optional] + +### Return type + +[**[ModelCase]**](ModelCase.md) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## showCaseById + +> ModelCase showCaseById(caseId) + +Info for a specific case + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.CaseApi(); +var caseId = 3.4; // Number | The id of the case to retrieve +apiInstance.showCaseById(caseId).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **caseId** | **Number**| The id of the case to retrieve | + +### Return type + +[**ModelCase**](ModelCase.md) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## updateCaseById + +> ModelCase updateCaseById(caseId, modelCase) + +Updated case + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.CaseApi(); +var caseId = 3.4; // Number | The id of the case to modify +var modelCase = new SmallEod.ModelCase(); // ModelCase | Updated case +apiInstance.updateCaseById(caseId, modelCase).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **caseId** | **Number**| The id of the case to modify | + **modelCase** | [**ModelCase**](ModelCase.md)| Updated case | + +### Return type + +[**ModelCase**](ModelCase.md) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + diff --git a/docs/CaseAuditedInstitution.md b/docs/CaseAuditedInstitution.md new file mode 100644 index 0000000..5966dca --- /dev/null +++ b/docs/CaseAuditedInstitution.md @@ -0,0 +1,10 @@ +# SmallEod.CaseAuditedInstitution + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [optional] +**user** | **Number** | | [optional] + + diff --git a/docs/CaseMatrix.md b/docs/CaseMatrix.md new file mode 100644 index 0000000..04fa1ae --- /dev/null +++ b/docs/CaseMatrix.md @@ -0,0 +1,11 @@ +# SmallEod.CaseMatrix + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Number** | | [optional] +**dictionary** | **String** | | [optional] +**values** | **[String]** | | [optional] + + diff --git a/docs/Channel.md b/docs/Channel.md new file mode 100644 index 0000000..c3b1bee --- /dev/null +++ b/docs/Channel.md @@ -0,0 +1,61 @@ +# SmallEod.Channel + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [readonly] +**name** | **String** | | +**required** | **[String]** | Required address fields | [optional] +**createdOn** | **String** | | [optional] [readonly] +**createdBy** | **String** | User ID responsible for creating the content | [optional] [readonly] +**modifiedOn** | **String** | | [optional] [readonly] +**modifiedBy** | **String** | | [optional] [readonly] + + + +## Enum: NameEnum + + +* `fedrowanie` (value: `"fedrowanie"`) + +* `faks` (value: `"faks"`) + +* `od klienta` (value: `"od klienta"`) + +* `mecenas zewn.` (value: `"mecenas zewn."`) + +* `dostarczenie osobiście` (value: `"dostarczenie osobiście"`) + +* `email` (value: `"email"`) + +* `poczta tradycyjna` (value: `"poczta tradycyjna"`) + +* `epuap` (value: `"epuap"`) + + + + + +## Enum: [RequiredEnum] + + +* `email` (value: `"email"`) + +* `epuap` (value: `"epuap"`) + +* `street` (value: `"street"`) + +* `postal_code` (value: `"postal_code"`) + +* `city` (value: `"city"`) + +* `voivodeship` (value: `"voivodeship"`) + +* `house_no` (value: `"house_no"`) + +* `flat_no` (value: `"flat_no"`) + + + + diff --git a/docs/Collection.md b/docs/Collection.md new file mode 100644 index 0000000..0b4dbbe --- /dev/null +++ b/docs/Collection.md @@ -0,0 +1,33 @@ +# SmallEod.Collection + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [readonly] +**name** | **String** | | +**content** | **[String]** | | [optional] +**_public** | **Boolean** | | [optional] +**expiredOn** | **Date** | | [optional] +**query** | **String** | Search query | +**createdOn** | **String** | | [readonly] +**createdBy** | **String** | User ID responsible for creating the content | [readonly] +**modifiedOn** | **String** | | [readonly] +**modifiedBy** | **String** | | [readonly] + + + +## Enum: [ContentEnum] + + +* `note` (value: `"note"`) + +* `comment` (value: `"comment"`) + +* `letter` (value: `"letter"`) + +* `event` (value: `"event"`) + + + + diff --git a/docs/CollectionApi.md b/docs/CollectionApi.md new file mode 100644 index 0000000..617846d --- /dev/null +++ b/docs/CollectionApi.md @@ -0,0 +1,489 @@ +# SmallEod.CollectionApi + +All URIs are relative to *https://small-eod.siecobywatelska.pl/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createCollection**](CollectionApi.md#createCollection) | **POST** /collection | Create a collection +[**deleteCollection**](CollectionApi.md#deleteCollection) | **DELETE** /collection/{collectionId} | +[**listCollection**](CollectionApi.md#listCollection) | **GET** /collection | List all collections +[**showCaseByCollection**](CollectionApi.md#showCaseByCollection) | **GET** /collection/{collectionId}/case | Cases match query for a specific collection +[**showCollectionById**](CollectionApi.md#showCollectionById) | **GET** /collection/{collectionId} | Info for a specific collection +[**showEventCaseByCollection**](CollectionApi.md#showEventCaseByCollection) | **GET** /collection/{collectionId}/case/{caseId}/event | Events of case match query for a specific collection +[**showLetterCaseByCollection**](CollectionApi.md#showLetterCaseByCollection) | **GET** /collection/{collectionId}/case/{caseId}/letter | Letters of cases match query for a specific collection +[**showNoteCaseByCollection**](CollectionApi.md#showNoteCaseByCollection) | **GET** /collection/{collectionId}/case/{caseId}/note | Notes of case match query for a specific collection +[**updateCollectionById**](CollectionApi.md#updateCollectionById) | **PATCH** /collection/{collectionId} | Updated collection + + + +## createCollection + +> Collection createCollection(collection) + +Create a collection + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.CollectionApi(); +var collection = new SmallEod.Collection(); // Collection | New collection +apiInstance.createCollection(collection).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **collection** | [**Collection**](Collection.md)| New collection | + +### Return type + +[**Collection**](Collection.md) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## deleteCollection + +> deleteCollection(collectionId) + + + +Deletes a single collection based on the ID supplied + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.CollectionApi(); +var collectionId = 789; // Number | The id of the collection to delete +apiInstance.deleteCollection(collectionId).then(function() { + console.log('API called successfully.'); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **collectionId** | **Number**| The id of the collection to delete | + +### Return type + +null (empty response body) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## listCollection + +> [Collection] listCollection(opts) + +List all collections + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.CollectionApi(); +var opts = { + 'limit': 56, // Number | How many items to return at one time (max 100) + 'offset': 56, // Number | How many items skip in return + '_case': 56 // Number | Case ID +}; +apiInstance.listCollection(opts).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **Number**| How many items to return at one time (max 100) | [optional] + **offset** | **Number**| How many items skip in return | [optional] + **_case** | **Number**| Case ID | [optional] + +### Return type + +[**[Collection]**](Collection.md) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## showCaseByCollection + +> ModelCase showCaseByCollection(collectionId) + +Cases match query for a specific collection + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure Bearer (JWT) access token for authorization: bearerAuth +var bearerAuth = defaultClient.authentications['bearerAuth']; +bearerAuth.accessToken = 'YOUR ACCESS TOKEN'; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.CollectionApi(); +var collectionId = 3.4; // Number | The id of the collection to retrieve +apiInstance.showCaseByCollection(collectionId).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **collectionId** | **Number**| The id of the collection to retrieve | + +### Return type + +[**ModelCase**](ModelCase.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth), [sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## showCollectionById + +> Collection showCollectionById(collectionId) + +Info for a specific collection + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure Bearer (JWT) access token for authorization: bearerAuth +var bearerAuth = defaultClient.authentications['bearerAuth']; +bearerAuth.accessToken = 'YOUR ACCESS TOKEN'; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.CollectionApi(); +var collectionId = 3.4; // Number | The id of the collection to retrieve +apiInstance.showCollectionById(collectionId).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **collectionId** | **Number**| The id of the collection to retrieve | + +### Return type + +[**Collection**](Collection.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth), [sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## showEventCaseByCollection + +> Event showEventCaseByCollection(collectionId, caseId) + +Events of case match query for a specific collection + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure Bearer (JWT) access token for authorization: bearerAuth +var bearerAuth = defaultClient.authentications['bearerAuth']; +bearerAuth.accessToken = 'YOUR ACCESS TOKEN'; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.CollectionApi(); +var collectionId = 3.4; // Number | The id of the collection to retrieve +var caseId = 3.4; // Number | The id of the collection to retrieve +apiInstance.showEventCaseByCollection(collectionId, caseId).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **collectionId** | **Number**| The id of the collection to retrieve | + **caseId** | **Number**| The id of the collection to retrieve | + +### Return type + +[**Event**](Event.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth), [sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## showLetterCaseByCollection + +> Letter showLetterCaseByCollection(collectionId, caseId) + +Letters of cases match query for a specific collection + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure Bearer (JWT) access token for authorization: bearerAuth +var bearerAuth = defaultClient.authentications['bearerAuth']; +bearerAuth.accessToken = 'YOUR ACCESS TOKEN'; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.CollectionApi(); +var collectionId = 3.4; // Number | The id of the collection to retrieve +var caseId = 3.4; // Number | The id of the collection to retrieve +apiInstance.showLetterCaseByCollection(collectionId, caseId).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **collectionId** | **Number**| The id of the collection to retrieve | + **caseId** | **Number**| The id of the collection to retrieve | + +### Return type + +[**Letter**](Letter.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth), [sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## showNoteCaseByCollection + +> Letter showNoteCaseByCollection(collectionId, caseId) + +Notes of case match query for a specific collection + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure Bearer (JWT) access token for authorization: bearerAuth +var bearerAuth = defaultClient.authentications['bearerAuth']; +bearerAuth.accessToken = 'YOUR ACCESS TOKEN'; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.CollectionApi(); +var collectionId = 3.4; // Number | The id of the collection to retrieve +var caseId = 3.4; // Number | The id of the collection to retrieve +apiInstance.showNoteCaseByCollection(collectionId, caseId).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **collectionId** | **Number**| The id of the collection to retrieve | + **caseId** | **Number**| The id of the collection to retrieve | + +### Return type + +[**Letter**](Letter.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth), [sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## updateCollectionById + +> Collection updateCollectionById(collectionId, collection) + +Updated collection + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.CollectionApi(); +var collectionId = 3.4; // Number | The id of the collection to modify +var collection = new SmallEod.Collection(); // Collection | Updated collection +apiInstance.updateCollectionById(collectionId, collection).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **collectionId** | **Number**| The id of the collection to modify | + **collection** | [**Collection**](Collection.md)| Updated collection | + +### Return type + +[**Collection**](Collection.md) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + diff --git a/docs/Description.md b/docs/Description.md new file mode 100644 index 0000000..18ca0f0 --- /dev/null +++ b/docs/Description.md @@ -0,0 +1,15 @@ +# SmallEod.Description + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [readonly] +**text** | **String** | | +**userAgent** | **String** | | [optional] +**createdOn** | **String** | | [readonly] +**createdBy** | **String** | User ID responsible for creating the content | [readonly] +**modifiedOn** | **String** | | [readonly] +**modifiedBy** | **String** | | [readonly] + + diff --git a/docs/DescriptionApi.md b/docs/DescriptionApi.md new file mode 100644 index 0000000..9cf3d9a --- /dev/null +++ b/docs/DescriptionApi.md @@ -0,0 +1,214 @@ +# SmallEod.DescriptionApi + +All URIs are relative to *https://small-eod.siecobywatelska.pl/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createDescription**](DescriptionApi.md#createDescription) | **POST** /description | Create a description +[**deleteDescription**](DescriptionApi.md#deleteDescription) | **DELETE** /description/{descriptionId} | +[**listDescription**](DescriptionApi.md#listDescription) | **GET** /description | List all descriptions +[**showDescriptionById**](DescriptionApi.md#showDescriptionById) | **GET** /description/{descriptionId} | Info for a specific description + + + +## createDescription + +> Description createDescription(description) + +Create a description + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.DescriptionApi(); +var description = new SmallEod.Description(); // Description | New description +apiInstance.createDescription(description).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **description** | [**Description**](Description.md)| New description | + +### Return type + +[**Description**](Description.md) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## deleteDescription + +> deleteDescription(descriptionId) + + + +Deletes a single description based on the ID supplied + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.DescriptionApi(); +var descriptionId = 789; // Number | The id of the description to delete +apiInstance.deleteDescription(descriptionId).then(function() { + console.log('API called successfully.'); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **descriptionId** | **Number**| The id of the description to delete | + +### Return type + +null (empty response body) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## listDescription + +> [Description] listDescription(opts) + +List all descriptions + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.DescriptionApi(); +var opts = { + 'limit': 56, // Number | How many items to return at one time (max 100) + 'offset': 56 // Number | How many items skip in return +}; +apiInstance.listDescription(opts).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **Number**| How many items to return at one time (max 100) | [optional] + **offset** | **Number**| How many items skip in return | [optional] + +### Return type + +[**[Description]**](Description.md) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## showDescriptionById + +> Description showDescriptionById(descriptionId) + +Info for a specific description + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.DescriptionApi(); +var descriptionId = 3.4; // Number | The id of the description to retrieve +apiInstance.showDescriptionById(descriptionId).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **descriptionId** | **Number**| The id of the description to retrieve | + +### Return type + +[**Description**](Description.md) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + diff --git a/docs/Dictionary.md b/docs/Dictionary.md new file mode 100644 index 0000000..33403a7 --- /dev/null +++ b/docs/Dictionary.md @@ -0,0 +1,18 @@ +# SmallEod.Dictionary + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**name** | **String** | Name of the statistical field | +**value** | [**[DictionaryValue]**](DictionaryValue.md) | Acceptable values | [optional] +**maxItems** | **Number** | Maximum number of selected values | [optional] [default to 1] +**minItems** | **Number** | Minimum number of selected values | [optional] [default to 1] +**active** | **Boolean** | Allows to add to new entries | [optional] [default to true] +**createdOn** | **String** | | [readonly] +**createdBy** | **String** | User ID responsible for creating the content | [readonly] +**modifiedOn** | **String** | | [readonly] +**modifiedBy** | **String** | | [readonly] + + diff --git a/docs/DictionaryApi.md b/docs/DictionaryApi.md new file mode 100644 index 0000000..37898ae --- /dev/null +++ b/docs/DictionaryApi.md @@ -0,0 +1,214 @@ +# SmallEod.DictionaryApi + +All URIs are relative to *https://small-eod.siecobywatelska.pl/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createDictionary**](DictionaryApi.md#createDictionary) | **POST** /dictionary | Create a dictionary +[**deleteDictionary**](DictionaryApi.md#deleteDictionary) | **DELETE** /dictionary/{dictionaryId} | +[**listDictionary**](DictionaryApi.md#listDictionary) | **GET** /dictionary | List all dictionaries +[**showDictionaryById**](DictionaryApi.md#showDictionaryById) | **GET** /dictionary/{dictionaryId} | Info for a specific dictionary + + + +## createDictionary + +> Dictionary createDictionary(dictionary) + +Create a dictionary + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.DictionaryApi(); +var dictionary = new SmallEod.Dictionary(); // Dictionary | New dictionary +apiInstance.createDictionary(dictionary).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **dictionary** | [**Dictionary**](Dictionary.md)| New dictionary | + +### Return type + +[**Dictionary**](Dictionary.md) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## deleteDictionary + +> deleteDictionary(dictionaryId) + + + +Deletes a single dictionary based on the ID supplied + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.DictionaryApi(); +var dictionaryId = 789; // Number | The id of the dictionary to delete +apiInstance.deleteDictionary(dictionaryId).then(function() { + console.log('API called successfully.'); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **dictionaryId** | **Number**| The id of the dictionary to delete | + +### Return type + +null (empty response body) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## listDictionary + +> [Dictionary] listDictionary(opts) + +List all dictionaries + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.DictionaryApi(); +var opts = { + 'limit': 56, // Number | How many items to return at one time (max 100) + 'offset': 56 // Number | How many items skip in return +}; +apiInstance.listDictionary(opts).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **Number**| How many items to return at one time (max 100) | [optional] + **offset** | **Number**| How many items skip in return | [optional] + +### Return type + +[**[Dictionary]**](Dictionary.md) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## showDictionaryById + +> Dictionary showDictionaryById(dictionaryId) + +Info for a specific dictionary + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.DictionaryApi(); +var dictionaryId = 3.4; // Number | The id of the dictionary to retrieve +apiInstance.showDictionaryById(dictionaryId).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **dictionaryId** | **Number**| The id of the dictionary to retrieve | + +### Return type + +[**Dictionary**](Dictionary.md) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + diff --git a/docs/DictionaryValue.md b/docs/DictionaryValue.md new file mode 100644 index 0000000..b9ce988 --- /dev/null +++ b/docs/DictionaryValue.md @@ -0,0 +1,10 @@ +# SmallEod.DictionaryValue + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | +**name** | **String** | | + + diff --git a/docs/Error.md b/docs/Error.md new file mode 100644 index 0000000..631cf82 --- /dev/null +++ b/docs/Error.md @@ -0,0 +1,10 @@ +# SmallEod.Error + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**code** | **Number** | | +**message** | **String** | | + + diff --git a/docs/Event.md b/docs/Event.md new file mode 100644 index 0000000..c96fb4b --- /dev/null +++ b/docs/Event.md @@ -0,0 +1,17 @@ +# SmallEod.Event + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [readonly] +**_case** | **String** | | [optional] +**name** | **String** | | +**data** | **Date** | | +**comment** | **String** | | [optional] +**createdOn** | **String** | | [readonly] +**createdBy** | **String** | User ID responsible for creating the content | [readonly] +**modifiedOn** | **String** | | [readonly] +**modifiedBy** | **String** | | [readonly] + + diff --git a/docs/EventApi.md b/docs/EventApi.md new file mode 100644 index 0000000..e251dfb --- /dev/null +++ b/docs/EventApi.md @@ -0,0 +1,216 @@ +# SmallEod.EventApi + +All URIs are relative to *https://small-eod.siecobywatelska.pl/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createEvent**](EventApi.md#createEvent) | **POST** /event | Create a event +[**deleteEvent**](EventApi.md#deleteEvent) | **DELETE** /event/{eventId} | +[**listEvent**](EventApi.md#listEvent) | **GET** /event | List all events of case +[**showEventById**](EventApi.md#showEventById) | **GET** /event/{eventId} | Info for a specific event + + + +## createEvent + +> Event createEvent(event) + +Create a event + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.EventApi(); +var event = new SmallEod.Event(); // Event | New event +apiInstance.createEvent(event).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **event** | [**Event**](Event.md)| New event | + +### Return type + +[**Event**](Event.md) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## deleteEvent + +> deleteEvent(eventId) + + + +Deletes a single event based on the ID supplied + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.EventApi(); +var eventId = 789; // Number | The id of the event to delete +apiInstance.deleteEvent(eventId).then(function() { + console.log('API called successfully.'); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **eventId** | **Number**| The id of the event to delete | + +### Return type + +null (empty response body) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## listEvent + +> [Event] listEvent(opts) + +List all events of case + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.EventApi(); +var opts = { + 'limit': 56, // Number | How many items to return at one time (max 100) + 'offset': 56, // Number | How many items skip in return + '_case': 56 // Number | Case ID +}; +apiInstance.listEvent(opts).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **Number**| How many items to return at one time (max 100) | [optional] + **offset** | **Number**| How many items skip in return | [optional] + **_case** | **Number**| Case ID | [optional] + +### Return type + +[**[Event]**](Event.md) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## showEventById + +> Event showEventById(eventId) + +Info for a specific event + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.EventApi(); +var eventId = 3.4; // Number | The id of the event to retrieve +apiInstance.showEventById(eventId).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **eventId** | **Number**| The id of the event to retrieve | + +### Return type + +[**Event**](Event.md) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + diff --git a/docs/File.md b/docs/File.md new file mode 100644 index 0000000..31102ef --- /dev/null +++ b/docs/File.md @@ -0,0 +1,11 @@ +# SmallEod.File + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [readonly] +**path** | **String** | | +**name** | **String** | | + + diff --git a/docs/FileApi.md b/docs/FileApi.md new file mode 100644 index 0000000..6e9165e --- /dev/null +++ b/docs/FileApi.md @@ -0,0 +1,162 @@ +# SmallEod.FileApi + +All URIs are relative to *https://small-eod.siecobywatelska.pl/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createFile**](FileApi.md#createFile) | **POST** /letter/{letterId}/file | Create a file +[**createPreSignedUrl**](FileApi.md#createPreSignedUrl) | **POST** /letter/file/sign | Create a pre-signed URLs for file +[**showFileByLetterId**](FileApi.md#showFileByLetterId) | **GET** /letter/{letterId}/file/{fileId} | Info for a specific file + + + +## createFile + +> File createFile(letterId, file) + +Create a file + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.FileApi(); +var letterId = 3.4; // Number | The id of the letter to retrieve +var file = null; // File | New file +apiInstance.createFile(letterId, file).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **letterId** | **Number**| The id of the letter to retrieve | + **file** | [**File**](File.md)| New file | + +### Return type + +**File** + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## createPreSignedUrl + +> FileSigner createPreSignedUrl(fileSigner) + +Create a pre-signed URLs for file + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.FileApi(); +var fileSigner = new SmallEod.FileSigner(); // FileSigner | New file signature request +apiInstance.createPreSignedUrl(fileSigner).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **fileSigner** | [**FileSigner**](FileSigner.md)| New file signature request | + +### Return type + +[**FileSigner**](FileSigner.md) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## showFileByLetterId + +> Letter showFileByLetterId(letterId, fileId) + +Info for a specific file + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.FileApi(); +var letterId = 3.4; // Number | The id of the letter of file +var fileId = 3.4; // Number | The id of the file to retrieve +apiInstance.showFileByLetterId(letterId, fileId).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **letterId** | **Number**| The id of the letter of file | + **fileId** | **Number**| The id of the file to retrieve | + +### Return type + +[**Letter**](Letter.md) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + diff --git a/docs/FileSigner.md b/docs/FileSigner.md new file mode 100644 index 0000000..679352b --- /dev/null +++ b/docs/FileSigner.md @@ -0,0 +1,23 @@ +# SmallEod.FileSigner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | | +**method** | **String** | | [optional] [readonly] +**url** | **String** | Path to send file. See details: https://docs.aws.amazon.com/AmazonS3/latest/dev/PresignedUrlUploadObject.html | [optional] [readonly] +**path** | **String** | | [optional] [readonly] + + + +## Enum: MethodEnum + + +* `POST` (value: `"POST"`) + +* `PUT` (value: `"PUT"`) + + + + diff --git a/docs/Institution.md b/docs/Institution.md new file mode 100644 index 0000000..b4b3adb --- /dev/null +++ b/docs/Institution.md @@ -0,0 +1,17 @@ +# SmallEod.Institution + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [readonly] +**name** | **String** | Name of institution | +**externalIdentifier** | [**InstitutionExternalIdentifier**](InstitutionExternalIdentifier.md) | | [optional] +**address** | [**AddressData**](AddressData.md) | | [optional] +**administrativeUnit** | **String** | | [optional] +**createdOn** | **String** | | [readonly] +**createdBy** | **String** | User ID responsible for creating the content | [readonly] +**modifiedOn** | **String** | | [readonly] +**modifiedBy** | **String** | | [readonly] + + diff --git a/docs/InstitutionApi.md b/docs/InstitutionApi.md new file mode 100644 index 0000000..2bdb7c0 --- /dev/null +++ b/docs/InstitutionApi.md @@ -0,0 +1,112 @@ +# SmallEod.InstitutionApi + +All URIs are relative to *https://small-eod.siecobywatelska.pl/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createInstitution**](InstitutionApi.md#createInstitution) | **POST** /institution | Create a institution +[**listInstitution**](InstitutionApi.md#listInstitution) | **GET** /institution | List all institutions + + + +## createInstitution + +> Institution createInstitution(institution) + +Create a institution + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.InstitutionApi(); +var institution = new SmallEod.Institution(); // Institution | New institution +apiInstance.createInstitution(institution).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **institution** | [**Institution**](Institution.md)| New institution | + +### Return type + +[**Institution**](Institution.md) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## listInstitution + +> [Institution] listInstitution(opts) + +List all institutions + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.InstitutionApi(); +var opts = { + 'limit': 56, // Number | How many items to return at one time (max 100) + 'offset': 56 // Number | How many items skip in return +}; +apiInstance.listInstitution(opts).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **Number**| How many items to return at one time (max 100) | [optional] + **offset** | **Number**| How many items skip in return | [optional] + +### Return type + +[**[Institution]**](Institution.md) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + diff --git a/docs/InstitutionExternalIdentifier.md b/docs/InstitutionExternalIdentifier.md new file mode 100644 index 0000000..e75d0fb --- /dev/null +++ b/docs/InstitutionExternalIdentifier.md @@ -0,0 +1,10 @@ +# SmallEod.InstitutionExternalIdentifier + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**regon** | **String** | | [optional] +**nip** | **String** | | [optional] + + diff --git a/docs/Letter.md b/docs/Letter.md new file mode 100644 index 0000000..1dee0eb --- /dev/null +++ b/docs/Letter.md @@ -0,0 +1,38 @@ +# SmallEod.Letter + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [readonly] +**name** | **String** | | +**direction** | **String** | Direction | +**channel** | **String** | Channel | +**_final** | **Boolean** | The status of the letter, e.g. deciding about visibility in the collection | [optional] +**data** | **Date** | Date of receipt / Date of dispatch | [optional] +**identifier** | **String** | External identifier of letter / case | [optional] +**institution** | **[Number]** | | [optional] +**address** | [**AddressData**](AddressData.md) | | [optional] +**_case** | **String** | | [optional] +**attachment** | **[File]** | | [optional] +**ordering** | **Number** | | [optional] [default to 0] +**comment** | **String** | | [optional] +**excerpt** | **String** | | [optional] +**tags** | **[String]** | | [optional] +**createdOn** | **String** | | [readonly] +**createdBy** | **String** | User ID responsible for creating the content | [readonly] +**modifiedOn** | **String** | | [readonly] +**modifiedBy** | **String** | | [readonly] + + + +## Enum: DirectionEnum + + +* `received` (value: `"received"`) + +* `send` (value: `"send"`) + + + + diff --git a/docs/LetterApi.md b/docs/LetterApi.md new file mode 100644 index 0000000..36f5c47 --- /dev/null +++ b/docs/LetterApi.md @@ -0,0 +1,216 @@ +# SmallEod.LetterApi + +All URIs are relative to *https://small-eod.siecobywatelska.pl/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createLetter**](LetterApi.md#createLetter) | **POST** /letter | Create a letter +[**deleteLetter**](LetterApi.md#deleteLetter) | **DELETE** /letter/{letterId} | +[**listLetter**](LetterApi.md#listLetter) | **GET** /letter | List all letters +[**showLetterById**](LetterApi.md#showLetterById) | **GET** /letter/{letterId} | Info for a specific letter + + + +## createLetter + +> Letter createLetter(letter) + +Create a letter + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.LetterApi(); +var letter = new SmallEod.Letter(); // Letter | New letter +apiInstance.createLetter(letter).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **letter** | [**Letter**](Letter.md)| New letter | + +### Return type + +[**Letter**](Letter.md) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## deleteLetter + +> deleteLetter(letterId) + + + +Deletes a single letter based on the ID supplied + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.LetterApi(); +var letterId = 789; // Number | The id of the letter to delete +apiInstance.deleteLetter(letterId).then(function() { + console.log('API called successfully.'); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **letterId** | **Number**| The id of the letter to delete | + +### Return type + +null (empty response body) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## listLetter + +> [Letter] listLetter(opts) + +List all letters + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.LetterApi(); +var opts = { + 'limit': 56, // Number | How many items to return at one time (max 100) + 'offset': 56, // Number | How many items skip in return + '_case': 56 // Number | Case ID +}; +apiInstance.listLetter(opts).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **Number**| How many items to return at one time (max 100) | [optional] + **offset** | **Number**| How many items skip in return | [optional] + **_case** | **Number**| Case ID | [optional] + +### Return type + +[**[Letter]**](Letter.md) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## showLetterById + +> Letter showLetterById(letterId) + +Info for a specific letter + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.LetterApi(); +var letterId = 3.4; // Number | The id of the letter to retrieve +apiInstance.showLetterById(letterId).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **letterId** | **Number**| The id of the letter to retrieve | + +### Return type + +[**Letter**](Letter.md) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + diff --git a/docs/ModelCase.md b/docs/ModelCase.md new file mode 100644 index 0000000..73d5d8d --- /dev/null +++ b/docs/ModelCase.md @@ -0,0 +1,22 @@ +# SmallEod.ModelCase + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **Number** | | [readonly] +**name** | **String** | Name of case | +**comment** | **String** | Comment available for team | [optional] +**tag** | **[String]** | List of tag which apply to case | [optional] +**auditedInstitution** | [**[CaseAuditedInstitution]**](CaseAuditedInstitution.md) | List of audited institution | [optional] +**responsibleUser** | [**[UserRef]**](UserRef.md) | List of users responsible for the case | [optional] +**notifiedUser** | [**[UserRef]**](UserRef.md) | List of users which receive notifications | [optional] +**matrix** | [**[CaseMatrix]**](CaseMatrix.md) | Structure to collect statistical information in relation to Dictionary | [optional] +**letterCount** | **Number** | Count of letter in case | [optional] [readonly] +**noteCount** | **Number** | Count of note in case | [optional] [readonly] +**createdOn** | **String** | | [readonly] +**createdBy** | **String** | User ID responsible for creating the content | [readonly] +**modifiedOn** | **String** | | [readonly] +**modifiedBy** | **String** | | [readonly] + + diff --git a/docs/Note.md b/docs/Note.md new file mode 100644 index 0000000..6060dbf --- /dev/null +++ b/docs/Note.md @@ -0,0 +1,15 @@ +# SmallEod.Note + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [readonly] +**_case** | **String** | | [optional] +**comment** | **String** | | +**createdOn** | **String** | | [readonly] +**createdBy** | **String** | User ID responsible for creating the content | [readonly] +**modifiedOn** | **String** | | [readonly] +**modifiedBy** | **String** | | [readonly] + + diff --git a/docs/NoteApi.md b/docs/NoteApi.md new file mode 100644 index 0000000..0d1da14 --- /dev/null +++ b/docs/NoteApi.md @@ -0,0 +1,216 @@ +# SmallEod.NoteApi + +All URIs are relative to *https://small-eod.siecobywatelska.pl/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createNote**](NoteApi.md#createNote) | **POST** /note | Create a note +[**deleteNote**](NoteApi.md#deleteNote) | **DELETE** /note/{noteId} | +[**listNote**](NoteApi.md#listNote) | **GET** /note | List all notes of case +[**showNoteById**](NoteApi.md#showNoteById) | **GET** /note/{noteId} | Info for a specific note + + + +## createNote + +> Note createNote(note) + +Create a note + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.NoteApi(); +var note = new SmallEod.Note(); // Note | New note +apiInstance.createNote(note).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **note** | [**Note**](Note.md)| New note | + +### Return type + +[**Note**](Note.md) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## deleteNote + +> deleteNote(noteId) + + + +Deletes a single note based on the ID supplied + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.NoteApi(); +var noteId = 789; // Number | The id of the note to delete +apiInstance.deleteNote(noteId).then(function() { + console.log('API called successfully.'); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **noteId** | **Number**| The id of the note to delete | + +### Return type + +null (empty response body) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## listNote + +> [Note] listNote(opts) + +List all notes of case + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.NoteApi(); +var opts = { + 'limit': 56, // Number | How many items to return at one time (max 100) + 'offset': 56, // Number | How many items skip in return + '_case': 56 // Number | Case ID +}; +apiInstance.listNote(opts).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **Number**| How many items to return at one time (max 100) | [optional] + **offset** | **Number**| How many items skip in return | [optional] + **_case** | **Number**| Case ID | [optional] + +### Return type + +[**[Note]**](Note.md) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## showNoteById + +> Note showNoteById(noteId) + +Info for a specific note + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.NoteApi(); +var noteId = 3.4; // Number | The id of the note to retrieve +apiInstance.showNoteById(noteId).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **noteId** | **Number**| The id of the note to retrieve | + +### Return type + +[**Note**](Note.md) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + diff --git a/docs/NotifiedUserApi.md b/docs/NotifiedUserApi.md new file mode 100644 index 0000000..f63a57d --- /dev/null +++ b/docs/NotifiedUserApi.md @@ -0,0 +1,166 @@ +# SmallEod.NotifiedUserApi + +All URIs are relative to *https://small-eod.siecobywatelska.pl/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createNotifiedUser**](NotifiedUserApi.md#createNotifiedUser) | **POST** /case/{caseId}/notifiedUser | Create a notified user reference of case +[**deleteNotifiedUser**](NotifiedUserApi.md#deleteNotifiedUser) | **DELETE** /case/{caseId}/notifiedUser/{notifiedUserId} | +[**shownotifiedUserById**](NotifiedUserApi.md#shownotifiedUserById) | **GET** /case/{caseId}/notifiedUser/{notifiedUserId} | Info for a specific notified user of case + + + +## createNotifiedUser + +> UserRef createNotifiedUser(caseId, userRef) + +Create a notified user reference of case + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.NotifiedUserApi(); +var caseId = 3.4; // Number | The id of the case to modify +var userRef = new SmallEod.UserRef(); // UserRef | New notified user +apiInstance.createNotifiedUser(caseId, userRef).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **caseId** | **Number**| The id of the case to modify | + **userRef** | [**UserRef**](UserRef.md)| New notified user | + +### Return type + +[**UserRef**](UserRef.md) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## deleteNotifiedUser + +> deleteNotifiedUser(caseId, notifiedUserId) + + + +Deletes a single notified user based on the ID supplied + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.NotifiedUserApi(); +var caseId = 789; // Number | The id of the case to modify +var notifiedUserId = 3.4; // Number | The id of the responsible user to delete +apiInstance.deleteNotifiedUser(caseId, notifiedUserId).then(function() { + console.log('API called successfully.'); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **caseId** | **Number**| The id of the case to modify | + **notifiedUserId** | **Number**| The id of the responsible user to delete | + +### Return type + +null (empty response body) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## shownotifiedUserById + +> UserRef shownotifiedUserById(caseId, notifiedUserId) + +Info for a specific notified user of case + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.NotifiedUserApi(); +var caseId = 3.4; // Number | The id of the case to modify +var notifiedUserId = 3.4; // Number | The id of the responsible user to retrieve +apiInstance.shownotifiedUserById(caseId, notifiedUserId).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **caseId** | **Number**| The id of the case to modify | + **notifiedUserId** | **Number**| The id of the responsible user to retrieve | + +### Return type + +[**UserRef**](UserRef.md) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + diff --git a/docs/ResponsibleUserApi.md b/docs/ResponsibleUserApi.md new file mode 100644 index 0000000..31484b6 --- /dev/null +++ b/docs/ResponsibleUserApi.md @@ -0,0 +1,166 @@ +# SmallEod.ResponsibleUserApi + +All URIs are relative to *https://small-eod.siecobywatelska.pl/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createResponsibleUser**](ResponsibleUserApi.md#createResponsibleUser) | **POST** /case/{caseId}/responsibleUser | Create a responsible user reference of case +[**deleteResponsibleUser**](ResponsibleUserApi.md#deleteResponsibleUser) | **DELETE** /case/{caseId}/responsibleUser/{responsibleUserId} | +[**showcaseById**](ResponsibleUserApi.md#showcaseById) | **GET** /case/{caseId}/responsibleUser/{responsibleUserId} | Info for a specific responsible user of case + + + +## createResponsibleUser + +> UserRef createResponsibleUser(caseId, userRef) + +Create a responsible user reference of case + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.ResponsibleUserApi(); +var caseId = 3.4; // Number | The id of the case to modify +var userRef = new SmallEod.UserRef(); // UserRef | New responsible user +apiInstance.createResponsibleUser(caseId, userRef).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **caseId** | **Number**| The id of the case to modify | + **userRef** | [**UserRef**](UserRef.md)| New responsible user | + +### Return type + +[**UserRef**](UserRef.md) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## deleteResponsibleUser + +> deleteResponsibleUser(caseId, responsibleUserId) + + + +Deletes a single responsible user based on the ID supplied + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.ResponsibleUserApi(); +var caseId = 3.4; // Number | The id of the case to modify +var responsibleUserId = 3.4; // Number | The id of the responsible user to delete +apiInstance.deleteResponsibleUser(caseId, responsibleUserId).then(function() { + console.log('API called successfully.'); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **caseId** | **Number**| The id of the case to modify | + **responsibleUserId** | **Number**| The id of the responsible user to delete | + +### Return type + +null (empty response body) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## showcaseById + +> UserRef showcaseById(caseId, responsibleUserId) + +Info for a specific responsible user of case + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.ResponsibleUserApi(); +var caseId = 3.4; // Number | The id of the case to retrieve +var responsibleUserId = 3.4; // Number | The id of the responsible user to retrieve +apiInstance.showcaseById(caseId, responsibleUserId).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **caseId** | **Number**| The id of the case to retrieve | + **responsibleUserId** | **Number**| The id of the responsible user to retrieve | + +### Return type + +[**UserRef**](UserRef.md) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + diff --git a/docs/Session.md b/docs/Session.md new file mode 100644 index 0000000..71c73e7 --- /dev/null +++ b/docs/Session.md @@ -0,0 +1,14 @@ +# SmallEod.Session + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [readonly] +**user** | **String** | | [optional] +**userAgent** | **String** | | [optional] +**createdOn** | **Date** | | [optional] +**validUntil** | **Date** | | [optional] +**secret** | **String** | Available via cookie on create | + + diff --git a/docs/SessionApi.md b/docs/SessionApi.md new file mode 100644 index 0000000..6aef920 --- /dev/null +++ b/docs/SessionApi.md @@ -0,0 +1,215 @@ +# SmallEod.SessionApi + +All URIs are relative to *https://small-eod.siecobywatelska.pl/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createSession**](SessionApi.md#createSession) | **POST** /user/{userId}/session | Create a session +[**deleteSession**](SessionApi.md#deleteSession) | **DELETE** /user/{userId}/session/{sessionId} | +[**listSessionOfUser**](SessionApi.md#listSessionOfUser) | **GET** /user/{userId}/session | List all sessions +[**showSessionById**](SessionApi.md#showSessionById) | **GET** /user/{userId}/session/{sessionId} | Info for a specific session of user + + + +## createSession + +> Session createSession(userId, body) + +Create a session + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure HTTP basic authorization: basicAuth +var basicAuth = defaultClient.authentications['basicAuth']; +basicAuth.username = 'YOUR USERNAME'; +basicAuth.password = 'YOUR PASSWORD'; + +var apiInstance = new SmallEod.SessionApi(); +var userId = 56; // Number | The id of the user to modify +var body = null; // Object | New session +apiInstance.createSession(userId, body).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userId** | **Number**| The id of the user to modify | + **body** | **Object**| New session | + +### Return type + +[**Session**](Session.md) + +### Authorization + +[basicAuth](../README.md#basicAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## deleteSession + +> deleteSession(userId, sessionId) + + + +Deletes a single session based on the ID supplied + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.SessionApi(); +var userId = 789; // Number | The id of the user to modify +var sessionId = 789; // Number | The id of the session to delete +apiInstance.deleteSession(userId, sessionId).then(function() { + console.log('API called successfully.'); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userId** | **Number**| The id of the user to modify | + **sessionId** | **Number**| The id of the session to delete | + +### Return type + +null (empty response body) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## listSessionOfUser + +> [Session] listSessionOfUser(userId) + +List all sessions + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.SessionApi(); +var userId = 56; // Number | The id of the user to modify +apiInstance.listSessionOfUser(userId).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userId** | **Number**| The id of the user to modify | + +### Return type + +[**[Session]**](Session.md) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## showSessionById + +> Session showSessionById(userId, sessionId) + +Info for a specific session of user + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.SessionApi(); +var userId = 3.4; // Number | The id of the user to retrieve +var sessionId = 3.4; // Number | The id of the user to retrieve +apiInstance.showSessionById(userId, sessionId).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userId** | **Number**| The id of the user to retrieve | + **sessionId** | **Number**| The id of the user to retrieve | + +### Return type + +[**Session**](Session.md) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + diff --git a/docs/TagNamespace.md b/docs/TagNamespace.md new file mode 100644 index 0000000..69dada2 --- /dev/null +++ b/docs/TagNamespace.md @@ -0,0 +1,15 @@ +# SmallEod.TagNamespace + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [readonly] +**description** | **String** | | +**color** | **String** | | [optional] +**createdOn** | **String** | | [readonly] +**createdBy** | **String** | User ID responsible for creating the content | [readonly] +**modifiedOn** | **String** | | [readonly] +**modifiedBy** | **String** | | [readonly] + + diff --git a/docs/TagNamespaceApi.md b/docs/TagNamespaceApi.md new file mode 100644 index 0000000..e83da7a --- /dev/null +++ b/docs/TagNamespaceApi.md @@ -0,0 +1,214 @@ +# SmallEod.TagNamespaceApi + +All URIs are relative to *https://small-eod.siecobywatelska.pl/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createTagNamespace**](TagNamespaceApi.md#createTagNamespace) | **POST** /tagNamespace | Create a tag namespace +[**deleteTagNamespace**](TagNamespaceApi.md#deleteTagNamespace) | **DELETE** /tagNamespace/{tagNamespaceId} | +[**listTagNamespace**](TagNamespaceApi.md#listTagNamespace) | **GET** /tagNamespace | List all tag namespaces +[**showTagNamespaceById**](TagNamespaceApi.md#showTagNamespaceById) | **GET** /tagNamespace/{tagNamespaceId} | Info for a specific tag namespace + + + +## createTagNamespace + +> TagNamespace createTagNamespace(tagNamespace) + +Create a tag namespace + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.TagNamespaceApi(); +var tagNamespace = new SmallEod.TagNamespace(); // TagNamespace | New tag namespace +apiInstance.createTagNamespace(tagNamespace).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tagNamespace** | [**TagNamespace**](TagNamespace.md)| New tag namespace | + +### Return type + +[**TagNamespace**](TagNamespace.md) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## deleteTagNamespace + +> deleteTagNamespace(tagNamespaceId) + + + +Deletes a single tag namespace based on the ID supplied + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.TagNamespaceApi(); +var tagNamespaceId = 789; // Number | The id of the tag namespace to delete +apiInstance.deleteTagNamespace(tagNamespaceId).then(function() { + console.log('API called successfully.'); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tagNamespaceId** | **Number**| The id of the tag namespace to delete | + +### Return type + +null (empty response body) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## listTagNamespace + +> [TagNamespace] listTagNamespace(opts) + +List all tag namespaces + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.TagNamespaceApi(); +var opts = { + 'limit': 56, // Number | How many items to return at one time (max 100) + 'offset': 56 // Number | How many items skip in return +}; +apiInstance.listTagNamespace(opts).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **Number**| How many items to return at one time (max 100) | [optional] + **offset** | **Number**| How many items skip in return | [optional] + +### Return type + +[**[TagNamespace]**](TagNamespace.md) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## showTagNamespaceById + +> TagNamespace showTagNamespaceById(tagNamespaceId) + +Info for a specific tag namespace + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.TagNamespaceApi(); +var tagNamespaceId = 3.4; // Number | The id of the tag namespace to retrieve +apiInstance.showTagNamespaceById(tagNamespaceId).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **tagNamespaceId** | **Number**| The id of the tag namespace to retrieve | + +### Return type + +[**TagNamespace**](TagNamespace.md) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + diff --git a/docs/User.md b/docs/User.md new file mode 100644 index 0000000..df455ca --- /dev/null +++ b/docs/User.md @@ -0,0 +1,14 @@ +# SmallEod.User + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [readonly] +**firstName** | **String** | | +**secondName** | **String** | | +**email** | **String** | | +**password** | **String** | | [optional] +**permission** | **[String]** | | + + diff --git a/docs/UserApi.md b/docs/UserApi.md new file mode 100644 index 0000000..c484c28 --- /dev/null +++ b/docs/UserApi.md @@ -0,0 +1,214 @@ +# SmallEod.UserApi + +All URIs are relative to *https://small-eod.siecobywatelska.pl/v1* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**createUser**](UserApi.md#createUser) | **POST** /user | Create a user +[**deleteUser**](UserApi.md#deleteUser) | **DELETE** /user/{userId} | +[**listUser**](UserApi.md#listUser) | **GET** /user | List all users +[**showUserById**](UserApi.md#showUserById) | **GET** /user/{userId} | Info for a specific user + + + +## createUser + +> User createUser(user) + +Create a user + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.UserApi(); +var user = new SmallEod.User(); // User | New user +apiInstance.createUser(user).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **user** | [**User**](User.md)| New user | + +### Return type + +[**User**](User.md) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## deleteUser + +> deleteUser(userId) + + + +Deletes a single user based on the ID supplied + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.UserApi(); +var userId = 789; // Number | The id of the user to delete +apiInstance.deleteUser(userId).then(function() { + console.log('API called successfully.'); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userId** | **Number**| The id of the user to delete | + +### Return type + +null (empty response body) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## listUser + +> [User] listUser(opts) + +List all users + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.UserApi(); +var opts = { + 'limit': 56, // Number | How many items to return at one time (max 100) + 'offset': 56 // Number | How many items skip in return +}; +apiInstance.listUser(opts).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **limit** | **Number**| How many items to return at one time (max 100) | [optional] + **offset** | **Number**| How many items skip in return | [optional] + +### Return type + +[**[User]**](User.md) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## showUserById + +> User showUserById(userId) + +Info for a specific user + +### Example + +```javascript +var SmallEod = require('small_eod'); +var defaultClient = SmallEod.ApiClient.instance; +// Configure API key authorization: sessionAuth +var sessionAuth = defaultClient.authentications['sessionAuth']; +sessionAuth.apiKey = 'YOUR API KEY'; +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//sessionAuth.apiKeyPrefix = 'Token'; + +var apiInstance = new SmallEod.UserApi(); +var userId = 3.4; // Number | The id of the user to retrieve +apiInstance.showUserById(userId).then(function(data) { + console.log('API called successfully. Returned data: ' + data); +}, function(error) { + console.error(error); +}); + +``` + +### Parameters + + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **userId** | **Number**| The id of the user to retrieve | + +### Return type + +[**User**](User.md) + +### Authorization + +[sessionAuth](../README.md#sessionAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + diff --git a/docs/UserRef.md b/docs/UserRef.md new file mode 100644 index 0000000..fc533cc --- /dev/null +++ b/docs/UserRef.md @@ -0,0 +1,10 @@ +# SmallEod.UserRef + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **String** | | [readonly] +**user** | **Number** | | + + diff --git a/git_push.sh b/git_push.sh new file mode 100644 index 0000000..9948d6b --- /dev/null +++ b/git_push.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ "$git_host" = "" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \$git_host to $git_host" +fi + +if [ "$git_user_id" = "" ]; then + git_user_id="watchdogpolska" + echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" +fi + +if [ "$git_repo_id" = "" ]; then + git_repo_id="small-eod-sdk-javascript" + echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" +fi + +if [ "$release_note" = "" ]; then + release_note="Github integration demo" + echo "[INFO] No command line input provided. Set \$release_note to $release_note" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "$release_note" + +# Sets the new remote +git_remote=`git remote` +if [ "$git_remote" = "" ]; then # git remote not defined + + if [ "$GIT_TOKEN" = "" ]; then + echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." + git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git + else + git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + fi + +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' + diff --git a/mocha.opts b/mocha.opts new file mode 100644 index 0000000..9070118 --- /dev/null +++ b/mocha.opts @@ -0,0 +1 @@ +--timeout 10000 diff --git a/package.json b/package.json new file mode 100644 index 0000000..277fc50 --- /dev/null +++ b/package.json @@ -0,0 +1,21 @@ +{ + "name": "small_eod", + "version": "1.0.0", + "description": "JS API client generated by OpenAPI Generator", + "license": "MIT", + "main": "src/index.js", + "scripts": { + "test": "mocha --recursive" + }, + "browser": { + "fs": false + }, + "dependencies": { + "superagent": "5.1.0" + }, + "devDependencies": { + "expect.js": "^0.3.1", + "mocha": "^5.2.0", + "sinon": "^7.2.0" + } +} diff --git a/src/ApiClient.js b/src/ApiClient.js new file mode 100644 index 0000000..1672a90 --- /dev/null +++ b/src/ApiClient.js @@ -0,0 +1,664 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['superagent', 'querystring'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('superagent'), require('querystring')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.ApiClient = factory(root.superagent, root.querystring); + } +}(this, function(superagent, querystring) { + 'use strict'; + + /** + * @module ApiClient + * @version 1.0.0 + */ + + /** + * Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an + * application to use this class directly - the *Api and model classes provide the public API for the service. The + * contents of this file should be regarded as internal but are documented for completeness. + * @alias module:ApiClient + * @class + */ + var exports = function() { + /** + * The base URL against which to resolve every API call's (relative) path. + * @type {String} + * @default https://small-eod.siecobywatelska.pl/v1 + */ + this.basePath = 'https://small-eod.siecobywatelska.pl/v1'.replace(/\/+$/, ''); + + /** + * The authentication methods to be included for all API calls. + * @type {Array.} + */ + this.authentications = { + 'basicAuth': {type: 'basic'}, + 'bearerAuth': {type: 'bearer'}, // JWT + 'sessionAuth': {type: 'apiKey', 'in': 'query', name: 'session'} + }; + /** + * The default HTTP headers to be included for all API calls. + * @type {Array.} + * @default {} + */ + 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; + + /** + * If set to true, the client will save the cookies from each server + * response, and return them in the next request. + * @default false + */ + 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.agent(); + } + + /* + * Allow user to override superagent agent + */ + this.requestAgent = null; + + /* + * Allow user to add superagent plugins + */ + this.plugins = null; + }; + + /** + * Returns a string representation for an actual parameter. + * @param param The actual parameter. + * @returns {String} The string representation of param. + */ + exports.prototype.paramToString = function(param) { + if (param == undefined || param == null) { + return ''; + } + if (param instanceof Date) { + return param.toJSON(); + } + return param.toString(); + }; + + /** + * Builds full URL by appending the given path to the base URL and replacing path parameter place-holders with parameter values. + * NOTE: query parameters are not handled here. + * @param {String} path The path to append to the base URL. + * @param {Object} pathParams The parameter values to append. + * @returns {String} The encoded path with parameter values substituted. + */ + exports.prototype.buildUrl = function(path, pathParams, apiBasePath) { + if (!path.match(/^\//)) { + path = '/' + path; + } + var url = this.basePath + path; + + + // use API (operation, path) base path if defined + if (apiBasePath !== null && apiBasePath !== undefined) { + url = apiBasePath + path; + } + + var _this = this; + url = url.replace(/\{([\w-]+)\}/g, function(fullMatch, key) { + var value; + if (pathParams.hasOwnProperty(key)) { + value = _this.paramToString(pathParams[key]); + } else { + value = fullMatch; + } + return encodeURIComponent(value); + }); + return url; + }; + + /** + * Checks whether the given content type represents JSON.
+ * JSON content type examples:
+ *
    + *
  • application/json
  • + *
  • application/json; charset=UTF8
  • + *
  • APPLICATION/JSON
  • + *
+ * @param {String} contentType The MIME content type to check. + * @returns {Boolean} true if contentType represents JSON, otherwise false. + */ + exports.prototype.isJsonMime = function(contentType) { + return Boolean(contentType != null && contentType.match(/^application\/json(;.*)?$/i)); + }; + + /** + * Chooses a content type from the given array, with JSON preferred; i.e. return JSON if included, otherwise return the first. + * @param {Array.} contentTypes + * @returns {String} The chosen content type, preferring JSON. + */ + exports.prototype.jsonPreferredMime = function(contentTypes) { + for (var i = 0; i < contentTypes.length; i++) { + if (this.isJsonMime(contentTypes[i])) { + return contentTypes[i]; + } + } + return contentTypes[0]; + }; + + /** + * Checks whether the given parameter value represents file-like content. + * @param param The parameter to check. + * @returns {Boolean} true if param represents a file. + */ + exports.prototype.isFileParam = function(param) { + // fs.ReadStream in Node.js and Electron (but not in runtime like browserify) + if (typeof require === 'function') { + var 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; + }; + + /** + * Normalizes parameter values: + *
    + *
  • remove nils
  • + *
  • keep files and arrays
  • + *
  • format to string with `paramToString` for other cases
  • + *
+ * @param {Object.} params The parameters as object properties. + * @returns {Object.} normalized parameters. + */ + exports.prototype.normalizeParams = function(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; + }; + + /** + * Enumeration of collection format separator strategies. + * @enum {String} + * @readonly + */ + exports.CollectionFormatEnum = { + /** + * Comma-separated values. Value: csv + * @const + */ + CSV: ',', + /** + * Space-separated values. Value: ssv + * @const + */ + SSV: ' ', + /** + * Tab-separated values. Value: tsv + * @const + */ + TSV: '\t', + /** + * Pipe(|)-separated values. Value: pipes + * @const + */ + PIPES: '|', + /** + * Native array. Value: multi + * @const + */ + MULTI: 'multi' + }; + + /** + * Builds a string representation of an array-type actual parameter, according to the given collection format. + * @param {Array} param An array parameter. + * @param {module:ApiClient.CollectionFormatEnum} collectionFormat The array element separator strategy. + * @returns {String|Array} A string representation of the supplied collection, using the specified delimiter. Returns + * param as is if collectionFormat is multi. + */ + exports.prototype.buildCollectionParam = function 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); + } + }; + + /** + * Applies authentication headers to the request. + * @param {Object} request The request object created by a superagent() call. + * @param {Array.} authNames An array of authentication method names. + */ + exports.prototype.applyAuthToRequest = function(request, authNames) { + var _this = this; + authNames.forEach(function(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); + } + }); + }; + + /** + * Deserializes an HTTP response body into a value of the specified type. + * @param {Object} response A SuperAgent response object. + * @param {(String|Array.|Object.|Function)} returnType The type to return. Pass a string for simple types + * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To + * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type: + * all properties on data will be converted to this type. + * @returns A value of the specified type. + */ + exports.prototype.deserialize = function 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 exports.convertToType(data, returnType); + }; + + /** + * Invokes the REST service using the supplied settings and parameters. + * @param {String} path The base URL to invoke. + * @param {String} httpMethod The HTTP method to use. + * @param {Object.} pathParams A map of path parameters and their values. + * @param {Object.} queryParams A map of query parameters and their values. + * @param {Object.} collectionQueryParams A map of collection query parameters and their values. + * @param {Object.} headerParams A map of header parameters and their values. + * @param {Object.} formParams A map of form parameters and their values. + * @param {Object} bodyParam The value to pass as the request body. + * @param {Array.} authNames An array of authentication type names. + * @param {Array.} contentTypes An array of request MIME types. + * @param {Array.} accepts An array of acceptable response MIME types. + * @param {(String|Array|ObjectFunction)} returnType The required type to return; can be a string for simple types or the + * constructor for a complex type. + * @returns {Promise} A {@link https://www.promisejs.org/|Promise} object. + */ + exports.prototype.callApi = function callApi(path, httpMethod, pathParams, + queryParams, collectionQueryParams, headerParams, formParams, bodyParam, authNames, contentTypes, accepts, + returnType, apiBasePath) { + + var _this = this; + var url = this.buildUrl(path, pathParams, apiBasePath); + var request = superagent(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 collection query parameters + for (var key in collectionQueryParams) { + if (collectionQueryParams.hasOwnProperty(key)) { + var param = collectionQueryParams[key]; + if (param.collectionFormat === 'csv') { + // SuperAgent normally percent-encodes all reserved characters in a query parameter. However, + // commas are used as delimiters for the 'csv' collectionFormat so they must not be encoded. We + // must therefore construct and encode 'csv' collection query parameters manually. + if (param.value != null) { + var value = param.value.map(this.paramToString).map(encodeURIComponent).join(','); + request.query(encodeURIComponent(key) + "=" + value); + } + } else { + // All other collection query parameters should be treated as ordinary query parameters. + queryParams[key] = this.buildCollectionParam(param.value, param.collectionFormat); + } + } + } + + // 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.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(function(resolve, reject) { + request.end(function(error, response) { + if (error) { + reject(error); + } else { + try { + var data = _this.deserialize(response, returnType); + if (_this.enableCookies && typeof window === 'undefined'){ + _this.agent._saveCookies(response); + } + resolve({data: data, response: response}); + } catch (err) { + reject(err); + } + } + }); + }); + }; + + /** + * Parses an ISO-8601 string representation of a date value. + * @param {String} str The date value as a string. + * @returns {Date} The parsed date object. + */ + exports.parseDate = function(str) { + return new Date(str.replace(/T/i, ' ')); + }; + + /** + * Converts a value to the specified type. + * @param {(String|Object)} data The data to convert, as a string or object. + * @param {(String|Array.|Object.|Function)} type The type to return. Pass a string for simple types + * or the constructor function for a complex type. Pass an array containing the type name to return an array of that type. To + * return an object, pass an object with one property whose name is the key type and whose value is the corresponding value type: + * all properties on data will be converted to this type. + * @returns An instance of the specified type or null or undefined if data is null or undefined. + */ + exports.convertToType = function(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 this.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 or enum class + return type.constructFromObject(data); + } else if (Array.isArray(type)) { + // for array type like: ['String'] + var itemType = type[0]; + return data.map(function(item) { + return exports.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 = exports.convertToType(k, keyType); + var value = exports.convertToType(data[k], valueType); + result[key] = value; + } + } + return result; + } else { + // for unknown type, return the data directly + return data; + } + } + }; + + /** + * Gets an array of host settings + * @returns An array of host settings + */ + exports.hostSettings = function() { + return [ + { + 'url': "https://small-eod.siecobywatelska.pl/v1", + 'description': "Production server (uses live data)", + }, + { + 'url': "https://demo.small-eod.siecobywatelska.pl/v1", + 'description': "Sandbox server (uses test data)", + }, + { + 'url': "https://localhost:8080/v1", + 'description': "Development server (uses ephemeral data)", + } + ]; + }; + + exports.getBasePathFromSettings = function(index, variables) { + var variables = 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; + }; + + /** + * Constructs a new map or array model from REST data. + * @param data {Object|Array} The REST data. + * @param obj {Object|Array} The target object or array. + */ + exports.constructFromObject = function(data, obj, itemType) { + if (Array.isArray(data)) { + for (var i = 0; i < data.length; i++) { + if (data.hasOwnProperty(i)) + obj[i] = exports.convertToType(data[i], itemType); + } + } else { + for (var k in data) { + if (data.hasOwnProperty(k)) + obj[k] = exports.convertToType(data[k], itemType); + } + } + }; + + /** + * The default API client implementation. + * @type {module:ApiClient} + */ + exports.instance = new exports(); + + return exports; +})); diff --git a/src/api/AdministrativeUnitApi.js b/src/api/AdministrativeUnitApi.js new file mode 100644 index 0000000..f9fb803 --- /dev/null +++ b/src/api/AdministrativeUnitApi.js @@ -0,0 +1,246 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/AdministrativeUnit', 'model/Error'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/AdministrativeUnit'), require('../model/Error')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.AdministrativeUnitApi = factory(root.SmallEod.ApiClient, root.SmallEod.AdministrativeUnit, root.SmallEod.Error); + } +}(this, function(ApiClient, AdministrativeUnit, Error) { + 'use strict'; + + /** + * AdministrativeUnit service. + * @module api/AdministrativeUnitApi + * @version 1.0.0 + */ + + /** + * Constructs a new AdministrativeUnitApi. + * @alias module:api/AdministrativeUnitApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a administrative unit + * @param {module:model/AdministrativeUnit} administrativeUnit New administrative unit + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/AdministrativeUnit} and HTTP response + */ + this.createAdministrativeUnitWithHttpInfo = function(administrativeUnit) { + var postBody = administrativeUnit; + // verify the required parameter 'administrativeUnit' is set + if (administrativeUnit === undefined || administrativeUnit === null) { + throw new Error("Missing the required parameter 'administrativeUnit' when calling createAdministrativeUnit"); + } + + var pathParams = { + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = AdministrativeUnit; + return this.apiClient.callApi( + '/administrativeUnit', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a administrative unit + * @param {module:model/AdministrativeUnit} administrativeUnit New administrative unit + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AdministrativeUnit} + */ + this.createAdministrativeUnit = function(administrativeUnit) { + return this.createAdministrativeUnitWithHttpInfo(administrativeUnit) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Deletes a single administrative unit based on the ID supplied + * @param {Number} administrativeUnitId The id of the administrativeUnit to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + this.deleteAdministrativeUnitWithHttpInfo = function(administrativeUnitId) { + var postBody = null; + // verify the required parameter 'administrativeUnitId' is set + if (administrativeUnitId === undefined || administrativeUnitId === null) { + throw new Error("Missing the required parameter 'administrativeUnitId' when calling deleteAdministrativeUnit"); + } + + var pathParams = { + 'administrativeUnitId': administrativeUnitId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = null; + return this.apiClient.callApi( + '/administrativeUnit/{administrativeUnitId}', 'DELETE', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Deletes a single administrative unit based on the ID supplied + * @param {Number} administrativeUnitId The id of the administrativeUnit to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.deleteAdministrativeUnit = function(administrativeUnitId) { + return this.deleteAdministrativeUnitWithHttpInfo(administrativeUnitId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * List all administrative units + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response + */ + this.listAdministrativeUnitWithHttpInfo = function(opts) { + opts = opts || {}; + var postBody = null; + + var pathParams = { + }; + var queryParams = { + 'limit': opts['limit'], + 'offset': opts['offset'], + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = [AdministrativeUnit]; + return this.apiClient.callApi( + '/administrativeUnit', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * List all administrative units + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} + */ + this.listAdministrativeUnit = function(opts) { + return this.listAdministrativeUnitWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Info for a specific administrative unit + * @param {Number} administrativeUnitId The id of the administrative unit to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/AdministrativeUnit} and HTTP response + */ + this.showAdministrativeUnitByIdWithHttpInfo = function(administrativeUnitId) { + var postBody = null; + // verify the required parameter 'administrativeUnitId' is set + if (administrativeUnitId === undefined || administrativeUnitId === null) { + throw new Error("Missing the required parameter 'administrativeUnitId' when calling showAdministrativeUnitById"); + } + + var pathParams = { + 'administrativeUnitId': administrativeUnitId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = AdministrativeUnit; + return this.apiClient.callApi( + '/administrativeUnit/{administrativeUnitId}', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Info for a specific administrative unit + * @param {Number} administrativeUnitId The id of the administrative unit to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AdministrativeUnit} + */ + this.showAdministrativeUnitById = function(administrativeUnitId) { + return this.showAdministrativeUnitByIdWithHttpInfo(administrativeUnitId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/src/api/CaseApi.js b/src/api/CaseApi.js new file mode 100644 index 0000000..4c467e9 --- /dev/null +++ b/src/api/CaseApi.js @@ -0,0 +1,303 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Error', 'model/ModelCase'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/Error'), require('../model/ModelCase')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.CaseApi = factory(root.SmallEod.ApiClient, root.SmallEod.Error, root.SmallEod.ModelCase); + } +}(this, function(ApiClient, Error, ModelCase) { + 'use strict'; + + /** + * Case service. + * @module api/CaseApi + * @version 1.0.0 + */ + + /** + * Constructs a new CaseApi. + * @alias module:api/CaseApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a case + * @param {module:model/ModelCase} modelCase New case + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ModelCase} and HTTP response + */ + this.createCaseWithHttpInfo = function(modelCase) { + var postBody = modelCase; + // verify the required parameter 'modelCase' is set + if (modelCase === undefined || modelCase === null) { + throw new Error("Missing the required parameter 'modelCase' when calling createCase"); + } + + var pathParams = { + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = ModelCase; + return this.apiClient.callApi( + '/case', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a case + * @param {module:model/ModelCase} modelCase New case + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ModelCase} + */ + this.createCase = function(modelCase) { + return this.createCaseWithHttpInfo(modelCase) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Deletes a single case based on the ID supplied + * @param {Number} caseId The id of the case to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + this.deleteCaseWithHttpInfo = function(caseId) { + var postBody = null; + // verify the required parameter 'caseId' is set + if (caseId === undefined || caseId === null) { + throw new Error("Missing the required parameter 'caseId' when calling deleteCase"); + } + + var pathParams = { + 'caseId': caseId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = null; + return this.apiClient.callApi( + '/case/{caseId}', 'DELETE', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Deletes a single case based on the ID supplied + * @param {Number} caseId The id of the case to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.deleteCase = function(caseId) { + return this.deleteCaseWithHttpInfo(caseId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * List all cases + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @param {Number} opts.institution Institution ID or NULL + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response + */ + this.listCaseWithHttpInfo = function(opts) { + opts = opts || {}; + var postBody = null; + + var pathParams = { + }; + var queryParams = { + 'limit': opts['limit'], + 'offset': opts['offset'], + 'institution': opts['institution'], + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = [ModelCase]; + return this.apiClient.callApi( + '/case', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * List all cases + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @param {Number} opts.institution Institution ID or NULL + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} + */ + this.listCase = function(opts) { + return this.listCaseWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Info for a specific case + * @param {Number} caseId The id of the case to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ModelCase} and HTTP response + */ + this.showCaseByIdWithHttpInfo = function(caseId) { + var postBody = null; + // verify the required parameter 'caseId' is set + if (caseId === undefined || caseId === null) { + throw new Error("Missing the required parameter 'caseId' when calling showCaseById"); + } + + var pathParams = { + 'caseId': caseId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = ModelCase; + return this.apiClient.callApi( + '/case/{caseId}', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Info for a specific case + * @param {Number} caseId The id of the case to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ModelCase} + */ + this.showCaseById = function(caseId) { + return this.showCaseByIdWithHttpInfo(caseId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Updated case + * @param {Number} caseId The id of the case to modify + * @param {module:model/ModelCase} modelCase Updated case + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ModelCase} and HTTP response + */ + this.updateCaseByIdWithHttpInfo = function(caseId, modelCase) { + var postBody = modelCase; + // verify the required parameter 'caseId' is set + if (caseId === undefined || caseId === null) { + throw new Error("Missing the required parameter 'caseId' when calling updateCaseById"); + } + // verify the required parameter 'modelCase' is set + if (modelCase === undefined || modelCase === null) { + throw new Error("Missing the required parameter 'modelCase' when calling updateCaseById"); + } + + var pathParams = { + 'caseId': caseId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = ModelCase; + return this.apiClient.callApi( + '/case/{caseId}', 'PATCH', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Updated case + * @param {Number} caseId The id of the case to modify + * @param {module:model/ModelCase} modelCase Updated case + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ModelCase} + */ + this.updateCaseById = function(caseId, modelCase) { + return this.updateCaseByIdWithHttpInfo(caseId, modelCase) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/src/api/CollectionApi.js b/src/api/CollectionApi.js new file mode 100644 index 0000000..2270bba --- /dev/null +++ b/src/api/CollectionApi.js @@ -0,0 +1,516 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Collection', 'model/Error', 'model/Event', 'model/Letter', 'model/ModelCase'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/Collection'), require('../model/Error'), require('../model/Event'), require('../model/Letter'), require('../model/ModelCase')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.CollectionApi = factory(root.SmallEod.ApiClient, root.SmallEod.Collection, root.SmallEod.Error, root.SmallEod.Event, root.SmallEod.Letter, root.SmallEod.ModelCase); + } +}(this, function(ApiClient, Collection, Error, Event, Letter, ModelCase) { + 'use strict'; + + /** + * Collection service. + * @module api/CollectionApi + * @version 1.0.0 + */ + + /** + * Constructs a new CollectionApi. + * @alias module:api/CollectionApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a collection + * @param {module:model/Collection} collection New collection + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Collection} and HTTP response + */ + this.createCollectionWithHttpInfo = function(collection) { + var postBody = collection; + // verify the required parameter 'collection' is set + if (collection === undefined || collection === null) { + throw new Error("Missing the required parameter 'collection' when calling createCollection"); + } + + var pathParams = { + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = Collection; + return this.apiClient.callApi( + '/collection', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a collection + * @param {module:model/Collection} collection New collection + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Collection} + */ + this.createCollection = function(collection) { + return this.createCollectionWithHttpInfo(collection) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Deletes a single collection based on the ID supplied + * @param {Number} collectionId The id of the collection to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + this.deleteCollectionWithHttpInfo = function(collectionId) { + var postBody = null; + // verify the required parameter 'collectionId' is set + if (collectionId === undefined || collectionId === null) { + throw new Error("Missing the required parameter 'collectionId' when calling deleteCollection"); + } + + var pathParams = { + 'collectionId': collectionId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = null; + return this.apiClient.callApi( + '/collection/{collectionId}', 'DELETE', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Deletes a single collection based on the ID supplied + * @param {Number} collectionId The id of the collection to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.deleteCollection = function(collectionId) { + return this.deleteCollectionWithHttpInfo(collectionId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * List all collections + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @param {Number} opts._case Case ID + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response + */ + this.listCollectionWithHttpInfo = function(opts) { + opts = opts || {}; + var postBody = null; + + var pathParams = { + }; + var queryParams = { + 'limit': opts['limit'], + 'offset': opts['offset'], + 'case': opts['_case'], + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = [Collection]; + return this.apiClient.callApi( + '/collection', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * List all collections + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @param {Number} opts._case Case ID + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} + */ + this.listCollection = function(opts) { + return this.listCollectionWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Cases match query for a specific collection + * @param {Number} collectionId The id of the collection to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ModelCase} and HTTP response + */ + this.showCaseByCollectionWithHttpInfo = function(collectionId) { + var postBody = null; + // verify the required parameter 'collectionId' is set + if (collectionId === undefined || collectionId === null) { + throw new Error("Missing the required parameter 'collectionId' when calling showCaseByCollection"); + } + + var pathParams = { + 'collectionId': collectionId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['bearerAuth', 'sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = ModelCase; + return this.apiClient.callApi( + '/collection/{collectionId}/case', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Cases match query for a specific collection + * @param {Number} collectionId The id of the collection to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ModelCase} + */ + this.showCaseByCollection = function(collectionId) { + return this.showCaseByCollectionWithHttpInfo(collectionId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Info for a specific collection + * @param {Number} collectionId The id of the collection to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Collection} and HTTP response + */ + this.showCollectionByIdWithHttpInfo = function(collectionId) { + var postBody = null; + // verify the required parameter 'collectionId' is set + if (collectionId === undefined || collectionId === null) { + throw new Error("Missing the required parameter 'collectionId' when calling showCollectionById"); + } + + var pathParams = { + 'collectionId': collectionId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['bearerAuth', 'sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = Collection; + return this.apiClient.callApi( + '/collection/{collectionId}', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Info for a specific collection + * @param {Number} collectionId The id of the collection to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Collection} + */ + this.showCollectionById = function(collectionId) { + return this.showCollectionByIdWithHttpInfo(collectionId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Events of case match query for a specific collection + * @param {Number} collectionId The id of the collection to retrieve + * @param {Number} caseId The id of the collection to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Event} and HTTP response + */ + this.showEventCaseByCollectionWithHttpInfo = function(collectionId, caseId) { + var postBody = null; + // verify the required parameter 'collectionId' is set + if (collectionId === undefined || collectionId === null) { + throw new Error("Missing the required parameter 'collectionId' when calling showEventCaseByCollection"); + } + // verify the required parameter 'caseId' is set + if (caseId === undefined || caseId === null) { + throw new Error("Missing the required parameter 'caseId' when calling showEventCaseByCollection"); + } + + var pathParams = { + 'collectionId': collectionId, + 'caseId': caseId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['bearerAuth', 'sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = Event; + return this.apiClient.callApi( + '/collection/{collectionId}/case/{caseId}/event', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Events of case match query for a specific collection + * @param {Number} collectionId The id of the collection to retrieve + * @param {Number} caseId The id of the collection to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Event} + */ + this.showEventCaseByCollection = function(collectionId, caseId) { + return this.showEventCaseByCollectionWithHttpInfo(collectionId, caseId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Letters of cases match query for a specific collection + * @param {Number} collectionId The id of the collection to retrieve + * @param {Number} caseId The id of the collection to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Letter} and HTTP response + */ + this.showLetterCaseByCollectionWithHttpInfo = function(collectionId, caseId) { + var postBody = null; + // verify the required parameter 'collectionId' is set + if (collectionId === undefined || collectionId === null) { + throw new Error("Missing the required parameter 'collectionId' when calling showLetterCaseByCollection"); + } + // verify the required parameter 'caseId' is set + if (caseId === undefined || caseId === null) { + throw new Error("Missing the required parameter 'caseId' when calling showLetterCaseByCollection"); + } + + var pathParams = { + 'collectionId': collectionId, + 'caseId': caseId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['bearerAuth', 'sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = Letter; + return this.apiClient.callApi( + '/collection/{collectionId}/case/{caseId}/letter', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Letters of cases match query for a specific collection + * @param {Number} collectionId The id of the collection to retrieve + * @param {Number} caseId The id of the collection to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Letter} + */ + this.showLetterCaseByCollection = function(collectionId, caseId) { + return this.showLetterCaseByCollectionWithHttpInfo(collectionId, caseId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Notes of case match query for a specific collection + * @param {Number} collectionId The id of the collection to retrieve + * @param {Number} caseId The id of the collection to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Letter} and HTTP response + */ + this.showNoteCaseByCollectionWithHttpInfo = function(collectionId, caseId) { + var postBody = null; + // verify the required parameter 'collectionId' is set + if (collectionId === undefined || collectionId === null) { + throw new Error("Missing the required parameter 'collectionId' when calling showNoteCaseByCollection"); + } + // verify the required parameter 'caseId' is set + if (caseId === undefined || caseId === null) { + throw new Error("Missing the required parameter 'caseId' when calling showNoteCaseByCollection"); + } + + var pathParams = { + 'collectionId': collectionId, + 'caseId': caseId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['bearerAuth', 'sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = Letter; + return this.apiClient.callApi( + '/collection/{collectionId}/case/{caseId}/note', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Notes of case match query for a specific collection + * @param {Number} collectionId The id of the collection to retrieve + * @param {Number} caseId The id of the collection to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Letter} + */ + this.showNoteCaseByCollection = function(collectionId, caseId) { + return this.showNoteCaseByCollectionWithHttpInfo(collectionId, caseId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Updated collection + * @param {Number} collectionId The id of the collection to modify + * @param {module:model/Collection} collection Updated collection + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Collection} and HTTP response + */ + this.updateCollectionByIdWithHttpInfo = function(collectionId, collection) { + var postBody = collection; + // verify the required parameter 'collectionId' is set + if (collectionId === undefined || collectionId === null) { + throw new Error("Missing the required parameter 'collectionId' when calling updateCollectionById"); + } + // verify the required parameter 'collection' is set + if (collection === undefined || collection === null) { + throw new Error("Missing the required parameter 'collection' when calling updateCollectionById"); + } + + var pathParams = { + 'collectionId': collectionId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = Collection; + return this.apiClient.callApi( + '/collection/{collectionId}', 'PATCH', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Updated collection + * @param {Number} collectionId The id of the collection to modify + * @param {module:model/Collection} collection Updated collection + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Collection} + */ + this.updateCollectionById = function(collectionId, collection) { + return this.updateCollectionByIdWithHttpInfo(collectionId, collection) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/src/api/DescriptionApi.js b/src/api/DescriptionApi.js new file mode 100644 index 0000000..34d5e36 --- /dev/null +++ b/src/api/DescriptionApi.js @@ -0,0 +1,246 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Description', 'model/Error'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/Description'), require('../model/Error')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.DescriptionApi = factory(root.SmallEod.ApiClient, root.SmallEod.Description, root.SmallEod.Error); + } +}(this, function(ApiClient, Description, Error) { + 'use strict'; + + /** + * Description service. + * @module api/DescriptionApi + * @version 1.0.0 + */ + + /** + * Constructs a new DescriptionApi. + * @alias module:api/DescriptionApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a description + * @param {module:model/Description} description New description + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Description} and HTTP response + */ + this.createDescriptionWithHttpInfo = function(description) { + var postBody = description; + // verify the required parameter 'description' is set + if (description === undefined || description === null) { + throw new Error("Missing the required parameter 'description' when calling createDescription"); + } + + var pathParams = { + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = Description; + return this.apiClient.callApi( + '/description', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a description + * @param {module:model/Description} description New description + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Description} + */ + this.createDescription = function(description) { + return this.createDescriptionWithHttpInfo(description) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Deletes a single description based on the ID supplied + * @param {Number} descriptionId The id of the description to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + this.deleteDescriptionWithHttpInfo = function(descriptionId) { + var postBody = null; + // verify the required parameter 'descriptionId' is set + if (descriptionId === undefined || descriptionId === null) { + throw new Error("Missing the required parameter 'descriptionId' when calling deleteDescription"); + } + + var pathParams = { + 'descriptionId': descriptionId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = null; + return this.apiClient.callApi( + '/description/{descriptionId}', 'DELETE', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Deletes a single description based on the ID supplied + * @param {Number} descriptionId The id of the description to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.deleteDescription = function(descriptionId) { + return this.deleteDescriptionWithHttpInfo(descriptionId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * List all descriptions + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response + */ + this.listDescriptionWithHttpInfo = function(opts) { + opts = opts || {}; + var postBody = null; + + var pathParams = { + }; + var queryParams = { + 'limit': opts['limit'], + 'offset': opts['offset'], + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = [Description]; + return this.apiClient.callApi( + '/description', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * List all descriptions + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} + */ + this.listDescription = function(opts) { + return this.listDescriptionWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Info for a specific description + * @param {Number} descriptionId The id of the description to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Description} and HTTP response + */ + this.showDescriptionByIdWithHttpInfo = function(descriptionId) { + var postBody = null; + // verify the required parameter 'descriptionId' is set + if (descriptionId === undefined || descriptionId === null) { + throw new Error("Missing the required parameter 'descriptionId' when calling showDescriptionById"); + } + + var pathParams = { + 'descriptionId': descriptionId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = Description; + return this.apiClient.callApi( + '/description/{descriptionId}', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Info for a specific description + * @param {Number} descriptionId The id of the description to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Description} + */ + this.showDescriptionById = function(descriptionId) { + return this.showDescriptionByIdWithHttpInfo(descriptionId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/src/api/DictionaryApi.js b/src/api/DictionaryApi.js new file mode 100644 index 0000000..e844fa7 --- /dev/null +++ b/src/api/DictionaryApi.js @@ -0,0 +1,246 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Dictionary', 'model/Error'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/Dictionary'), require('../model/Error')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.DictionaryApi = factory(root.SmallEod.ApiClient, root.SmallEod.Dictionary, root.SmallEod.Error); + } +}(this, function(ApiClient, Dictionary, Error) { + 'use strict'; + + /** + * Dictionary service. + * @module api/DictionaryApi + * @version 1.0.0 + */ + + /** + * Constructs a new DictionaryApi. + * @alias module:api/DictionaryApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a dictionary + * @param {module:model/Dictionary} dictionary New dictionary + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Dictionary} and HTTP response + */ + this.createDictionaryWithHttpInfo = function(dictionary) { + var postBody = dictionary; + // verify the required parameter 'dictionary' is set + if (dictionary === undefined || dictionary === null) { + throw new Error("Missing the required parameter 'dictionary' when calling createDictionary"); + } + + var pathParams = { + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = Dictionary; + return this.apiClient.callApi( + '/dictionary', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a dictionary + * @param {module:model/Dictionary} dictionary New dictionary + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Dictionary} + */ + this.createDictionary = function(dictionary) { + return this.createDictionaryWithHttpInfo(dictionary) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Deletes a single dictionary based on the ID supplied + * @param {Number} dictionaryId The id of the dictionary to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + this.deleteDictionaryWithHttpInfo = function(dictionaryId) { + var postBody = null; + // verify the required parameter 'dictionaryId' is set + if (dictionaryId === undefined || dictionaryId === null) { + throw new Error("Missing the required parameter 'dictionaryId' when calling deleteDictionary"); + } + + var pathParams = { + 'dictionaryId': dictionaryId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = null; + return this.apiClient.callApi( + '/dictionary/{dictionaryId}', 'DELETE', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Deletes a single dictionary based on the ID supplied + * @param {Number} dictionaryId The id of the dictionary to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.deleteDictionary = function(dictionaryId) { + return this.deleteDictionaryWithHttpInfo(dictionaryId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * List all dictionaries + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response + */ + this.listDictionaryWithHttpInfo = function(opts) { + opts = opts || {}; + var postBody = null; + + var pathParams = { + }; + var queryParams = { + 'limit': opts['limit'], + 'offset': opts['offset'], + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = [Dictionary]; + return this.apiClient.callApi( + '/dictionary', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * List all dictionaries + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} + */ + this.listDictionary = function(opts) { + return this.listDictionaryWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Info for a specific dictionary + * @param {Number} dictionaryId The id of the dictionary to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Dictionary} and HTTP response + */ + this.showDictionaryByIdWithHttpInfo = function(dictionaryId) { + var postBody = null; + // verify the required parameter 'dictionaryId' is set + if (dictionaryId === undefined || dictionaryId === null) { + throw new Error("Missing the required parameter 'dictionaryId' when calling showDictionaryById"); + } + + var pathParams = { + 'dictionaryId': dictionaryId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = Dictionary; + return this.apiClient.callApi( + '/dictionary/{dictionaryId}', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Info for a specific dictionary + * @param {Number} dictionaryId The id of the dictionary to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Dictionary} + */ + this.showDictionaryById = function(dictionaryId) { + return this.showDictionaryByIdWithHttpInfo(dictionaryId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/src/api/EventApi.js b/src/api/EventApi.js new file mode 100644 index 0000000..ba2b5d4 --- /dev/null +++ b/src/api/EventApi.js @@ -0,0 +1,249 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Error', 'model/Event'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/Error'), require('../model/Event')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.EventApi = factory(root.SmallEod.ApiClient, root.SmallEod.Error, root.SmallEod.Event); + } +}(this, function(ApiClient, Error, Event) { + 'use strict'; + + /** + * Event service. + * @module api/EventApi + * @version 1.0.0 + */ + + /** + * Constructs a new EventApi. + * @alias module:api/EventApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a event + * @param {module:model/Event} event New event + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Event} and HTTP response + */ + this.createEventWithHttpInfo = function(event) { + var postBody = event; + // verify the required parameter 'event' is set + if (event === undefined || event === null) { + throw new Error("Missing the required parameter 'event' when calling createEvent"); + } + + var pathParams = { + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = Event; + return this.apiClient.callApi( + '/event', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a event + * @param {module:model/Event} event New event + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Event} + */ + this.createEvent = function(event) { + return this.createEventWithHttpInfo(event) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Deletes a single event based on the ID supplied + * @param {Number} eventId The id of the event to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + this.deleteEventWithHttpInfo = function(eventId) { + var postBody = null; + // verify the required parameter 'eventId' is set + if (eventId === undefined || eventId === null) { + throw new Error("Missing the required parameter 'eventId' when calling deleteEvent"); + } + + var pathParams = { + 'eventId': eventId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = null; + return this.apiClient.callApi( + '/event/{eventId}', 'DELETE', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Deletes a single event based on the ID supplied + * @param {Number} eventId The id of the event to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.deleteEvent = function(eventId) { + return this.deleteEventWithHttpInfo(eventId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * List all events of case + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @param {Number} opts._case Case ID + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response + */ + this.listEventWithHttpInfo = function(opts) { + opts = opts || {}; + var postBody = null; + + var pathParams = { + }; + var queryParams = { + 'limit': opts['limit'], + 'offset': opts['offset'], + 'case': opts['_case'], + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = [Event]; + return this.apiClient.callApi( + '/event', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * List all events of case + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @param {Number} opts._case Case ID + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} + */ + this.listEvent = function(opts) { + return this.listEventWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Info for a specific event + * @param {Number} eventId The id of the event to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Event} and HTTP response + */ + this.showEventByIdWithHttpInfo = function(eventId) { + var postBody = null; + // verify the required parameter 'eventId' is set + if (eventId === undefined || eventId === null) { + throw new Error("Missing the required parameter 'eventId' when calling showEventById"); + } + + var pathParams = { + 'eventId': eventId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = Event; + return this.apiClient.callApi( + '/event/{eventId}', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Info for a specific event + * @param {Number} eventId The id of the event to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Event} + */ + this.showEventById = function(eventId) { + return this.showEventByIdWithHttpInfo(eventId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/src/api/FileApi.js b/src/api/FileApi.js new file mode 100644 index 0000000..265958d --- /dev/null +++ b/src/api/FileApi.js @@ -0,0 +1,209 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Error', 'model/FileSigner', 'model/Letter'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/Error'), require('../model/FileSigner'), require('../model/Letter')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.FileApi = factory(root.SmallEod.ApiClient, root.SmallEod.Error, root.SmallEod.FileSigner, root.SmallEod.Letter); + } +}(this, function(ApiClient, Error, FileSigner, Letter) { + 'use strict'; + + /** + * File service. + * @module api/FileApi + * @version 1.0.0 + */ + + /** + * Constructs a new FileApi. + * @alias module:api/FileApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a file + * @param {Number} letterId The id of the letter to retrieve + * @param {File} file New file + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link File} and HTTP response + */ + this.createFileWithHttpInfo = function(letterId, file) { + var postBody = file; + // verify the required parameter 'letterId' is set + if (letterId === undefined || letterId === null) { + throw new Error("Missing the required parameter 'letterId' when calling createFile"); + } + // verify the required parameter 'file' is set + if (file === undefined || file === null) { + throw new Error("Missing the required parameter 'file' when calling createFile"); + } + + var pathParams = { + 'letterId': letterId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = File; + return this.apiClient.callApi( + '/letter/{letterId}/file', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a file + * @param {Number} letterId The id of the letter to retrieve + * @param {File} file New file + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link File} + */ + this.createFile = function(letterId, file) { + return this.createFileWithHttpInfo(letterId, file) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Create a pre-signed URLs for file + * @param {module:model/FileSigner} fileSigner New file signature request + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/FileSigner} and HTTP response + */ + this.createPreSignedUrlWithHttpInfo = function(fileSigner) { + var postBody = fileSigner; + // verify the required parameter 'fileSigner' is set + if (fileSigner === undefined || fileSigner === null) { + throw new Error("Missing the required parameter 'fileSigner' when calling createPreSignedUrl"); + } + + var pathParams = { + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = FileSigner; + return this.apiClient.callApi( + '/letter/file/sign', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a pre-signed URLs for file + * @param {module:model/FileSigner} fileSigner New file signature request + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/FileSigner} + */ + this.createPreSignedUrl = function(fileSigner) { + return this.createPreSignedUrlWithHttpInfo(fileSigner) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Info for a specific file + * @param {Number} letterId The id of the letter of file + * @param {Number} fileId The id of the file to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Letter} and HTTP response + */ + this.showFileByLetterIdWithHttpInfo = function(letterId, fileId) { + var postBody = null; + // verify the required parameter 'letterId' is set + if (letterId === undefined || letterId === null) { + throw new Error("Missing the required parameter 'letterId' when calling showFileByLetterId"); + } + // verify the required parameter 'fileId' is set + if (fileId === undefined || fileId === null) { + throw new Error("Missing the required parameter 'fileId' when calling showFileByLetterId"); + } + + var pathParams = { + 'letterId': letterId, + 'fileId': fileId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = Letter; + return this.apiClient.callApi( + '/letter/{letterId}/file/{fileId}', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Info for a specific file + * @param {Number} letterId The id of the letter of file + * @param {Number} fileId The id of the file to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Letter} + */ + this.showFileByLetterId = function(letterId, fileId) { + return this.showFileByLetterIdWithHttpInfo(letterId, fileId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/src/api/InstitutionApi.js b/src/api/InstitutionApi.js new file mode 100644 index 0000000..8c1aac7 --- /dev/null +++ b/src/api/InstitutionApi.js @@ -0,0 +1,150 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Error', 'model/Institution'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/Error'), require('../model/Institution')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.InstitutionApi = factory(root.SmallEod.ApiClient, root.SmallEod.Error, root.SmallEod.Institution); + } +}(this, function(ApiClient, Error, Institution) { + 'use strict'; + + /** + * Institution service. + * @module api/InstitutionApi + * @version 1.0.0 + */ + + /** + * Constructs a new InstitutionApi. + * @alias module:api/InstitutionApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a institution + * @param {module:model/Institution} institution New institution + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Institution} and HTTP response + */ + this.createInstitutionWithHttpInfo = function(institution) { + var postBody = institution; + // verify the required parameter 'institution' is set + if (institution === undefined || institution === null) { + throw new Error("Missing the required parameter 'institution' when calling createInstitution"); + } + + var pathParams = { + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = Institution; + return this.apiClient.callApi( + '/institution', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a institution + * @param {module:model/Institution} institution New institution + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Institution} + */ + this.createInstitution = function(institution) { + return this.createInstitutionWithHttpInfo(institution) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * List all institutions + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response + */ + this.listInstitutionWithHttpInfo = function(opts) { + opts = opts || {}; + var postBody = null; + + var pathParams = { + }; + var queryParams = { + 'limit': opts['limit'], + 'offset': opts['offset'], + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = [Institution]; + return this.apiClient.callApi( + '/institution', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * List all institutions + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} + */ + this.listInstitution = function(opts) { + return this.listInstitutionWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/src/api/LetterApi.js b/src/api/LetterApi.js new file mode 100644 index 0000000..2f51efa --- /dev/null +++ b/src/api/LetterApi.js @@ -0,0 +1,249 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Error', 'model/Letter'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/Error'), require('../model/Letter')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.LetterApi = factory(root.SmallEod.ApiClient, root.SmallEod.Error, root.SmallEod.Letter); + } +}(this, function(ApiClient, Error, Letter) { + 'use strict'; + + /** + * Letter service. + * @module api/LetterApi + * @version 1.0.0 + */ + + /** + * Constructs a new LetterApi. + * @alias module:api/LetterApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a letter + * @param {module:model/Letter} letter New letter + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Letter} and HTTP response + */ + this.createLetterWithHttpInfo = function(letter) { + var postBody = letter; + // verify the required parameter 'letter' is set + if (letter === undefined || letter === null) { + throw new Error("Missing the required parameter 'letter' when calling createLetter"); + } + + var pathParams = { + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = Letter; + return this.apiClient.callApi( + '/letter', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a letter + * @param {module:model/Letter} letter New letter + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Letter} + */ + this.createLetter = function(letter) { + return this.createLetterWithHttpInfo(letter) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Deletes a single letter based on the ID supplied + * @param {Number} letterId The id of the letter to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + this.deleteLetterWithHttpInfo = function(letterId) { + var postBody = null; + // verify the required parameter 'letterId' is set + if (letterId === undefined || letterId === null) { + throw new Error("Missing the required parameter 'letterId' when calling deleteLetter"); + } + + var pathParams = { + 'letterId': letterId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = null; + return this.apiClient.callApi( + '/letter/{letterId}', 'DELETE', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Deletes a single letter based on the ID supplied + * @param {Number} letterId The id of the letter to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.deleteLetter = function(letterId) { + return this.deleteLetterWithHttpInfo(letterId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * List all letters + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @param {Number} opts._case Case ID + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response + */ + this.listLetterWithHttpInfo = function(opts) { + opts = opts || {}; + var postBody = null; + + var pathParams = { + }; + var queryParams = { + 'limit': opts['limit'], + 'offset': opts['offset'], + 'case': opts['_case'], + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = [Letter]; + return this.apiClient.callApi( + '/letter', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * List all letters + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @param {Number} opts._case Case ID + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} + */ + this.listLetter = function(opts) { + return this.listLetterWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Info for a specific letter + * @param {Number} letterId The id of the letter to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Letter} and HTTP response + */ + this.showLetterByIdWithHttpInfo = function(letterId) { + var postBody = null; + // verify the required parameter 'letterId' is set + if (letterId === undefined || letterId === null) { + throw new Error("Missing the required parameter 'letterId' when calling showLetterById"); + } + + var pathParams = { + 'letterId': letterId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = Letter; + return this.apiClient.callApi( + '/letter/{letterId}', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Info for a specific letter + * @param {Number} letterId The id of the letter to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Letter} + */ + this.showLetterById = function(letterId) { + return this.showLetterByIdWithHttpInfo(letterId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/src/api/NoteApi.js b/src/api/NoteApi.js new file mode 100644 index 0000000..5ee631d --- /dev/null +++ b/src/api/NoteApi.js @@ -0,0 +1,249 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Error', 'model/Note'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/Error'), require('../model/Note')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.NoteApi = factory(root.SmallEod.ApiClient, root.SmallEod.Error, root.SmallEod.Note); + } +}(this, function(ApiClient, Error, Note) { + 'use strict'; + + /** + * Note service. + * @module api/NoteApi + * @version 1.0.0 + */ + + /** + * Constructs a new NoteApi. + * @alias module:api/NoteApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a note + * @param {module:model/Note} note New note + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Note} and HTTP response + */ + this.createNoteWithHttpInfo = function(note) { + var postBody = note; + // verify the required parameter 'note' is set + if (note === undefined || note === null) { + throw new Error("Missing the required parameter 'note' when calling createNote"); + } + + var pathParams = { + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = Note; + return this.apiClient.callApi( + '/note', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a note + * @param {module:model/Note} note New note + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Note} + */ + this.createNote = function(note) { + return this.createNoteWithHttpInfo(note) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Deletes a single note based on the ID supplied + * @param {Number} noteId The id of the note to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + this.deleteNoteWithHttpInfo = function(noteId) { + var postBody = null; + // verify the required parameter 'noteId' is set + if (noteId === undefined || noteId === null) { + throw new Error("Missing the required parameter 'noteId' when calling deleteNote"); + } + + var pathParams = { + 'noteId': noteId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = null; + return this.apiClient.callApi( + '/note/{noteId}', 'DELETE', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Deletes a single note based on the ID supplied + * @param {Number} noteId The id of the note to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.deleteNote = function(noteId) { + return this.deleteNoteWithHttpInfo(noteId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * List all notes of case + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @param {Number} opts._case Case ID + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response + */ + this.listNoteWithHttpInfo = function(opts) { + opts = opts || {}; + var postBody = null; + + var pathParams = { + }; + var queryParams = { + 'limit': opts['limit'], + 'offset': opts['offset'], + 'case': opts['_case'], + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = [Note]; + return this.apiClient.callApi( + '/note', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * List all notes of case + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @param {Number} opts._case Case ID + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} + */ + this.listNote = function(opts) { + return this.listNoteWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Info for a specific note + * @param {Number} noteId The id of the note to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Note} and HTTP response + */ + this.showNoteByIdWithHttpInfo = function(noteId) { + var postBody = null; + // verify the required parameter 'noteId' is set + if (noteId === undefined || noteId === null) { + throw new Error("Missing the required parameter 'noteId' when calling showNoteById"); + } + + var pathParams = { + 'noteId': noteId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = Note; + return this.apiClient.callApi( + '/note/{noteId}', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Info for a specific note + * @param {Number} noteId The id of the note to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Note} + */ + this.showNoteById = function(noteId) { + return this.showNoteByIdWithHttpInfo(noteId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/src/api/NotifiedUserApi.js b/src/api/NotifiedUserApi.js new file mode 100644 index 0000000..f245e5c --- /dev/null +++ b/src/api/NotifiedUserApi.js @@ -0,0 +1,217 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Error', 'model/UserRef'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/Error'), require('../model/UserRef')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.NotifiedUserApi = factory(root.SmallEod.ApiClient, root.SmallEod.Error, root.SmallEod.UserRef); + } +}(this, function(ApiClient, Error, UserRef) { + 'use strict'; + + /** + * NotifiedUser service. + * @module api/NotifiedUserApi + * @version 1.0.0 + */ + + /** + * Constructs a new NotifiedUserApi. + * @alias module:api/NotifiedUserApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a notified user reference of case + * @param {Number} caseId The id of the case to modify + * @param {module:model/UserRef} userRef New notified user + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/UserRef} and HTTP response + */ + this.createNotifiedUserWithHttpInfo = function(caseId, userRef) { + var postBody = userRef; + // verify the required parameter 'caseId' is set + if (caseId === undefined || caseId === null) { + throw new Error("Missing the required parameter 'caseId' when calling createNotifiedUser"); + } + // verify the required parameter 'userRef' is set + if (userRef === undefined || userRef === null) { + throw new Error("Missing the required parameter 'userRef' when calling createNotifiedUser"); + } + + var pathParams = { + 'caseId': caseId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = UserRef; + return this.apiClient.callApi( + '/case/{caseId}/notifiedUser', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a notified user reference of case + * @param {Number} caseId The id of the case to modify + * @param {module:model/UserRef} userRef New notified user + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UserRef} + */ + this.createNotifiedUser = function(caseId, userRef) { + return this.createNotifiedUserWithHttpInfo(caseId, userRef) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Deletes a single notified user based on the ID supplied + * @param {Number} caseId The id of the case to modify + * @param {Number} notifiedUserId The id of the responsible user to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + this.deleteNotifiedUserWithHttpInfo = function(caseId, notifiedUserId) { + var postBody = null; + // verify the required parameter 'caseId' is set + if (caseId === undefined || caseId === null) { + throw new Error("Missing the required parameter 'caseId' when calling deleteNotifiedUser"); + } + // verify the required parameter 'notifiedUserId' is set + if (notifiedUserId === undefined || notifiedUserId === null) { + throw new Error("Missing the required parameter 'notifiedUserId' when calling deleteNotifiedUser"); + } + + var pathParams = { + 'caseId': caseId, + 'notifiedUserId': notifiedUserId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = null; + return this.apiClient.callApi( + '/case/{caseId}/notifiedUser/{notifiedUserId}', 'DELETE', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Deletes a single notified user based on the ID supplied + * @param {Number} caseId The id of the case to modify + * @param {Number} notifiedUserId The id of the responsible user to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.deleteNotifiedUser = function(caseId, notifiedUserId) { + return this.deleteNotifiedUserWithHttpInfo(caseId, notifiedUserId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Info for a specific notified user of case + * @param {Number} caseId The id of the case to modify + * @param {Number} notifiedUserId The id of the responsible user to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/UserRef} and HTTP response + */ + this.shownotifiedUserByIdWithHttpInfo = function(caseId, notifiedUserId) { + var postBody = null; + // verify the required parameter 'caseId' is set + if (caseId === undefined || caseId === null) { + throw new Error("Missing the required parameter 'caseId' when calling shownotifiedUserById"); + } + // verify the required parameter 'notifiedUserId' is set + if (notifiedUserId === undefined || notifiedUserId === null) { + throw new Error("Missing the required parameter 'notifiedUserId' when calling shownotifiedUserById"); + } + + var pathParams = { + 'caseId': caseId, + 'notifiedUserId': notifiedUserId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = UserRef; + return this.apiClient.callApi( + '/case/{caseId}/notifiedUser/{notifiedUserId}', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Info for a specific notified user of case + * @param {Number} caseId The id of the case to modify + * @param {Number} notifiedUserId The id of the responsible user to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UserRef} + */ + this.shownotifiedUserById = function(caseId, notifiedUserId) { + return this.shownotifiedUserByIdWithHttpInfo(caseId, notifiedUserId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/src/api/ResponsibleUserApi.js b/src/api/ResponsibleUserApi.js new file mode 100644 index 0000000..0e64088 --- /dev/null +++ b/src/api/ResponsibleUserApi.js @@ -0,0 +1,217 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Error', 'model/UserRef'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/Error'), require('../model/UserRef')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.ResponsibleUserApi = factory(root.SmallEod.ApiClient, root.SmallEod.Error, root.SmallEod.UserRef); + } +}(this, function(ApiClient, Error, UserRef) { + 'use strict'; + + /** + * ResponsibleUser service. + * @module api/ResponsibleUserApi + * @version 1.0.0 + */ + + /** + * Constructs a new ResponsibleUserApi. + * @alias module:api/ResponsibleUserApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a responsible user reference of case + * @param {Number} caseId The id of the case to modify + * @param {module:model/UserRef} userRef New responsible user + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/UserRef} and HTTP response + */ + this.createResponsibleUserWithHttpInfo = function(caseId, userRef) { + var postBody = userRef; + // verify the required parameter 'caseId' is set + if (caseId === undefined || caseId === null) { + throw new Error("Missing the required parameter 'caseId' when calling createResponsibleUser"); + } + // verify the required parameter 'userRef' is set + if (userRef === undefined || userRef === null) { + throw new Error("Missing the required parameter 'userRef' when calling createResponsibleUser"); + } + + var pathParams = { + 'caseId': caseId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = UserRef; + return this.apiClient.callApi( + '/case/{caseId}/responsibleUser', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a responsible user reference of case + * @param {Number} caseId The id of the case to modify + * @param {module:model/UserRef} userRef New responsible user + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UserRef} + */ + this.createResponsibleUser = function(caseId, userRef) { + return this.createResponsibleUserWithHttpInfo(caseId, userRef) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Deletes a single responsible user based on the ID supplied + * @param {Number} caseId The id of the case to modify + * @param {Number} responsibleUserId The id of the responsible user to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + this.deleteResponsibleUserWithHttpInfo = function(caseId, responsibleUserId) { + var postBody = null; + // verify the required parameter 'caseId' is set + if (caseId === undefined || caseId === null) { + throw new Error("Missing the required parameter 'caseId' when calling deleteResponsibleUser"); + } + // verify the required parameter 'responsibleUserId' is set + if (responsibleUserId === undefined || responsibleUserId === null) { + throw new Error("Missing the required parameter 'responsibleUserId' when calling deleteResponsibleUser"); + } + + var pathParams = { + 'caseId': caseId, + 'responsibleUserId': responsibleUserId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = null; + return this.apiClient.callApi( + '/case/{caseId}/responsibleUser/{responsibleUserId}', 'DELETE', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Deletes a single responsible user based on the ID supplied + * @param {Number} caseId The id of the case to modify + * @param {Number} responsibleUserId The id of the responsible user to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.deleteResponsibleUser = function(caseId, responsibleUserId) { + return this.deleteResponsibleUserWithHttpInfo(caseId, responsibleUserId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Info for a specific responsible user of case + * @param {Number} caseId The id of the case to retrieve + * @param {Number} responsibleUserId The id of the responsible user to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/UserRef} and HTTP response + */ + this.showcaseByIdWithHttpInfo = function(caseId, responsibleUserId) { + var postBody = null; + // verify the required parameter 'caseId' is set + if (caseId === undefined || caseId === null) { + throw new Error("Missing the required parameter 'caseId' when calling showcaseById"); + } + // verify the required parameter 'responsibleUserId' is set + if (responsibleUserId === undefined || responsibleUserId === null) { + throw new Error("Missing the required parameter 'responsibleUserId' when calling showcaseById"); + } + + var pathParams = { + 'caseId': caseId, + 'responsibleUserId': responsibleUserId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = UserRef; + return this.apiClient.callApi( + '/case/{caseId}/responsibleUser/{responsibleUserId}', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Info for a specific responsible user of case + * @param {Number} caseId The id of the case to retrieve + * @param {Number} responsibleUserId The id of the responsible user to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UserRef} + */ + this.showcaseById = function(caseId, responsibleUserId) { + return this.showcaseByIdWithHttpInfo(caseId, responsibleUserId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/src/api/SessionApi.js b/src/api/SessionApi.js new file mode 100644 index 0000000..92fa5ec --- /dev/null +++ b/src/api/SessionApi.js @@ -0,0 +1,265 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Error', 'model/Session'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/Error'), require('../model/Session')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.SessionApi = factory(root.SmallEod.ApiClient, root.SmallEod.Error, root.SmallEod.Session); + } +}(this, function(ApiClient, Error, Session) { + 'use strict'; + + /** + * Session service. + * @module api/SessionApi + * @version 1.0.0 + */ + + /** + * Constructs a new SessionApi. + * @alias module:api/SessionApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a session + * @param {Number} userId The id of the user to modify + * @param {Object} body New session + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Session} and HTTP response + */ + this.createSessionWithHttpInfo = function(userId, body) { + var postBody = body; + // verify the required parameter 'userId' is set + if (userId === undefined || userId === null) { + throw new Error("Missing the required parameter 'userId' when calling createSession"); + } + // verify the required parameter 'body' is set + if (body === undefined || body === null) { + throw new Error("Missing the required parameter 'body' when calling createSession"); + } + + var pathParams = { + 'userId': userId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['basicAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = Session; + return this.apiClient.callApi( + '/user/{userId}/session', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a session + * @param {Number} userId The id of the user to modify + * @param {Object} body New session + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Session} + */ + this.createSession = function(userId, body) { + return this.createSessionWithHttpInfo(userId, body) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Deletes a single session based on the ID supplied + * @param {Number} userId The id of the user to modify + * @param {Number} sessionId The id of the session to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + this.deleteSessionWithHttpInfo = function(userId, sessionId) { + var postBody = null; + // verify the required parameter 'userId' is set + if (userId === undefined || userId === null) { + throw new Error("Missing the required parameter 'userId' when calling deleteSession"); + } + // verify the required parameter 'sessionId' is set + if (sessionId === undefined || sessionId === null) { + throw new Error("Missing the required parameter 'sessionId' when calling deleteSession"); + } + + var pathParams = { + 'userId': userId, + 'sessionId': sessionId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = null; + return this.apiClient.callApi( + '/user/{userId}/session/{sessionId}', 'DELETE', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Deletes a single session based on the ID supplied + * @param {Number} userId The id of the user to modify + * @param {Number} sessionId The id of the session to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.deleteSession = function(userId, sessionId) { + return this.deleteSessionWithHttpInfo(userId, sessionId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * List all sessions + * @param {Number} userId The id of the user to modify + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response + */ + this.listSessionOfUserWithHttpInfo = function(userId) { + var postBody = null; + // verify the required parameter 'userId' is set + if (userId === undefined || userId === null) { + throw new Error("Missing the required parameter 'userId' when calling listSessionOfUser"); + } + + var pathParams = { + 'userId': userId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = [Session]; + return this.apiClient.callApi( + '/user/{userId}/session', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * List all sessions + * @param {Number} userId The id of the user to modify + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} + */ + this.listSessionOfUser = function(userId) { + return this.listSessionOfUserWithHttpInfo(userId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Info for a specific session of user + * @param {Number} userId The id of the user to retrieve + * @param {Number} sessionId The id of the user to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Session} and HTTP response + */ + this.showSessionByIdWithHttpInfo = function(userId, sessionId) { + var postBody = null; + // verify the required parameter 'userId' is set + if (userId === undefined || userId === null) { + throw new Error("Missing the required parameter 'userId' when calling showSessionById"); + } + // verify the required parameter 'sessionId' is set + if (sessionId === undefined || sessionId === null) { + throw new Error("Missing the required parameter 'sessionId' when calling showSessionById"); + } + + var pathParams = { + 'userId': userId, + 'sessionId': sessionId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = Session; + return this.apiClient.callApi( + '/user/{userId}/session/{sessionId}', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Info for a specific session of user + * @param {Number} userId The id of the user to retrieve + * @param {Number} sessionId The id of the user to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Session} + */ + this.showSessionById = function(userId, sessionId) { + return this.showSessionByIdWithHttpInfo(userId, sessionId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/src/api/TagNamespaceApi.js b/src/api/TagNamespaceApi.js new file mode 100644 index 0000000..7bd0b0d --- /dev/null +++ b/src/api/TagNamespaceApi.js @@ -0,0 +1,246 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Error', 'model/TagNamespace'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/Error'), require('../model/TagNamespace')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.TagNamespaceApi = factory(root.SmallEod.ApiClient, root.SmallEod.Error, root.SmallEod.TagNamespace); + } +}(this, function(ApiClient, Error, TagNamespace) { + 'use strict'; + + /** + * TagNamespace service. + * @module api/TagNamespaceApi + * @version 1.0.0 + */ + + /** + * Constructs a new TagNamespaceApi. + * @alias module:api/TagNamespaceApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a tag namespace + * @param {module:model/TagNamespace} tagNamespace New tag namespace + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TagNamespace} and HTTP response + */ + this.createTagNamespaceWithHttpInfo = function(tagNamespace) { + var postBody = tagNamespace; + // verify the required parameter 'tagNamespace' is set + if (tagNamespace === undefined || tagNamespace === null) { + throw new Error("Missing the required parameter 'tagNamespace' when calling createTagNamespace"); + } + + var pathParams = { + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = TagNamespace; + return this.apiClient.callApi( + '/tagNamespace', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a tag namespace + * @param {module:model/TagNamespace} tagNamespace New tag namespace + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TagNamespace} + */ + this.createTagNamespace = function(tagNamespace) { + return this.createTagNamespaceWithHttpInfo(tagNamespace) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Deletes a single tag namespace based on the ID supplied + * @param {Number} tagNamespaceId The id of the tag namespace to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + this.deleteTagNamespaceWithHttpInfo = function(tagNamespaceId) { + var postBody = null; + // verify the required parameter 'tagNamespaceId' is set + if (tagNamespaceId === undefined || tagNamespaceId === null) { + throw new Error("Missing the required parameter 'tagNamespaceId' when calling deleteTagNamespace"); + } + + var pathParams = { + 'tagNamespaceId': tagNamespaceId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = null; + return this.apiClient.callApi( + '/tagNamespace/{tagNamespaceId}', 'DELETE', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Deletes a single tag namespace based on the ID supplied + * @param {Number} tagNamespaceId The id of the tag namespace to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.deleteTagNamespace = function(tagNamespaceId) { + return this.deleteTagNamespaceWithHttpInfo(tagNamespaceId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * List all tag namespaces + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response + */ + this.listTagNamespaceWithHttpInfo = function(opts) { + opts = opts || {}; + var postBody = null; + + var pathParams = { + }; + var queryParams = { + 'limit': opts['limit'], + 'offset': opts['offset'], + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = [TagNamespace]; + return this.apiClient.callApi( + '/tagNamespace', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * List all tag namespaces + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} + */ + this.listTagNamespace = function(opts) { + return this.listTagNamespaceWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Info for a specific tag namespace + * @param {Number} tagNamespaceId The id of the tag namespace to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TagNamespace} and HTTP response + */ + this.showTagNamespaceByIdWithHttpInfo = function(tagNamespaceId) { + var postBody = null; + // verify the required parameter 'tagNamespaceId' is set + if (tagNamespaceId === undefined || tagNamespaceId === null) { + throw new Error("Missing the required parameter 'tagNamespaceId' when calling showTagNamespaceById"); + } + + var pathParams = { + 'tagNamespaceId': tagNamespaceId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = TagNamespace; + return this.apiClient.callApi( + '/tagNamespace/{tagNamespaceId}', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Info for a specific tag namespace + * @param {Number} tagNamespaceId The id of the tag namespace to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TagNamespace} + */ + this.showTagNamespaceById = function(tagNamespaceId) { + return this.showTagNamespaceByIdWithHttpInfo(tagNamespaceId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/src/api/UserApi.js b/src/api/UserApi.js new file mode 100644 index 0000000..d046801 --- /dev/null +++ b/src/api/UserApi.js @@ -0,0 +1,246 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Error', 'model/User'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/Error'), require('../model/User')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.UserApi = factory(root.SmallEod.ApiClient, root.SmallEod.Error, root.SmallEod.User); + } +}(this, function(ApiClient, Error, User) { + 'use strict'; + + /** + * User service. + * @module api/UserApi + * @version 1.0.0 + */ + + /** + * Constructs a new UserApi. + * @alias module:api/UserApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a user + * @param {module:model/User} user New user + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/User} and HTTP response + */ + this.createUserWithHttpInfo = function(user) { + var postBody = user; + // verify the required parameter 'user' is set + if (user === undefined || user === null) { + throw new Error("Missing the required parameter 'user' when calling createUser"); + } + + var pathParams = { + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = User; + return this.apiClient.callApi( + '/user', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a user + * @param {module:model/User} user New user + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/User} + */ + this.createUser = function(user) { + return this.createUserWithHttpInfo(user) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Deletes a single user based on the ID supplied + * @param {Number} userId The id of the user to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + this.deleteUserWithHttpInfo = function(userId) { + var postBody = null; + // verify the required parameter 'userId' is set + if (userId === undefined || userId === null) { + throw new Error("Missing the required parameter 'userId' when calling deleteUser"); + } + + var pathParams = { + 'userId': userId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = null; + return this.apiClient.callApi( + '/user/{userId}', 'DELETE', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Deletes a single user based on the ID supplied + * @param {Number} userId The id of the user to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.deleteUser = function(userId) { + return this.deleteUserWithHttpInfo(userId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * List all users + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response + */ + this.listUserWithHttpInfo = function(opts) { + opts = opts || {}; + var postBody = null; + + var pathParams = { + }; + var queryParams = { + 'limit': opts['limit'], + 'offset': opts['offset'], + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = [User]; + return this.apiClient.callApi( + '/user', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * List all users + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} + */ + this.listUser = function(opts) { + return this.listUserWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Info for a specific user + * @param {Number} userId The id of the user to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/User} and HTTP response + */ + this.showUserByIdWithHttpInfo = function(userId) { + var postBody = null; + // verify the required parameter 'userId' is set + if (userId === undefined || userId === null) { + throw new Error("Missing the required parameter 'userId' when calling showUserById"); + } + + var pathParams = { + 'userId': userId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = User; + return this.apiClient.callApi( + '/user/{userId}', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Info for a specific user + * @param {Number} userId The id of the user to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/User} + */ + this.showUserById = function(userId) { + return this.showUserByIdWithHttpInfo(userId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/src/index.js b/src/index.js new file mode 100644 index 0000000..dade7e5 --- /dev/null +++ b/src/index.js @@ -0,0 +1,253 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/AddressData', 'model/AdministrativeUnit', 'model/CaseAuditedInstitution', 'model/CaseMatrix', 'model/Channel', 'model/Collection', 'model/Description', 'model/Dictionary', 'model/DictionaryValue', 'model/Error', 'model/Event', 'model/File', 'model/FileSigner', 'model/Institution', 'model/InstitutionExternalIdentifier', 'model/Letter', 'model/ModelCase', 'model/Note', 'model/Session', 'model/TagNamespace', 'model/User', 'model/UserRef', 'small_eod_client/AdministrativeUnitApi', 'small_eod_client/CaseApi', 'small_eod_client/CollectionApi', 'small_eod_client/DescriptionApi', 'small_eod_client/DictionaryApi', 'small_eod_client/EventApi', 'small_eod_client/FileApi', 'small_eod_client/InstitutionApi', 'small_eod_client/LetterApi', 'small_eod_client/NoteApi', 'small_eod_client/NotifiedUserApi', 'small_eod_client/ResponsibleUserApi', 'small_eod_client/SessionApi', 'small_eod_client/TagNamespaceApi', 'small_eod_client/UserApi'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('./ApiClient'), require('./model/AddressData'), require('./model/AdministrativeUnit'), require('./model/CaseAuditedInstitution'), require('./model/CaseMatrix'), require('./model/Channel'), require('./model/Collection'), require('./model/Description'), require('./model/Dictionary'), require('./model/DictionaryValue'), require('./model/Error'), require('./model/Event'), require('./model/File'), require('./model/FileSigner'), require('./model/Institution'), require('./model/InstitutionExternalIdentifier'), require('./model/Letter'), require('./model/ModelCase'), require('./model/Note'), require('./model/Session'), require('./model/TagNamespace'), require('./model/User'), require('./model/UserRef'), require('./small_eod_client/AdministrativeUnitApi'), require('./small_eod_client/CaseApi'), require('./small_eod_client/CollectionApi'), require('./small_eod_client/DescriptionApi'), require('./small_eod_client/DictionaryApi'), require('./small_eod_client/EventApi'), require('./small_eod_client/FileApi'), require('./small_eod_client/InstitutionApi'), require('./small_eod_client/LetterApi'), require('./small_eod_client/NoteApi'), require('./small_eod_client/NotifiedUserApi'), require('./small_eod_client/ResponsibleUserApi'), require('./small_eod_client/SessionApi'), require('./small_eod_client/TagNamespaceApi'), require('./small_eod_client/UserApi')); + } +}(function(ApiClient, AddressData, AdministrativeUnit, CaseAuditedInstitution, CaseMatrix, Channel, Collection, Description, Dictionary, DictionaryValue, Error, Event, File, FileSigner, Institution, InstitutionExternalIdentifier, Letter, ModelCase, Note, Session, TagNamespace, User, UserRef, AdministrativeUnitApi, CaseApi, CollectionApi, DescriptionApi, DictionaryApi, EventApi, FileApi, InstitutionApi, LetterApi, NoteApi, NotifiedUserApi, ResponsibleUserApi, SessionApi, TagNamespaceApi, UserApi) { + 'use strict'; + + /** + * JS API client generated by OpenAPI Generator.
+ * The index module provides access to constructors for all the classes which comprise the public API. + *

+ * An AMD (recommended!) or CommonJS application will generally do something equivalent to the following: + *

+   * var SmallEod = require('index'); // See note below*.
+   * var xxxSvc = new SmallEod.XxxApi(); // Allocate the API class we're going to use.
+   * var yyyModel = new SmallEod.Yyy(); // Construct a model instance.
+   * yyyModel.someProperty = 'someValue';
+   * ...
+   * var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service.
+   * ...
+   * 
+ * *NOTE: For a top-level AMD script, use require(['index'], function(){...}) + * and put the application logic within the callback function. + *

+ *

+ * A non-AMD browser application (discouraged) might do something like this: + *

+   * var xxxSvc = new SmallEod.XxxApi(); // Allocate the API class we're going to use.
+   * var yyy = new SmallEod.Yyy(); // Construct a model instance.
+   * yyyModel.someProperty = 'someValue';
+   * ...
+   * var zzz = xxxSvc.doSomething(yyyModel); // Invoke the service.
+   * ...
+   * 
+ *

+ * @module index + * @version 1.0.0 + */ + var exports = { + /** + * The ApiClient constructor. + * @property {module:ApiClient} + */ + ApiClient: ApiClient, + /** + * The AddressData model constructor. + * @property {module:model/AddressData} + */ + AddressData: AddressData, + /** + * The AdministrativeUnit model constructor. + * @property {module:model/AdministrativeUnit} + */ + AdministrativeUnit: AdministrativeUnit, + /** + * The CaseAuditedInstitution model constructor. + * @property {module:model/CaseAuditedInstitution} + */ + CaseAuditedInstitution: CaseAuditedInstitution, + /** + * The CaseMatrix model constructor. + * @property {module:model/CaseMatrix} + */ + CaseMatrix: CaseMatrix, + /** + * The Channel model constructor. + * @property {module:model/Channel} + */ + Channel: Channel, + /** + * The Collection model constructor. + * @property {module:model/Collection} + */ + Collection: Collection, + /** + * The Description model constructor. + * @property {module:model/Description} + */ + Description: Description, + /** + * The Dictionary model constructor. + * @property {module:model/Dictionary} + */ + Dictionary: Dictionary, + /** + * The DictionaryValue model constructor. + * @property {module:model/DictionaryValue} + */ + DictionaryValue: DictionaryValue, + /** + * The Error model constructor. + * @property {module:model/Error} + */ + Error: Error, + /** + * The Event model constructor. + * @property {module:model/Event} + */ + Event: Event, + /** + * The File model constructor. + * @property {module:model/File} + */ + File: File, + /** + * The FileSigner model constructor. + * @property {module:model/FileSigner} + */ + FileSigner: FileSigner, + /** + * The Institution model constructor. + * @property {module:model/Institution} + */ + Institution: Institution, + /** + * The InstitutionExternalIdentifier model constructor. + * @property {module:model/InstitutionExternalIdentifier} + */ + InstitutionExternalIdentifier: InstitutionExternalIdentifier, + /** + * The Letter model constructor. + * @property {module:model/Letter} + */ + Letter: Letter, + /** + * The ModelCase model constructor. + * @property {module:model/ModelCase} + */ + ModelCase: ModelCase, + /** + * The Note model constructor. + * @property {module:model/Note} + */ + Note: Note, + /** + * The Session model constructor. + * @property {module:model/Session} + */ + Session: Session, + /** + * The TagNamespace model constructor. + * @property {module:model/TagNamespace} + */ + TagNamespace: TagNamespace, + /** + * The User model constructor. + * @property {module:model/User} + */ + User: User, + /** + * The UserRef model constructor. + * @property {module:model/UserRef} + */ + UserRef: UserRef, + /** + * The AdministrativeUnitApi service constructor. + * @property {module:small_eod_client/AdministrativeUnitApi} + */ + AdministrativeUnitApi: AdministrativeUnitApi, + /** + * The CaseApi service constructor. + * @property {module:small_eod_client/CaseApi} + */ + CaseApi: CaseApi, + /** + * The CollectionApi service constructor. + * @property {module:small_eod_client/CollectionApi} + */ + CollectionApi: CollectionApi, + /** + * The DescriptionApi service constructor. + * @property {module:small_eod_client/DescriptionApi} + */ + DescriptionApi: DescriptionApi, + /** + * The DictionaryApi service constructor. + * @property {module:small_eod_client/DictionaryApi} + */ + DictionaryApi: DictionaryApi, + /** + * The EventApi service constructor. + * @property {module:small_eod_client/EventApi} + */ + EventApi: EventApi, + /** + * The FileApi service constructor. + * @property {module:small_eod_client/FileApi} + */ + FileApi: FileApi, + /** + * The InstitutionApi service constructor. + * @property {module:small_eod_client/InstitutionApi} + */ + InstitutionApi: InstitutionApi, + /** + * The LetterApi service constructor. + * @property {module:small_eod_client/LetterApi} + */ + LetterApi: LetterApi, + /** + * The NoteApi service constructor. + * @property {module:small_eod_client/NoteApi} + */ + NoteApi: NoteApi, + /** + * The NotifiedUserApi service constructor. + * @property {module:small_eod_client/NotifiedUserApi} + */ + NotifiedUserApi: NotifiedUserApi, + /** + * The ResponsibleUserApi service constructor. + * @property {module:small_eod_client/ResponsibleUserApi} + */ + ResponsibleUserApi: ResponsibleUserApi, + /** + * The SessionApi service constructor. + * @property {module:small_eod_client/SessionApi} + */ + SessionApi: SessionApi, + /** + * The TagNamespaceApi service constructor. + * @property {module:small_eod_client/TagNamespaceApi} + */ + TagNamespaceApi: TagNamespaceApi, + /** + * The UserApi service constructor. + * @property {module:small_eod_client/UserApi} + */ + UserApi: UserApi + }; + + return exports; +})); diff --git a/src/model/AddressData.js b/src/model/AddressData.js new file mode 100644 index 0000000..a5527fa --- /dev/null +++ b/src/model/AddressData.js @@ -0,0 +1,128 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.AddressData = factory(root.SmallEod.ApiClient); + } +}(this, function(ApiClient) { + 'use strict'; + + + + /** + * The AddressData model module. + * @module model/AddressData + * @version 1.0.0 + */ + + /** + * Constructs a new AddressData. + * @alias module:model/AddressData + * @class + */ + var exports = function() { + var _this = this; + + }; + + /** + * Constructs a AddressData 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/AddressData} obj Optional instance to populate. + * @return {module:model/AddressData} The populated AddressData instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + if (data.hasOwnProperty('email')) { + obj['email'] = ApiClient.convertToType(data['email'], 'String'); + } + if (data.hasOwnProperty('epuap')) { + obj['epuap'] = ApiClient.convertToType(data['epuap'], 'String'); + } + if (data.hasOwnProperty('street')) { + obj['street'] = ApiClient.convertToType(data['street'], 'String'); + } + if (data.hasOwnProperty('postal_code')) { + obj['postal_code'] = ApiClient.convertToType(data['postal_code'], 'String'); + } + if (data.hasOwnProperty('city')) { + obj['city'] = ApiClient.convertToType(data['city'], 'String'); + } + if (data.hasOwnProperty('voivodeship')) { + obj['voivodeship'] = ApiClient.convertToType(data['voivodeship'], 'String'); + } + if (data.hasOwnProperty('house_no')) { + obj['house_no'] = ApiClient.convertToType(data['house_no'], 'String'); + } + if (data.hasOwnProperty('flat_no')) { + obj['flat_no'] = ApiClient.convertToType(data['flat_no'], 'String'); + } + } + return obj; + } + + /** + * @member {String} email + */ + exports.prototype['email'] = undefined; + /** + * @member {String} epuap + */ + exports.prototype['epuap'] = undefined; + /** + * @member {String} street + */ + exports.prototype['street'] = undefined; + /** + * @member {String} postal_code + */ + exports.prototype['postal_code'] = undefined; + /** + * @member {String} city + */ + exports.prototype['city'] = undefined; + /** + * @member {String} voivodeship + */ + exports.prototype['voivodeship'] = undefined; + /** + * @member {String} house_no + */ + exports.prototype['house_no'] = undefined; + /** + * @member {String} flat_no + */ + exports.prototype['flat_no'] = undefined; + + + + return exports; +})); + + diff --git a/src/model/AdministrativeUnit.js b/src/model/AdministrativeUnit.js new file mode 100644 index 0000000..5cdf710 --- /dev/null +++ b/src/model/AdministrativeUnit.js @@ -0,0 +1,117 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.AdministrativeUnit = factory(root.SmallEod.ApiClient); + } +}(this, function(ApiClient) { + 'use strict'; + + + + /** + * The AdministrativeUnit model module. + * @module model/AdministrativeUnit + * @version 1.0.0 + */ + + /** + * Constructs a new AdministrativeUnit. + * @alias module:model/AdministrativeUnit + * @class + * @param id {String} + * @param name {String} + * @param level {Number} + * @param category {String} + * @param terc {String} + */ + var exports = function(id, name, level, category, terc) { + var _this = this; + + _this['id'] = id; + _this['name'] = name; + _this['level'] = level; + _this['category'] = category; + _this['terc'] = terc; + }; + + /** + * Constructs a AdministrativeUnit 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/AdministrativeUnit} obj Optional instance to populate. + * @return {module:model/AdministrativeUnit} The populated AdministrativeUnit instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'String'); + } + if (data.hasOwnProperty('name')) { + obj['name'] = ApiClient.convertToType(data['name'], 'String'); + } + if (data.hasOwnProperty('level')) { + obj['level'] = ApiClient.convertToType(data['level'], 'Number'); + } + if (data.hasOwnProperty('category')) { + obj['category'] = ApiClient.convertToType(data['category'], 'String'); + } + if (data.hasOwnProperty('terc')) { + obj['terc'] = ApiClient.convertToType(data['terc'], 'String'); + } + } + return obj; + } + + /** + * @member {String} id + */ + exports.prototype['id'] = undefined; + /** + * @member {String} name + */ + exports.prototype['name'] = undefined; + /** + * @member {Number} level + */ + exports.prototype['level'] = undefined; + /** + * @member {String} category + */ + exports.prototype['category'] = undefined; + /** + * @member {String} terc + */ + exports.prototype['terc'] = undefined; + + + + return exports; +})); + + diff --git a/src/model/CaseAuditedInstitution.js b/src/model/CaseAuditedInstitution.js new file mode 100644 index 0000000..e5e095a --- /dev/null +++ b/src/model/CaseAuditedInstitution.js @@ -0,0 +1,86 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.CaseAuditedInstitution = factory(root.SmallEod.ApiClient); + } +}(this, function(ApiClient) { + 'use strict'; + + + + /** + * The CaseAuditedInstitution model module. + * @module model/CaseAuditedInstitution + * @version 1.0.0 + */ + + /** + * Constructs a new CaseAuditedInstitution. + * @alias module:model/CaseAuditedInstitution + * @class + */ + var exports = function() { + var _this = this; + + }; + + /** + * Constructs a CaseAuditedInstitution 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/CaseAuditedInstitution} obj Optional instance to populate. + * @return {module:model/CaseAuditedInstitution} The populated CaseAuditedInstitution instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'String'); + } + if (data.hasOwnProperty('user')) { + obj['user'] = ApiClient.convertToType(data['user'], 'Number'); + } + } + return obj; + } + + /** + * @member {String} id + */ + exports.prototype['id'] = undefined; + /** + * @member {Number} user + */ + exports.prototype['user'] = undefined; + + + + return exports; +})); + + diff --git a/src/model/CaseMatrix.js b/src/model/CaseMatrix.js new file mode 100644 index 0000000..650ac6d --- /dev/null +++ b/src/model/CaseMatrix.js @@ -0,0 +1,93 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.CaseMatrix = factory(root.SmallEod.ApiClient); + } +}(this, function(ApiClient) { + 'use strict'; + + + + /** + * The CaseMatrix model module. + * @module model/CaseMatrix + * @version 1.0.0 + */ + + /** + * Constructs a new CaseMatrix. + * @alias module:model/CaseMatrix + * @class + */ + var exports = function() { + var _this = this; + + }; + + /** + * Constructs a CaseMatrix 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/CaseMatrix} obj Optional instance to populate. + * @return {module:model/CaseMatrix} The populated CaseMatrix instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'Number'); + } + if (data.hasOwnProperty('dictionary')) { + obj['dictionary'] = ApiClient.convertToType(data['dictionary'], 'String'); + } + if (data.hasOwnProperty('values')) { + obj['values'] = ApiClient.convertToType(data['values'], ['String']); + } + } + return obj; + } + + /** + * @member {Number} id + */ + exports.prototype['id'] = undefined; + /** + * @member {String} dictionary + */ + exports.prototype['dictionary'] = undefined; + /** + * @member {Array.} values + */ + exports.prototype['values'] = undefined; + + + + return exports; +})); + + diff --git a/src/model/Channel.js b/src/model/Channel.js new file mode 100644 index 0000000..1efec79 --- /dev/null +++ b/src/model/Channel.js @@ -0,0 +1,221 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.Channel = factory(root.SmallEod.ApiClient); + } +}(this, function(ApiClient) { + 'use strict'; + + + + /** + * The Channel model module. + * @module model/Channel + * @version 1.0.0 + */ + + /** + * Constructs a new Channel. + * @alias module:model/Channel + * @class + * @param id {String} + * @param name {module:model/Channel.NameEnum} + */ + var exports = function(id, name) { + var _this = this; + + _this['id'] = id; + _this['name'] = name; + }; + + /** + * Constructs a Channel 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/Channel} obj Optional instance to populate. + * @return {module:model/Channel} The populated Channel instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'String'); + } + if (data.hasOwnProperty('name')) { + obj['name'] = ApiClient.convertToType(data['name'], 'String'); + } + if (data.hasOwnProperty('required')) { + obj['required'] = ApiClient.convertToType(data['required'], ['String']); + } + if (data.hasOwnProperty('createdOn')) { + obj['createdOn'] = ApiClient.convertToType(data['createdOn'], 'String'); + } + if (data.hasOwnProperty('createdBy')) { + obj['createdBy'] = ApiClient.convertToType(data['createdBy'], 'String'); + } + if (data.hasOwnProperty('modifiedOn')) { + obj['modifiedOn'] = ApiClient.convertToType(data['modifiedOn'], 'String'); + } + if (data.hasOwnProperty('modifiedBy')) { + obj['modifiedBy'] = ApiClient.convertToType(data['modifiedBy'], 'String'); + } + } + return obj; + } + + /** + * @member {String} id + */ + exports.prototype['id'] = undefined; + /** + * @member {module:model/Channel.NameEnum} name + */ + exports.prototype['name'] = undefined; + /** + * Required address fields + * @member {Array.} required + */ + exports.prototype['required'] = undefined; + /** + * @member {String} createdOn + */ + exports.prototype['createdOn'] = undefined; + /** + * User ID responsible for creating the content + * @member {String} createdBy + */ + exports.prototype['createdBy'] = undefined; + /** + * @member {String} modifiedOn + */ + exports.prototype['modifiedOn'] = undefined; + /** + * @member {String} modifiedBy + */ + exports.prototype['modifiedBy'] = undefined; + + + /** + * Allowed values for the name property. + * @enum {String} + * @readonly + */ + exports.NameEnum = { + /** + * value: "fedrowanie" + * @const + */ + "fedrowanie": "fedrowanie", + /** + * value: "faks" + * @const + */ + "faks": "faks", + /** + * value: "od klienta" + * @const + */ + "od klienta": "od klienta", + /** + * value: "mecenas zewn." + * @const + */ + "mecenas zewn.": "mecenas zewn.", + /** + * value: "dostarczenie osobiście" + * @const + */ + "dostarczenie osobiście": "dostarczenie osobiście", + /** + * value: "email" + * @const + */ + "email": "email", + /** + * value: "poczta tradycyjna" + * @const + */ + "poczta tradycyjna": "poczta tradycyjna", + /** + * value: "epuap" + * @const + */ + "epuap": "epuap" }; + + /** + * Allowed values for the required property. + * @enum {String} + * @readonly + */ + exports.RequiredEnum = { + /** + * value: "email" + * @const + */ + "email": "email", + /** + * value: "epuap" + * @const + */ + "epuap": "epuap", + /** + * value: "street" + * @const + */ + "street": "street", + /** + * value: "postal_code" + * @const + */ + "postal_code": "postal_code", + /** + * value: "city" + * @const + */ + "city": "city", + /** + * value: "voivodeship" + * @const + */ + "voivodeship": "voivodeship", + /** + * value: "house_no" + * @const + */ + "house_no": "house_no", + /** + * value: "flat_no" + * @const + */ + "flat_no": "flat_no" }; + + + return exports; +})); + + diff --git a/src/model/Collection.js b/src/model/Collection.js new file mode 100644 index 0000000..ea36e8e --- /dev/null +++ b/src/model/Collection.js @@ -0,0 +1,185 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.Collection = factory(root.SmallEod.ApiClient); + } +}(this, function(ApiClient) { + 'use strict'; + + + + /** + * The Collection model module. + * @module model/Collection + * @version 1.0.0 + */ + + /** + * Constructs a new Collection. + * @alias module:model/Collection + * @class + * @param id {String} + * @param name {String} + * @param query {String} Search query + * @param createdOn {String} + * @param createdBy {String} User ID responsible for creating the content + * @param modifiedOn {String} + * @param modifiedBy {String} + */ + var exports = function(id, name, query, createdOn, createdBy, modifiedOn, modifiedBy) { + var _this = this; + + _this['id'] = id; + _this['name'] = name; + _this['query'] = query; + _this['createdOn'] = createdOn; + _this['createdBy'] = createdBy; + _this['modifiedOn'] = modifiedOn; + _this['modifiedBy'] = modifiedBy; + }; + + /** + * Constructs a Collection 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/Collection} obj Optional instance to populate. + * @return {module:model/Collection} The populated Collection instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'String'); + } + if (data.hasOwnProperty('name')) { + obj['name'] = ApiClient.convertToType(data['name'], 'String'); + } + if (data.hasOwnProperty('content')) { + obj['content'] = ApiClient.convertToType(data['content'], ['String']); + } + if (data.hasOwnProperty('public')) { + obj['public'] = ApiClient.convertToType(data['public'], 'Boolean'); + } + if (data.hasOwnProperty('expiredOn')) { + obj['expiredOn'] = ApiClient.convertToType(data['expiredOn'], 'Date'); + } + if (data.hasOwnProperty('query')) { + obj['query'] = ApiClient.convertToType(data['query'], 'String'); + } + if (data.hasOwnProperty('createdOn')) { + obj['createdOn'] = ApiClient.convertToType(data['createdOn'], 'String'); + } + if (data.hasOwnProperty('createdBy')) { + obj['createdBy'] = ApiClient.convertToType(data['createdBy'], 'String'); + } + if (data.hasOwnProperty('modifiedOn')) { + obj['modifiedOn'] = ApiClient.convertToType(data['modifiedOn'], 'String'); + } + if (data.hasOwnProperty('modifiedBy')) { + obj['modifiedBy'] = ApiClient.convertToType(data['modifiedBy'], 'String'); + } + } + return obj; + } + + /** + * @member {String} id + */ + exports.prototype['id'] = undefined; + /** + * @member {String} name + */ + exports.prototype['name'] = undefined; + /** + * @member {Array.} content + */ + exports.prototype['content'] = undefined; + /** + * @member {Boolean} public + */ + exports.prototype['public'] = undefined; + /** + * @member {Date} expiredOn + */ + exports.prototype['expiredOn'] = undefined; + /** + * Search query + * @member {String} query + */ + exports.prototype['query'] = undefined; + /** + * @member {String} createdOn + */ + exports.prototype['createdOn'] = undefined; + /** + * User ID responsible for creating the content + * @member {String} createdBy + */ + exports.prototype['createdBy'] = undefined; + /** + * @member {String} modifiedOn + */ + exports.prototype['modifiedOn'] = undefined; + /** + * @member {String} modifiedBy + */ + exports.prototype['modifiedBy'] = undefined; + + + /** + * Allowed values for the content property. + * @enum {String} + * @readonly + */ + exports.ContentEnum = { + /** + * value: "note" + * @const + */ + "note": "note", + /** + * value: "comment" + * @const + */ + "comment": "comment", + /** + * value: "letter" + * @const + */ + "letter": "letter", + /** + * value: "event" + * @const + */ + "event": "event" }; + + + return exports; +})); + + diff --git a/src/model/Description.js b/src/model/Description.js new file mode 100644 index 0000000..6490651 --- /dev/null +++ b/src/model/Description.js @@ -0,0 +1,134 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.Description = factory(root.SmallEod.ApiClient); + } +}(this, function(ApiClient) { + 'use strict'; + + + + /** + * The Description model module. + * @module model/Description + * @version 1.0.0 + */ + + /** + * Constructs a new Description. + * @alias module:model/Description + * @class + * @param id {String} + * @param text {String} + * @param createdOn {String} + * @param createdBy {String} User ID responsible for creating the content + * @param modifiedOn {String} + * @param modifiedBy {String} + */ + var exports = function(id, text, createdOn, createdBy, modifiedOn, modifiedBy) { + var _this = this; + + _this['id'] = id; + _this['text'] = text; + _this['createdOn'] = createdOn; + _this['createdBy'] = createdBy; + _this['modifiedOn'] = modifiedOn; + _this['modifiedBy'] = modifiedBy; + }; + + /** + * Constructs a Description 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/Description} obj Optional instance to populate. + * @return {module:model/Description} The populated Description instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'String'); + } + if (data.hasOwnProperty('text')) { + obj['text'] = ApiClient.convertToType(data['text'], 'String'); + } + if (data.hasOwnProperty('userAgent')) { + obj['userAgent'] = ApiClient.convertToType(data['userAgent'], 'String'); + } + if (data.hasOwnProperty('createdOn')) { + obj['createdOn'] = ApiClient.convertToType(data['createdOn'], 'String'); + } + if (data.hasOwnProperty('createdBy')) { + obj['createdBy'] = ApiClient.convertToType(data['createdBy'], 'String'); + } + if (data.hasOwnProperty('modifiedOn')) { + obj['modifiedOn'] = ApiClient.convertToType(data['modifiedOn'], 'String'); + } + if (data.hasOwnProperty('modifiedBy')) { + obj['modifiedBy'] = ApiClient.convertToType(data['modifiedBy'], 'String'); + } + } + return obj; + } + + /** + * @member {String} id + */ + exports.prototype['id'] = undefined; + /** + * @member {String} text + */ + exports.prototype['text'] = undefined; + /** + * @member {String} userAgent + */ + exports.prototype['userAgent'] = undefined; + /** + * @member {String} createdOn + */ + exports.prototype['createdOn'] = undefined; + /** + * User ID responsible for creating the content + * @member {String} createdBy + */ + exports.prototype['createdBy'] = undefined; + /** + * @member {String} modifiedOn + */ + exports.prototype['modifiedOn'] = undefined; + /** + * @member {String} modifiedBy + */ + exports.prototype['modifiedBy'] = undefined; + + + + return exports; +})); + + diff --git a/src/model/Dictionary.js b/src/model/Dictionary.js new file mode 100644 index 0000000..c9a1fb4 --- /dev/null +++ b/src/model/Dictionary.js @@ -0,0 +1,164 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/DictionaryValue'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('./DictionaryValue')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.Dictionary = factory(root.SmallEod.ApiClient, root.SmallEod.DictionaryValue); + } +}(this, function(ApiClient, DictionaryValue) { + 'use strict'; + + + + /** + * The Dictionary model module. + * @module model/Dictionary + * @version 1.0.0 + */ + + /** + * Constructs a new Dictionary. + * A collection of dictionary data for categorizing and collecting statistical information + * @alias module:model/Dictionary + * @class + * @param id {String} + * @param name {String} Name of the statistical field + * @param createdOn {String} + * @param createdBy {String} User ID responsible for creating the content + * @param modifiedOn {String} + * @param modifiedBy {String} + */ + var exports = function(id, name, createdOn, createdBy, modifiedOn, modifiedBy) { + var _this = this; + + _this['id'] = id; + _this['name'] = name; + _this['createdOn'] = createdOn; + _this['createdBy'] = createdBy; + _this['modifiedOn'] = modifiedOn; + _this['modifiedBy'] = modifiedBy; + }; + + /** + * Constructs a Dictionary 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/Dictionary} obj Optional instance to populate. + * @return {module:model/Dictionary} The populated Dictionary instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'String'); + } + if (data.hasOwnProperty('name')) { + obj['name'] = ApiClient.convertToType(data['name'], 'String'); + } + if (data.hasOwnProperty('value')) { + obj['value'] = ApiClient.convertToType(data['value'], [DictionaryValue]); + } + if (data.hasOwnProperty('maxItems')) { + obj['maxItems'] = ApiClient.convertToType(data['maxItems'], 'Number'); + } + if (data.hasOwnProperty('minItems')) { + obj['minItems'] = ApiClient.convertToType(data['minItems'], 'Number'); + } + if (data.hasOwnProperty('active')) { + obj['active'] = ApiClient.convertToType(data['active'], 'Boolean'); + } + if (data.hasOwnProperty('createdOn')) { + obj['createdOn'] = ApiClient.convertToType(data['createdOn'], 'String'); + } + if (data.hasOwnProperty('createdBy')) { + obj['createdBy'] = ApiClient.convertToType(data['createdBy'], 'String'); + } + if (data.hasOwnProperty('modifiedOn')) { + obj['modifiedOn'] = ApiClient.convertToType(data['modifiedOn'], 'String'); + } + if (data.hasOwnProperty('modifiedBy')) { + obj['modifiedBy'] = ApiClient.convertToType(data['modifiedBy'], 'String'); + } + } + return obj; + } + + /** + * @member {String} id + */ + exports.prototype['id'] = undefined; + /** + * Name of the statistical field + * @member {String} name + */ + exports.prototype['name'] = undefined; + /** + * Acceptable values + * @member {Array.} value + */ + exports.prototype['value'] = undefined; + /** + * Maximum number of selected values + * @member {Number} maxItems + * @default 1 + */ + exports.prototype['maxItems'] = 1; + /** + * Minimum number of selected values + * @member {Number} minItems + * @default 1 + */ + exports.prototype['minItems'] = 1; + /** + * Allows to add to new entries + * @member {Boolean} active + * @default true + */ + exports.prototype['active'] = true; + /** + * @member {String} createdOn + */ + exports.prototype['createdOn'] = undefined; + /** + * User ID responsible for creating the content + * @member {String} createdBy + */ + exports.prototype['createdBy'] = undefined; + /** + * @member {String} modifiedOn + */ + exports.prototype['modifiedOn'] = undefined; + /** + * @member {String} modifiedBy + */ + exports.prototype['modifiedBy'] = undefined; + + + + return exports; +})); + + diff --git a/src/model/DictionaryValue.js b/src/model/DictionaryValue.js new file mode 100644 index 0000000..2cf4e40 --- /dev/null +++ b/src/model/DictionaryValue.js @@ -0,0 +1,90 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.DictionaryValue = factory(root.SmallEod.ApiClient); + } +}(this, function(ApiClient) { + 'use strict'; + + + + /** + * The DictionaryValue model module. + * @module model/DictionaryValue + * @version 1.0.0 + */ + + /** + * Constructs a new DictionaryValue. + * @alias module:model/DictionaryValue + * @class + * @param id {String} + * @param name {String} + */ + var exports = function(id, name) { + var _this = this; + + _this['id'] = id; + _this['name'] = name; + }; + + /** + * Constructs a DictionaryValue 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/DictionaryValue} obj Optional instance to populate. + * @return {module:model/DictionaryValue} The populated DictionaryValue instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'String'); + } + if (data.hasOwnProperty('name')) { + obj['name'] = ApiClient.convertToType(data['name'], 'String'); + } + } + return obj; + } + + /** + * @member {String} id + */ + exports.prototype['id'] = undefined; + /** + * @member {String} name + */ + exports.prototype['name'] = undefined; + + + + return exports; +})); + + diff --git a/src/model/Error.js b/src/model/Error.js new file mode 100644 index 0000000..670a930 --- /dev/null +++ b/src/model/Error.js @@ -0,0 +1,90 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.Error = factory(root.SmallEod.ApiClient); + } +}(this, function(ApiClient) { + 'use strict'; + + + + /** + * The Error model module. + * @module model/Error + * @version 1.0.0 + */ + + /** + * Constructs a new Error. + * @alias module:model/Error + * @class + * @param code {Number} + * @param message {String} + */ + var exports = function(code, message) { + var _this = this; + + _this['code'] = code; + _this['message'] = message; + }; + + /** + * Constructs a Error 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/Error} obj Optional instance to populate. + * @return {module:model/Error} The populated Error instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + if (data.hasOwnProperty('code')) { + obj['code'] = ApiClient.convertToType(data['code'], 'Number'); + } + if (data.hasOwnProperty('message')) { + obj['message'] = ApiClient.convertToType(data['message'], 'String'); + } + } + return obj; + } + + /** + * @member {Number} code + */ + exports.prototype['code'] = undefined; + /** + * @member {String} message + */ + exports.prototype['message'] = undefined; + + + + return exports; +})); + + diff --git a/src/model/Event.js b/src/model/Event.js new file mode 100644 index 0000000..2f9677a --- /dev/null +++ b/src/model/Event.js @@ -0,0 +1,150 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.Event = factory(root.SmallEod.ApiClient); + } +}(this, function(ApiClient) { + 'use strict'; + + + + /** + * The Event model module. + * @module model/Event + * @version 1.0.0 + */ + + /** + * Constructs a new Event. + * @alias module:model/Event + * @class + * @param id {String} + * @param name {String} + * @param data {Date} + * @param createdOn {String} + * @param createdBy {String} User ID responsible for creating the content + * @param modifiedOn {String} + * @param modifiedBy {String} + */ + var exports = function(id, name, data, createdOn, createdBy, modifiedOn, modifiedBy) { + var _this = this; + + _this['id'] = id; + _this['name'] = name; + _this['data'] = data; + _this['createdOn'] = createdOn; + _this['createdBy'] = createdBy; + _this['modifiedOn'] = modifiedOn; + _this['modifiedBy'] = modifiedBy; + }; + + /** + * Constructs a Event 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/Event} obj Optional instance to populate. + * @return {module:model/Event} The populated Event instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'String'); + } + if (data.hasOwnProperty('case')) { + obj['case'] = ApiClient.convertToType(data['case'], 'String'); + } + if (data.hasOwnProperty('name')) { + obj['name'] = ApiClient.convertToType(data['name'], 'String'); + } + if (data.hasOwnProperty('data')) { + obj['data'] = ApiClient.convertToType(data['data'], 'Date'); + } + if (data.hasOwnProperty('comment')) { + obj['comment'] = ApiClient.convertToType(data['comment'], 'String'); + } + if (data.hasOwnProperty('createdOn')) { + obj['createdOn'] = ApiClient.convertToType(data['createdOn'], 'String'); + } + if (data.hasOwnProperty('createdBy')) { + obj['createdBy'] = ApiClient.convertToType(data['createdBy'], 'String'); + } + if (data.hasOwnProperty('modifiedOn')) { + obj['modifiedOn'] = ApiClient.convertToType(data['modifiedOn'], 'String'); + } + if (data.hasOwnProperty('modifiedBy')) { + obj['modifiedBy'] = ApiClient.convertToType(data['modifiedBy'], 'String'); + } + } + return obj; + } + + /** + * @member {String} id + */ + exports.prototype['id'] = undefined; + /** + * @member {String} case + */ + exports.prototype['case'] = undefined; + /** + * @member {String} name + */ + exports.prototype['name'] = undefined; + /** + * @member {Date} data + */ + exports.prototype['data'] = undefined; + /** + * @member {String} comment + */ + exports.prototype['comment'] = undefined; + /** + * @member {String} createdOn + */ + exports.prototype['createdOn'] = undefined; + /** + * User ID responsible for creating the content + * @member {String} createdBy + */ + exports.prototype['createdBy'] = undefined; + /** + * @member {String} modifiedOn + */ + exports.prototype['modifiedOn'] = undefined; + /** + * @member {String} modifiedBy + */ + exports.prototype['modifiedBy'] = undefined; + + + + return exports; +})); + + diff --git a/src/model/File.js b/src/model/File.js new file mode 100644 index 0000000..94a65b1 --- /dev/null +++ b/src/model/File.js @@ -0,0 +1,99 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.File = factory(root.SmallEod.ApiClient); + } +}(this, function(ApiClient) { + 'use strict'; + + + + /** + * The File model module. + * @module model/File + * @version 1.0.0 + */ + + /** + * Constructs a new File. + * @alias module:model/File + * @class + * @param id {String} + * @param path {String} + * @param name {String} + */ + var exports = function(id, path, name) { + var _this = this; + + _this['id'] = id; + _this['path'] = path; + _this['name'] = name; + }; + + /** + * Constructs a File 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/File} obj Optional instance to populate. + * @return {module:model/File} The populated File instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'String'); + } + if (data.hasOwnProperty('path')) { + obj['path'] = ApiClient.convertToType(data['path'], 'String'); + } + if (data.hasOwnProperty('name')) { + obj['name'] = ApiClient.convertToType(data['name'], 'String'); + } + } + return obj; + } + + /** + * @member {String} id + */ + exports.prototype['id'] = undefined; + /** + * @member {String} path + */ + exports.prototype['path'] = undefined; + /** + * @member {String} name + */ + exports.prototype['name'] = undefined; + + + + return exports; +})); + + diff --git a/src/model/FileSigner.js b/src/model/FileSigner.js new file mode 100644 index 0000000..fd92fe0 --- /dev/null +++ b/src/model/FileSigner.js @@ -0,0 +1,120 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.FileSigner = factory(root.SmallEod.ApiClient); + } +}(this, function(ApiClient) { + 'use strict'; + + + + /** + * The FileSigner model module. + * @module model/FileSigner + * @version 1.0.0 + */ + + /** + * Constructs a new FileSigner. + * @alias module:model/FileSigner + * @class + * @param name {String} + */ + var exports = function(name) { + var _this = this; + + _this['name'] = name; + }; + + /** + * Constructs a FileSigner 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/FileSigner} obj Optional instance to populate. + * @return {module:model/FileSigner} The populated FileSigner instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + if (data.hasOwnProperty('name')) { + obj['name'] = ApiClient.convertToType(data['name'], 'String'); + } + if (data.hasOwnProperty('method')) { + obj['method'] = ApiClient.convertToType(data['method'], 'String'); + } + if (data.hasOwnProperty('url')) { + obj['url'] = ApiClient.convertToType(data['url'], 'String'); + } + if (data.hasOwnProperty('path')) { + obj['path'] = ApiClient.convertToType(data['path'], 'String'); + } + } + return obj; + } + + /** + * @member {String} name + */ + exports.prototype['name'] = undefined; + /** + * @member {module:model/FileSigner.MethodEnum} method + */ + exports.prototype['method'] = undefined; + /** + * Path to send file. See details: https://docs.aws.amazon.com/AmazonS3/latest/dev/PresignedUrlUploadObject.html + * @member {String} url + */ + exports.prototype['url'] = undefined; + /** + * @member {String} path + */ + exports.prototype['path'] = undefined; + + + /** + * Allowed values for the method property. + * @enum {String} + * @readonly + */ + exports.MethodEnum = { + /** + * value: "POST" + * @const + */ + "POST": "POST", + /** + * value: "PUT" + * @const + */ + "PUT": "PUT" }; + + + return exports; +})); + + diff --git a/src/model/Institution.js b/src/model/Institution.js new file mode 100644 index 0000000..de36ad1 --- /dev/null +++ b/src/model/Institution.js @@ -0,0 +1,149 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/AddressData', 'model/InstitutionExternalIdentifier'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('./AddressData'), require('./InstitutionExternalIdentifier')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.Institution = factory(root.SmallEod.ApiClient, root.SmallEod.AddressData, root.SmallEod.InstitutionExternalIdentifier); + } +}(this, function(ApiClient, AddressData, InstitutionExternalIdentifier) { + 'use strict'; + + + + /** + * The Institution model module. + * @module model/Institution + * @version 1.0.0 + */ + + /** + * Constructs a new Institution. + * @alias module:model/Institution + * @class + * @param id {String} + * @param name {String} Name of institution + * @param createdOn {String} + * @param createdBy {String} User ID responsible for creating the content + * @param modifiedOn {String} + * @param modifiedBy {String} + */ + var exports = function(id, name, createdOn, createdBy, modifiedOn, modifiedBy) { + var _this = this; + + _this['id'] = id; + _this['name'] = name; + _this['createdOn'] = createdOn; + _this['createdBy'] = createdBy; + _this['modifiedOn'] = modifiedOn; + _this['modifiedBy'] = modifiedBy; + }; + + /** + * Constructs a Institution 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/Institution} obj Optional instance to populate. + * @return {module:model/Institution} The populated Institution instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'String'); + } + if (data.hasOwnProperty('name')) { + obj['name'] = ApiClient.convertToType(data['name'], 'String'); + } + if (data.hasOwnProperty('external_identifier')) { + obj['external_identifier'] = InstitutionExternalIdentifier.constructFromObject(data['external_identifier']); + } + if (data.hasOwnProperty('address')) { + obj['address'] = AddressData.constructFromObject(data['address']); + } + if (data.hasOwnProperty('administrativeUnit')) { + obj['administrativeUnit'] = ApiClient.convertToType(data['administrativeUnit'], 'String'); + } + if (data.hasOwnProperty('createdOn')) { + obj['createdOn'] = ApiClient.convertToType(data['createdOn'], 'String'); + } + if (data.hasOwnProperty('createdBy')) { + obj['createdBy'] = ApiClient.convertToType(data['createdBy'], 'String'); + } + if (data.hasOwnProperty('modifiedOn')) { + obj['modifiedOn'] = ApiClient.convertToType(data['modifiedOn'], 'String'); + } + if (data.hasOwnProperty('modifiedBy')) { + obj['modifiedBy'] = ApiClient.convertToType(data['modifiedBy'], 'String'); + } + } + return obj; + } + + /** + * @member {String} id + */ + exports.prototype['id'] = undefined; + /** + * Name of institution + * @member {String} name + */ + exports.prototype['name'] = undefined; + /** + * @member {module:model/InstitutionExternalIdentifier} external_identifier + */ + exports.prototype['external_identifier'] = undefined; + /** + * @member {module:model/AddressData} address + */ + exports.prototype['address'] = undefined; + /** + * @member {String} administrativeUnit + */ + exports.prototype['administrativeUnit'] = undefined; + /** + * @member {String} createdOn + */ + exports.prototype['createdOn'] = undefined; + /** + * User ID responsible for creating the content + * @member {String} createdBy + */ + exports.prototype['createdBy'] = undefined; + /** + * @member {String} modifiedOn + */ + exports.prototype['modifiedOn'] = undefined; + /** + * @member {String} modifiedBy + */ + exports.prototype['modifiedBy'] = undefined; + + + + return exports; +})); + + diff --git a/src/model/InstitutionExternalIdentifier.js b/src/model/InstitutionExternalIdentifier.js new file mode 100644 index 0000000..e447945 --- /dev/null +++ b/src/model/InstitutionExternalIdentifier.js @@ -0,0 +1,87 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.InstitutionExternalIdentifier = factory(root.SmallEod.ApiClient); + } +}(this, function(ApiClient) { + 'use strict'; + + + + /** + * The InstitutionExternalIdentifier model module. + * @module model/InstitutionExternalIdentifier + * @version 1.0.0 + */ + + /** + * Constructs a new InstitutionExternalIdentifier. + * Known external identifier of the institution + * @alias module:model/InstitutionExternalIdentifier + * @class + */ + var exports = function() { + var _this = this; + + }; + + /** + * Constructs a InstitutionExternalIdentifier 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/InstitutionExternalIdentifier} obj Optional instance to populate. + * @return {module:model/InstitutionExternalIdentifier} The populated InstitutionExternalIdentifier instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + if (data.hasOwnProperty('regon')) { + obj['regon'] = ApiClient.convertToType(data['regon'], 'String'); + } + if (data.hasOwnProperty('nip')) { + obj['nip'] = ApiClient.convertToType(data['nip'], 'String'); + } + } + return obj; + } + + /** + * @member {String} regon + */ + exports.prototype['regon'] = undefined; + /** + * @member {String} nip + */ + exports.prototype['nip'] = undefined; + + + + return exports; +})); + + diff --git a/src/model/Letter.js b/src/model/Letter.js new file mode 100644 index 0000000..95f8de0 --- /dev/null +++ b/src/model/Letter.js @@ -0,0 +1,245 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/AddressData'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('./AddressData')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.Letter = factory(root.SmallEod.ApiClient, root.SmallEod.AddressData); + } +}(this, function(ApiClient, AddressData) { + 'use strict'; + + + + /** + * The Letter model module. + * @module model/Letter + * @version 1.0.0 + */ + + /** + * Constructs a new Letter. + * @alias module:model/Letter + * @class + * @param id {String} + * @param name {String} + * @param direction {module:model/Letter.DirectionEnum} Direction + * @param channel {String} Channel + * @param createdOn {String} + * @param createdBy {String} User ID responsible for creating the content + * @param modifiedOn {String} + * @param modifiedBy {String} + */ + var exports = function(id, name, direction, channel, createdOn, createdBy, modifiedOn, modifiedBy) { + var _this = this; + + _this['id'] = id; + _this['name'] = name; + _this['direction'] = direction; + _this['channel'] = channel; + _this['createdOn'] = createdOn; + _this['createdBy'] = createdBy; + _this['modifiedOn'] = modifiedOn; + _this['modifiedBy'] = modifiedBy; + }; + + /** + * Constructs a Letter 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/Letter} obj Optional instance to populate. + * @return {module:model/Letter} The populated Letter instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'String'); + } + if (data.hasOwnProperty('name')) { + obj['name'] = ApiClient.convertToType(data['name'], 'String'); + } + if (data.hasOwnProperty('direction')) { + obj['direction'] = ApiClient.convertToType(data['direction'], 'String'); + } + if (data.hasOwnProperty('channel')) { + obj['channel'] = ApiClient.convertToType(data['channel'], 'String'); + } + if (data.hasOwnProperty('final')) { + obj['final'] = ApiClient.convertToType(data['final'], 'Boolean'); + } + if (data.hasOwnProperty('data')) { + obj['data'] = ApiClient.convertToType(data['data'], 'Date'); + } + if (data.hasOwnProperty('identifier')) { + obj['identifier'] = ApiClient.convertToType(data['identifier'], 'String'); + } + if (data.hasOwnProperty('institution')) { + obj['institution'] = ApiClient.convertToType(data['institution'], ['Number']); + } + if (data.hasOwnProperty('address')) { + obj['address'] = AddressData.constructFromObject(data['address']); + } + if (data.hasOwnProperty('case')) { + obj['case'] = ApiClient.convertToType(data['case'], 'String'); + } + if (data.hasOwnProperty('attachment')) { + obj['attachment'] = ApiClient.convertToType(data['attachment'], [File]); + } + if (data.hasOwnProperty('ordering')) { + obj['ordering'] = ApiClient.convertToType(data['ordering'], 'Number'); + } + if (data.hasOwnProperty('comment')) { + obj['comment'] = ApiClient.convertToType(data['comment'], 'String'); + } + if (data.hasOwnProperty('excerpt')) { + obj['excerpt'] = ApiClient.convertToType(data['excerpt'], 'String'); + } + if (data.hasOwnProperty('tags')) { + obj['tags'] = ApiClient.convertToType(data['tags'], ['String']); + } + if (data.hasOwnProperty('createdOn')) { + obj['createdOn'] = ApiClient.convertToType(data['createdOn'], 'String'); + } + if (data.hasOwnProperty('createdBy')) { + obj['createdBy'] = ApiClient.convertToType(data['createdBy'], 'String'); + } + if (data.hasOwnProperty('modifiedOn')) { + obj['modifiedOn'] = ApiClient.convertToType(data['modifiedOn'], 'String'); + } + if (data.hasOwnProperty('modifiedBy')) { + obj['modifiedBy'] = ApiClient.convertToType(data['modifiedBy'], 'String'); + } + } + return obj; + } + + /** + * @member {String} id + */ + exports.prototype['id'] = undefined; + /** + * @member {String} name + */ + exports.prototype['name'] = undefined; + /** + * Direction + * @member {module:model/Letter.DirectionEnum} direction + */ + exports.prototype['direction'] = undefined; + /** + * Channel + * @member {String} channel + */ + exports.prototype['channel'] = undefined; + /** + * The status of the letter, e.g. deciding about visibility in the collection + * @member {Boolean} final + */ + exports.prototype['final'] = undefined; + /** + * Date of receipt / Date of dispatch + * @member {Date} data + */ + exports.prototype['data'] = undefined; + /** + * External identifier of letter / case + * @member {String} identifier + */ + exports.prototype['identifier'] = undefined; + /** + * @member {Array.} institution + */ + exports.prototype['institution'] = undefined; + /** + * @member {module:model/AddressData} address + */ + exports.prototype['address'] = undefined; + /** + * @member {String} case + */ + exports.prototype['case'] = undefined; + /** + * @member {Array.} attachment + */ + exports.prototype['attachment'] = undefined; + /** + * @member {Number} ordering + * @default 0 + */ + exports.prototype['ordering'] = 0; + /** + * @member {String} comment + */ + exports.prototype['comment'] = undefined; + /** + * @member {String} excerpt + */ + exports.prototype['excerpt'] = undefined; + /** + * @member {Array.} tags + */ + exports.prototype['tags'] = undefined; + /** + * @member {String} createdOn + */ + exports.prototype['createdOn'] = undefined; + /** + * User ID responsible for creating the content + * @member {String} createdBy + */ + exports.prototype['createdBy'] = undefined; + /** + * @member {String} modifiedOn + */ + exports.prototype['modifiedOn'] = undefined; + /** + * @member {String} modifiedBy + */ + exports.prototype['modifiedBy'] = undefined; + + + /** + * Allowed values for the direction property. + * @enum {String} + * @readonly + */ + exports.DirectionEnum = { + /** + * value: "received" + * @const + */ + "received": "received", + /** + * value: "send" + * @const + */ + "send": "send" }; + + + return exports; +})); + + diff --git a/src/model/ModelCase.js b/src/model/ModelCase.js new file mode 100644 index 0000000..d1103ee --- /dev/null +++ b/src/model/ModelCase.js @@ -0,0 +1,192 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/CaseAuditedInstitution', 'model/CaseMatrix', 'model/UserRef'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('./CaseAuditedInstitution'), require('./CaseMatrix'), require('./UserRef')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.ModelCase = factory(root.SmallEod.ApiClient, root.SmallEod.CaseAuditedInstitution, root.SmallEod.CaseMatrix, root.SmallEod.UserRef); + } +}(this, function(ApiClient, CaseAuditedInstitution, CaseMatrix, UserRef) { + 'use strict'; + + + + /** + * The ModelCase model module. + * @module model/ModelCase + * @version 1.0.0 + */ + + /** + * Constructs a new ModelCase. + * @alias module:model/ModelCase + * @class + * @param id {Number} + * @param name {String} Name of case + * @param createdOn {String} + * @param createdBy {String} User ID responsible for creating the content + * @param modifiedOn {String} + * @param modifiedBy {String} + */ + var exports = function(id, name, createdOn, createdBy, modifiedOn, modifiedBy) { + var _this = this; + + _this['id'] = id; + _this['name'] = name; + _this['createdOn'] = createdOn; + _this['createdBy'] = createdBy; + _this['modifiedOn'] = modifiedOn; + _this['modifiedBy'] = modifiedBy; + }; + + /** + * Constructs a ModelCase 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/ModelCase} obj Optional instance to populate. + * @return {module:model/ModelCase} The populated ModelCase instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'Number'); + } + if (data.hasOwnProperty('name')) { + obj['name'] = ApiClient.convertToType(data['name'], 'String'); + } + if (data.hasOwnProperty('comment')) { + obj['comment'] = ApiClient.convertToType(data['comment'], 'String'); + } + if (data.hasOwnProperty('tag')) { + obj['tag'] = ApiClient.convertToType(data['tag'], ['String']); + } + if (data.hasOwnProperty('auditedInstitution')) { + obj['auditedInstitution'] = ApiClient.convertToType(data['auditedInstitution'], [CaseAuditedInstitution]); + } + if (data.hasOwnProperty('responsibleUser')) { + obj['responsibleUser'] = ApiClient.convertToType(data['responsibleUser'], [UserRef]); + } + if (data.hasOwnProperty('notifiedUser')) { + obj['notifiedUser'] = ApiClient.convertToType(data['notifiedUser'], [UserRef]); + } + if (data.hasOwnProperty('matrix')) { + obj['matrix'] = ApiClient.convertToType(data['matrix'], [CaseMatrix]); + } + if (data.hasOwnProperty('letterCount')) { + obj['letterCount'] = ApiClient.convertToType(data['letterCount'], 'Number'); + } + if (data.hasOwnProperty('noteCount')) { + obj['noteCount'] = ApiClient.convertToType(data['noteCount'], 'Number'); + } + if (data.hasOwnProperty('createdOn')) { + obj['createdOn'] = ApiClient.convertToType(data['createdOn'], 'String'); + } + if (data.hasOwnProperty('createdBy')) { + obj['createdBy'] = ApiClient.convertToType(data['createdBy'], 'String'); + } + if (data.hasOwnProperty('modifiedOn')) { + obj['modifiedOn'] = ApiClient.convertToType(data['modifiedOn'], 'String'); + } + if (data.hasOwnProperty('modifiedBy')) { + obj['modifiedBy'] = ApiClient.convertToType(data['modifiedBy'], 'String'); + } + } + return obj; + } + + /** + * @member {Number} id + */ + exports.prototype['id'] = undefined; + /** + * Name of case + * @member {String} name + */ + exports.prototype['name'] = undefined; + /** + * Comment available for team + * @member {String} comment + */ + exports.prototype['comment'] = undefined; + /** + * List of tag which apply to case + * @member {Array.} tag + */ + exports.prototype['tag'] = undefined; + /** + * List of audited institution + * @member {Array.} auditedInstitution + */ + exports.prototype['auditedInstitution'] = undefined; + /** + * List of users responsible for the case + * @member {Array.} responsibleUser + */ + exports.prototype['responsibleUser'] = undefined; + /** + * List of users which receive notifications + * @member {Array.} notifiedUser + */ + exports.prototype['notifiedUser'] = undefined; + /** + * Structure to collect statistical information in relation to Dictionary + * @member {Array.} matrix + */ + exports.prototype['matrix'] = undefined; + /** + * Count of letter in case + * @member {Number} letterCount + */ + exports.prototype['letterCount'] = undefined; + /** + * Count of note in case + * @member {Number} noteCount + */ + exports.prototype['noteCount'] = undefined; + /** + * @member {String} createdOn + */ + exports.prototype['createdOn'] = undefined; + /** + * User ID responsible for creating the content + * @member {String} createdBy + */ + exports.prototype['createdBy'] = undefined; + /** + * @member {String} modifiedOn + */ + exports.prototype['modifiedOn'] = undefined; + /** + * @member {String} modifiedBy + */ + exports.prototype['modifiedBy'] = undefined; + + + + return exports; +})); + + diff --git a/src/model/Note.js b/src/model/Note.js new file mode 100644 index 0000000..b781c0f --- /dev/null +++ b/src/model/Note.js @@ -0,0 +1,134 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.Note = factory(root.SmallEod.ApiClient); + } +}(this, function(ApiClient) { + 'use strict'; + + + + /** + * The Note model module. + * @module model/Note + * @version 1.0.0 + */ + + /** + * Constructs a new Note. + * @alias module:model/Note + * @class + * @param id {String} + * @param comment {String} + * @param createdOn {String} + * @param createdBy {String} User ID responsible for creating the content + * @param modifiedOn {String} + * @param modifiedBy {String} + */ + var exports = function(id, comment, createdOn, createdBy, modifiedOn, modifiedBy) { + var _this = this; + + _this['id'] = id; + _this['comment'] = comment; + _this['createdOn'] = createdOn; + _this['createdBy'] = createdBy; + _this['modifiedOn'] = modifiedOn; + _this['modifiedBy'] = modifiedBy; + }; + + /** + * Constructs a Note 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/Note} obj Optional instance to populate. + * @return {module:model/Note} The populated Note instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'String'); + } + if (data.hasOwnProperty('case')) { + obj['case'] = ApiClient.convertToType(data['case'], 'String'); + } + if (data.hasOwnProperty('comment')) { + obj['comment'] = ApiClient.convertToType(data['comment'], 'String'); + } + if (data.hasOwnProperty('createdOn')) { + obj['createdOn'] = ApiClient.convertToType(data['createdOn'], 'String'); + } + if (data.hasOwnProperty('createdBy')) { + obj['createdBy'] = ApiClient.convertToType(data['createdBy'], 'String'); + } + if (data.hasOwnProperty('modifiedOn')) { + obj['modifiedOn'] = ApiClient.convertToType(data['modifiedOn'], 'String'); + } + if (data.hasOwnProperty('modifiedBy')) { + obj['modifiedBy'] = ApiClient.convertToType(data['modifiedBy'], 'String'); + } + } + return obj; + } + + /** + * @member {String} id + */ + exports.prototype['id'] = undefined; + /** + * @member {String} case + */ + exports.prototype['case'] = undefined; + /** + * @member {String} comment + */ + exports.prototype['comment'] = undefined; + /** + * @member {String} createdOn + */ + exports.prototype['createdOn'] = undefined; + /** + * User ID responsible for creating the content + * @member {String} createdBy + */ + exports.prototype['createdBy'] = undefined; + /** + * @member {String} modifiedOn + */ + exports.prototype['modifiedOn'] = undefined; + /** + * @member {String} modifiedBy + */ + exports.prototype['modifiedBy'] = undefined; + + + + return exports; +})); + + diff --git a/src/model/Session.js b/src/model/Session.js new file mode 100644 index 0000000..06fbaac --- /dev/null +++ b/src/model/Session.js @@ -0,0 +1,119 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.Session = factory(root.SmallEod.ApiClient); + } +}(this, function(ApiClient) { + 'use strict'; + + + + /** + * The Session model module. + * @module model/Session + * @version 1.0.0 + */ + + /** + * Constructs a new Session. + * @alias module:model/Session + * @class + * @param id {String} + * @param secret {String} Available via cookie on create + */ + var exports = function(id, secret) { + var _this = this; + + _this['id'] = id; + _this['secret'] = secret; + }; + + /** + * Constructs a Session 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/Session} obj Optional instance to populate. + * @return {module:model/Session} The populated Session instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'String'); + } + if (data.hasOwnProperty('user')) { + obj['user'] = ApiClient.convertToType(data['user'], 'String'); + } + if (data.hasOwnProperty('userAgent')) { + obj['userAgent'] = ApiClient.convertToType(data['userAgent'], 'String'); + } + if (data.hasOwnProperty('createdOn')) { + obj['createdOn'] = ApiClient.convertToType(data['createdOn'], 'Date'); + } + if (data.hasOwnProperty('validUntil')) { + obj['validUntil'] = ApiClient.convertToType(data['validUntil'], 'Date'); + } + if (data.hasOwnProperty('secret')) { + obj['secret'] = ApiClient.convertToType(data['secret'], 'String'); + } + } + return obj; + } + + /** + * @member {String} id + */ + exports.prototype['id'] = undefined; + /** + * @member {String} user + */ + exports.prototype['user'] = undefined; + /** + * @member {String} userAgent + */ + exports.prototype['userAgent'] = undefined; + /** + * @member {Date} createdOn + */ + exports.prototype['createdOn'] = undefined; + /** + * @member {Date} validUntil + */ + exports.prototype['validUntil'] = undefined; + /** + * Available via cookie on create + * @member {String} secret + */ + exports.prototype['secret'] = undefined; + + + + return exports; +})); + + diff --git a/src/model/TagNamespace.js b/src/model/TagNamespace.js new file mode 100644 index 0000000..3e3e342 --- /dev/null +++ b/src/model/TagNamespace.js @@ -0,0 +1,134 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.TagNamespace = factory(root.SmallEod.ApiClient); + } +}(this, function(ApiClient) { + 'use strict'; + + + + /** + * The TagNamespace model module. + * @module model/TagNamespace + * @version 1.0.0 + */ + + /** + * Constructs a new TagNamespace. + * @alias module:model/TagNamespace + * @class + * @param id {String} + * @param description {String} + * @param createdOn {String} + * @param createdBy {String} User ID responsible for creating the content + * @param modifiedOn {String} + * @param modifiedBy {String} + */ + var exports = function(id, description, createdOn, createdBy, modifiedOn, modifiedBy) { + var _this = this; + + _this['id'] = id; + _this['description'] = description; + _this['createdOn'] = createdOn; + _this['createdBy'] = createdBy; + _this['modifiedOn'] = modifiedOn; + _this['modifiedBy'] = modifiedBy; + }; + + /** + * Constructs a TagNamespace 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/TagNamespace} obj Optional instance to populate. + * @return {module:model/TagNamespace} The populated TagNamespace instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'String'); + } + if (data.hasOwnProperty('description')) { + obj['description'] = ApiClient.convertToType(data['description'], 'String'); + } + if (data.hasOwnProperty('color')) { + obj['color'] = ApiClient.convertToType(data['color'], 'String'); + } + if (data.hasOwnProperty('createdOn')) { + obj['createdOn'] = ApiClient.convertToType(data['createdOn'], 'String'); + } + if (data.hasOwnProperty('createdBy')) { + obj['createdBy'] = ApiClient.convertToType(data['createdBy'], 'String'); + } + if (data.hasOwnProperty('modifiedOn')) { + obj['modifiedOn'] = ApiClient.convertToType(data['modifiedOn'], 'String'); + } + if (data.hasOwnProperty('modifiedBy')) { + obj['modifiedBy'] = ApiClient.convertToType(data['modifiedBy'], 'String'); + } + } + return obj; + } + + /** + * @member {String} id + */ + exports.prototype['id'] = undefined; + /** + * @member {String} description + */ + exports.prototype['description'] = undefined; + /** + * @member {String} color + */ + exports.prototype['color'] = undefined; + /** + * @member {String} createdOn + */ + exports.prototype['createdOn'] = undefined; + /** + * User ID responsible for creating the content + * @member {String} createdBy + */ + exports.prototype['createdBy'] = undefined; + /** + * @member {String} modifiedOn + */ + exports.prototype['modifiedOn'] = undefined; + /** + * @member {String} modifiedBy + */ + exports.prototype['modifiedBy'] = undefined; + + + + return exports; +})); + + diff --git a/src/model/User.js b/src/model/User.js new file mode 100644 index 0000000..696b8d3 --- /dev/null +++ b/src/model/User.js @@ -0,0 +1,124 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.User = factory(root.SmallEod.ApiClient); + } +}(this, function(ApiClient) { + 'use strict'; + + + + /** + * The User model module. + * @module model/User + * @version 1.0.0 + */ + + /** + * Constructs a new User. + * @alias module:model/User + * @class + * @param id {String} + * @param firstName {String} + * @param secondName {String} + * @param email {String} + * @param permission {Array.} + */ + var exports = function(id, firstName, secondName, email, permission) { + var _this = this; + + _this['id'] = id; + _this['first_name'] = firstName; + _this['second_name'] = secondName; + _this['email'] = email; + _this['permission'] = permission; + }; + + /** + * Constructs a User 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/User} obj Optional instance to populate. + * @return {module:model/User} The populated User instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'String'); + } + if (data.hasOwnProperty('first_name')) { + obj['first_name'] = ApiClient.convertToType(data['first_name'], 'String'); + } + if (data.hasOwnProperty('second_name')) { + obj['second_name'] = ApiClient.convertToType(data['second_name'], 'String'); + } + if (data.hasOwnProperty('email')) { + obj['email'] = ApiClient.convertToType(data['email'], 'String'); + } + if (data.hasOwnProperty('password')) { + obj['password'] = ApiClient.convertToType(data['password'], 'String'); + } + if (data.hasOwnProperty('permission')) { + obj['permission'] = ApiClient.convertToType(data['permission'], ['String']); + } + } + return obj; + } + + /** + * @member {String} id + */ + exports.prototype['id'] = undefined; + /** + * @member {String} first_name + */ + exports.prototype['first_name'] = undefined; + /** + * @member {String} second_name + */ + exports.prototype['second_name'] = undefined; + /** + * @member {String} email + */ + exports.prototype['email'] = undefined; + /** + * @member {String} password + */ + exports.prototype['password'] = undefined; + /** + * @member {Array.} permission + */ + exports.prototype['permission'] = undefined; + + + + return exports; +})); + + diff --git a/src/model/UserRef.js b/src/model/UserRef.js new file mode 100644 index 0000000..3b7806a --- /dev/null +++ b/src/model/UserRef.js @@ -0,0 +1,90 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.UserRef = factory(root.SmallEod.ApiClient); + } +}(this, function(ApiClient) { + 'use strict'; + + + + /** + * The UserRef model module. + * @module model/UserRef + * @version 1.0.0 + */ + + /** + * Constructs a new UserRef. + * @alias module:model/UserRef + * @class + * @param id {String} + * @param user {Number} + */ + var exports = function(id, user) { + var _this = this; + + _this['id'] = id; + _this['user'] = user; + }; + + /** + * Constructs a UserRef 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/UserRef} obj Optional instance to populate. + * @return {module:model/UserRef} The populated UserRef instance. + */ + exports.constructFromObject = function(data, obj) { + if (data) { + obj = obj || new exports(); + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'String'); + } + if (data.hasOwnProperty('user')) { + obj['user'] = ApiClient.convertToType(data['user'], 'Number'); + } + } + return obj; + } + + /** + * @member {String} id + */ + exports.prototype['id'] = undefined; + /** + * @member {Number} user + */ + exports.prototype['user'] = undefined; + + + + return exports; +})); + + diff --git a/src/small_eod/AdministrativeUnitApi.js b/src/small_eod/AdministrativeUnitApi.js new file mode 100644 index 0000000..3b7dba4 --- /dev/null +++ b/src/small_eod/AdministrativeUnitApi.js @@ -0,0 +1,246 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/AdministrativeUnit', 'model/Error'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/AdministrativeUnit'), require('../model/Error')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.AdministrativeUnitApi = factory(root.SmallEod.ApiClient, root.SmallEod.AdministrativeUnit, root.SmallEod.Error); + } +}(this, function(ApiClient, AdministrativeUnit, Error) { + 'use strict'; + + /** + * AdministrativeUnit service. + * @module small_eod/AdministrativeUnitApi + * @version 1.0.0 + */ + + /** + * Constructs a new AdministrativeUnitApi. + * @alias module:small_eod/AdministrativeUnitApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a administrative unit + * @param {module:model/AdministrativeUnit} administrativeUnit New administrative unit + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/AdministrativeUnit} and HTTP response + */ + this.createAdministrativeUnitWithHttpInfo = function(administrativeUnit) { + var postBody = administrativeUnit; + // verify the required parameter 'administrativeUnit' is set + if (administrativeUnit === undefined || administrativeUnit === null) { + throw new Error("Missing the required parameter 'administrativeUnit' when calling createAdministrativeUnit"); + } + + var pathParams = { + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = AdministrativeUnit; + return this.apiClient.callApi( + '/administrativeUnit', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a administrative unit + * @param {module:model/AdministrativeUnit} administrativeUnit New administrative unit + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AdministrativeUnit} + */ + this.createAdministrativeUnit = function(administrativeUnit) { + return this.createAdministrativeUnitWithHttpInfo(administrativeUnit) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Deletes a single administrative unit based on the ID supplied + * @param {Number} administrativeUnitId The id of the administrativeUnit to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + this.deleteAdministrativeUnitWithHttpInfo = function(administrativeUnitId) { + var postBody = null; + // verify the required parameter 'administrativeUnitId' is set + if (administrativeUnitId === undefined || administrativeUnitId === null) { + throw new Error("Missing the required parameter 'administrativeUnitId' when calling deleteAdministrativeUnit"); + } + + var pathParams = { + 'administrativeUnitId': administrativeUnitId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = null; + return this.apiClient.callApi( + '/administrativeUnit/{administrativeUnitId}', 'DELETE', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Deletes a single administrative unit based on the ID supplied + * @param {Number} administrativeUnitId The id of the administrativeUnit to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.deleteAdministrativeUnit = function(administrativeUnitId) { + return this.deleteAdministrativeUnitWithHttpInfo(administrativeUnitId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * List all administrative units + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response + */ + this.listAdministrativeUnitWithHttpInfo = function(opts) { + opts = opts || {}; + var postBody = null; + + var pathParams = { + }; + var queryParams = { + 'limit': opts['limit'], + 'offset': opts['offset'], + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = [AdministrativeUnit]; + return this.apiClient.callApi( + '/administrativeUnit', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * List all administrative units + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} + */ + this.listAdministrativeUnit = function(opts) { + return this.listAdministrativeUnitWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Info for a specific administrative unit + * @param {Number} administrativeUnitId The id of the administrative unit to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/AdministrativeUnit} and HTTP response + */ + this.showAdministrativeUnitByIdWithHttpInfo = function(administrativeUnitId) { + var postBody = null; + // verify the required parameter 'administrativeUnitId' is set + if (administrativeUnitId === undefined || administrativeUnitId === null) { + throw new Error("Missing the required parameter 'administrativeUnitId' when calling showAdministrativeUnitById"); + } + + var pathParams = { + 'administrativeUnitId': administrativeUnitId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = AdministrativeUnit; + return this.apiClient.callApi( + '/administrativeUnit/{administrativeUnitId}', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Info for a specific administrative unit + * @param {Number} administrativeUnitId The id of the administrative unit to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AdministrativeUnit} + */ + this.showAdministrativeUnitById = function(administrativeUnitId) { + return this.showAdministrativeUnitByIdWithHttpInfo(administrativeUnitId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/src/small_eod/CaseApi.js b/src/small_eod/CaseApi.js new file mode 100644 index 0000000..039c54d --- /dev/null +++ b/src/small_eod/CaseApi.js @@ -0,0 +1,303 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Error', 'model/ModelCase'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/Error'), require('../model/ModelCase')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.CaseApi = factory(root.SmallEod.ApiClient, root.SmallEod.Error, root.SmallEod.ModelCase); + } +}(this, function(ApiClient, Error, ModelCase) { + 'use strict'; + + /** + * Case service. + * @module small_eod/CaseApi + * @version 1.0.0 + */ + + /** + * Constructs a new CaseApi. + * @alias module:small_eod/CaseApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a case + * @param {module:model/ModelCase} modelCase New case + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ModelCase} and HTTP response + */ + this.createCaseWithHttpInfo = function(modelCase) { + var postBody = modelCase; + // verify the required parameter 'modelCase' is set + if (modelCase === undefined || modelCase === null) { + throw new Error("Missing the required parameter 'modelCase' when calling createCase"); + } + + var pathParams = { + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = ModelCase; + return this.apiClient.callApi( + '/case', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a case + * @param {module:model/ModelCase} modelCase New case + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ModelCase} + */ + this.createCase = function(modelCase) { + return this.createCaseWithHttpInfo(modelCase) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Deletes a single case based on the ID supplied + * @param {Number} caseId The id of the case to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + this.deleteCaseWithHttpInfo = function(caseId) { + var postBody = null; + // verify the required parameter 'caseId' is set + if (caseId === undefined || caseId === null) { + throw new Error("Missing the required parameter 'caseId' when calling deleteCase"); + } + + var pathParams = { + 'caseId': caseId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = null; + return this.apiClient.callApi( + '/case/{caseId}', 'DELETE', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Deletes a single case based on the ID supplied + * @param {Number} caseId The id of the case to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.deleteCase = function(caseId) { + return this.deleteCaseWithHttpInfo(caseId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * List all cases + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @param {Number} opts.institution Institution ID or NULL + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response + */ + this.listCaseWithHttpInfo = function(opts) { + opts = opts || {}; + var postBody = null; + + var pathParams = { + }; + var queryParams = { + 'limit': opts['limit'], + 'offset': opts['offset'], + 'institution': opts['institution'], + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = [ModelCase]; + return this.apiClient.callApi( + '/case', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * List all cases + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @param {Number} opts.institution Institution ID or NULL + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} + */ + this.listCase = function(opts) { + return this.listCaseWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Info for a specific case + * @param {Number} caseId The id of the case to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ModelCase} and HTTP response + */ + this.showCaseByIdWithHttpInfo = function(caseId) { + var postBody = null; + // verify the required parameter 'caseId' is set + if (caseId === undefined || caseId === null) { + throw new Error("Missing the required parameter 'caseId' when calling showCaseById"); + } + + var pathParams = { + 'caseId': caseId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = ModelCase; + return this.apiClient.callApi( + '/case/{caseId}', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Info for a specific case + * @param {Number} caseId The id of the case to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ModelCase} + */ + this.showCaseById = function(caseId) { + return this.showCaseByIdWithHttpInfo(caseId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Updated case + * @param {Number} caseId The id of the case to modify + * @param {module:model/ModelCase} modelCase Updated case + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ModelCase} and HTTP response + */ + this.updateCaseByIdWithHttpInfo = function(caseId, modelCase) { + var postBody = modelCase; + // verify the required parameter 'caseId' is set + if (caseId === undefined || caseId === null) { + throw new Error("Missing the required parameter 'caseId' when calling updateCaseById"); + } + // verify the required parameter 'modelCase' is set + if (modelCase === undefined || modelCase === null) { + throw new Error("Missing the required parameter 'modelCase' when calling updateCaseById"); + } + + var pathParams = { + 'caseId': caseId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = ModelCase; + return this.apiClient.callApi( + '/case/{caseId}', 'PATCH', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Updated case + * @param {Number} caseId The id of the case to modify + * @param {module:model/ModelCase} modelCase Updated case + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ModelCase} + */ + this.updateCaseById = function(caseId, modelCase) { + return this.updateCaseByIdWithHttpInfo(caseId, modelCase) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/src/small_eod/CollectionApi.js b/src/small_eod/CollectionApi.js new file mode 100644 index 0000000..7202149 --- /dev/null +++ b/src/small_eod/CollectionApi.js @@ -0,0 +1,516 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Collection', 'model/Error', 'model/Event', 'model/Letter', 'model/ModelCase'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/Collection'), require('../model/Error'), require('../model/Event'), require('../model/Letter'), require('../model/ModelCase')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.CollectionApi = factory(root.SmallEod.ApiClient, root.SmallEod.Collection, root.SmallEod.Error, root.SmallEod.Event, root.SmallEod.Letter, root.SmallEod.ModelCase); + } +}(this, function(ApiClient, Collection, Error, Event, Letter, ModelCase) { + 'use strict'; + + /** + * Collection service. + * @module small_eod/CollectionApi + * @version 1.0.0 + */ + + /** + * Constructs a new CollectionApi. + * @alias module:small_eod/CollectionApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a collection + * @param {module:model/Collection} collection New collection + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Collection} and HTTP response + */ + this.createCollectionWithHttpInfo = function(collection) { + var postBody = collection; + // verify the required parameter 'collection' is set + if (collection === undefined || collection === null) { + throw new Error("Missing the required parameter 'collection' when calling createCollection"); + } + + var pathParams = { + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = Collection; + return this.apiClient.callApi( + '/collection', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a collection + * @param {module:model/Collection} collection New collection + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Collection} + */ + this.createCollection = function(collection) { + return this.createCollectionWithHttpInfo(collection) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Deletes a single collection based on the ID supplied + * @param {Number} collectionId The id of the collection to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + this.deleteCollectionWithHttpInfo = function(collectionId) { + var postBody = null; + // verify the required parameter 'collectionId' is set + if (collectionId === undefined || collectionId === null) { + throw new Error("Missing the required parameter 'collectionId' when calling deleteCollection"); + } + + var pathParams = { + 'collectionId': collectionId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = null; + return this.apiClient.callApi( + '/collection/{collectionId}', 'DELETE', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Deletes a single collection based on the ID supplied + * @param {Number} collectionId The id of the collection to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.deleteCollection = function(collectionId) { + return this.deleteCollectionWithHttpInfo(collectionId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * List all collections + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @param {Number} opts._case Case ID + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response + */ + this.listCollectionWithHttpInfo = function(opts) { + opts = opts || {}; + var postBody = null; + + var pathParams = { + }; + var queryParams = { + 'limit': opts['limit'], + 'offset': opts['offset'], + 'case': opts['_case'], + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = [Collection]; + return this.apiClient.callApi( + '/collection', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * List all collections + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @param {Number} opts._case Case ID + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} + */ + this.listCollection = function(opts) { + return this.listCollectionWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Cases match query for a specific collection + * @param {Number} collectionId The id of the collection to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ModelCase} and HTTP response + */ + this.showCaseByCollectionWithHttpInfo = function(collectionId) { + var postBody = null; + // verify the required parameter 'collectionId' is set + if (collectionId === undefined || collectionId === null) { + throw new Error("Missing the required parameter 'collectionId' when calling showCaseByCollection"); + } + + var pathParams = { + 'collectionId': collectionId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['bearerAuth', 'sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = ModelCase; + return this.apiClient.callApi( + '/collection/{collectionId}/case', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Cases match query for a specific collection + * @param {Number} collectionId The id of the collection to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ModelCase} + */ + this.showCaseByCollection = function(collectionId) { + return this.showCaseByCollectionWithHttpInfo(collectionId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Info for a specific collection + * @param {Number} collectionId The id of the collection to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Collection} and HTTP response + */ + this.showCollectionByIdWithHttpInfo = function(collectionId) { + var postBody = null; + // verify the required parameter 'collectionId' is set + if (collectionId === undefined || collectionId === null) { + throw new Error("Missing the required parameter 'collectionId' when calling showCollectionById"); + } + + var pathParams = { + 'collectionId': collectionId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['bearerAuth', 'sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = Collection; + return this.apiClient.callApi( + '/collection/{collectionId}', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Info for a specific collection + * @param {Number} collectionId The id of the collection to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Collection} + */ + this.showCollectionById = function(collectionId) { + return this.showCollectionByIdWithHttpInfo(collectionId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Events of case match query for a specific collection + * @param {Number} collectionId The id of the collection to retrieve + * @param {Number} caseId The id of the collection to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Event} and HTTP response + */ + this.showEventCaseByCollectionWithHttpInfo = function(collectionId, caseId) { + var postBody = null; + // verify the required parameter 'collectionId' is set + if (collectionId === undefined || collectionId === null) { + throw new Error("Missing the required parameter 'collectionId' when calling showEventCaseByCollection"); + } + // verify the required parameter 'caseId' is set + if (caseId === undefined || caseId === null) { + throw new Error("Missing the required parameter 'caseId' when calling showEventCaseByCollection"); + } + + var pathParams = { + 'collectionId': collectionId, + 'caseId': caseId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['bearerAuth', 'sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = Event; + return this.apiClient.callApi( + '/collection/{collectionId}/case/{caseId}/event', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Events of case match query for a specific collection + * @param {Number} collectionId The id of the collection to retrieve + * @param {Number} caseId The id of the collection to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Event} + */ + this.showEventCaseByCollection = function(collectionId, caseId) { + return this.showEventCaseByCollectionWithHttpInfo(collectionId, caseId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Letters of cases match query for a specific collection + * @param {Number} collectionId The id of the collection to retrieve + * @param {Number} caseId The id of the collection to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Letter} and HTTP response + */ + this.showLetterCaseByCollectionWithHttpInfo = function(collectionId, caseId) { + var postBody = null; + // verify the required parameter 'collectionId' is set + if (collectionId === undefined || collectionId === null) { + throw new Error("Missing the required parameter 'collectionId' when calling showLetterCaseByCollection"); + } + // verify the required parameter 'caseId' is set + if (caseId === undefined || caseId === null) { + throw new Error("Missing the required parameter 'caseId' when calling showLetterCaseByCollection"); + } + + var pathParams = { + 'collectionId': collectionId, + 'caseId': caseId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['bearerAuth', 'sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = Letter; + return this.apiClient.callApi( + '/collection/{collectionId}/case/{caseId}/letter', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Letters of cases match query for a specific collection + * @param {Number} collectionId The id of the collection to retrieve + * @param {Number} caseId The id of the collection to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Letter} + */ + this.showLetterCaseByCollection = function(collectionId, caseId) { + return this.showLetterCaseByCollectionWithHttpInfo(collectionId, caseId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Notes of case match query for a specific collection + * @param {Number} collectionId The id of the collection to retrieve + * @param {Number} caseId The id of the collection to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Letter} and HTTP response + */ + this.showNoteCaseByCollectionWithHttpInfo = function(collectionId, caseId) { + var postBody = null; + // verify the required parameter 'collectionId' is set + if (collectionId === undefined || collectionId === null) { + throw new Error("Missing the required parameter 'collectionId' when calling showNoteCaseByCollection"); + } + // verify the required parameter 'caseId' is set + if (caseId === undefined || caseId === null) { + throw new Error("Missing the required parameter 'caseId' when calling showNoteCaseByCollection"); + } + + var pathParams = { + 'collectionId': collectionId, + 'caseId': caseId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['bearerAuth', 'sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = Letter; + return this.apiClient.callApi( + '/collection/{collectionId}/case/{caseId}/note', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Notes of case match query for a specific collection + * @param {Number} collectionId The id of the collection to retrieve + * @param {Number} caseId The id of the collection to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Letter} + */ + this.showNoteCaseByCollection = function(collectionId, caseId) { + return this.showNoteCaseByCollectionWithHttpInfo(collectionId, caseId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Updated collection + * @param {Number} collectionId The id of the collection to modify + * @param {module:model/Collection} collection Updated collection + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Collection} and HTTP response + */ + this.updateCollectionByIdWithHttpInfo = function(collectionId, collection) { + var postBody = collection; + // verify the required parameter 'collectionId' is set + if (collectionId === undefined || collectionId === null) { + throw new Error("Missing the required parameter 'collectionId' when calling updateCollectionById"); + } + // verify the required parameter 'collection' is set + if (collection === undefined || collection === null) { + throw new Error("Missing the required parameter 'collection' when calling updateCollectionById"); + } + + var pathParams = { + 'collectionId': collectionId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = Collection; + return this.apiClient.callApi( + '/collection/{collectionId}', 'PATCH', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Updated collection + * @param {Number} collectionId The id of the collection to modify + * @param {module:model/Collection} collection Updated collection + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Collection} + */ + this.updateCollectionById = function(collectionId, collection) { + return this.updateCollectionByIdWithHttpInfo(collectionId, collection) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/src/small_eod/DescriptionApi.js b/src/small_eod/DescriptionApi.js new file mode 100644 index 0000000..8045322 --- /dev/null +++ b/src/small_eod/DescriptionApi.js @@ -0,0 +1,246 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Description', 'model/Error'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/Description'), require('../model/Error')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.DescriptionApi = factory(root.SmallEod.ApiClient, root.SmallEod.Description, root.SmallEod.Error); + } +}(this, function(ApiClient, Description, Error) { + 'use strict'; + + /** + * Description service. + * @module small_eod/DescriptionApi + * @version 1.0.0 + */ + + /** + * Constructs a new DescriptionApi. + * @alias module:small_eod/DescriptionApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a description + * @param {module:model/Description} description New description + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Description} and HTTP response + */ + this.createDescriptionWithHttpInfo = function(description) { + var postBody = description; + // verify the required parameter 'description' is set + if (description === undefined || description === null) { + throw new Error("Missing the required parameter 'description' when calling createDescription"); + } + + var pathParams = { + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = Description; + return this.apiClient.callApi( + '/description', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a description + * @param {module:model/Description} description New description + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Description} + */ + this.createDescription = function(description) { + return this.createDescriptionWithHttpInfo(description) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Deletes a single description based on the ID supplied + * @param {Number} descriptionId The id of the description to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + this.deleteDescriptionWithHttpInfo = function(descriptionId) { + var postBody = null; + // verify the required parameter 'descriptionId' is set + if (descriptionId === undefined || descriptionId === null) { + throw new Error("Missing the required parameter 'descriptionId' when calling deleteDescription"); + } + + var pathParams = { + 'descriptionId': descriptionId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = null; + return this.apiClient.callApi( + '/description/{descriptionId}', 'DELETE', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Deletes a single description based on the ID supplied + * @param {Number} descriptionId The id of the description to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.deleteDescription = function(descriptionId) { + return this.deleteDescriptionWithHttpInfo(descriptionId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * List all descriptions + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response + */ + this.listDescriptionWithHttpInfo = function(opts) { + opts = opts || {}; + var postBody = null; + + var pathParams = { + }; + var queryParams = { + 'limit': opts['limit'], + 'offset': opts['offset'], + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = [Description]; + return this.apiClient.callApi( + '/description', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * List all descriptions + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} + */ + this.listDescription = function(opts) { + return this.listDescriptionWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Info for a specific description + * @param {Number} descriptionId The id of the description to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Description} and HTTP response + */ + this.showDescriptionByIdWithHttpInfo = function(descriptionId) { + var postBody = null; + // verify the required parameter 'descriptionId' is set + if (descriptionId === undefined || descriptionId === null) { + throw new Error("Missing the required parameter 'descriptionId' when calling showDescriptionById"); + } + + var pathParams = { + 'descriptionId': descriptionId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = Description; + return this.apiClient.callApi( + '/description/{descriptionId}', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Info for a specific description + * @param {Number} descriptionId The id of the description to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Description} + */ + this.showDescriptionById = function(descriptionId) { + return this.showDescriptionByIdWithHttpInfo(descriptionId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/src/small_eod/DictionaryApi.js b/src/small_eod/DictionaryApi.js new file mode 100644 index 0000000..6525969 --- /dev/null +++ b/src/small_eod/DictionaryApi.js @@ -0,0 +1,246 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Dictionary', 'model/Error'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/Dictionary'), require('../model/Error')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.DictionaryApi = factory(root.SmallEod.ApiClient, root.SmallEod.Dictionary, root.SmallEod.Error); + } +}(this, function(ApiClient, Dictionary, Error) { + 'use strict'; + + /** + * Dictionary service. + * @module small_eod/DictionaryApi + * @version 1.0.0 + */ + + /** + * Constructs a new DictionaryApi. + * @alias module:small_eod/DictionaryApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a dictionary + * @param {module:model/Dictionary} dictionary New dictionary + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Dictionary} and HTTP response + */ + this.createDictionaryWithHttpInfo = function(dictionary) { + var postBody = dictionary; + // verify the required parameter 'dictionary' is set + if (dictionary === undefined || dictionary === null) { + throw new Error("Missing the required parameter 'dictionary' when calling createDictionary"); + } + + var pathParams = { + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = Dictionary; + return this.apiClient.callApi( + '/dictionary', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a dictionary + * @param {module:model/Dictionary} dictionary New dictionary + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Dictionary} + */ + this.createDictionary = function(dictionary) { + return this.createDictionaryWithHttpInfo(dictionary) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Deletes a single dictionary based on the ID supplied + * @param {Number} dictionaryId The id of the dictionary to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + this.deleteDictionaryWithHttpInfo = function(dictionaryId) { + var postBody = null; + // verify the required parameter 'dictionaryId' is set + if (dictionaryId === undefined || dictionaryId === null) { + throw new Error("Missing the required parameter 'dictionaryId' when calling deleteDictionary"); + } + + var pathParams = { + 'dictionaryId': dictionaryId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = null; + return this.apiClient.callApi( + '/dictionary/{dictionaryId}', 'DELETE', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Deletes a single dictionary based on the ID supplied + * @param {Number} dictionaryId The id of the dictionary to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.deleteDictionary = function(dictionaryId) { + return this.deleteDictionaryWithHttpInfo(dictionaryId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * List all dictionaries + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response + */ + this.listDictionaryWithHttpInfo = function(opts) { + opts = opts || {}; + var postBody = null; + + var pathParams = { + }; + var queryParams = { + 'limit': opts['limit'], + 'offset': opts['offset'], + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = [Dictionary]; + return this.apiClient.callApi( + '/dictionary', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * List all dictionaries + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} + */ + this.listDictionary = function(opts) { + return this.listDictionaryWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Info for a specific dictionary + * @param {Number} dictionaryId The id of the dictionary to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Dictionary} and HTTP response + */ + this.showDictionaryByIdWithHttpInfo = function(dictionaryId) { + var postBody = null; + // verify the required parameter 'dictionaryId' is set + if (dictionaryId === undefined || dictionaryId === null) { + throw new Error("Missing the required parameter 'dictionaryId' when calling showDictionaryById"); + } + + var pathParams = { + 'dictionaryId': dictionaryId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = Dictionary; + return this.apiClient.callApi( + '/dictionary/{dictionaryId}', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Info for a specific dictionary + * @param {Number} dictionaryId The id of the dictionary to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Dictionary} + */ + this.showDictionaryById = function(dictionaryId) { + return this.showDictionaryByIdWithHttpInfo(dictionaryId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/src/small_eod/EventApi.js b/src/small_eod/EventApi.js new file mode 100644 index 0000000..283647c --- /dev/null +++ b/src/small_eod/EventApi.js @@ -0,0 +1,249 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Error', 'model/Event'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/Error'), require('../model/Event')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.EventApi = factory(root.SmallEod.ApiClient, root.SmallEod.Error, root.SmallEod.Event); + } +}(this, function(ApiClient, Error, Event) { + 'use strict'; + + /** + * Event service. + * @module small_eod/EventApi + * @version 1.0.0 + */ + + /** + * Constructs a new EventApi. + * @alias module:small_eod/EventApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a event + * @param {module:model/Event} event New event + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Event} and HTTP response + */ + this.createEventWithHttpInfo = function(event) { + var postBody = event; + // verify the required parameter 'event' is set + if (event === undefined || event === null) { + throw new Error("Missing the required parameter 'event' when calling createEvent"); + } + + var pathParams = { + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = Event; + return this.apiClient.callApi( + '/event', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a event + * @param {module:model/Event} event New event + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Event} + */ + this.createEvent = function(event) { + return this.createEventWithHttpInfo(event) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Deletes a single event based on the ID supplied + * @param {Number} eventId The id of the event to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + this.deleteEventWithHttpInfo = function(eventId) { + var postBody = null; + // verify the required parameter 'eventId' is set + if (eventId === undefined || eventId === null) { + throw new Error("Missing the required parameter 'eventId' when calling deleteEvent"); + } + + var pathParams = { + 'eventId': eventId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = null; + return this.apiClient.callApi( + '/event/{eventId}', 'DELETE', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Deletes a single event based on the ID supplied + * @param {Number} eventId The id of the event to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.deleteEvent = function(eventId) { + return this.deleteEventWithHttpInfo(eventId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * List all events of case + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @param {Number} opts._case Case ID + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response + */ + this.listEventWithHttpInfo = function(opts) { + opts = opts || {}; + var postBody = null; + + var pathParams = { + }; + var queryParams = { + 'limit': opts['limit'], + 'offset': opts['offset'], + 'case': opts['_case'], + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = [Event]; + return this.apiClient.callApi( + '/event', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * List all events of case + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @param {Number} opts._case Case ID + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} + */ + this.listEvent = function(opts) { + return this.listEventWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Info for a specific event + * @param {Number} eventId The id of the event to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Event} and HTTP response + */ + this.showEventByIdWithHttpInfo = function(eventId) { + var postBody = null; + // verify the required parameter 'eventId' is set + if (eventId === undefined || eventId === null) { + throw new Error("Missing the required parameter 'eventId' when calling showEventById"); + } + + var pathParams = { + 'eventId': eventId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = Event; + return this.apiClient.callApi( + '/event/{eventId}', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Info for a specific event + * @param {Number} eventId The id of the event to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Event} + */ + this.showEventById = function(eventId) { + return this.showEventByIdWithHttpInfo(eventId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/src/small_eod/FileApi.js b/src/small_eod/FileApi.js new file mode 100644 index 0000000..a661f7b --- /dev/null +++ b/src/small_eod/FileApi.js @@ -0,0 +1,209 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Error', 'model/FileSigner', 'model/Letter'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/Error'), require('../model/FileSigner'), require('../model/Letter')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.FileApi = factory(root.SmallEod.ApiClient, root.SmallEod.Error, root.SmallEod.FileSigner, root.SmallEod.Letter); + } +}(this, function(ApiClient, Error, FileSigner, Letter) { + 'use strict'; + + /** + * File service. + * @module small_eod/FileApi + * @version 1.0.0 + */ + + /** + * Constructs a new FileApi. + * @alias module:small_eod/FileApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a file + * @param {Number} letterId The id of the letter to retrieve + * @param {File} file New file + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link File} and HTTP response + */ + this.createFileWithHttpInfo = function(letterId, file) { + var postBody = file; + // verify the required parameter 'letterId' is set + if (letterId === undefined || letterId === null) { + throw new Error("Missing the required parameter 'letterId' when calling createFile"); + } + // verify the required parameter 'file' is set + if (file === undefined || file === null) { + throw new Error("Missing the required parameter 'file' when calling createFile"); + } + + var pathParams = { + 'letterId': letterId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = File; + return this.apiClient.callApi( + '/letter/{letterId}/file', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a file + * @param {Number} letterId The id of the letter to retrieve + * @param {File} file New file + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link File} + */ + this.createFile = function(letterId, file) { + return this.createFileWithHttpInfo(letterId, file) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Create a pre-signed URLs for file + * @param {module:model/FileSigner} fileSigner New file signature request + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/FileSigner} and HTTP response + */ + this.createPreSignedUrlWithHttpInfo = function(fileSigner) { + var postBody = fileSigner; + // verify the required parameter 'fileSigner' is set + if (fileSigner === undefined || fileSigner === null) { + throw new Error("Missing the required parameter 'fileSigner' when calling createPreSignedUrl"); + } + + var pathParams = { + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = FileSigner; + return this.apiClient.callApi( + '/letter/file/sign', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a pre-signed URLs for file + * @param {module:model/FileSigner} fileSigner New file signature request + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/FileSigner} + */ + this.createPreSignedUrl = function(fileSigner) { + return this.createPreSignedUrlWithHttpInfo(fileSigner) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Info for a specific file + * @param {Number} letterId The id of the letter of file + * @param {Number} fileId The id of the file to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Letter} and HTTP response + */ + this.showFileByLetterIdWithHttpInfo = function(letterId, fileId) { + var postBody = null; + // verify the required parameter 'letterId' is set + if (letterId === undefined || letterId === null) { + throw new Error("Missing the required parameter 'letterId' when calling showFileByLetterId"); + } + // verify the required parameter 'fileId' is set + if (fileId === undefined || fileId === null) { + throw new Error("Missing the required parameter 'fileId' when calling showFileByLetterId"); + } + + var pathParams = { + 'letterId': letterId, + 'fileId': fileId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = Letter; + return this.apiClient.callApi( + '/letter/{letterId}/file/{fileId}', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Info for a specific file + * @param {Number} letterId The id of the letter of file + * @param {Number} fileId The id of the file to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Letter} + */ + this.showFileByLetterId = function(letterId, fileId) { + return this.showFileByLetterIdWithHttpInfo(letterId, fileId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/src/small_eod/InstitutionApi.js b/src/small_eod/InstitutionApi.js new file mode 100644 index 0000000..77e554a --- /dev/null +++ b/src/small_eod/InstitutionApi.js @@ -0,0 +1,150 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Error', 'model/Institution'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/Error'), require('../model/Institution')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.InstitutionApi = factory(root.SmallEod.ApiClient, root.SmallEod.Error, root.SmallEod.Institution); + } +}(this, function(ApiClient, Error, Institution) { + 'use strict'; + + /** + * Institution service. + * @module small_eod/InstitutionApi + * @version 1.0.0 + */ + + /** + * Constructs a new InstitutionApi. + * @alias module:small_eod/InstitutionApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a institution + * @param {module:model/Institution} institution New institution + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Institution} and HTTP response + */ + this.createInstitutionWithHttpInfo = function(institution) { + var postBody = institution; + // verify the required parameter 'institution' is set + if (institution === undefined || institution === null) { + throw new Error("Missing the required parameter 'institution' when calling createInstitution"); + } + + var pathParams = { + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = Institution; + return this.apiClient.callApi( + '/institution', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a institution + * @param {module:model/Institution} institution New institution + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Institution} + */ + this.createInstitution = function(institution) { + return this.createInstitutionWithHttpInfo(institution) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * List all institutions + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response + */ + this.listInstitutionWithHttpInfo = function(opts) { + opts = opts || {}; + var postBody = null; + + var pathParams = { + }; + var queryParams = { + 'limit': opts['limit'], + 'offset': opts['offset'], + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = [Institution]; + return this.apiClient.callApi( + '/institution', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * List all institutions + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} + */ + this.listInstitution = function(opts) { + return this.listInstitutionWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/src/small_eod/LetterApi.js b/src/small_eod/LetterApi.js new file mode 100644 index 0000000..aa307a8 --- /dev/null +++ b/src/small_eod/LetterApi.js @@ -0,0 +1,249 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Error', 'model/Letter'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/Error'), require('../model/Letter')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.LetterApi = factory(root.SmallEod.ApiClient, root.SmallEod.Error, root.SmallEod.Letter); + } +}(this, function(ApiClient, Error, Letter) { + 'use strict'; + + /** + * Letter service. + * @module small_eod/LetterApi + * @version 1.0.0 + */ + + /** + * Constructs a new LetterApi. + * @alias module:small_eod/LetterApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a letter + * @param {module:model/Letter} letter New letter + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Letter} and HTTP response + */ + this.createLetterWithHttpInfo = function(letter) { + var postBody = letter; + // verify the required parameter 'letter' is set + if (letter === undefined || letter === null) { + throw new Error("Missing the required parameter 'letter' when calling createLetter"); + } + + var pathParams = { + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = Letter; + return this.apiClient.callApi( + '/letter', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a letter + * @param {module:model/Letter} letter New letter + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Letter} + */ + this.createLetter = function(letter) { + return this.createLetterWithHttpInfo(letter) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Deletes a single letter based on the ID supplied + * @param {Number} letterId The id of the letter to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + this.deleteLetterWithHttpInfo = function(letterId) { + var postBody = null; + // verify the required parameter 'letterId' is set + if (letterId === undefined || letterId === null) { + throw new Error("Missing the required parameter 'letterId' when calling deleteLetter"); + } + + var pathParams = { + 'letterId': letterId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = null; + return this.apiClient.callApi( + '/letter/{letterId}', 'DELETE', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Deletes a single letter based on the ID supplied + * @param {Number} letterId The id of the letter to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.deleteLetter = function(letterId) { + return this.deleteLetterWithHttpInfo(letterId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * List all letters + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @param {Number} opts._case Case ID + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response + */ + this.listLetterWithHttpInfo = function(opts) { + opts = opts || {}; + var postBody = null; + + var pathParams = { + }; + var queryParams = { + 'limit': opts['limit'], + 'offset': opts['offset'], + 'case': opts['_case'], + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = [Letter]; + return this.apiClient.callApi( + '/letter', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * List all letters + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @param {Number} opts._case Case ID + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} + */ + this.listLetter = function(opts) { + return this.listLetterWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Info for a specific letter + * @param {Number} letterId The id of the letter to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Letter} and HTTP response + */ + this.showLetterByIdWithHttpInfo = function(letterId) { + var postBody = null; + // verify the required parameter 'letterId' is set + if (letterId === undefined || letterId === null) { + throw new Error("Missing the required parameter 'letterId' when calling showLetterById"); + } + + var pathParams = { + 'letterId': letterId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = Letter; + return this.apiClient.callApi( + '/letter/{letterId}', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Info for a specific letter + * @param {Number} letterId The id of the letter to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Letter} + */ + this.showLetterById = function(letterId) { + return this.showLetterByIdWithHttpInfo(letterId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/src/small_eod/NoteApi.js b/src/small_eod/NoteApi.js new file mode 100644 index 0000000..b27e871 --- /dev/null +++ b/src/small_eod/NoteApi.js @@ -0,0 +1,249 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Error', 'model/Note'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/Error'), require('../model/Note')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.NoteApi = factory(root.SmallEod.ApiClient, root.SmallEod.Error, root.SmallEod.Note); + } +}(this, function(ApiClient, Error, Note) { + 'use strict'; + + /** + * Note service. + * @module small_eod/NoteApi + * @version 1.0.0 + */ + + /** + * Constructs a new NoteApi. + * @alias module:small_eod/NoteApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a note + * @param {module:model/Note} note New note + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Note} and HTTP response + */ + this.createNoteWithHttpInfo = function(note) { + var postBody = note; + // verify the required parameter 'note' is set + if (note === undefined || note === null) { + throw new Error("Missing the required parameter 'note' when calling createNote"); + } + + var pathParams = { + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = Note; + return this.apiClient.callApi( + '/note', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a note + * @param {module:model/Note} note New note + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Note} + */ + this.createNote = function(note) { + return this.createNoteWithHttpInfo(note) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Deletes a single note based on the ID supplied + * @param {Number} noteId The id of the note to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + this.deleteNoteWithHttpInfo = function(noteId) { + var postBody = null; + // verify the required parameter 'noteId' is set + if (noteId === undefined || noteId === null) { + throw new Error("Missing the required parameter 'noteId' when calling deleteNote"); + } + + var pathParams = { + 'noteId': noteId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = null; + return this.apiClient.callApi( + '/note/{noteId}', 'DELETE', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Deletes a single note based on the ID supplied + * @param {Number} noteId The id of the note to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.deleteNote = function(noteId) { + return this.deleteNoteWithHttpInfo(noteId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * List all notes of case + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @param {Number} opts._case Case ID + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response + */ + this.listNoteWithHttpInfo = function(opts) { + opts = opts || {}; + var postBody = null; + + var pathParams = { + }; + var queryParams = { + 'limit': opts['limit'], + 'offset': opts['offset'], + 'case': opts['_case'], + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = [Note]; + return this.apiClient.callApi( + '/note', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * List all notes of case + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @param {Number} opts._case Case ID + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} + */ + this.listNote = function(opts) { + return this.listNoteWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Info for a specific note + * @param {Number} noteId The id of the note to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Note} and HTTP response + */ + this.showNoteByIdWithHttpInfo = function(noteId) { + var postBody = null; + // verify the required parameter 'noteId' is set + if (noteId === undefined || noteId === null) { + throw new Error("Missing the required parameter 'noteId' when calling showNoteById"); + } + + var pathParams = { + 'noteId': noteId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = Note; + return this.apiClient.callApi( + '/note/{noteId}', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Info for a specific note + * @param {Number} noteId The id of the note to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Note} + */ + this.showNoteById = function(noteId) { + return this.showNoteByIdWithHttpInfo(noteId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/src/small_eod/NotifiedUserApi.js b/src/small_eod/NotifiedUserApi.js new file mode 100644 index 0000000..0e0380d --- /dev/null +++ b/src/small_eod/NotifiedUserApi.js @@ -0,0 +1,217 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Error', 'model/UserRef'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/Error'), require('../model/UserRef')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.NotifiedUserApi = factory(root.SmallEod.ApiClient, root.SmallEod.Error, root.SmallEod.UserRef); + } +}(this, function(ApiClient, Error, UserRef) { + 'use strict'; + + /** + * NotifiedUser service. + * @module small_eod/NotifiedUserApi + * @version 1.0.0 + */ + + /** + * Constructs a new NotifiedUserApi. + * @alias module:small_eod/NotifiedUserApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a notified user reference of case + * @param {Number} caseId The id of the case to modify + * @param {module:model/UserRef} userRef New notified user + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/UserRef} and HTTP response + */ + this.createNotifiedUserWithHttpInfo = function(caseId, userRef) { + var postBody = userRef; + // verify the required parameter 'caseId' is set + if (caseId === undefined || caseId === null) { + throw new Error("Missing the required parameter 'caseId' when calling createNotifiedUser"); + } + // verify the required parameter 'userRef' is set + if (userRef === undefined || userRef === null) { + throw new Error("Missing the required parameter 'userRef' when calling createNotifiedUser"); + } + + var pathParams = { + 'caseId': caseId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = UserRef; + return this.apiClient.callApi( + '/case/{caseId}/notifiedUser', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a notified user reference of case + * @param {Number} caseId The id of the case to modify + * @param {module:model/UserRef} userRef New notified user + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UserRef} + */ + this.createNotifiedUser = function(caseId, userRef) { + return this.createNotifiedUserWithHttpInfo(caseId, userRef) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Deletes a single notified user based on the ID supplied + * @param {Number} caseId The id of the case to modify + * @param {Number} notifiedUserId The id of the responsible user to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + this.deleteNotifiedUserWithHttpInfo = function(caseId, notifiedUserId) { + var postBody = null; + // verify the required parameter 'caseId' is set + if (caseId === undefined || caseId === null) { + throw new Error("Missing the required parameter 'caseId' when calling deleteNotifiedUser"); + } + // verify the required parameter 'notifiedUserId' is set + if (notifiedUserId === undefined || notifiedUserId === null) { + throw new Error("Missing the required parameter 'notifiedUserId' when calling deleteNotifiedUser"); + } + + var pathParams = { + 'caseId': caseId, + 'notifiedUserId': notifiedUserId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = null; + return this.apiClient.callApi( + '/case/{caseId}/notifiedUser/{notifiedUserId}', 'DELETE', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Deletes a single notified user based on the ID supplied + * @param {Number} caseId The id of the case to modify + * @param {Number} notifiedUserId The id of the responsible user to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.deleteNotifiedUser = function(caseId, notifiedUserId) { + return this.deleteNotifiedUserWithHttpInfo(caseId, notifiedUserId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Info for a specific notified user of case + * @param {Number} caseId The id of the case to modify + * @param {Number} notifiedUserId The id of the responsible user to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/UserRef} and HTTP response + */ + this.shownotifiedUserByIdWithHttpInfo = function(caseId, notifiedUserId) { + var postBody = null; + // verify the required parameter 'caseId' is set + if (caseId === undefined || caseId === null) { + throw new Error("Missing the required parameter 'caseId' when calling shownotifiedUserById"); + } + // verify the required parameter 'notifiedUserId' is set + if (notifiedUserId === undefined || notifiedUserId === null) { + throw new Error("Missing the required parameter 'notifiedUserId' when calling shownotifiedUserById"); + } + + var pathParams = { + 'caseId': caseId, + 'notifiedUserId': notifiedUserId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = UserRef; + return this.apiClient.callApi( + '/case/{caseId}/notifiedUser/{notifiedUserId}', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Info for a specific notified user of case + * @param {Number} caseId The id of the case to modify + * @param {Number} notifiedUserId The id of the responsible user to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UserRef} + */ + this.shownotifiedUserById = function(caseId, notifiedUserId) { + return this.shownotifiedUserByIdWithHttpInfo(caseId, notifiedUserId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/src/small_eod/ResponsibleUserApi.js b/src/small_eod/ResponsibleUserApi.js new file mode 100644 index 0000000..ef52847 --- /dev/null +++ b/src/small_eod/ResponsibleUserApi.js @@ -0,0 +1,217 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Error', 'model/UserRef'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/Error'), require('../model/UserRef')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.ResponsibleUserApi = factory(root.SmallEod.ApiClient, root.SmallEod.Error, root.SmallEod.UserRef); + } +}(this, function(ApiClient, Error, UserRef) { + 'use strict'; + + /** + * ResponsibleUser service. + * @module small_eod/ResponsibleUserApi + * @version 1.0.0 + */ + + /** + * Constructs a new ResponsibleUserApi. + * @alias module:small_eod/ResponsibleUserApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a responsible user reference of case + * @param {Number} caseId The id of the case to modify + * @param {module:model/UserRef} userRef New responsible user + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/UserRef} and HTTP response + */ + this.createResponsibleUserWithHttpInfo = function(caseId, userRef) { + var postBody = userRef; + // verify the required parameter 'caseId' is set + if (caseId === undefined || caseId === null) { + throw new Error("Missing the required parameter 'caseId' when calling createResponsibleUser"); + } + // verify the required parameter 'userRef' is set + if (userRef === undefined || userRef === null) { + throw new Error("Missing the required parameter 'userRef' when calling createResponsibleUser"); + } + + var pathParams = { + 'caseId': caseId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = UserRef; + return this.apiClient.callApi( + '/case/{caseId}/responsibleUser', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a responsible user reference of case + * @param {Number} caseId The id of the case to modify + * @param {module:model/UserRef} userRef New responsible user + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UserRef} + */ + this.createResponsibleUser = function(caseId, userRef) { + return this.createResponsibleUserWithHttpInfo(caseId, userRef) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Deletes a single responsible user based on the ID supplied + * @param {Number} caseId The id of the case to modify + * @param {Number} responsibleUserId The id of the responsible user to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + this.deleteResponsibleUserWithHttpInfo = function(caseId, responsibleUserId) { + var postBody = null; + // verify the required parameter 'caseId' is set + if (caseId === undefined || caseId === null) { + throw new Error("Missing the required parameter 'caseId' when calling deleteResponsibleUser"); + } + // verify the required parameter 'responsibleUserId' is set + if (responsibleUserId === undefined || responsibleUserId === null) { + throw new Error("Missing the required parameter 'responsibleUserId' when calling deleteResponsibleUser"); + } + + var pathParams = { + 'caseId': caseId, + 'responsibleUserId': responsibleUserId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = null; + return this.apiClient.callApi( + '/case/{caseId}/responsibleUser/{responsibleUserId}', 'DELETE', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Deletes a single responsible user based on the ID supplied + * @param {Number} caseId The id of the case to modify + * @param {Number} responsibleUserId The id of the responsible user to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.deleteResponsibleUser = function(caseId, responsibleUserId) { + return this.deleteResponsibleUserWithHttpInfo(caseId, responsibleUserId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Info for a specific responsible user of case + * @param {Number} caseId The id of the case to retrieve + * @param {Number} responsibleUserId The id of the responsible user to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/UserRef} and HTTP response + */ + this.showcaseByIdWithHttpInfo = function(caseId, responsibleUserId) { + var postBody = null; + // verify the required parameter 'caseId' is set + if (caseId === undefined || caseId === null) { + throw new Error("Missing the required parameter 'caseId' when calling showcaseById"); + } + // verify the required parameter 'responsibleUserId' is set + if (responsibleUserId === undefined || responsibleUserId === null) { + throw new Error("Missing the required parameter 'responsibleUserId' when calling showcaseById"); + } + + var pathParams = { + 'caseId': caseId, + 'responsibleUserId': responsibleUserId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = UserRef; + return this.apiClient.callApi( + '/case/{caseId}/responsibleUser/{responsibleUserId}', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Info for a specific responsible user of case + * @param {Number} caseId The id of the case to retrieve + * @param {Number} responsibleUserId The id of the responsible user to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UserRef} + */ + this.showcaseById = function(caseId, responsibleUserId) { + return this.showcaseByIdWithHttpInfo(caseId, responsibleUserId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/src/small_eod/SessionApi.js b/src/small_eod/SessionApi.js new file mode 100644 index 0000000..152f5c9 --- /dev/null +++ b/src/small_eod/SessionApi.js @@ -0,0 +1,265 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Error', 'model/Session'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/Error'), require('../model/Session')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.SessionApi = factory(root.SmallEod.ApiClient, root.SmallEod.Error, root.SmallEod.Session); + } +}(this, function(ApiClient, Error, Session) { + 'use strict'; + + /** + * Session service. + * @module small_eod/SessionApi + * @version 1.0.0 + */ + + /** + * Constructs a new SessionApi. + * @alias module:small_eod/SessionApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a session + * @param {Number} userId The id of the user to modify + * @param {Object} body New session + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Session} and HTTP response + */ + this.createSessionWithHttpInfo = function(userId, body) { + var postBody = body; + // verify the required parameter 'userId' is set + if (userId === undefined || userId === null) { + throw new Error("Missing the required parameter 'userId' when calling createSession"); + } + // verify the required parameter 'body' is set + if (body === undefined || body === null) { + throw new Error("Missing the required parameter 'body' when calling createSession"); + } + + var pathParams = { + 'userId': userId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['basicAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = Session; + return this.apiClient.callApi( + '/user/{userId}/session', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a session + * @param {Number} userId The id of the user to modify + * @param {Object} body New session + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Session} + */ + this.createSession = function(userId, body) { + return this.createSessionWithHttpInfo(userId, body) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Deletes a single session based on the ID supplied + * @param {Number} userId The id of the user to modify + * @param {Number} sessionId The id of the session to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + this.deleteSessionWithHttpInfo = function(userId, sessionId) { + var postBody = null; + // verify the required parameter 'userId' is set + if (userId === undefined || userId === null) { + throw new Error("Missing the required parameter 'userId' when calling deleteSession"); + } + // verify the required parameter 'sessionId' is set + if (sessionId === undefined || sessionId === null) { + throw new Error("Missing the required parameter 'sessionId' when calling deleteSession"); + } + + var pathParams = { + 'userId': userId, + 'sessionId': sessionId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = null; + return this.apiClient.callApi( + '/user/{userId}/session/{sessionId}', 'DELETE', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Deletes a single session based on the ID supplied + * @param {Number} userId The id of the user to modify + * @param {Number} sessionId The id of the session to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.deleteSession = function(userId, sessionId) { + return this.deleteSessionWithHttpInfo(userId, sessionId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * List all sessions + * @param {Number} userId The id of the user to modify + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response + */ + this.listSessionOfUserWithHttpInfo = function(userId) { + var postBody = null; + // verify the required parameter 'userId' is set + if (userId === undefined || userId === null) { + throw new Error("Missing the required parameter 'userId' when calling listSessionOfUser"); + } + + var pathParams = { + 'userId': userId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = [Session]; + return this.apiClient.callApi( + '/user/{userId}/session', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * List all sessions + * @param {Number} userId The id of the user to modify + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} + */ + this.listSessionOfUser = function(userId) { + return this.listSessionOfUserWithHttpInfo(userId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Info for a specific session of user + * @param {Number} userId The id of the user to retrieve + * @param {Number} sessionId The id of the user to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Session} and HTTP response + */ + this.showSessionByIdWithHttpInfo = function(userId, sessionId) { + var postBody = null; + // verify the required parameter 'userId' is set + if (userId === undefined || userId === null) { + throw new Error("Missing the required parameter 'userId' when calling showSessionById"); + } + // verify the required parameter 'sessionId' is set + if (sessionId === undefined || sessionId === null) { + throw new Error("Missing the required parameter 'sessionId' when calling showSessionById"); + } + + var pathParams = { + 'userId': userId, + 'sessionId': sessionId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = Session; + return this.apiClient.callApi( + '/user/{userId}/session/{sessionId}', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Info for a specific session of user + * @param {Number} userId The id of the user to retrieve + * @param {Number} sessionId The id of the user to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Session} + */ + this.showSessionById = function(userId, sessionId) { + return this.showSessionByIdWithHttpInfo(userId, sessionId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/src/small_eod/TagNamespaceApi.js b/src/small_eod/TagNamespaceApi.js new file mode 100644 index 0000000..67e5257 --- /dev/null +++ b/src/small_eod/TagNamespaceApi.js @@ -0,0 +1,246 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Error', 'model/TagNamespace'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/Error'), require('../model/TagNamespace')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.TagNamespaceApi = factory(root.SmallEod.ApiClient, root.SmallEod.Error, root.SmallEod.TagNamespace); + } +}(this, function(ApiClient, Error, TagNamespace) { + 'use strict'; + + /** + * TagNamespace service. + * @module small_eod/TagNamespaceApi + * @version 1.0.0 + */ + + /** + * Constructs a new TagNamespaceApi. + * @alias module:small_eod/TagNamespaceApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a tag namespace + * @param {module:model/TagNamespace} tagNamespace New tag namespace + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TagNamespace} and HTTP response + */ + this.createTagNamespaceWithHttpInfo = function(tagNamespace) { + var postBody = tagNamespace; + // verify the required parameter 'tagNamespace' is set + if (tagNamespace === undefined || tagNamespace === null) { + throw new Error("Missing the required parameter 'tagNamespace' when calling createTagNamespace"); + } + + var pathParams = { + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = TagNamespace; + return this.apiClient.callApi( + '/tagNamespace', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a tag namespace + * @param {module:model/TagNamespace} tagNamespace New tag namespace + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TagNamespace} + */ + this.createTagNamespace = function(tagNamespace) { + return this.createTagNamespaceWithHttpInfo(tagNamespace) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Deletes a single tag namespace based on the ID supplied + * @param {Number} tagNamespaceId The id of the tag namespace to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + this.deleteTagNamespaceWithHttpInfo = function(tagNamespaceId) { + var postBody = null; + // verify the required parameter 'tagNamespaceId' is set + if (tagNamespaceId === undefined || tagNamespaceId === null) { + throw new Error("Missing the required parameter 'tagNamespaceId' when calling deleteTagNamespace"); + } + + var pathParams = { + 'tagNamespaceId': tagNamespaceId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = null; + return this.apiClient.callApi( + '/tagNamespace/{tagNamespaceId}', 'DELETE', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Deletes a single tag namespace based on the ID supplied + * @param {Number} tagNamespaceId The id of the tag namespace to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.deleteTagNamespace = function(tagNamespaceId) { + return this.deleteTagNamespaceWithHttpInfo(tagNamespaceId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * List all tag namespaces + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response + */ + this.listTagNamespaceWithHttpInfo = function(opts) { + opts = opts || {}; + var postBody = null; + + var pathParams = { + }; + var queryParams = { + 'limit': opts['limit'], + 'offset': opts['offset'], + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = [TagNamespace]; + return this.apiClient.callApi( + '/tagNamespace', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * List all tag namespaces + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} + */ + this.listTagNamespace = function(opts) { + return this.listTagNamespaceWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Info for a specific tag namespace + * @param {Number} tagNamespaceId The id of the tag namespace to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TagNamespace} and HTTP response + */ + this.showTagNamespaceByIdWithHttpInfo = function(tagNamespaceId) { + var postBody = null; + // verify the required parameter 'tagNamespaceId' is set + if (tagNamespaceId === undefined || tagNamespaceId === null) { + throw new Error("Missing the required parameter 'tagNamespaceId' when calling showTagNamespaceById"); + } + + var pathParams = { + 'tagNamespaceId': tagNamespaceId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = TagNamespace; + return this.apiClient.callApi( + '/tagNamespace/{tagNamespaceId}', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Info for a specific tag namespace + * @param {Number} tagNamespaceId The id of the tag namespace to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TagNamespace} + */ + this.showTagNamespaceById = function(tagNamespaceId) { + return this.showTagNamespaceByIdWithHttpInfo(tagNamespaceId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/src/small_eod/UserApi.js b/src/small_eod/UserApi.js new file mode 100644 index 0000000..52f36a7 --- /dev/null +++ b/src/small_eod/UserApi.js @@ -0,0 +1,246 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Error', 'model/User'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/Error'), require('../model/User')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.UserApi = factory(root.SmallEod.ApiClient, root.SmallEod.Error, root.SmallEod.User); + } +}(this, function(ApiClient, Error, User) { + 'use strict'; + + /** + * User service. + * @module small_eod/UserApi + * @version 1.0.0 + */ + + /** + * Constructs a new UserApi. + * @alias module:small_eod/UserApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a user + * @param {module:model/User} user New user + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/User} and HTTP response + */ + this.createUserWithHttpInfo = function(user) { + var postBody = user; + // verify the required parameter 'user' is set + if (user === undefined || user === null) { + throw new Error("Missing the required parameter 'user' when calling createUser"); + } + + var pathParams = { + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = User; + return this.apiClient.callApi( + '/user', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a user + * @param {module:model/User} user New user + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/User} + */ + this.createUser = function(user) { + return this.createUserWithHttpInfo(user) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Deletes a single user based on the ID supplied + * @param {Number} userId The id of the user to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + this.deleteUserWithHttpInfo = function(userId) { + var postBody = null; + // verify the required parameter 'userId' is set + if (userId === undefined || userId === null) { + throw new Error("Missing the required parameter 'userId' when calling deleteUser"); + } + + var pathParams = { + 'userId': userId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = null; + return this.apiClient.callApi( + '/user/{userId}', 'DELETE', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Deletes a single user based on the ID supplied + * @param {Number} userId The id of the user to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.deleteUser = function(userId) { + return this.deleteUserWithHttpInfo(userId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * List all users + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response + */ + this.listUserWithHttpInfo = function(opts) { + opts = opts || {}; + var postBody = null; + + var pathParams = { + }; + var queryParams = { + 'limit': opts['limit'], + 'offset': opts['offset'], + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = [User]; + return this.apiClient.callApi( + '/user', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * List all users + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} + */ + this.listUser = function(opts) { + return this.listUserWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Info for a specific user + * @param {Number} userId The id of the user to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/User} and HTTP response + */ + this.showUserByIdWithHttpInfo = function(userId) { + var postBody = null; + // verify the required parameter 'userId' is set + if (userId === undefined || userId === null) { + throw new Error("Missing the required parameter 'userId' when calling showUserById"); + } + + var pathParams = { + 'userId': userId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = User; + return this.apiClient.callApi( + '/user/{userId}', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Info for a specific user + * @param {Number} userId The id of the user to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/User} + */ + this.showUserById = function(userId) { + return this.showUserByIdWithHttpInfo(userId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/src/small_eod_client/AdministrativeUnitApi.js b/src/small_eod_client/AdministrativeUnitApi.js new file mode 100644 index 0000000..f9ceada --- /dev/null +++ b/src/small_eod_client/AdministrativeUnitApi.js @@ -0,0 +1,246 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/AdministrativeUnit', 'model/Error'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/AdministrativeUnit'), require('../model/Error')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.AdministrativeUnitApi = factory(root.SmallEod.ApiClient, root.SmallEod.AdministrativeUnit, root.SmallEod.Error); + } +}(this, function(ApiClient, AdministrativeUnit, Error) { + 'use strict'; + + /** + * AdministrativeUnit service. + * @module small_eod_client/AdministrativeUnitApi + * @version 1.0.0 + */ + + /** + * Constructs a new AdministrativeUnitApi. + * @alias module:small_eod_client/AdministrativeUnitApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a administrative unit + * @param {module:model/AdministrativeUnit} administrativeUnit New administrative unit + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/AdministrativeUnit} and HTTP response + */ + this.createAdministrativeUnitWithHttpInfo = function(administrativeUnit) { + var postBody = administrativeUnit; + // verify the required parameter 'administrativeUnit' is set + if (administrativeUnit === undefined || administrativeUnit === null) { + throw new Error("Missing the required parameter 'administrativeUnit' when calling createAdministrativeUnit"); + } + + var pathParams = { + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = AdministrativeUnit; + return this.apiClient.callApi( + '/administrativeUnit', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a administrative unit + * @param {module:model/AdministrativeUnit} administrativeUnit New administrative unit + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AdministrativeUnit} + */ + this.createAdministrativeUnit = function(administrativeUnit) { + return this.createAdministrativeUnitWithHttpInfo(administrativeUnit) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Deletes a single administrative unit based on the ID supplied + * @param {Number} administrativeUnitId The id of the administrativeUnit to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + this.deleteAdministrativeUnitWithHttpInfo = function(administrativeUnitId) { + var postBody = null; + // verify the required parameter 'administrativeUnitId' is set + if (administrativeUnitId === undefined || administrativeUnitId === null) { + throw new Error("Missing the required parameter 'administrativeUnitId' when calling deleteAdministrativeUnit"); + } + + var pathParams = { + 'administrativeUnitId': administrativeUnitId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = null; + return this.apiClient.callApi( + '/administrativeUnit/{administrativeUnitId}', 'DELETE', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Deletes a single administrative unit based on the ID supplied + * @param {Number} administrativeUnitId The id of the administrativeUnit to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.deleteAdministrativeUnit = function(administrativeUnitId) { + return this.deleteAdministrativeUnitWithHttpInfo(administrativeUnitId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * List all administrative units + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response + */ + this.listAdministrativeUnitWithHttpInfo = function(opts) { + opts = opts || {}; + var postBody = null; + + var pathParams = { + }; + var queryParams = { + 'limit': opts['limit'], + 'offset': opts['offset'], + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = [AdministrativeUnit]; + return this.apiClient.callApi( + '/administrativeUnit', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * List all administrative units + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} + */ + this.listAdministrativeUnit = function(opts) { + return this.listAdministrativeUnitWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Info for a specific administrative unit + * @param {Number} administrativeUnitId The id of the administrative unit to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/AdministrativeUnit} and HTTP response + */ + this.showAdministrativeUnitByIdWithHttpInfo = function(administrativeUnitId) { + var postBody = null; + // verify the required parameter 'administrativeUnitId' is set + if (administrativeUnitId === undefined || administrativeUnitId === null) { + throw new Error("Missing the required parameter 'administrativeUnitId' when calling showAdministrativeUnitById"); + } + + var pathParams = { + 'administrativeUnitId': administrativeUnitId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = AdministrativeUnit; + return this.apiClient.callApi( + '/administrativeUnit/{administrativeUnitId}', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Info for a specific administrative unit + * @param {Number} administrativeUnitId The id of the administrative unit to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/AdministrativeUnit} + */ + this.showAdministrativeUnitById = function(administrativeUnitId) { + return this.showAdministrativeUnitByIdWithHttpInfo(administrativeUnitId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/src/small_eod_client/CaseApi.js b/src/small_eod_client/CaseApi.js new file mode 100644 index 0000000..ec37bb1 --- /dev/null +++ b/src/small_eod_client/CaseApi.js @@ -0,0 +1,303 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Error', 'model/ModelCase'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/Error'), require('../model/ModelCase')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.CaseApi = factory(root.SmallEod.ApiClient, root.SmallEod.Error, root.SmallEod.ModelCase); + } +}(this, function(ApiClient, Error, ModelCase) { + 'use strict'; + + /** + * Case service. + * @module small_eod_client/CaseApi + * @version 1.0.0 + */ + + /** + * Constructs a new CaseApi. + * @alias module:small_eod_client/CaseApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a case + * @param {module:model/ModelCase} modelCase New case + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ModelCase} and HTTP response + */ + this.createCaseWithHttpInfo = function(modelCase) { + var postBody = modelCase; + // verify the required parameter 'modelCase' is set + if (modelCase === undefined || modelCase === null) { + throw new Error("Missing the required parameter 'modelCase' when calling createCase"); + } + + var pathParams = { + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = ModelCase; + return this.apiClient.callApi( + '/case', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a case + * @param {module:model/ModelCase} modelCase New case + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ModelCase} + */ + this.createCase = function(modelCase) { + return this.createCaseWithHttpInfo(modelCase) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Deletes a single case based on the ID supplied + * @param {Number} caseId The id of the case to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + this.deleteCaseWithHttpInfo = function(caseId) { + var postBody = null; + // verify the required parameter 'caseId' is set + if (caseId === undefined || caseId === null) { + throw new Error("Missing the required parameter 'caseId' when calling deleteCase"); + } + + var pathParams = { + 'caseId': caseId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = null; + return this.apiClient.callApi( + '/case/{caseId}', 'DELETE', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Deletes a single case based on the ID supplied + * @param {Number} caseId The id of the case to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.deleteCase = function(caseId) { + return this.deleteCaseWithHttpInfo(caseId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * List all cases + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @param {Number} opts.institution Institution ID or NULL + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response + */ + this.listCaseWithHttpInfo = function(opts) { + opts = opts || {}; + var postBody = null; + + var pathParams = { + }; + var queryParams = { + 'limit': opts['limit'], + 'offset': opts['offset'], + 'institution': opts['institution'], + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = [ModelCase]; + return this.apiClient.callApi( + '/case', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * List all cases + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @param {Number} opts.institution Institution ID or NULL + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} + */ + this.listCase = function(opts) { + return this.listCaseWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Info for a specific case + * @param {Number} caseId The id of the case to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ModelCase} and HTTP response + */ + this.showCaseByIdWithHttpInfo = function(caseId) { + var postBody = null; + // verify the required parameter 'caseId' is set + if (caseId === undefined || caseId === null) { + throw new Error("Missing the required parameter 'caseId' when calling showCaseById"); + } + + var pathParams = { + 'caseId': caseId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = ModelCase; + return this.apiClient.callApi( + '/case/{caseId}', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Info for a specific case + * @param {Number} caseId The id of the case to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ModelCase} + */ + this.showCaseById = function(caseId) { + return this.showCaseByIdWithHttpInfo(caseId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Updated case + * @param {Number} caseId The id of the case to modify + * @param {module:model/ModelCase} modelCase Updated case + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ModelCase} and HTTP response + */ + this.updateCaseByIdWithHttpInfo = function(caseId, modelCase) { + var postBody = modelCase; + // verify the required parameter 'caseId' is set + if (caseId === undefined || caseId === null) { + throw new Error("Missing the required parameter 'caseId' when calling updateCaseById"); + } + // verify the required parameter 'modelCase' is set + if (modelCase === undefined || modelCase === null) { + throw new Error("Missing the required parameter 'modelCase' when calling updateCaseById"); + } + + var pathParams = { + 'caseId': caseId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = ModelCase; + return this.apiClient.callApi( + '/case/{caseId}', 'PATCH', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Updated case + * @param {Number} caseId The id of the case to modify + * @param {module:model/ModelCase} modelCase Updated case + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ModelCase} + */ + this.updateCaseById = function(caseId, modelCase) { + return this.updateCaseByIdWithHttpInfo(caseId, modelCase) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/src/small_eod_client/CollectionApi.js b/src/small_eod_client/CollectionApi.js new file mode 100644 index 0000000..4266736 --- /dev/null +++ b/src/small_eod_client/CollectionApi.js @@ -0,0 +1,516 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Collection', 'model/Error', 'model/Event', 'model/Letter', 'model/ModelCase'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/Collection'), require('../model/Error'), require('../model/Event'), require('../model/Letter'), require('../model/ModelCase')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.CollectionApi = factory(root.SmallEod.ApiClient, root.SmallEod.Collection, root.SmallEod.Error, root.SmallEod.Event, root.SmallEod.Letter, root.SmallEod.ModelCase); + } +}(this, function(ApiClient, Collection, Error, Event, Letter, ModelCase) { + 'use strict'; + + /** + * Collection service. + * @module small_eod_client/CollectionApi + * @version 1.0.0 + */ + + /** + * Constructs a new CollectionApi. + * @alias module:small_eod_client/CollectionApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a collection + * @param {module:model/Collection} collection New collection + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Collection} and HTTP response + */ + this.createCollectionWithHttpInfo = function(collection) { + var postBody = collection; + // verify the required parameter 'collection' is set + if (collection === undefined || collection === null) { + throw new Error("Missing the required parameter 'collection' when calling createCollection"); + } + + var pathParams = { + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = Collection; + return this.apiClient.callApi( + '/collection', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a collection + * @param {module:model/Collection} collection New collection + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Collection} + */ + this.createCollection = function(collection) { + return this.createCollectionWithHttpInfo(collection) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Deletes a single collection based on the ID supplied + * @param {Number} collectionId The id of the collection to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + this.deleteCollectionWithHttpInfo = function(collectionId) { + var postBody = null; + // verify the required parameter 'collectionId' is set + if (collectionId === undefined || collectionId === null) { + throw new Error("Missing the required parameter 'collectionId' when calling deleteCollection"); + } + + var pathParams = { + 'collectionId': collectionId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = null; + return this.apiClient.callApi( + '/collection/{collectionId}', 'DELETE', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Deletes a single collection based on the ID supplied + * @param {Number} collectionId The id of the collection to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.deleteCollection = function(collectionId) { + return this.deleteCollectionWithHttpInfo(collectionId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * List all collections + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @param {Number} opts._case Case ID + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response + */ + this.listCollectionWithHttpInfo = function(opts) { + opts = opts || {}; + var postBody = null; + + var pathParams = { + }; + var queryParams = { + 'limit': opts['limit'], + 'offset': opts['offset'], + 'case': opts['_case'], + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = [Collection]; + return this.apiClient.callApi( + '/collection', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * List all collections + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @param {Number} opts._case Case ID + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} + */ + this.listCollection = function(opts) { + return this.listCollectionWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Cases match query for a specific collection + * @param {Number} collectionId The id of the collection to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ModelCase} and HTTP response + */ + this.showCaseByCollectionWithHttpInfo = function(collectionId) { + var postBody = null; + // verify the required parameter 'collectionId' is set + if (collectionId === undefined || collectionId === null) { + throw new Error("Missing the required parameter 'collectionId' when calling showCaseByCollection"); + } + + var pathParams = { + 'collectionId': collectionId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['bearerAuth', 'sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = ModelCase; + return this.apiClient.callApi( + '/collection/{collectionId}/case', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Cases match query for a specific collection + * @param {Number} collectionId The id of the collection to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ModelCase} + */ + this.showCaseByCollection = function(collectionId) { + return this.showCaseByCollectionWithHttpInfo(collectionId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Info for a specific collection + * @param {Number} collectionId The id of the collection to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Collection} and HTTP response + */ + this.showCollectionByIdWithHttpInfo = function(collectionId) { + var postBody = null; + // verify the required parameter 'collectionId' is set + if (collectionId === undefined || collectionId === null) { + throw new Error("Missing the required parameter 'collectionId' when calling showCollectionById"); + } + + var pathParams = { + 'collectionId': collectionId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['bearerAuth', 'sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = Collection; + return this.apiClient.callApi( + '/collection/{collectionId}', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Info for a specific collection + * @param {Number} collectionId The id of the collection to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Collection} + */ + this.showCollectionById = function(collectionId) { + return this.showCollectionByIdWithHttpInfo(collectionId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Events of case match query for a specific collection + * @param {Number} collectionId The id of the collection to retrieve + * @param {Number} caseId The id of the collection to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Event} and HTTP response + */ + this.showEventCaseByCollectionWithHttpInfo = function(collectionId, caseId) { + var postBody = null; + // verify the required parameter 'collectionId' is set + if (collectionId === undefined || collectionId === null) { + throw new Error("Missing the required parameter 'collectionId' when calling showEventCaseByCollection"); + } + // verify the required parameter 'caseId' is set + if (caseId === undefined || caseId === null) { + throw new Error("Missing the required parameter 'caseId' when calling showEventCaseByCollection"); + } + + var pathParams = { + 'collectionId': collectionId, + 'caseId': caseId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['bearerAuth', 'sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = Event; + return this.apiClient.callApi( + '/collection/{collectionId}/case/{caseId}/event', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Events of case match query for a specific collection + * @param {Number} collectionId The id of the collection to retrieve + * @param {Number} caseId The id of the collection to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Event} + */ + this.showEventCaseByCollection = function(collectionId, caseId) { + return this.showEventCaseByCollectionWithHttpInfo(collectionId, caseId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Letters of cases match query for a specific collection + * @param {Number} collectionId The id of the collection to retrieve + * @param {Number} caseId The id of the collection to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Letter} and HTTP response + */ + this.showLetterCaseByCollectionWithHttpInfo = function(collectionId, caseId) { + var postBody = null; + // verify the required parameter 'collectionId' is set + if (collectionId === undefined || collectionId === null) { + throw new Error("Missing the required parameter 'collectionId' when calling showLetterCaseByCollection"); + } + // verify the required parameter 'caseId' is set + if (caseId === undefined || caseId === null) { + throw new Error("Missing the required parameter 'caseId' when calling showLetterCaseByCollection"); + } + + var pathParams = { + 'collectionId': collectionId, + 'caseId': caseId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['bearerAuth', 'sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = Letter; + return this.apiClient.callApi( + '/collection/{collectionId}/case/{caseId}/letter', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Letters of cases match query for a specific collection + * @param {Number} collectionId The id of the collection to retrieve + * @param {Number} caseId The id of the collection to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Letter} + */ + this.showLetterCaseByCollection = function(collectionId, caseId) { + return this.showLetterCaseByCollectionWithHttpInfo(collectionId, caseId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Notes of case match query for a specific collection + * @param {Number} collectionId The id of the collection to retrieve + * @param {Number} caseId The id of the collection to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Letter} and HTTP response + */ + this.showNoteCaseByCollectionWithHttpInfo = function(collectionId, caseId) { + var postBody = null; + // verify the required parameter 'collectionId' is set + if (collectionId === undefined || collectionId === null) { + throw new Error("Missing the required parameter 'collectionId' when calling showNoteCaseByCollection"); + } + // verify the required parameter 'caseId' is set + if (caseId === undefined || caseId === null) { + throw new Error("Missing the required parameter 'caseId' when calling showNoteCaseByCollection"); + } + + var pathParams = { + 'collectionId': collectionId, + 'caseId': caseId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['bearerAuth', 'sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = Letter; + return this.apiClient.callApi( + '/collection/{collectionId}/case/{caseId}/note', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Notes of case match query for a specific collection + * @param {Number} collectionId The id of the collection to retrieve + * @param {Number} caseId The id of the collection to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Letter} + */ + this.showNoteCaseByCollection = function(collectionId, caseId) { + return this.showNoteCaseByCollectionWithHttpInfo(collectionId, caseId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Updated collection + * @param {Number} collectionId The id of the collection to modify + * @param {module:model/Collection} collection Updated collection + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Collection} and HTTP response + */ + this.updateCollectionByIdWithHttpInfo = function(collectionId, collection) { + var postBody = collection; + // verify the required parameter 'collectionId' is set + if (collectionId === undefined || collectionId === null) { + throw new Error("Missing the required parameter 'collectionId' when calling updateCollectionById"); + } + // verify the required parameter 'collection' is set + if (collection === undefined || collection === null) { + throw new Error("Missing the required parameter 'collection' when calling updateCollectionById"); + } + + var pathParams = { + 'collectionId': collectionId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = Collection; + return this.apiClient.callApi( + '/collection/{collectionId}', 'PATCH', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Updated collection + * @param {Number} collectionId The id of the collection to modify + * @param {module:model/Collection} collection Updated collection + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Collection} + */ + this.updateCollectionById = function(collectionId, collection) { + return this.updateCollectionByIdWithHttpInfo(collectionId, collection) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/src/small_eod_client/DescriptionApi.js b/src/small_eod_client/DescriptionApi.js new file mode 100644 index 0000000..a56a0b0 --- /dev/null +++ b/src/small_eod_client/DescriptionApi.js @@ -0,0 +1,246 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Description', 'model/Error'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/Description'), require('../model/Error')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.DescriptionApi = factory(root.SmallEod.ApiClient, root.SmallEod.Description, root.SmallEod.Error); + } +}(this, function(ApiClient, Description, Error) { + 'use strict'; + + /** + * Description service. + * @module small_eod_client/DescriptionApi + * @version 1.0.0 + */ + + /** + * Constructs a new DescriptionApi. + * @alias module:small_eod_client/DescriptionApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a description + * @param {module:model/Description} description New description + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Description} and HTTP response + */ + this.createDescriptionWithHttpInfo = function(description) { + var postBody = description; + // verify the required parameter 'description' is set + if (description === undefined || description === null) { + throw new Error("Missing the required parameter 'description' when calling createDescription"); + } + + var pathParams = { + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = Description; + return this.apiClient.callApi( + '/description', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a description + * @param {module:model/Description} description New description + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Description} + */ + this.createDescription = function(description) { + return this.createDescriptionWithHttpInfo(description) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Deletes a single description based on the ID supplied + * @param {Number} descriptionId The id of the description to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + this.deleteDescriptionWithHttpInfo = function(descriptionId) { + var postBody = null; + // verify the required parameter 'descriptionId' is set + if (descriptionId === undefined || descriptionId === null) { + throw new Error("Missing the required parameter 'descriptionId' when calling deleteDescription"); + } + + var pathParams = { + 'descriptionId': descriptionId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = null; + return this.apiClient.callApi( + '/description/{descriptionId}', 'DELETE', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Deletes a single description based on the ID supplied + * @param {Number} descriptionId The id of the description to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.deleteDescription = function(descriptionId) { + return this.deleteDescriptionWithHttpInfo(descriptionId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * List all descriptions + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response + */ + this.listDescriptionWithHttpInfo = function(opts) { + opts = opts || {}; + var postBody = null; + + var pathParams = { + }; + var queryParams = { + 'limit': opts['limit'], + 'offset': opts['offset'], + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = [Description]; + return this.apiClient.callApi( + '/description', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * List all descriptions + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} + */ + this.listDescription = function(opts) { + return this.listDescriptionWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Info for a specific description + * @param {Number} descriptionId The id of the description to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Description} and HTTP response + */ + this.showDescriptionByIdWithHttpInfo = function(descriptionId) { + var postBody = null; + // verify the required parameter 'descriptionId' is set + if (descriptionId === undefined || descriptionId === null) { + throw new Error("Missing the required parameter 'descriptionId' when calling showDescriptionById"); + } + + var pathParams = { + 'descriptionId': descriptionId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = Description; + return this.apiClient.callApi( + '/description/{descriptionId}', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Info for a specific description + * @param {Number} descriptionId The id of the description to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Description} + */ + this.showDescriptionById = function(descriptionId) { + return this.showDescriptionByIdWithHttpInfo(descriptionId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/src/small_eod_client/DictionaryApi.js b/src/small_eod_client/DictionaryApi.js new file mode 100644 index 0000000..b0b79d5 --- /dev/null +++ b/src/small_eod_client/DictionaryApi.js @@ -0,0 +1,246 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Dictionary', 'model/Error'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/Dictionary'), require('../model/Error')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.DictionaryApi = factory(root.SmallEod.ApiClient, root.SmallEod.Dictionary, root.SmallEod.Error); + } +}(this, function(ApiClient, Dictionary, Error) { + 'use strict'; + + /** + * Dictionary service. + * @module small_eod_client/DictionaryApi + * @version 1.0.0 + */ + + /** + * Constructs a new DictionaryApi. + * @alias module:small_eod_client/DictionaryApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a dictionary + * @param {module:model/Dictionary} dictionary New dictionary + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Dictionary} and HTTP response + */ + this.createDictionaryWithHttpInfo = function(dictionary) { + var postBody = dictionary; + // verify the required parameter 'dictionary' is set + if (dictionary === undefined || dictionary === null) { + throw new Error("Missing the required parameter 'dictionary' when calling createDictionary"); + } + + var pathParams = { + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = Dictionary; + return this.apiClient.callApi( + '/dictionary', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a dictionary + * @param {module:model/Dictionary} dictionary New dictionary + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Dictionary} + */ + this.createDictionary = function(dictionary) { + return this.createDictionaryWithHttpInfo(dictionary) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Deletes a single dictionary based on the ID supplied + * @param {Number} dictionaryId The id of the dictionary to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + this.deleteDictionaryWithHttpInfo = function(dictionaryId) { + var postBody = null; + // verify the required parameter 'dictionaryId' is set + if (dictionaryId === undefined || dictionaryId === null) { + throw new Error("Missing the required parameter 'dictionaryId' when calling deleteDictionary"); + } + + var pathParams = { + 'dictionaryId': dictionaryId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = null; + return this.apiClient.callApi( + '/dictionary/{dictionaryId}', 'DELETE', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Deletes a single dictionary based on the ID supplied + * @param {Number} dictionaryId The id of the dictionary to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.deleteDictionary = function(dictionaryId) { + return this.deleteDictionaryWithHttpInfo(dictionaryId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * List all dictionaries + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response + */ + this.listDictionaryWithHttpInfo = function(opts) { + opts = opts || {}; + var postBody = null; + + var pathParams = { + }; + var queryParams = { + 'limit': opts['limit'], + 'offset': opts['offset'], + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = [Dictionary]; + return this.apiClient.callApi( + '/dictionary', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * List all dictionaries + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} + */ + this.listDictionary = function(opts) { + return this.listDictionaryWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Info for a specific dictionary + * @param {Number} dictionaryId The id of the dictionary to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Dictionary} and HTTP response + */ + this.showDictionaryByIdWithHttpInfo = function(dictionaryId) { + var postBody = null; + // verify the required parameter 'dictionaryId' is set + if (dictionaryId === undefined || dictionaryId === null) { + throw new Error("Missing the required parameter 'dictionaryId' when calling showDictionaryById"); + } + + var pathParams = { + 'dictionaryId': dictionaryId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = Dictionary; + return this.apiClient.callApi( + '/dictionary/{dictionaryId}', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Info for a specific dictionary + * @param {Number} dictionaryId The id of the dictionary to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Dictionary} + */ + this.showDictionaryById = function(dictionaryId) { + return this.showDictionaryByIdWithHttpInfo(dictionaryId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/src/small_eod_client/EventApi.js b/src/small_eod_client/EventApi.js new file mode 100644 index 0000000..680bec0 --- /dev/null +++ b/src/small_eod_client/EventApi.js @@ -0,0 +1,249 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Error', 'model/Event'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/Error'), require('../model/Event')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.EventApi = factory(root.SmallEod.ApiClient, root.SmallEod.Error, root.SmallEod.Event); + } +}(this, function(ApiClient, Error, Event) { + 'use strict'; + + /** + * Event service. + * @module small_eod_client/EventApi + * @version 1.0.0 + */ + + /** + * Constructs a new EventApi. + * @alias module:small_eod_client/EventApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a event + * @param {module:model/Event} event New event + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Event} and HTTP response + */ + this.createEventWithHttpInfo = function(event) { + var postBody = event; + // verify the required parameter 'event' is set + if (event === undefined || event === null) { + throw new Error("Missing the required parameter 'event' when calling createEvent"); + } + + var pathParams = { + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = Event; + return this.apiClient.callApi( + '/event', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a event + * @param {module:model/Event} event New event + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Event} + */ + this.createEvent = function(event) { + return this.createEventWithHttpInfo(event) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Deletes a single event based on the ID supplied + * @param {Number} eventId The id of the event to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + this.deleteEventWithHttpInfo = function(eventId) { + var postBody = null; + // verify the required parameter 'eventId' is set + if (eventId === undefined || eventId === null) { + throw new Error("Missing the required parameter 'eventId' when calling deleteEvent"); + } + + var pathParams = { + 'eventId': eventId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = null; + return this.apiClient.callApi( + '/event/{eventId}', 'DELETE', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Deletes a single event based on the ID supplied + * @param {Number} eventId The id of the event to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.deleteEvent = function(eventId) { + return this.deleteEventWithHttpInfo(eventId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * List all events of case + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @param {Number} opts._case Case ID + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response + */ + this.listEventWithHttpInfo = function(opts) { + opts = opts || {}; + var postBody = null; + + var pathParams = { + }; + var queryParams = { + 'limit': opts['limit'], + 'offset': opts['offset'], + 'case': opts['_case'], + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = [Event]; + return this.apiClient.callApi( + '/event', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * List all events of case + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @param {Number} opts._case Case ID + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} + */ + this.listEvent = function(opts) { + return this.listEventWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Info for a specific event + * @param {Number} eventId The id of the event to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Event} and HTTP response + */ + this.showEventByIdWithHttpInfo = function(eventId) { + var postBody = null; + // verify the required parameter 'eventId' is set + if (eventId === undefined || eventId === null) { + throw new Error("Missing the required parameter 'eventId' when calling showEventById"); + } + + var pathParams = { + 'eventId': eventId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = Event; + return this.apiClient.callApi( + '/event/{eventId}', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Info for a specific event + * @param {Number} eventId The id of the event to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Event} + */ + this.showEventById = function(eventId) { + return this.showEventByIdWithHttpInfo(eventId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/src/small_eod_client/FileApi.js b/src/small_eod_client/FileApi.js new file mode 100644 index 0000000..dd9247c --- /dev/null +++ b/src/small_eod_client/FileApi.js @@ -0,0 +1,209 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Error', 'model/FileSigner', 'model/Letter'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/Error'), require('../model/FileSigner'), require('../model/Letter')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.FileApi = factory(root.SmallEod.ApiClient, root.SmallEod.Error, root.SmallEod.FileSigner, root.SmallEod.Letter); + } +}(this, function(ApiClient, Error, FileSigner, Letter) { + 'use strict'; + + /** + * File service. + * @module small_eod_client/FileApi + * @version 1.0.0 + */ + + /** + * Constructs a new FileApi. + * @alias module:small_eod_client/FileApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a file + * @param {Number} letterId The id of the letter to retrieve + * @param {File} file New file + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link File} and HTTP response + */ + this.createFileWithHttpInfo = function(letterId, file) { + var postBody = file; + // verify the required parameter 'letterId' is set + if (letterId === undefined || letterId === null) { + throw new Error("Missing the required parameter 'letterId' when calling createFile"); + } + // verify the required parameter 'file' is set + if (file === undefined || file === null) { + throw new Error("Missing the required parameter 'file' when calling createFile"); + } + + var pathParams = { + 'letterId': letterId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = File; + return this.apiClient.callApi( + '/letter/{letterId}/file', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a file + * @param {Number} letterId The id of the letter to retrieve + * @param {File} file New file + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link File} + */ + this.createFile = function(letterId, file) { + return this.createFileWithHttpInfo(letterId, file) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Create a pre-signed URLs for file + * @param {module:model/FileSigner} fileSigner New file signature request + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/FileSigner} and HTTP response + */ + this.createPreSignedUrlWithHttpInfo = function(fileSigner) { + var postBody = fileSigner; + // verify the required parameter 'fileSigner' is set + if (fileSigner === undefined || fileSigner === null) { + throw new Error("Missing the required parameter 'fileSigner' when calling createPreSignedUrl"); + } + + var pathParams = { + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = FileSigner; + return this.apiClient.callApi( + '/letter/file/sign', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a pre-signed URLs for file + * @param {module:model/FileSigner} fileSigner New file signature request + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/FileSigner} + */ + this.createPreSignedUrl = function(fileSigner) { + return this.createPreSignedUrlWithHttpInfo(fileSigner) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Info for a specific file + * @param {Number} letterId The id of the letter of file + * @param {Number} fileId The id of the file to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Letter} and HTTP response + */ + this.showFileByLetterIdWithHttpInfo = function(letterId, fileId) { + var postBody = null; + // verify the required parameter 'letterId' is set + if (letterId === undefined || letterId === null) { + throw new Error("Missing the required parameter 'letterId' when calling showFileByLetterId"); + } + // verify the required parameter 'fileId' is set + if (fileId === undefined || fileId === null) { + throw new Error("Missing the required parameter 'fileId' when calling showFileByLetterId"); + } + + var pathParams = { + 'letterId': letterId, + 'fileId': fileId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = Letter; + return this.apiClient.callApi( + '/letter/{letterId}/file/{fileId}', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Info for a specific file + * @param {Number} letterId The id of the letter of file + * @param {Number} fileId The id of the file to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Letter} + */ + this.showFileByLetterId = function(letterId, fileId) { + return this.showFileByLetterIdWithHttpInfo(letterId, fileId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/src/small_eod_client/InstitutionApi.js b/src/small_eod_client/InstitutionApi.js new file mode 100644 index 0000000..a17684b --- /dev/null +++ b/src/small_eod_client/InstitutionApi.js @@ -0,0 +1,150 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Error', 'model/Institution'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/Error'), require('../model/Institution')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.InstitutionApi = factory(root.SmallEod.ApiClient, root.SmallEod.Error, root.SmallEod.Institution); + } +}(this, function(ApiClient, Error, Institution) { + 'use strict'; + + /** + * Institution service. + * @module small_eod_client/InstitutionApi + * @version 1.0.0 + */ + + /** + * Constructs a new InstitutionApi. + * @alias module:small_eod_client/InstitutionApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a institution + * @param {module:model/Institution} institution New institution + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Institution} and HTTP response + */ + this.createInstitutionWithHttpInfo = function(institution) { + var postBody = institution; + // verify the required parameter 'institution' is set + if (institution === undefined || institution === null) { + throw new Error("Missing the required parameter 'institution' when calling createInstitution"); + } + + var pathParams = { + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = Institution; + return this.apiClient.callApi( + '/institution', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a institution + * @param {module:model/Institution} institution New institution + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Institution} + */ + this.createInstitution = function(institution) { + return this.createInstitutionWithHttpInfo(institution) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * List all institutions + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response + */ + this.listInstitutionWithHttpInfo = function(opts) { + opts = opts || {}; + var postBody = null; + + var pathParams = { + }; + var queryParams = { + 'limit': opts['limit'], + 'offset': opts['offset'], + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = [Institution]; + return this.apiClient.callApi( + '/institution', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * List all institutions + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} + */ + this.listInstitution = function(opts) { + return this.listInstitutionWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/src/small_eod_client/LetterApi.js b/src/small_eod_client/LetterApi.js new file mode 100644 index 0000000..d5fe676 --- /dev/null +++ b/src/small_eod_client/LetterApi.js @@ -0,0 +1,249 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Error', 'model/Letter'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/Error'), require('../model/Letter')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.LetterApi = factory(root.SmallEod.ApiClient, root.SmallEod.Error, root.SmallEod.Letter); + } +}(this, function(ApiClient, Error, Letter) { + 'use strict'; + + /** + * Letter service. + * @module small_eod_client/LetterApi + * @version 1.0.0 + */ + + /** + * Constructs a new LetterApi. + * @alias module:small_eod_client/LetterApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a letter + * @param {module:model/Letter} letter New letter + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Letter} and HTTP response + */ + this.createLetterWithHttpInfo = function(letter) { + var postBody = letter; + // verify the required parameter 'letter' is set + if (letter === undefined || letter === null) { + throw new Error("Missing the required parameter 'letter' when calling createLetter"); + } + + var pathParams = { + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = Letter; + return this.apiClient.callApi( + '/letter', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a letter + * @param {module:model/Letter} letter New letter + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Letter} + */ + this.createLetter = function(letter) { + return this.createLetterWithHttpInfo(letter) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Deletes a single letter based on the ID supplied + * @param {Number} letterId The id of the letter to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + this.deleteLetterWithHttpInfo = function(letterId) { + var postBody = null; + // verify the required parameter 'letterId' is set + if (letterId === undefined || letterId === null) { + throw new Error("Missing the required parameter 'letterId' when calling deleteLetter"); + } + + var pathParams = { + 'letterId': letterId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = null; + return this.apiClient.callApi( + '/letter/{letterId}', 'DELETE', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Deletes a single letter based on the ID supplied + * @param {Number} letterId The id of the letter to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.deleteLetter = function(letterId) { + return this.deleteLetterWithHttpInfo(letterId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * List all letters + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @param {Number} opts._case Case ID + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response + */ + this.listLetterWithHttpInfo = function(opts) { + opts = opts || {}; + var postBody = null; + + var pathParams = { + }; + var queryParams = { + 'limit': opts['limit'], + 'offset': opts['offset'], + 'case': opts['_case'], + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = [Letter]; + return this.apiClient.callApi( + '/letter', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * List all letters + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @param {Number} opts._case Case ID + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} + */ + this.listLetter = function(opts) { + return this.listLetterWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Info for a specific letter + * @param {Number} letterId The id of the letter to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Letter} and HTTP response + */ + this.showLetterByIdWithHttpInfo = function(letterId) { + var postBody = null; + // verify the required parameter 'letterId' is set + if (letterId === undefined || letterId === null) { + throw new Error("Missing the required parameter 'letterId' when calling showLetterById"); + } + + var pathParams = { + 'letterId': letterId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = Letter; + return this.apiClient.callApi( + '/letter/{letterId}', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Info for a specific letter + * @param {Number} letterId The id of the letter to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Letter} + */ + this.showLetterById = function(letterId) { + return this.showLetterByIdWithHttpInfo(letterId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/src/small_eod_client/NoteApi.js b/src/small_eod_client/NoteApi.js new file mode 100644 index 0000000..9ae9206 --- /dev/null +++ b/src/small_eod_client/NoteApi.js @@ -0,0 +1,249 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Error', 'model/Note'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/Error'), require('../model/Note')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.NoteApi = factory(root.SmallEod.ApiClient, root.SmallEod.Error, root.SmallEod.Note); + } +}(this, function(ApiClient, Error, Note) { + 'use strict'; + + /** + * Note service. + * @module small_eod_client/NoteApi + * @version 1.0.0 + */ + + /** + * Constructs a new NoteApi. + * @alias module:small_eod_client/NoteApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a note + * @param {module:model/Note} note New note + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Note} and HTTP response + */ + this.createNoteWithHttpInfo = function(note) { + var postBody = note; + // verify the required parameter 'note' is set + if (note === undefined || note === null) { + throw new Error("Missing the required parameter 'note' when calling createNote"); + } + + var pathParams = { + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = Note; + return this.apiClient.callApi( + '/note', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a note + * @param {module:model/Note} note New note + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Note} + */ + this.createNote = function(note) { + return this.createNoteWithHttpInfo(note) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Deletes a single note based on the ID supplied + * @param {Number} noteId The id of the note to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + this.deleteNoteWithHttpInfo = function(noteId) { + var postBody = null; + // verify the required parameter 'noteId' is set + if (noteId === undefined || noteId === null) { + throw new Error("Missing the required parameter 'noteId' when calling deleteNote"); + } + + var pathParams = { + 'noteId': noteId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = null; + return this.apiClient.callApi( + '/note/{noteId}', 'DELETE', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Deletes a single note based on the ID supplied + * @param {Number} noteId The id of the note to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.deleteNote = function(noteId) { + return this.deleteNoteWithHttpInfo(noteId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * List all notes of case + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @param {Number} opts._case Case ID + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response + */ + this.listNoteWithHttpInfo = function(opts) { + opts = opts || {}; + var postBody = null; + + var pathParams = { + }; + var queryParams = { + 'limit': opts['limit'], + 'offset': opts['offset'], + 'case': opts['_case'], + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = [Note]; + return this.apiClient.callApi( + '/note', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * List all notes of case + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @param {Number} opts._case Case ID + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} + */ + this.listNote = function(opts) { + return this.listNoteWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Info for a specific note + * @param {Number} noteId The id of the note to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Note} and HTTP response + */ + this.showNoteByIdWithHttpInfo = function(noteId) { + var postBody = null; + // verify the required parameter 'noteId' is set + if (noteId === undefined || noteId === null) { + throw new Error("Missing the required parameter 'noteId' when calling showNoteById"); + } + + var pathParams = { + 'noteId': noteId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = Note; + return this.apiClient.callApi( + '/note/{noteId}', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Info for a specific note + * @param {Number} noteId The id of the note to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Note} + */ + this.showNoteById = function(noteId) { + return this.showNoteByIdWithHttpInfo(noteId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/src/small_eod_client/NotifiedUserApi.js b/src/small_eod_client/NotifiedUserApi.js new file mode 100644 index 0000000..a4a1c57 --- /dev/null +++ b/src/small_eod_client/NotifiedUserApi.js @@ -0,0 +1,217 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Error', 'model/UserRef'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/Error'), require('../model/UserRef')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.NotifiedUserApi = factory(root.SmallEod.ApiClient, root.SmallEod.Error, root.SmallEod.UserRef); + } +}(this, function(ApiClient, Error, UserRef) { + 'use strict'; + + /** + * NotifiedUser service. + * @module small_eod_client/NotifiedUserApi + * @version 1.0.0 + */ + + /** + * Constructs a new NotifiedUserApi. + * @alias module:small_eod_client/NotifiedUserApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a notified user reference of case + * @param {Number} caseId The id of the case to modify + * @param {module:model/UserRef} userRef New notified user + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/UserRef} and HTTP response + */ + this.createNotifiedUserWithHttpInfo = function(caseId, userRef) { + var postBody = userRef; + // verify the required parameter 'caseId' is set + if (caseId === undefined || caseId === null) { + throw new Error("Missing the required parameter 'caseId' when calling createNotifiedUser"); + } + // verify the required parameter 'userRef' is set + if (userRef === undefined || userRef === null) { + throw new Error("Missing the required parameter 'userRef' when calling createNotifiedUser"); + } + + var pathParams = { + 'caseId': caseId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = UserRef; + return this.apiClient.callApi( + '/case/{caseId}/notifiedUser', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a notified user reference of case + * @param {Number} caseId The id of the case to modify + * @param {module:model/UserRef} userRef New notified user + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UserRef} + */ + this.createNotifiedUser = function(caseId, userRef) { + return this.createNotifiedUserWithHttpInfo(caseId, userRef) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Deletes a single notified user based on the ID supplied + * @param {Number} caseId The id of the case to modify + * @param {Number} notifiedUserId The id of the responsible user to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + this.deleteNotifiedUserWithHttpInfo = function(caseId, notifiedUserId) { + var postBody = null; + // verify the required parameter 'caseId' is set + if (caseId === undefined || caseId === null) { + throw new Error("Missing the required parameter 'caseId' when calling deleteNotifiedUser"); + } + // verify the required parameter 'notifiedUserId' is set + if (notifiedUserId === undefined || notifiedUserId === null) { + throw new Error("Missing the required parameter 'notifiedUserId' when calling deleteNotifiedUser"); + } + + var pathParams = { + 'caseId': caseId, + 'notifiedUserId': notifiedUserId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = null; + return this.apiClient.callApi( + '/case/{caseId}/notifiedUser/{notifiedUserId}', 'DELETE', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Deletes a single notified user based on the ID supplied + * @param {Number} caseId The id of the case to modify + * @param {Number} notifiedUserId The id of the responsible user to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.deleteNotifiedUser = function(caseId, notifiedUserId) { + return this.deleteNotifiedUserWithHttpInfo(caseId, notifiedUserId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Info for a specific notified user of case + * @param {Number} caseId The id of the case to modify + * @param {Number} notifiedUserId The id of the responsible user to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/UserRef} and HTTP response + */ + this.shownotifiedUserByIdWithHttpInfo = function(caseId, notifiedUserId) { + var postBody = null; + // verify the required parameter 'caseId' is set + if (caseId === undefined || caseId === null) { + throw new Error("Missing the required parameter 'caseId' when calling shownotifiedUserById"); + } + // verify the required parameter 'notifiedUserId' is set + if (notifiedUserId === undefined || notifiedUserId === null) { + throw new Error("Missing the required parameter 'notifiedUserId' when calling shownotifiedUserById"); + } + + var pathParams = { + 'caseId': caseId, + 'notifiedUserId': notifiedUserId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = UserRef; + return this.apiClient.callApi( + '/case/{caseId}/notifiedUser/{notifiedUserId}', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Info for a specific notified user of case + * @param {Number} caseId The id of the case to modify + * @param {Number} notifiedUserId The id of the responsible user to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UserRef} + */ + this.shownotifiedUserById = function(caseId, notifiedUserId) { + return this.shownotifiedUserByIdWithHttpInfo(caseId, notifiedUserId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/src/small_eod_client/ResponsibleUserApi.js b/src/small_eod_client/ResponsibleUserApi.js new file mode 100644 index 0000000..0c9dc39 --- /dev/null +++ b/src/small_eod_client/ResponsibleUserApi.js @@ -0,0 +1,217 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Error', 'model/UserRef'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/Error'), require('../model/UserRef')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.ResponsibleUserApi = factory(root.SmallEod.ApiClient, root.SmallEod.Error, root.SmallEod.UserRef); + } +}(this, function(ApiClient, Error, UserRef) { + 'use strict'; + + /** + * ResponsibleUser service. + * @module small_eod_client/ResponsibleUserApi + * @version 1.0.0 + */ + + /** + * Constructs a new ResponsibleUserApi. + * @alias module:small_eod_client/ResponsibleUserApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a responsible user reference of case + * @param {Number} caseId The id of the case to modify + * @param {module:model/UserRef} userRef New responsible user + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/UserRef} and HTTP response + */ + this.createResponsibleUserWithHttpInfo = function(caseId, userRef) { + var postBody = userRef; + // verify the required parameter 'caseId' is set + if (caseId === undefined || caseId === null) { + throw new Error("Missing the required parameter 'caseId' when calling createResponsibleUser"); + } + // verify the required parameter 'userRef' is set + if (userRef === undefined || userRef === null) { + throw new Error("Missing the required parameter 'userRef' when calling createResponsibleUser"); + } + + var pathParams = { + 'caseId': caseId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = UserRef; + return this.apiClient.callApi( + '/case/{caseId}/responsibleUser', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a responsible user reference of case + * @param {Number} caseId The id of the case to modify + * @param {module:model/UserRef} userRef New responsible user + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UserRef} + */ + this.createResponsibleUser = function(caseId, userRef) { + return this.createResponsibleUserWithHttpInfo(caseId, userRef) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Deletes a single responsible user based on the ID supplied + * @param {Number} caseId The id of the case to modify + * @param {Number} responsibleUserId The id of the responsible user to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + this.deleteResponsibleUserWithHttpInfo = function(caseId, responsibleUserId) { + var postBody = null; + // verify the required parameter 'caseId' is set + if (caseId === undefined || caseId === null) { + throw new Error("Missing the required parameter 'caseId' when calling deleteResponsibleUser"); + } + // verify the required parameter 'responsibleUserId' is set + if (responsibleUserId === undefined || responsibleUserId === null) { + throw new Error("Missing the required parameter 'responsibleUserId' when calling deleteResponsibleUser"); + } + + var pathParams = { + 'caseId': caseId, + 'responsibleUserId': responsibleUserId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = null; + return this.apiClient.callApi( + '/case/{caseId}/responsibleUser/{responsibleUserId}', 'DELETE', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Deletes a single responsible user based on the ID supplied + * @param {Number} caseId The id of the case to modify + * @param {Number} responsibleUserId The id of the responsible user to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.deleteResponsibleUser = function(caseId, responsibleUserId) { + return this.deleteResponsibleUserWithHttpInfo(caseId, responsibleUserId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Info for a specific responsible user of case + * @param {Number} caseId The id of the case to retrieve + * @param {Number} responsibleUserId The id of the responsible user to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/UserRef} and HTTP response + */ + this.showcaseByIdWithHttpInfo = function(caseId, responsibleUserId) { + var postBody = null; + // verify the required parameter 'caseId' is set + if (caseId === undefined || caseId === null) { + throw new Error("Missing the required parameter 'caseId' when calling showcaseById"); + } + // verify the required parameter 'responsibleUserId' is set + if (responsibleUserId === undefined || responsibleUserId === null) { + throw new Error("Missing the required parameter 'responsibleUserId' when calling showcaseById"); + } + + var pathParams = { + 'caseId': caseId, + 'responsibleUserId': responsibleUserId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = UserRef; + return this.apiClient.callApi( + '/case/{caseId}/responsibleUser/{responsibleUserId}', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Info for a specific responsible user of case + * @param {Number} caseId The id of the case to retrieve + * @param {Number} responsibleUserId The id of the responsible user to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UserRef} + */ + this.showcaseById = function(caseId, responsibleUserId) { + return this.showcaseByIdWithHttpInfo(caseId, responsibleUserId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/src/small_eod_client/SessionApi.js b/src/small_eod_client/SessionApi.js new file mode 100644 index 0000000..19b2ff4 --- /dev/null +++ b/src/small_eod_client/SessionApi.js @@ -0,0 +1,265 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Error', 'model/Session'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/Error'), require('../model/Session')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.SessionApi = factory(root.SmallEod.ApiClient, root.SmallEod.Error, root.SmallEod.Session); + } +}(this, function(ApiClient, Error, Session) { + 'use strict'; + + /** + * Session service. + * @module small_eod_client/SessionApi + * @version 1.0.0 + */ + + /** + * Constructs a new SessionApi. + * @alias module:small_eod_client/SessionApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a session + * @param {Number} userId The id of the user to modify + * @param {Object} body New session + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Session} and HTTP response + */ + this.createSessionWithHttpInfo = function(userId, body) { + var postBody = body; + // verify the required parameter 'userId' is set + if (userId === undefined || userId === null) { + throw new Error("Missing the required parameter 'userId' when calling createSession"); + } + // verify the required parameter 'body' is set + if (body === undefined || body === null) { + throw new Error("Missing the required parameter 'body' when calling createSession"); + } + + var pathParams = { + 'userId': userId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['basicAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = Session; + return this.apiClient.callApi( + '/user/{userId}/session', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a session + * @param {Number} userId The id of the user to modify + * @param {Object} body New session + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Session} + */ + this.createSession = function(userId, body) { + return this.createSessionWithHttpInfo(userId, body) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Deletes a single session based on the ID supplied + * @param {Number} userId The id of the user to modify + * @param {Number} sessionId The id of the session to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + this.deleteSessionWithHttpInfo = function(userId, sessionId) { + var postBody = null; + // verify the required parameter 'userId' is set + if (userId === undefined || userId === null) { + throw new Error("Missing the required parameter 'userId' when calling deleteSession"); + } + // verify the required parameter 'sessionId' is set + if (sessionId === undefined || sessionId === null) { + throw new Error("Missing the required parameter 'sessionId' when calling deleteSession"); + } + + var pathParams = { + 'userId': userId, + 'sessionId': sessionId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = null; + return this.apiClient.callApi( + '/user/{userId}/session/{sessionId}', 'DELETE', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Deletes a single session based on the ID supplied + * @param {Number} userId The id of the user to modify + * @param {Number} sessionId The id of the session to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.deleteSession = function(userId, sessionId) { + return this.deleteSessionWithHttpInfo(userId, sessionId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * List all sessions + * @param {Number} userId The id of the user to modify + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response + */ + this.listSessionOfUserWithHttpInfo = function(userId) { + var postBody = null; + // verify the required parameter 'userId' is set + if (userId === undefined || userId === null) { + throw new Error("Missing the required parameter 'userId' when calling listSessionOfUser"); + } + + var pathParams = { + 'userId': userId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = [Session]; + return this.apiClient.callApi( + '/user/{userId}/session', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * List all sessions + * @param {Number} userId The id of the user to modify + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} + */ + this.listSessionOfUser = function(userId) { + return this.listSessionOfUserWithHttpInfo(userId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Info for a specific session of user + * @param {Number} userId The id of the user to retrieve + * @param {Number} sessionId The id of the user to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Session} and HTTP response + */ + this.showSessionByIdWithHttpInfo = function(userId, sessionId) { + var postBody = null; + // verify the required parameter 'userId' is set + if (userId === undefined || userId === null) { + throw new Error("Missing the required parameter 'userId' when calling showSessionById"); + } + // verify the required parameter 'sessionId' is set + if (sessionId === undefined || sessionId === null) { + throw new Error("Missing the required parameter 'sessionId' when calling showSessionById"); + } + + var pathParams = { + 'userId': userId, + 'sessionId': sessionId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = Session; + return this.apiClient.callApi( + '/user/{userId}/session/{sessionId}', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Info for a specific session of user + * @param {Number} userId The id of the user to retrieve + * @param {Number} sessionId The id of the user to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Session} + */ + this.showSessionById = function(userId, sessionId) { + return this.showSessionByIdWithHttpInfo(userId, sessionId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/src/small_eod_client/TagNamespaceApi.js b/src/small_eod_client/TagNamespaceApi.js new file mode 100644 index 0000000..47c8819 --- /dev/null +++ b/src/small_eod_client/TagNamespaceApi.js @@ -0,0 +1,246 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Error', 'model/TagNamespace'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/Error'), require('../model/TagNamespace')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.TagNamespaceApi = factory(root.SmallEod.ApiClient, root.SmallEod.Error, root.SmallEod.TagNamespace); + } +}(this, function(ApiClient, Error, TagNamespace) { + 'use strict'; + + /** + * TagNamespace service. + * @module small_eod_client/TagNamespaceApi + * @version 1.0.0 + */ + + /** + * Constructs a new TagNamespaceApi. + * @alias module:small_eod_client/TagNamespaceApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a tag namespace + * @param {module:model/TagNamespace} tagNamespace New tag namespace + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TagNamespace} and HTTP response + */ + this.createTagNamespaceWithHttpInfo = function(tagNamespace) { + var postBody = tagNamespace; + // verify the required parameter 'tagNamespace' is set + if (tagNamespace === undefined || tagNamespace === null) { + throw new Error("Missing the required parameter 'tagNamespace' when calling createTagNamespace"); + } + + var pathParams = { + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = TagNamespace; + return this.apiClient.callApi( + '/tagNamespace', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a tag namespace + * @param {module:model/TagNamespace} tagNamespace New tag namespace + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TagNamespace} + */ + this.createTagNamespace = function(tagNamespace) { + return this.createTagNamespaceWithHttpInfo(tagNamespace) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Deletes a single tag namespace based on the ID supplied + * @param {Number} tagNamespaceId The id of the tag namespace to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + this.deleteTagNamespaceWithHttpInfo = function(tagNamespaceId) { + var postBody = null; + // verify the required parameter 'tagNamespaceId' is set + if (tagNamespaceId === undefined || tagNamespaceId === null) { + throw new Error("Missing the required parameter 'tagNamespaceId' when calling deleteTagNamespace"); + } + + var pathParams = { + 'tagNamespaceId': tagNamespaceId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = null; + return this.apiClient.callApi( + '/tagNamespace/{tagNamespaceId}', 'DELETE', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Deletes a single tag namespace based on the ID supplied + * @param {Number} tagNamespaceId The id of the tag namespace to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.deleteTagNamespace = function(tagNamespaceId) { + return this.deleteTagNamespaceWithHttpInfo(tagNamespaceId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * List all tag namespaces + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response + */ + this.listTagNamespaceWithHttpInfo = function(opts) { + opts = opts || {}; + var postBody = null; + + var pathParams = { + }; + var queryParams = { + 'limit': opts['limit'], + 'offset': opts['offset'], + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = [TagNamespace]; + return this.apiClient.callApi( + '/tagNamespace', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * List all tag namespaces + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} + */ + this.listTagNamespace = function(opts) { + return this.listTagNamespaceWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Info for a specific tag namespace + * @param {Number} tagNamespaceId The id of the tag namespace to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/TagNamespace} and HTTP response + */ + this.showTagNamespaceByIdWithHttpInfo = function(tagNamespaceId) { + var postBody = null; + // verify the required parameter 'tagNamespaceId' is set + if (tagNamespaceId === undefined || tagNamespaceId === null) { + throw new Error("Missing the required parameter 'tagNamespaceId' when calling showTagNamespaceById"); + } + + var pathParams = { + 'tagNamespaceId': tagNamespaceId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = TagNamespace; + return this.apiClient.callApi( + '/tagNamespace/{tagNamespaceId}', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Info for a specific tag namespace + * @param {Number} tagNamespaceId The id of the tag namespace to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/TagNamespace} + */ + this.showTagNamespaceById = function(tagNamespaceId) { + return this.showTagNamespaceByIdWithHttpInfo(tagNamespaceId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/src/small_eod_client/UserApi.js b/src/small_eod_client/UserApi.js new file mode 100644 index 0000000..f1d6565 --- /dev/null +++ b/src/small_eod_client/UserApi.js @@ -0,0 +1,246 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * Do not edit the class manually. + * + */ + +(function(root, factory) { + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define(['ApiClient', 'model/Error', 'model/User'], factory); + } else if (typeof module === 'object' && module.exports) { + // CommonJS-like environments that support module.exports, like Node. + module.exports = factory(require('../ApiClient'), require('../model/Error'), require('../model/User')); + } else { + // Browser globals (root is window) + if (!root.SmallEod) { + root.SmallEod = {}; + } + root.SmallEod.UserApi = factory(root.SmallEod.ApiClient, root.SmallEod.Error, root.SmallEod.User); + } +}(this, function(ApiClient, Error, User) { + 'use strict'; + + /** + * User service. + * @module small_eod_client/UserApi + * @version 1.0.0 + */ + + /** + * Constructs a new UserApi. + * @alias module:small_eod_client/UserApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + var exports = function(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + + + + /** + * Create a user + * @param {module:model/User} user New user + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/User} and HTTP response + */ + this.createUserWithHttpInfo = function(user) { + var postBody = user; + // verify the required parameter 'user' is set + if (user === undefined || user === null) { + throw new Error("Missing the required parameter 'user' when calling createUser"); + } + + var pathParams = { + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = ['application/json']; + var accepts = ['application/json']; + var returnType = User; + return this.apiClient.callApi( + '/user', 'POST', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Create a user + * @param {module:model/User} user New user + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/User} + */ + this.createUser = function(user) { + return this.createUserWithHttpInfo(user) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Deletes a single user based on the ID supplied + * @param {Number} userId The id of the user to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + this.deleteUserWithHttpInfo = function(userId) { + var postBody = null; + // verify the required parameter 'userId' is set + if (userId === undefined || userId === null) { + throw new Error("Missing the required parameter 'userId' when calling deleteUser"); + } + + var pathParams = { + 'userId': userId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = null; + return this.apiClient.callApi( + '/user/{userId}', 'DELETE', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Deletes a single user based on the ID supplied + * @param {Number} userId The id of the user to delete + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + this.deleteUser = function(userId) { + return this.deleteUserWithHttpInfo(userId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * List all users + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response + */ + this.listUserWithHttpInfo = function(opts) { + opts = opts || {}; + var postBody = null; + + var pathParams = { + }; + var queryParams = { + 'limit': opts['limit'], + 'offset': opts['offset'], + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = [User]; + return this.apiClient.callApi( + '/user', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * List all users + * @param {Object} opts Optional parameters + * @param {Number} opts.limit How many items to return at one time (max 100) + * @param {Number} opts.offset How many items skip in return + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} + */ + this.listUser = function(opts) { + return this.listUserWithHttpInfo(opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * Info for a specific user + * @param {Number} userId The id of the user to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/User} and HTTP response + */ + this.showUserByIdWithHttpInfo = function(userId) { + var postBody = null; + // verify the required parameter 'userId' is set + if (userId === undefined || userId === null) { + throw new Error("Missing the required parameter 'userId' when calling showUserById"); + } + + var pathParams = { + 'userId': userId + }; + var queryParams = { + }; + var collectionQueryParams = { + }; + var headerParams = { + }; + var formParams = { + }; + + var authNames = ['sessionAuth']; + var contentTypes = []; + var accepts = ['application/json']; + var returnType = User; + return this.apiClient.callApi( + '/user/{userId}', 'GET', + pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * Info for a specific user + * @param {Number} userId The id of the user to retrieve + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/User} + */ + this.showUserById = function(userId) { + return this.showUserByIdWithHttpInfo(userId) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + }; + + return exports; +})); diff --git a/test/api/AdministrativeUnitApi.spec.js b/test/api/AdministrativeUnitApi.spec.js new file mode 100644 index 0000000..e64d305 --- /dev/null +++ b/test/api/AdministrativeUnitApi.spec.js @@ -0,0 +1,96 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * 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.SmallEod); + } +}(this, function(expect, SmallEod) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new SmallEod.AdministrativeUnitApi(); + }); + + 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('AdministrativeUnitApi', function() { + describe('createAdministrativeUnit', function() { + it('should call createAdministrativeUnit successfully', function(done) { + //uncomment below and update the code to test createAdministrativeUnit + //instance.createAdministrativeUnit(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('deleteAdministrativeUnit', function() { + it('should call deleteAdministrativeUnit successfully', function(done) { + //uncomment below and update the code to test deleteAdministrativeUnit + //instance.deleteAdministrativeUnit(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('listAdministrativeUnit', function() { + it('should call listAdministrativeUnit successfully', function(done) { + //uncomment below and update the code to test listAdministrativeUnit + //instance.listAdministrativeUnit(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('showAdministrativeUnitById', function() { + it('should call showAdministrativeUnitById successfully', function(done) { + //uncomment below and update the code to test showAdministrativeUnitById + //instance.showAdministrativeUnitById(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + }); + +})); diff --git a/test/api/CaseApi.spec.js b/test/api/CaseApi.spec.js new file mode 100644 index 0000000..fbeba69 --- /dev/null +++ b/test/api/CaseApi.spec.js @@ -0,0 +1,106 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * 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.SmallEod); + } +}(this, function(expect, SmallEod) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new SmallEod.CaseApi(); + }); + + 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('CaseApi', function() { + describe('createCase', function() { + it('should call createCase successfully', function(done) { + //uncomment below and update the code to test createCase + //instance.createCase(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('deleteCase', function() { + it('should call deleteCase successfully', function(done) { + //uncomment below and update the code to test deleteCase + //instance.deleteCase(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('listCase', function() { + it('should call listCase successfully', function(done) { + //uncomment below and update the code to test listCase + //instance.listCase(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('showCaseById', function() { + it('should call showCaseById successfully', function(done) { + //uncomment below and update the code to test showCaseById + //instance.showCaseById(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('updateCaseById', function() { + it('should call updateCaseById successfully', function(done) { + //uncomment below and update the code to test updateCaseById + //instance.updateCaseById(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + }); + +})); diff --git a/test/api/CollectionApi.spec.js b/test/api/CollectionApi.spec.js new file mode 100644 index 0000000..bb444d1 --- /dev/null +++ b/test/api/CollectionApi.spec.js @@ -0,0 +1,146 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * 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.SmallEod); + } +}(this, function(expect, SmallEod) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new SmallEod.CollectionApi(); + }); + + 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('CollectionApi', function() { + describe('createCollection', function() { + it('should call createCollection successfully', function(done) { + //uncomment below and update the code to test createCollection + //instance.createCollection(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('deleteCollection', function() { + it('should call deleteCollection successfully', function(done) { + //uncomment below and update the code to test deleteCollection + //instance.deleteCollection(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('listCollection', function() { + it('should call listCollection successfully', function(done) { + //uncomment below and update the code to test listCollection + //instance.listCollection(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('showCaseByCollection', function() { + it('should call showCaseByCollection successfully', function(done) { + //uncomment below and update the code to test showCaseByCollection + //instance.showCaseByCollection(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('showCollectionById', function() { + it('should call showCollectionById successfully', function(done) { + //uncomment below and update the code to test showCollectionById + //instance.showCollectionById(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('showEventCaseByCollection', function() { + it('should call showEventCaseByCollection successfully', function(done) { + //uncomment below and update the code to test showEventCaseByCollection + //instance.showEventCaseByCollection(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('showLetterCaseByCollection', function() { + it('should call showLetterCaseByCollection successfully', function(done) { + //uncomment below and update the code to test showLetterCaseByCollection + //instance.showLetterCaseByCollection(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('showNoteCaseByCollection', function() { + it('should call showNoteCaseByCollection successfully', function(done) { + //uncomment below and update the code to test showNoteCaseByCollection + //instance.showNoteCaseByCollection(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('updateCollectionById', function() { + it('should call updateCollectionById successfully', function(done) { + //uncomment below and update the code to test updateCollectionById + //instance.updateCollectionById(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + }); + +})); diff --git a/test/api/DescriptionApi.spec.js b/test/api/DescriptionApi.spec.js new file mode 100644 index 0000000..df63e91 --- /dev/null +++ b/test/api/DescriptionApi.spec.js @@ -0,0 +1,96 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * 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.SmallEod); + } +}(this, function(expect, SmallEod) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new SmallEod.DescriptionApi(); + }); + + 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('DescriptionApi', function() { + describe('createDescription', function() { + it('should call createDescription successfully', function(done) { + //uncomment below and update the code to test createDescription + //instance.createDescription(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('deleteDescription', function() { + it('should call deleteDescription successfully', function(done) { + //uncomment below and update the code to test deleteDescription + //instance.deleteDescription(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('listDescription', function() { + it('should call listDescription successfully', function(done) { + //uncomment below and update the code to test listDescription + //instance.listDescription(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('showDescriptionById', function() { + it('should call showDescriptionById successfully', function(done) { + //uncomment below and update the code to test showDescriptionById + //instance.showDescriptionById(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + }); + +})); diff --git a/test/api/DictionaryApi.spec.js b/test/api/DictionaryApi.spec.js new file mode 100644 index 0000000..d010457 --- /dev/null +++ b/test/api/DictionaryApi.spec.js @@ -0,0 +1,96 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * 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.SmallEod); + } +}(this, function(expect, SmallEod) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new SmallEod.DictionaryApi(); + }); + + 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('DictionaryApi', function() { + describe('createDictionary', function() { + it('should call createDictionary successfully', function(done) { + //uncomment below and update the code to test createDictionary + //instance.createDictionary(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('deleteDictionary', function() { + it('should call deleteDictionary successfully', function(done) { + //uncomment below and update the code to test deleteDictionary + //instance.deleteDictionary(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('listDictionary', function() { + it('should call listDictionary successfully', function(done) { + //uncomment below and update the code to test listDictionary + //instance.listDictionary(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('showDictionaryById', function() { + it('should call showDictionaryById successfully', function(done) { + //uncomment below and update the code to test showDictionaryById + //instance.showDictionaryById(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + }); + +})); diff --git a/test/api/EventApi.spec.js b/test/api/EventApi.spec.js new file mode 100644 index 0000000..52a2017 --- /dev/null +++ b/test/api/EventApi.spec.js @@ -0,0 +1,96 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * 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.SmallEod); + } +}(this, function(expect, SmallEod) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new SmallEod.EventApi(); + }); + + 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('EventApi', function() { + describe('createEvent', function() { + it('should call createEvent successfully', function(done) { + //uncomment below and update the code to test createEvent + //instance.createEvent(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('deleteEvent', function() { + it('should call deleteEvent successfully', function(done) { + //uncomment below and update the code to test deleteEvent + //instance.deleteEvent(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('listEvent', function() { + it('should call listEvent successfully', function(done) { + //uncomment below and update the code to test listEvent + //instance.listEvent(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('showEventById', function() { + it('should call showEventById successfully', function(done) { + //uncomment below and update the code to test showEventById + //instance.showEventById(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + }); + +})); diff --git a/test/api/FileApi.spec.js b/test/api/FileApi.spec.js new file mode 100644 index 0000000..b2cbf33 --- /dev/null +++ b/test/api/FileApi.spec.js @@ -0,0 +1,86 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * 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.SmallEod); + } +}(this, function(expect, SmallEod) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new SmallEod.FileApi(); + }); + + 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('FileApi', function() { + describe('createFile', function() { + it('should call createFile successfully', function(done) { + //uncomment below and update the code to test createFile + //instance.createFile(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('createPreSignedUrl', function() { + it('should call createPreSignedUrl successfully', function(done) { + //uncomment below and update the code to test createPreSignedUrl + //instance.createPreSignedUrl(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('showFileByLetterId', function() { + it('should call showFileByLetterId successfully', function(done) { + //uncomment below and update the code to test showFileByLetterId + //instance.showFileByLetterId(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + }); + +})); diff --git a/test/api/InstitutionApi.spec.js b/test/api/InstitutionApi.spec.js new file mode 100644 index 0000000..5cff473 --- /dev/null +++ b/test/api/InstitutionApi.spec.js @@ -0,0 +1,76 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * 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.SmallEod); + } +}(this, function(expect, SmallEod) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new SmallEod.InstitutionApi(); + }); + + 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('InstitutionApi', function() { + describe('createInstitution', function() { + it('should call createInstitution successfully', function(done) { + //uncomment below and update the code to test createInstitution + //instance.createInstitution(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('listInstitution', function() { + it('should call listInstitution successfully', function(done) { + //uncomment below and update the code to test listInstitution + //instance.listInstitution(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + }); + +})); diff --git a/test/api/LetterApi.spec.js b/test/api/LetterApi.spec.js new file mode 100644 index 0000000..141a743 --- /dev/null +++ b/test/api/LetterApi.spec.js @@ -0,0 +1,96 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * 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.SmallEod); + } +}(this, function(expect, SmallEod) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new SmallEod.LetterApi(); + }); + + 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('LetterApi', function() { + describe('createLetter', function() { + it('should call createLetter successfully', function(done) { + //uncomment below and update the code to test createLetter + //instance.createLetter(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('deleteLetter', function() { + it('should call deleteLetter successfully', function(done) { + //uncomment below and update the code to test deleteLetter + //instance.deleteLetter(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('listLetter', function() { + it('should call listLetter successfully', function(done) { + //uncomment below and update the code to test listLetter + //instance.listLetter(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('showLetterById', function() { + it('should call showLetterById successfully', function(done) { + //uncomment below and update the code to test showLetterById + //instance.showLetterById(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + }); + +})); diff --git a/test/api/NoteApi.spec.js b/test/api/NoteApi.spec.js new file mode 100644 index 0000000..d0f2d24 --- /dev/null +++ b/test/api/NoteApi.spec.js @@ -0,0 +1,96 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * 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.SmallEod); + } +}(this, function(expect, SmallEod) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new SmallEod.NoteApi(); + }); + + 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('NoteApi', function() { + describe('createNote', function() { + it('should call createNote successfully', function(done) { + //uncomment below and update the code to test createNote + //instance.createNote(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('deleteNote', function() { + it('should call deleteNote successfully', function(done) { + //uncomment below and update the code to test deleteNote + //instance.deleteNote(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('listNote', function() { + it('should call listNote successfully', function(done) { + //uncomment below and update the code to test listNote + //instance.listNote(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('showNoteById', function() { + it('should call showNoteById successfully', function(done) { + //uncomment below and update the code to test showNoteById + //instance.showNoteById(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + }); + +})); diff --git a/test/api/NotifiedUserApi.spec.js b/test/api/NotifiedUserApi.spec.js new file mode 100644 index 0000000..d370090 --- /dev/null +++ b/test/api/NotifiedUserApi.spec.js @@ -0,0 +1,86 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * 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.SmallEod); + } +}(this, function(expect, SmallEod) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new SmallEod.NotifiedUserApi(); + }); + + 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('NotifiedUserApi', function() { + describe('createNotifiedUser', function() { + it('should call createNotifiedUser successfully', function(done) { + //uncomment below and update the code to test createNotifiedUser + //instance.createNotifiedUser(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('deleteNotifiedUser', function() { + it('should call deleteNotifiedUser successfully', function(done) { + //uncomment below and update the code to test deleteNotifiedUser + //instance.deleteNotifiedUser(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('shownotifiedUserById', function() { + it('should call shownotifiedUserById successfully', function(done) { + //uncomment below and update the code to test shownotifiedUserById + //instance.shownotifiedUserById(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + }); + +})); diff --git a/test/api/ResponsibleUserApi.spec.js b/test/api/ResponsibleUserApi.spec.js new file mode 100644 index 0000000..d86c462 --- /dev/null +++ b/test/api/ResponsibleUserApi.spec.js @@ -0,0 +1,86 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * 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.SmallEod); + } +}(this, function(expect, SmallEod) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new SmallEod.ResponsibleUserApi(); + }); + + 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('ResponsibleUserApi', function() { + describe('createResponsibleUser', function() { + it('should call createResponsibleUser successfully', function(done) { + //uncomment below and update the code to test createResponsibleUser + //instance.createResponsibleUser(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('deleteResponsibleUser', function() { + it('should call deleteResponsibleUser successfully', function(done) { + //uncomment below and update the code to test deleteResponsibleUser + //instance.deleteResponsibleUser(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('showcaseById', function() { + it('should call showcaseById successfully', function(done) { + //uncomment below and update the code to test showcaseById + //instance.showcaseById(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + }); + +})); diff --git a/test/api/SessionApi.spec.js b/test/api/SessionApi.spec.js new file mode 100644 index 0000000..475a5c5 --- /dev/null +++ b/test/api/SessionApi.spec.js @@ -0,0 +1,96 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * 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.SmallEod); + } +}(this, function(expect, SmallEod) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new SmallEod.SessionApi(); + }); + + 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('SessionApi', function() { + describe('createSession', function() { + it('should call createSession successfully', function(done) { + //uncomment below and update the code to test createSession + //instance.createSession(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('deleteSession', function() { + it('should call deleteSession successfully', function(done) { + //uncomment below and update the code to test deleteSession + //instance.deleteSession(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('listSessionOfUser', function() { + it('should call listSessionOfUser successfully', function(done) { + //uncomment below and update the code to test listSessionOfUser + //instance.listSessionOfUser(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('showSessionById', function() { + it('should call showSessionById successfully', function(done) { + //uncomment below and update the code to test showSessionById + //instance.showSessionById(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + }); + +})); diff --git a/test/api/TagNamespaceApi.spec.js b/test/api/TagNamespaceApi.spec.js new file mode 100644 index 0000000..5b7ec99 --- /dev/null +++ b/test/api/TagNamespaceApi.spec.js @@ -0,0 +1,96 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * 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.SmallEod); + } +}(this, function(expect, SmallEod) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new SmallEod.TagNamespaceApi(); + }); + + 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('TagNamespaceApi', function() { + describe('createTagNamespace', function() { + it('should call createTagNamespace successfully', function(done) { + //uncomment below and update the code to test createTagNamespace + //instance.createTagNamespace(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('deleteTagNamespace', function() { + it('should call deleteTagNamespace successfully', function(done) { + //uncomment below and update the code to test deleteTagNamespace + //instance.deleteTagNamespace(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('listTagNamespace', function() { + it('should call listTagNamespace successfully', function(done) { + //uncomment below and update the code to test listTagNamespace + //instance.listTagNamespace(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('showTagNamespaceById', function() { + it('should call showTagNamespaceById successfully', function(done) { + //uncomment below and update the code to test showTagNamespaceById + //instance.showTagNamespaceById(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + }); + +})); diff --git a/test/api/UserApi.spec.js b/test/api/UserApi.spec.js new file mode 100644 index 0000000..5512d27 --- /dev/null +++ b/test/api/UserApi.spec.js @@ -0,0 +1,96 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * 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.SmallEod); + } +}(this, function(expect, SmallEod) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new SmallEod.UserApi(); + }); + + 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('UserApi', function() { + describe('createUser', function() { + it('should call createUser successfully', function(done) { + //uncomment below and update the code to test createUser + //instance.createUser(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('deleteUser', function() { + it('should call deleteUser successfully', function(done) { + //uncomment below and update the code to test deleteUser + //instance.deleteUser(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('listUser', function() { + it('should call listUser successfully', function(done) { + //uncomment below and update the code to test listUser + //instance.listUser(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + describe('showUserById', function() { + it('should call showUserById successfully', function(done) { + //uncomment below and update the code to test showUserById + //instance.showUserById(function(error) { + // if (error) throw error; + //expect().to.be(); + //}); + done(); + }); + }); + }); + +})); diff --git a/test/model/AddressData.spec.js b/test/model/AddressData.spec.js new file mode 100644 index 0000000..f400197 --- /dev/null +++ b/test/model/AddressData.spec.js @@ -0,0 +1,110 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * 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.SmallEod); + } +}(this, function(expect, SmallEod) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new SmallEod.AddressData(); + }); + + 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('AddressData', function() { + it('should create an instance of AddressData', function() { + // uncomment below and update the code to test AddressData + //var instance = new SmallEod.AddressData(); + //expect(instance).to.be.a(SmallEod.AddressData); + }); + + it('should have the property email (base name: "email")', function() { + // uncomment below and update the code to test the property email + //var instance = new SmallEod.AddressData(); + //expect(instance).to.be(); + }); + + it('should have the property epuap (base name: "epuap")', function() { + // uncomment below and update the code to test the property epuap + //var instance = new SmallEod.AddressData(); + //expect(instance).to.be(); + }); + + it('should have the property street (base name: "street")', function() { + // uncomment below and update the code to test the property street + //var instance = new SmallEod.AddressData(); + //expect(instance).to.be(); + }); + + it('should have the property postalCode (base name: "postal_code")', function() { + // uncomment below and update the code to test the property postalCode + //var instance = new SmallEod.AddressData(); + //expect(instance).to.be(); + }); + + it('should have the property city (base name: "city")', function() { + // uncomment below and update the code to test the property city + //var instance = new SmallEod.AddressData(); + //expect(instance).to.be(); + }); + + it('should have the property voivodeship (base name: "voivodeship")', function() { + // uncomment below and update the code to test the property voivodeship + //var instance = new SmallEod.AddressData(); + //expect(instance).to.be(); + }); + + it('should have the property houseNo (base name: "house_no")', function() { + // uncomment below and update the code to test the property houseNo + //var instance = new SmallEod.AddressData(); + //expect(instance).to.be(); + }); + + it('should have the property flatNo (base name: "flat_no")', function() { + // uncomment below and update the code to test the property flatNo + //var instance = new SmallEod.AddressData(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/AdministrativeUnit.spec.js b/test/model/AdministrativeUnit.spec.js new file mode 100644 index 0000000..88d5bdb --- /dev/null +++ b/test/model/AdministrativeUnit.spec.js @@ -0,0 +1,92 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * 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.SmallEod); + } +}(this, function(expect, SmallEod) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new SmallEod.AdministrativeUnit(); + }); + + 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('AdministrativeUnit', function() { + it('should create an instance of AdministrativeUnit', function() { + // uncomment below and update the code to test AdministrativeUnit + //var instance = new SmallEod.AdministrativeUnit(); + //expect(instance).to.be.a(SmallEod.AdministrativeUnit); + }); + + it('should have the property id (base name: "id")', function() { + // uncomment below and update the code to test the property id + //var instance = new SmallEod.AdministrativeUnit(); + //expect(instance).to.be(); + }); + + it('should have the property name (base name: "name")', function() { + // uncomment below and update the code to test the property name + //var instance = new SmallEod.AdministrativeUnit(); + //expect(instance).to.be(); + }); + + it('should have the property level (base name: "level")', function() { + // uncomment below and update the code to test the property level + //var instance = new SmallEod.AdministrativeUnit(); + //expect(instance).to.be(); + }); + + it('should have the property category (base name: "category")', function() { + // uncomment below and update the code to test the property category + //var instance = new SmallEod.AdministrativeUnit(); + //expect(instance).to.be(); + }); + + it('should have the property terc (base name: "terc")', function() { + // uncomment below and update the code to test the property terc + //var instance = new SmallEod.AdministrativeUnit(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/CaseAuditedInstitution.spec.js b/test/model/CaseAuditedInstitution.spec.js new file mode 100644 index 0000000..58302df --- /dev/null +++ b/test/model/CaseAuditedInstitution.spec.js @@ -0,0 +1,74 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * 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.SmallEod); + } +}(this, function(expect, SmallEod) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new SmallEod.CaseAuditedInstitution(); + }); + + 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('CaseAuditedInstitution', function() { + it('should create an instance of CaseAuditedInstitution', function() { + // uncomment below and update the code to test CaseAuditedInstitution + //var instance = new SmallEod.CaseAuditedInstitution(); + //expect(instance).to.be.a(SmallEod.CaseAuditedInstitution); + }); + + it('should have the property id (base name: "id")', function() { + // uncomment below and update the code to test the property id + //var instance = new SmallEod.CaseAuditedInstitution(); + //expect(instance).to.be(); + }); + + it('should have the property user (base name: "user")', function() { + // uncomment below and update the code to test the property user + //var instance = new SmallEod.CaseAuditedInstitution(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/CaseMatrix.spec.js b/test/model/CaseMatrix.spec.js new file mode 100644 index 0000000..3ac3094 --- /dev/null +++ b/test/model/CaseMatrix.spec.js @@ -0,0 +1,80 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * 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.SmallEod); + } +}(this, function(expect, SmallEod) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new SmallEod.CaseMatrix(); + }); + + 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('CaseMatrix', function() { + it('should create an instance of CaseMatrix', function() { + // uncomment below and update the code to test CaseMatrix + //var instance = new SmallEod.CaseMatrix(); + //expect(instance).to.be.a(SmallEod.CaseMatrix); + }); + + it('should have the property id (base name: "id")', function() { + // uncomment below and update the code to test the property id + //var instance = new SmallEod.CaseMatrix(); + //expect(instance).to.be(); + }); + + it('should have the property dictionary (base name: "dictionary")', function() { + // uncomment below and update the code to test the property dictionary + //var instance = new SmallEod.CaseMatrix(); + //expect(instance).to.be(); + }); + + it('should have the property values (base name: "values")', function() { + // uncomment below and update the code to test the property values + //var instance = new SmallEod.CaseMatrix(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/Channel.spec.js b/test/model/Channel.spec.js new file mode 100644 index 0000000..3fae085 --- /dev/null +++ b/test/model/Channel.spec.js @@ -0,0 +1,104 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * 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.SmallEod); + } +}(this, function(expect, SmallEod) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new SmallEod.Channel(); + }); + + 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('Channel', function() { + it('should create an instance of Channel', function() { + // uncomment below and update the code to test Channel + //var instance = new SmallEod.Channel(); + //expect(instance).to.be.a(SmallEod.Channel); + }); + + it('should have the property id (base name: "id")', function() { + // uncomment below and update the code to test the property id + //var instance = new SmallEod.Channel(); + //expect(instance).to.be(); + }); + + it('should have the property name (base name: "name")', function() { + // uncomment below and update the code to test the property name + //var instance = new SmallEod.Channel(); + //expect(instance).to.be(); + }); + + it('should have the property required (base name: "required")', function() { + // uncomment below and update the code to test the property required + //var instance = new SmallEod.Channel(); + //expect(instance).to.be(); + }); + + it('should have the property createdOn (base name: "createdOn")', function() { + // uncomment below and update the code to test the property createdOn + //var instance = new SmallEod.Channel(); + //expect(instance).to.be(); + }); + + it('should have the property createdBy (base name: "createdBy")', function() { + // uncomment below and update the code to test the property createdBy + //var instance = new SmallEod.Channel(); + //expect(instance).to.be(); + }); + + it('should have the property modifiedOn (base name: "modifiedOn")', function() { + // uncomment below and update the code to test the property modifiedOn + //var instance = new SmallEod.Channel(); + //expect(instance).to.be(); + }); + + it('should have the property modifiedBy (base name: "modifiedBy")', function() { + // uncomment below and update the code to test the property modifiedBy + //var instance = new SmallEod.Channel(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/Collection.spec.js b/test/model/Collection.spec.js new file mode 100644 index 0000000..af07998 --- /dev/null +++ b/test/model/Collection.spec.js @@ -0,0 +1,122 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * 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.SmallEod); + } +}(this, function(expect, SmallEod) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new SmallEod.Collection(); + }); + + 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('Collection', function() { + it('should create an instance of Collection', function() { + // uncomment below and update the code to test Collection + //var instance = new SmallEod.Collection(); + //expect(instance).to.be.a(SmallEod.Collection); + }); + + it('should have the property id (base name: "id")', function() { + // uncomment below and update the code to test the property id + //var instance = new SmallEod.Collection(); + //expect(instance).to.be(); + }); + + it('should have the property name (base name: "name")', function() { + // uncomment below and update the code to test the property name + //var instance = new SmallEod.Collection(); + //expect(instance).to.be(); + }); + + it('should have the property content (base name: "content")', function() { + // uncomment below and update the code to test the property content + //var instance = new SmallEod.Collection(); + //expect(instance).to.be(); + }); + + it('should have the property _public (base name: "public")', function() { + // uncomment below and update the code to test the property _public + //var instance = new SmallEod.Collection(); + //expect(instance).to.be(); + }); + + it('should have the property expiredOn (base name: "expiredOn")', function() { + // uncomment below and update the code to test the property expiredOn + //var instance = new SmallEod.Collection(); + //expect(instance).to.be(); + }); + + it('should have the property query (base name: "query")', function() { + // uncomment below and update the code to test the property query + //var instance = new SmallEod.Collection(); + //expect(instance).to.be(); + }); + + it('should have the property createdOn (base name: "createdOn")', function() { + // uncomment below and update the code to test the property createdOn + //var instance = new SmallEod.Collection(); + //expect(instance).to.be(); + }); + + it('should have the property createdBy (base name: "createdBy")', function() { + // uncomment below and update the code to test the property createdBy + //var instance = new SmallEod.Collection(); + //expect(instance).to.be(); + }); + + it('should have the property modifiedOn (base name: "modifiedOn")', function() { + // uncomment below and update the code to test the property modifiedOn + //var instance = new SmallEod.Collection(); + //expect(instance).to.be(); + }); + + it('should have the property modifiedBy (base name: "modifiedBy")', function() { + // uncomment below and update the code to test the property modifiedBy + //var instance = new SmallEod.Collection(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/Description.spec.js b/test/model/Description.spec.js new file mode 100644 index 0000000..c6cc850 --- /dev/null +++ b/test/model/Description.spec.js @@ -0,0 +1,104 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * 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.SmallEod); + } +}(this, function(expect, SmallEod) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new SmallEod.Description(); + }); + + 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('Description', function() { + it('should create an instance of Description', function() { + // uncomment below and update the code to test Description + //var instance = new SmallEod.Description(); + //expect(instance).to.be.a(SmallEod.Description); + }); + + it('should have the property id (base name: "id")', function() { + // uncomment below and update the code to test the property id + //var instance = new SmallEod.Description(); + //expect(instance).to.be(); + }); + + it('should have the property text (base name: "text")', function() { + // uncomment below and update the code to test the property text + //var instance = new SmallEod.Description(); + //expect(instance).to.be(); + }); + + it('should have the property userAgent (base name: "userAgent")', function() { + // uncomment below and update the code to test the property userAgent + //var instance = new SmallEod.Description(); + //expect(instance).to.be(); + }); + + it('should have the property createdOn (base name: "createdOn")', function() { + // uncomment below and update the code to test the property createdOn + //var instance = new SmallEod.Description(); + //expect(instance).to.be(); + }); + + it('should have the property createdBy (base name: "createdBy")', function() { + // uncomment below and update the code to test the property createdBy + //var instance = new SmallEod.Description(); + //expect(instance).to.be(); + }); + + it('should have the property modifiedOn (base name: "modifiedOn")', function() { + // uncomment below and update the code to test the property modifiedOn + //var instance = new SmallEod.Description(); + //expect(instance).to.be(); + }); + + it('should have the property modifiedBy (base name: "modifiedBy")', function() { + // uncomment below and update the code to test the property modifiedBy + //var instance = new SmallEod.Description(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/Dictionary.spec.js b/test/model/Dictionary.spec.js new file mode 100644 index 0000000..3ba34da --- /dev/null +++ b/test/model/Dictionary.spec.js @@ -0,0 +1,122 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * 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.SmallEod); + } +}(this, function(expect, SmallEod) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new SmallEod.Dictionary(); + }); + + 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('Dictionary', function() { + it('should create an instance of Dictionary', function() { + // uncomment below and update the code to test Dictionary + //var instance = new SmallEod.Dictionary(); + //expect(instance).to.be.a(SmallEod.Dictionary); + }); + + it('should have the property id (base name: "id")', function() { + // uncomment below and update the code to test the property id + //var instance = new SmallEod.Dictionary(); + //expect(instance).to.be(); + }); + + it('should have the property name (base name: "name")', function() { + // uncomment below and update the code to test the property name + //var instance = new SmallEod.Dictionary(); + //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 instance = new SmallEod.Dictionary(); + //expect(instance).to.be(); + }); + + it('should have the property maxItems (base name: "maxItems")', function() { + // uncomment below and update the code to test the property maxItems + //var instance = new SmallEod.Dictionary(); + //expect(instance).to.be(); + }); + + it('should have the property minItems (base name: "minItems")', function() { + // uncomment below and update the code to test the property minItems + //var instance = new SmallEod.Dictionary(); + //expect(instance).to.be(); + }); + + it('should have the property active (base name: "active")', function() { + // uncomment below and update the code to test the property active + //var instance = new SmallEod.Dictionary(); + //expect(instance).to.be(); + }); + + it('should have the property createdOn (base name: "createdOn")', function() { + // uncomment below and update the code to test the property createdOn + //var instance = new SmallEod.Dictionary(); + //expect(instance).to.be(); + }); + + it('should have the property createdBy (base name: "createdBy")', function() { + // uncomment below and update the code to test the property createdBy + //var instance = new SmallEod.Dictionary(); + //expect(instance).to.be(); + }); + + it('should have the property modifiedOn (base name: "modifiedOn")', function() { + // uncomment below and update the code to test the property modifiedOn + //var instance = new SmallEod.Dictionary(); + //expect(instance).to.be(); + }); + + it('should have the property modifiedBy (base name: "modifiedBy")', function() { + // uncomment below and update the code to test the property modifiedBy + //var instance = new SmallEod.Dictionary(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/DictionaryValue.spec.js b/test/model/DictionaryValue.spec.js new file mode 100644 index 0000000..a38a629 --- /dev/null +++ b/test/model/DictionaryValue.spec.js @@ -0,0 +1,74 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * 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.SmallEod); + } +}(this, function(expect, SmallEod) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new SmallEod.DictionaryValue(); + }); + + 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('DictionaryValue', function() { + it('should create an instance of DictionaryValue', function() { + // uncomment below and update the code to test DictionaryValue + //var instance = new SmallEod.DictionaryValue(); + //expect(instance).to.be.a(SmallEod.DictionaryValue); + }); + + it('should have the property id (base name: "id")', function() { + // uncomment below and update the code to test the property id + //var instance = new SmallEod.DictionaryValue(); + //expect(instance).to.be(); + }); + + it('should have the property name (base name: "name")', function() { + // uncomment below and update the code to test the property name + //var instance = new SmallEod.DictionaryValue(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/Error.spec.js b/test/model/Error.spec.js new file mode 100644 index 0000000..34c1191 --- /dev/null +++ b/test/model/Error.spec.js @@ -0,0 +1,74 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * 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.SmallEod); + } +}(this, function(expect, SmallEod) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new SmallEod.Error(); + }); + + 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('Error', function() { + it('should create an instance of Error', function() { + // uncomment below and update the code to test Error + //var instance = new SmallEod.Error(); + //expect(instance).to.be.a(SmallEod.Error); + }); + + it('should have the property code (base name: "code")', function() { + // uncomment below and update the code to test the property code + //var instance = new SmallEod.Error(); + //expect(instance).to.be(); + }); + + it('should have the property message (base name: "message")', function() { + // uncomment below and update the code to test the property message + //var instance = new SmallEod.Error(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/Event.spec.js b/test/model/Event.spec.js new file mode 100644 index 0000000..9f75616 --- /dev/null +++ b/test/model/Event.spec.js @@ -0,0 +1,116 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * 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.SmallEod); + } +}(this, function(expect, SmallEod) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new SmallEod.Event(); + }); + + 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('Event', function() { + it('should create an instance of Event', function() { + // uncomment below and update the code to test Event + //var instance = new SmallEod.Event(); + //expect(instance).to.be.a(SmallEod.Event); + }); + + it('should have the property id (base name: "id")', function() { + // uncomment below and update the code to test the property id + //var instance = new SmallEod.Event(); + //expect(instance).to.be(); + }); + + it('should have the property _case (base name: "case")', function() { + // uncomment below and update the code to test the property _case + //var instance = new SmallEod.Event(); + //expect(instance).to.be(); + }); + + it('should have the property name (base name: "name")', function() { + // uncomment below and update the code to test the property name + //var instance = new SmallEod.Event(); + //expect(instance).to.be(); + }); + + it('should have the property data (base name: "data")', function() { + // uncomment below and update the code to test the property data + //var instance = new SmallEod.Event(); + //expect(instance).to.be(); + }); + + it('should have the property comment (base name: "comment")', function() { + // uncomment below and update the code to test the property comment + //var instance = new SmallEod.Event(); + //expect(instance).to.be(); + }); + + it('should have the property createdOn (base name: "createdOn")', function() { + // uncomment below and update the code to test the property createdOn + //var instance = new SmallEod.Event(); + //expect(instance).to.be(); + }); + + it('should have the property createdBy (base name: "createdBy")', function() { + // uncomment below and update the code to test the property createdBy + //var instance = new SmallEod.Event(); + //expect(instance).to.be(); + }); + + it('should have the property modifiedOn (base name: "modifiedOn")', function() { + // uncomment below and update the code to test the property modifiedOn + //var instance = new SmallEod.Event(); + //expect(instance).to.be(); + }); + + it('should have the property modifiedBy (base name: "modifiedBy")', function() { + // uncomment below and update the code to test the property modifiedBy + //var instance = new SmallEod.Event(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/File.spec.js b/test/model/File.spec.js new file mode 100644 index 0000000..58969ce --- /dev/null +++ b/test/model/File.spec.js @@ -0,0 +1,80 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * 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.SmallEod); + } +}(this, function(expect, SmallEod) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new SmallEod.File(); + }); + + 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('File', function() { + it('should create an instance of File', function() { + // uncomment below and update the code to test File + //var instance = new SmallEod.File(); + //expect(instance).to.be.a(SmallEod.File); + }); + + it('should have the property id (base name: "id")', function() { + // uncomment below and update the code to test the property id + //var instance = new SmallEod.File(); + //expect(instance).to.be(); + }); + + it('should have the property path (base name: "path")', function() { + // uncomment below and update the code to test the property path + //var instance = new SmallEod.File(); + //expect(instance).to.be(); + }); + + it('should have the property name (base name: "name")', function() { + // uncomment below and update the code to test the property name + //var instance = new SmallEod.File(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/FileSigner.spec.js b/test/model/FileSigner.spec.js new file mode 100644 index 0000000..3a467a8 --- /dev/null +++ b/test/model/FileSigner.spec.js @@ -0,0 +1,86 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * 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.SmallEod); + } +}(this, function(expect, SmallEod) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new SmallEod.FileSigner(); + }); + + 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('FileSigner', function() { + it('should create an instance of FileSigner', function() { + // uncomment below and update the code to test FileSigner + //var instance = new SmallEod.FileSigner(); + //expect(instance).to.be.a(SmallEod.FileSigner); + }); + + it('should have the property name (base name: "name")', function() { + // uncomment below and update the code to test the property name + //var instance = new SmallEod.FileSigner(); + //expect(instance).to.be(); + }); + + it('should have the property method (base name: "method")', function() { + // uncomment below and update the code to test the property method + //var instance = new SmallEod.FileSigner(); + //expect(instance).to.be(); + }); + + it('should have the property url (base name: "url")', function() { + // uncomment below and update the code to test the property url + //var instance = new SmallEod.FileSigner(); + //expect(instance).to.be(); + }); + + it('should have the property path (base name: "path")', function() { + // uncomment below and update the code to test the property path + //var instance = new SmallEod.FileSigner(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/Institution.spec.js b/test/model/Institution.spec.js new file mode 100644 index 0000000..71c30f4 --- /dev/null +++ b/test/model/Institution.spec.js @@ -0,0 +1,116 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * 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.SmallEod); + } +}(this, function(expect, SmallEod) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new SmallEod.Institution(); + }); + + 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('Institution', function() { + it('should create an instance of Institution', function() { + // uncomment below and update the code to test Institution + //var instance = new SmallEod.Institution(); + //expect(instance).to.be.a(SmallEod.Institution); + }); + + it('should have the property id (base name: "id")', function() { + // uncomment below and update the code to test the property id + //var instance = new SmallEod.Institution(); + //expect(instance).to.be(); + }); + + it('should have the property name (base name: "name")', function() { + // uncomment below and update the code to test the property name + //var instance = new SmallEod.Institution(); + //expect(instance).to.be(); + }); + + it('should have the property externalIdentifier (base name: "external_identifier")', function() { + // uncomment below and update the code to test the property externalIdentifier + //var instance = new SmallEod.Institution(); + //expect(instance).to.be(); + }); + + it('should have the property address (base name: "address")', function() { + // uncomment below and update the code to test the property address + //var instance = new SmallEod.Institution(); + //expect(instance).to.be(); + }); + + it('should have the property administrativeUnit (base name: "administrativeUnit")', function() { + // uncomment below and update the code to test the property administrativeUnit + //var instance = new SmallEod.Institution(); + //expect(instance).to.be(); + }); + + it('should have the property createdOn (base name: "createdOn")', function() { + // uncomment below and update the code to test the property createdOn + //var instance = new SmallEod.Institution(); + //expect(instance).to.be(); + }); + + it('should have the property createdBy (base name: "createdBy")', function() { + // uncomment below and update the code to test the property createdBy + //var instance = new SmallEod.Institution(); + //expect(instance).to.be(); + }); + + it('should have the property modifiedOn (base name: "modifiedOn")', function() { + // uncomment below and update the code to test the property modifiedOn + //var instance = new SmallEod.Institution(); + //expect(instance).to.be(); + }); + + it('should have the property modifiedBy (base name: "modifiedBy")', function() { + // uncomment below and update the code to test the property modifiedBy + //var instance = new SmallEod.Institution(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/InstitutionExternalIdentifier.spec.js b/test/model/InstitutionExternalIdentifier.spec.js new file mode 100644 index 0000000..4c5f2ea --- /dev/null +++ b/test/model/InstitutionExternalIdentifier.spec.js @@ -0,0 +1,74 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * 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.SmallEod); + } +}(this, function(expect, SmallEod) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new SmallEod.InstitutionExternalIdentifier(); + }); + + 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('InstitutionExternalIdentifier', function() { + it('should create an instance of InstitutionExternalIdentifier', function() { + // uncomment below and update the code to test InstitutionExternalIdentifier + //var instance = new SmallEod.InstitutionExternalIdentifier(); + //expect(instance).to.be.a(SmallEod.InstitutionExternalIdentifier); + }); + + it('should have the property regon (base name: "regon")', function() { + // uncomment below and update the code to test the property regon + //var instance = new SmallEod.InstitutionExternalIdentifier(); + //expect(instance).to.be(); + }); + + it('should have the property nip (base name: "nip")', function() { + // uncomment below and update the code to test the property nip + //var instance = new SmallEod.InstitutionExternalIdentifier(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/Letter.spec.js b/test/model/Letter.spec.js new file mode 100644 index 0000000..649c9ba --- /dev/null +++ b/test/model/Letter.spec.js @@ -0,0 +1,176 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * 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.SmallEod); + } +}(this, function(expect, SmallEod) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new SmallEod.Letter(); + }); + + 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('Letter', function() { + it('should create an instance of Letter', function() { + // uncomment below and update the code to test Letter + //var instance = new SmallEod.Letter(); + //expect(instance).to.be.a(SmallEod.Letter); + }); + + it('should have the property id (base name: "id")', function() { + // uncomment below and update the code to test the property id + //var instance = new SmallEod.Letter(); + //expect(instance).to.be(); + }); + + it('should have the property name (base name: "name")', function() { + // uncomment below and update the code to test the property name + //var instance = new SmallEod.Letter(); + //expect(instance).to.be(); + }); + + it('should have the property direction (base name: "direction")', function() { + // uncomment below and update the code to test the property direction + //var instance = new SmallEod.Letter(); + //expect(instance).to.be(); + }); + + it('should have the property channel (base name: "channel")', function() { + // uncomment below and update the code to test the property channel + //var instance = new SmallEod.Letter(); + //expect(instance).to.be(); + }); + + it('should have the property _final (base name: "final")', function() { + // uncomment below and update the code to test the property _final + //var instance = new SmallEod.Letter(); + //expect(instance).to.be(); + }); + + it('should have the property data (base name: "data")', function() { + // uncomment below and update the code to test the property data + //var instance = new SmallEod.Letter(); + //expect(instance).to.be(); + }); + + it('should have the property identifier (base name: "identifier")', function() { + // uncomment below and update the code to test the property identifier + //var instance = new SmallEod.Letter(); + //expect(instance).to.be(); + }); + + it('should have the property institution (base name: "institution")', function() { + // uncomment below and update the code to test the property institution + //var instance = new SmallEod.Letter(); + //expect(instance).to.be(); + }); + + it('should have the property address (base name: "address")', function() { + // uncomment below and update the code to test the property address + //var instance = new SmallEod.Letter(); + //expect(instance).to.be(); + }); + + it('should have the property _case (base name: "case")', function() { + // uncomment below and update the code to test the property _case + //var instance = new SmallEod.Letter(); + //expect(instance).to.be(); + }); + + it('should have the property attachment (base name: "attachment")', function() { + // uncomment below and update the code to test the property attachment + //var instance = new SmallEod.Letter(); + //expect(instance).to.be(); + }); + + it('should have the property ordering (base name: "ordering")', function() { + // uncomment below and update the code to test the property ordering + //var instance = new SmallEod.Letter(); + //expect(instance).to.be(); + }); + + it('should have the property comment (base name: "comment")', function() { + // uncomment below and update the code to test the property comment + //var instance = new SmallEod.Letter(); + //expect(instance).to.be(); + }); + + it('should have the property excerpt (base name: "excerpt")', function() { + // uncomment below and update the code to test the property excerpt + //var instance = new SmallEod.Letter(); + //expect(instance).to.be(); + }); + + it('should have the property tags (base name: "tags")', function() { + // uncomment below and update the code to test the property tags + //var instance = new SmallEod.Letter(); + //expect(instance).to.be(); + }); + + it('should have the property createdOn (base name: "createdOn")', function() { + // uncomment below and update the code to test the property createdOn + //var instance = new SmallEod.Letter(); + //expect(instance).to.be(); + }); + + it('should have the property createdBy (base name: "createdBy")', function() { + // uncomment below and update the code to test the property createdBy + //var instance = new SmallEod.Letter(); + //expect(instance).to.be(); + }); + + it('should have the property modifiedOn (base name: "modifiedOn")', function() { + // uncomment below and update the code to test the property modifiedOn + //var instance = new SmallEod.Letter(); + //expect(instance).to.be(); + }); + + it('should have the property modifiedBy (base name: "modifiedBy")', function() { + // uncomment below and update the code to test the property modifiedBy + //var instance = new SmallEod.Letter(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/ModelCase.spec.js b/test/model/ModelCase.spec.js new file mode 100644 index 0000000..3ad3474 --- /dev/null +++ b/test/model/ModelCase.spec.js @@ -0,0 +1,146 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * 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.SmallEod); + } +}(this, function(expect, SmallEod) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new SmallEod.ModelCase(); + }); + + 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('ModelCase', function() { + it('should create an instance of ModelCase', function() { + // uncomment below and update the code to test ModelCase + //var instance = new SmallEod.ModelCase(); + //expect(instance).to.be.a(SmallEod.ModelCase); + }); + + it('should have the property id (base name: "id")', function() { + // uncomment below and update the code to test the property id + //var instance = new SmallEod.ModelCase(); + //expect(instance).to.be(); + }); + + it('should have the property name (base name: "name")', function() { + // uncomment below and update the code to test the property name + //var instance = new SmallEod.ModelCase(); + //expect(instance).to.be(); + }); + + it('should have the property comment (base name: "comment")', function() { + // uncomment below and update the code to test the property comment + //var instance = new SmallEod.ModelCase(); + //expect(instance).to.be(); + }); + + it('should have the property tag (base name: "tag")', function() { + // uncomment below and update the code to test the property tag + //var instance = new SmallEod.ModelCase(); + //expect(instance).to.be(); + }); + + it('should have the property auditedInstitution (base name: "auditedInstitution")', function() { + // uncomment below and update the code to test the property auditedInstitution + //var instance = new SmallEod.ModelCase(); + //expect(instance).to.be(); + }); + + it('should have the property responsibleUser (base name: "responsibleUser")', function() { + // uncomment below and update the code to test the property responsibleUser + //var instance = new SmallEod.ModelCase(); + //expect(instance).to.be(); + }); + + it('should have the property notifiedUser (base name: "notifiedUser")', function() { + // uncomment below and update the code to test the property notifiedUser + //var instance = new SmallEod.ModelCase(); + //expect(instance).to.be(); + }); + + it('should have the property matrix (base name: "matrix")', function() { + // uncomment below and update the code to test the property matrix + //var instance = new SmallEod.ModelCase(); + //expect(instance).to.be(); + }); + + it('should have the property letterCount (base name: "letterCount")', function() { + // uncomment below and update the code to test the property letterCount + //var instance = new SmallEod.ModelCase(); + //expect(instance).to.be(); + }); + + it('should have the property noteCount (base name: "noteCount")', function() { + // uncomment below and update the code to test the property noteCount + //var instance = new SmallEod.ModelCase(); + //expect(instance).to.be(); + }); + + it('should have the property createdOn (base name: "createdOn")', function() { + // uncomment below and update the code to test the property createdOn + //var instance = new SmallEod.ModelCase(); + //expect(instance).to.be(); + }); + + it('should have the property createdBy (base name: "createdBy")', function() { + // uncomment below and update the code to test the property createdBy + //var instance = new SmallEod.ModelCase(); + //expect(instance).to.be(); + }); + + it('should have the property modifiedOn (base name: "modifiedOn")', function() { + // uncomment below and update the code to test the property modifiedOn + //var instance = new SmallEod.ModelCase(); + //expect(instance).to.be(); + }); + + it('should have the property modifiedBy (base name: "modifiedBy")', function() { + // uncomment below and update the code to test the property modifiedBy + //var instance = new SmallEod.ModelCase(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/Note.spec.js b/test/model/Note.spec.js new file mode 100644 index 0000000..ff4994d --- /dev/null +++ b/test/model/Note.spec.js @@ -0,0 +1,104 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * 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.SmallEod); + } +}(this, function(expect, SmallEod) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new SmallEod.Note(); + }); + + 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('Note', function() { + it('should create an instance of Note', function() { + // uncomment below and update the code to test Note + //var instance = new SmallEod.Note(); + //expect(instance).to.be.a(SmallEod.Note); + }); + + it('should have the property id (base name: "id")', function() { + // uncomment below and update the code to test the property id + //var instance = new SmallEod.Note(); + //expect(instance).to.be(); + }); + + it('should have the property _case (base name: "case")', function() { + // uncomment below and update the code to test the property _case + //var instance = new SmallEod.Note(); + //expect(instance).to.be(); + }); + + it('should have the property comment (base name: "comment")', function() { + // uncomment below and update the code to test the property comment + //var instance = new SmallEod.Note(); + //expect(instance).to.be(); + }); + + it('should have the property createdOn (base name: "createdOn")', function() { + // uncomment below and update the code to test the property createdOn + //var instance = new SmallEod.Note(); + //expect(instance).to.be(); + }); + + it('should have the property createdBy (base name: "createdBy")', function() { + // uncomment below and update the code to test the property createdBy + //var instance = new SmallEod.Note(); + //expect(instance).to.be(); + }); + + it('should have the property modifiedOn (base name: "modifiedOn")', function() { + // uncomment below and update the code to test the property modifiedOn + //var instance = new SmallEod.Note(); + //expect(instance).to.be(); + }); + + it('should have the property modifiedBy (base name: "modifiedBy")', function() { + // uncomment below and update the code to test the property modifiedBy + //var instance = new SmallEod.Note(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/Session.spec.js b/test/model/Session.spec.js new file mode 100644 index 0000000..2403276 --- /dev/null +++ b/test/model/Session.spec.js @@ -0,0 +1,98 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * 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.SmallEod); + } +}(this, function(expect, SmallEod) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new SmallEod.Session(); + }); + + 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('Session', function() { + it('should create an instance of Session', function() { + // uncomment below and update the code to test Session + //var instance = new SmallEod.Session(); + //expect(instance).to.be.a(SmallEod.Session); + }); + + it('should have the property id (base name: "id")', function() { + // uncomment below and update the code to test the property id + //var instance = new SmallEod.Session(); + //expect(instance).to.be(); + }); + + it('should have the property user (base name: "user")', function() { + // uncomment below and update the code to test the property user + //var instance = new SmallEod.Session(); + //expect(instance).to.be(); + }); + + it('should have the property userAgent (base name: "userAgent")', function() { + // uncomment below and update the code to test the property userAgent + //var instance = new SmallEod.Session(); + //expect(instance).to.be(); + }); + + it('should have the property createdOn (base name: "createdOn")', function() { + // uncomment below and update the code to test the property createdOn + //var instance = new SmallEod.Session(); + //expect(instance).to.be(); + }); + + it('should have the property validUntil (base name: "validUntil")', function() { + // uncomment below and update the code to test the property validUntil + //var instance = new SmallEod.Session(); + //expect(instance).to.be(); + }); + + it('should have the property secret (base name: "secret")', function() { + // uncomment below and update the code to test the property secret + //var instance = new SmallEod.Session(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/TagNamespace.spec.js b/test/model/TagNamespace.spec.js new file mode 100644 index 0000000..9539fdb --- /dev/null +++ b/test/model/TagNamespace.spec.js @@ -0,0 +1,104 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * 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.SmallEod); + } +}(this, function(expect, SmallEod) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new SmallEod.TagNamespace(); + }); + + 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('TagNamespace', function() { + it('should create an instance of TagNamespace', function() { + // uncomment below and update the code to test TagNamespace + //var instance = new SmallEod.TagNamespace(); + //expect(instance).to.be.a(SmallEod.TagNamespace); + }); + + it('should have the property id (base name: "id")', function() { + // uncomment below and update the code to test the property id + //var instance = new SmallEod.TagNamespace(); + //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 instance = new SmallEod.TagNamespace(); + //expect(instance).to.be(); + }); + + it('should have the property color (base name: "color")', function() { + // uncomment below and update the code to test the property color + //var instance = new SmallEod.TagNamespace(); + //expect(instance).to.be(); + }); + + it('should have the property createdOn (base name: "createdOn")', function() { + // uncomment below and update the code to test the property createdOn + //var instance = new SmallEod.TagNamespace(); + //expect(instance).to.be(); + }); + + it('should have the property createdBy (base name: "createdBy")', function() { + // uncomment below and update the code to test the property createdBy + //var instance = new SmallEod.TagNamespace(); + //expect(instance).to.be(); + }); + + it('should have the property modifiedOn (base name: "modifiedOn")', function() { + // uncomment below and update the code to test the property modifiedOn + //var instance = new SmallEod.TagNamespace(); + //expect(instance).to.be(); + }); + + it('should have the property modifiedBy (base name: "modifiedBy")', function() { + // uncomment below and update the code to test the property modifiedBy + //var instance = new SmallEod.TagNamespace(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/User.spec.js b/test/model/User.spec.js new file mode 100644 index 0000000..06bbe4f --- /dev/null +++ b/test/model/User.spec.js @@ -0,0 +1,98 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * 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.SmallEod); + } +}(this, function(expect, SmallEod) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new SmallEod.User(); + }); + + 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('User', function() { + it('should create an instance of User', function() { + // uncomment below and update the code to test User + //var instance = new SmallEod.User(); + //expect(instance).to.be.a(SmallEod.User); + }); + + it('should have the property id (base name: "id")', function() { + // uncomment below and update the code to test the property id + //var instance = new SmallEod.User(); + //expect(instance).to.be(); + }); + + it('should have the property firstName (base name: "first_name")', function() { + // uncomment below and update the code to test the property firstName + //var instance = new SmallEod.User(); + //expect(instance).to.be(); + }); + + it('should have the property secondName (base name: "second_name")', function() { + // uncomment below and update the code to test the property secondName + //var instance = new SmallEod.User(); + //expect(instance).to.be(); + }); + + it('should have the property email (base name: "email")', function() { + // uncomment below and update the code to test the property email + //var instance = new SmallEod.User(); + //expect(instance).to.be(); + }); + + it('should have the property password (base name: "password")', function() { + // uncomment below and update the code to test the property password + //var instance = new SmallEod.User(); + //expect(instance).to.be(); + }); + + it('should have the property permission (base name: "permission")', function() { + // uncomment below and update the code to test the property permission + //var instance = new SmallEod.User(); + //expect(instance).to.be(); + }); + + }); + +})); diff --git a/test/model/UserRef.spec.js b/test/model/UserRef.spec.js new file mode 100644 index 0000000..ee36cc8 --- /dev/null +++ b/test/model/UserRef.spec.js @@ -0,0 +1,74 @@ +/** + * Small_EOD + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * Contact: adam.dobrawy@siecobywatelska.pl + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * + * OpenAPI Generator version: 4.2.3-SNAPSHOT + * + * 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.SmallEod); + } +}(this, function(expect, SmallEod) { + 'use strict'; + + var instance; + + beforeEach(function() { + instance = new SmallEod.UserRef(); + }); + + 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('UserRef', function() { + it('should create an instance of UserRef', function() { + // uncomment below and update the code to test UserRef + //var instance = new SmallEod.UserRef(); + //expect(instance).to.be.a(SmallEod.UserRef); + }); + + it('should have the property id (base name: "id")', function() { + // uncomment below and update the code to test the property id + //var instance = new SmallEod.UserRef(); + //expect(instance).to.be(); + }); + + it('should have the property user (base name: "user")', function() { + // uncomment below and update the code to test the property user + //var instance = new SmallEod.UserRef(); + //expect(instance).to.be(); + }); + + }); + +}));