-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 6abaf32
Showing
152 changed files
with
23,180 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
4.2.3-SNAPSHOT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM node:latest | ||
WORKDIR /src | ||
ADD . . | ||
RUN npm install | ||
RUN npm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/<JAVASCRIPT_CLIENT_DIR> | ||
``` | ||
|
||
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**: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiPackage: "small_eod_client" | ||
projectVersion: 1.0.0 | ||
additionalProperties: | ||
usePromises: true | ||
useES6: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# SmallEod.AdministrativeUnit | ||
|
||
## Properties | ||
|
||
Name | Type | Description | Notes | ||
------------ | ------------- | ------------- | ------------- | ||
**id** | **String** | | | ||
**name** | **String** | | | ||
**level** | **Number** | | | ||
**category** | **String** | | | ||
**terc** | **String** | | | ||
|
||
|
Oops, something went wrong.