Skip to content

Commit

Permalink
Validate Document API (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
Matej-Hlatky authored Aug 9, 2024
1 parent 0cd2f41 commit 7de5786
Show file tree
Hide file tree
Showing 9 changed files with 1,091 additions and 1,087 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.4.2

* Update API client - Document Validation

## 0.4.1

* Implement `generateEncryptionKey()` and `generateAsymmetricKeyPair()` helpers
Expand Down
21 changes: 17 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
# Autogram Sign

REST API klient v jazyku Dart pre `Autogram v mobile server`. Poskytuje [`IAutogramService`](lib/src/iautogram_service.dart) podľa [AVM server API](https://generator3.swagger.io/index.html?url=https://autogram.slovensko.digital/openapi.yaml)
REST API klient v jazyku Dart pre `Autogram v mobile server`.
Poskytuje [`IAutogramService`](lib/src/iautogram_service.dart) podľa
[AVM server API](https://generator3.swagger.io/index.html?url=https://autogram.slovensko.digital/openapi.yaml)

Ide o súčasť riešenia [Autogram v mobile](https://sluzby.slovensko.digital/autogram-v-mobile/),
ktoré vytvorili freevision s.r.o., Služby Slovensko.Digital s.r.o. a s dobrovoľníkmi pod EUPL-1.2 licenciou.

Prevádzkovateľom je Služby Slovensko.Digital s.r.o..
Prípadné issues riešime v [GitHub projekte](https://github.com/orgs/slovensko-digital/projects/5)
alebo rovno v tomto repozitári.

Ide o súčasť riešenia [Autogram v mobile](https://sluzby.slovensko.digital/autogram-v-mobile/), ktoré vytvorili freevision s.r.o., Služby Slovensko.Digital s.r.o. a dobrovoľníkmi pod EUPL-1.2 licenciou. Prevádzkovateľom je Služby Slovensko.Digital s.r.o.. Prípadné issues riešime v [GitHub projekte](https://github.com/orgs/slovensko-digital/projects/5) alebo rovno v tomto repozitári.
Projekt sa skladá z viacerých častí:
- **Server**
- [AVM server](https://github.com/slovensko-digital/avm-server) - Ruby on Rails API server poskytujúci funkcionalitu zdieľania a podpisovania dokumentov.
Expand All @@ -13,12 +21,17 @@ Projekt sa skladá z viacerých častí:
- [eID mSDK Flutter](https://github.com/slovensko-digital/eidmsdk-flutter) - Flutter wrapper "štátneho" [eID mSDK](https://github.com/eIDmSDK) pre komunikáciu s občianskym preukazom.
- [**Autogram extension**](https://github.com/slovensko-digital/autogram-extension) - Rozšírenie do prehliadača, ktoré umožňuje podpisovanie priamo na štátnych portáloch.


## Ako si to rozbehnúť

Repozitár sa volá `avm-client-dart`, ale knižnica sa potom zvykne používať `autogram_sign`, takže odporúčame si repozitár naklonovať práve do adresára `autogram_sign`.

Vygenerovanie kódu:
Stiahnutie aktuálnej verzie schémy:

```shell
curl -o lib/swagger/autogram.yaml https://autogram.slovensko.digital/openapi.yaml
```

Vygenerovanie kódu REST API klienta:

```shell
fvm dart run build_runner build --delete-conflicting-outputs
Expand Down
45 changes: 28 additions & 17 deletions lib/generated/autogram.enums.swagger.dart
Original file line number Diff line number Diff line change
Expand Up @@ -217,22 +217,34 @@ enum SigningParametersTransformationMediaDestinationTypeDescription {
this.value);
}

enum DocumentValidationResponseBodyFileFormat {
enum DocumentValidationResponseBodyContainerType {
@JsonValue(null)
swaggerGeneratedUnknown(null),

@JsonValue('ASiC_E')
asicE('ASiC_E'),
@JsonValue('ASiC_S')
asicS('ASiC_S'),
@JsonValue('PAdES')
pades('PAdES'),
asicS('ASiC_S');

final String? value;

const DocumentValidationResponseBodyContainerType(this.value);
}

enum DocumentValidationResponseBodySignatureForm {
@JsonValue(null)
swaggerGeneratedUnknown(null),

@JsonValue('XAdES')
xades('XAdES');
xades('XAdES'),
@JsonValue('CAdES')
cades('CAdES'),
@JsonValue('PAdES')
pades('PAdES');

final String? value;

const DocumentValidationResponseBodyFileFormat(this.value);
const DocumentValidationResponseBodySignatureForm(this.value);
}

enum DocumentValidationResponseBody$Signatures$Item$ValidationResultCode {
Expand Down Expand Up @@ -269,7 +281,7 @@ enum DocumentValidationResponseBody$Signatures$Item$ValidationResultDescription
this.value);
}

enum DocumentValidationResponseBody$Signatures$Item$SignatureInfoLevel {
enum DocumentValidationResponseBody$Signatures$ItemLevel {
@JsonValue(null)
swaggerGeneratedUnknown(null),

Expand Down Expand Up @@ -300,11 +312,10 @@ enum DocumentValidationResponseBody$Signatures$Item$SignatureInfoLevel {

final String? value;

const DocumentValidationResponseBody$Signatures$Item$SignatureInfoLevel(
this.value);
const DocumentValidationResponseBody$Signatures$ItemLevel(this.value);
}

enum DocumentValidationResponseBody$Signatures$Item$SignatureInfo$SigningCertificate$QualificationDescription {
enum DocumentValidationResponseBody$Signatures$Item$SigningCertificate$QualificationDescription {
@JsonValue(null)
swaggerGeneratedUnknown(null),

Expand Down Expand Up @@ -355,11 +366,11 @@ enum DocumentValidationResponseBody$Signatures$Item$SignatureInfo$SigningCertifi

final String? value;

const DocumentValidationResponseBody$Signatures$Item$SignatureInfo$SigningCertificate$QualificationDescription(
const DocumentValidationResponseBody$Signatures$Item$SigningCertificate$QualificationDescription(
this.value);
}

enum DocumentValidationResponseBody$Signatures$Item$SignatureInfo$Timestamps$Item$QualificationCode {
enum DocumentValidationResponseBody$Signatures$Item$Timestamps$Item$QualificationCode {
@JsonValue(null)
swaggerGeneratedUnknown(null),

Expand All @@ -372,11 +383,11 @@ enum DocumentValidationResponseBody$Signatures$Item$SignatureInfo$Timestamps$Ite

final int? value;

const DocumentValidationResponseBody$Signatures$Item$SignatureInfo$Timestamps$Item$QualificationCode(
const DocumentValidationResponseBody$Signatures$Item$Timestamps$Item$QualificationCode(
this.value);
}

enum DocumentValidationResponseBody$Signatures$Item$SignatureInfo$Timestamps$Item$QualificationDescription {
enum DocumentValidationResponseBody$Signatures$Item$Timestamps$Item$QualificationDescription {
@JsonValue(null)
swaggerGeneratedUnknown(null),

Expand All @@ -389,11 +400,11 @@ enum DocumentValidationResponseBody$Signatures$Item$SignatureInfo$Timestamps$Ite

final String? value;

const DocumentValidationResponseBody$Signatures$Item$SignatureInfo$Timestamps$Item$QualificationDescription(
const DocumentValidationResponseBody$Signatures$Item$Timestamps$Item$QualificationDescription(
this.value);
}

enum DocumentValidationResponseBody$Signatures$Item$SignatureInfo$Timestamps$ItemTimestampType {
enum DocumentValidationResponseBody$Signatures$Item$Timestamps$ItemTimestampType {
@JsonValue(null)
swaggerGeneratedUnknown(null),

Expand All @@ -418,7 +429,7 @@ enum DocumentValidationResponseBody$Signatures$Item$SignatureInfo$Timestamps$Ite

final String? value;

const DocumentValidationResponseBody$Signatures$Item$SignatureInfo$Timestamps$ItemTimestampType(
const DocumentValidationResponseBody$Signatures$Item$Timestamps$ItemTimestampType(
this.value);
}

Expand Down
6 changes: 2 additions & 4 deletions lib/generated/autogram.swagger.chopper.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7de5786

Please sign in to comment.