Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions examples/auth/server/package-lock.json

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

25 changes: 13 additions & 12 deletions examples/basic/package-lock.json

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

10 changes: 10 additions & 0 deletions generator-templates/model.mustache
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/* tslint:disable */
/* eslint-disable */
{{>licenseInfo}}
{{#withSeparateModelsAndApi}}{{#hasAllOf}}{{#allOf}}
import type { {{class}} } from './{{filename}}';{{/allOf}}{{/hasAllOf}}{{#hasOneOf}}{{#oneOf}}
import type { {{class}} } from './{{filename}}';{{/oneOf}}{{/hasOneOf}}{{^hasAllOf}}{{^hasOneOf}}{{#imports}}
import type { {{class}} } from './{{filename}}';{{/imports}}{{/hasOneOf}}{{/hasAllOf}}{{/withSeparateModelsAndApi}}
{{#models}}{{#model}}
{{#isEnum}}{{>modelEnum}}{{/isEnum}}{{#oneOf}}{{#-first}}{{>modelOneOf}}{{/-first}}{{/oneOf}}{{#allOf}}{{#-first}}{{>modelAllOf}}{{/-first}}{{/allOf}}{{^isEnum}}{{^oneOf}}{{^allOf}}{{>modelGeneric}}{{/allOf}}{{/oneOf}}{{/isEnum}}
{{/model}}{{/models}}
25 changes: 25 additions & 0 deletions generator-templates/modelEnum.mustache
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* {{{description}}}
* @export
* @enum {string}
*/
{{#isBoolean}}
export type {{classname}} = {{#allowableValues}}{{#enumVars}}{{{value}}}{{^-last}} | {{/-last}}{{/enumVars}}{{/allowableValues}}
{{/isBoolean}}

{{^isBoolean}}
export const {{classname}} = {
{{#allowableValues}}
{{#enumVars}}
{{#enumDescription}}
/**
* {{.}}
*/
{{/enumDescription}}
{{{name}}}: {{{value}}}{{^-last}},{{/-last}}
{{/enumVars}}
{{/allowableValues}}
} as const;

export type {{classname}} = typeof {{classname}}[keyof typeof {{classname}}];
{{/isBoolean}}
42 changes: 42 additions & 0 deletions generator-templates/modelGeneric.mustache
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/**
* {{{description}}}
* @export
* @interface {{classname}}
*/
export interface {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{
{{#additionalPropertiesType}}
[key: string]: {{{additionalPropertiesType}}}{{#hasVars}} | any{{/hasVars}};

{{/additionalPropertiesType}}
{{#vars}}
/**
* {{{description}}}
* @type {{=<% %>=}}{<%&datatype%>}<%={{ }}=%>
* @memberof {{classname}}
{{#deprecated}}
* @deprecated
{{/deprecated}}
*/
{{name}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}};
{{/vars}}
}{{#hasEnums}}

{{#vars}}
{{#isEnum}}
export const {{enumName}} = {
{{#allowableValues}}
{{#enumVars}}
{{#enumDescription}}
/**
* {{enumDescription}}
*/
{{/enumDescription}}
{{{name}}}: {{{value}}}{{^-last}},{{/-last}}
{{/enumVars}}
{{/allowableValues}}
} as const;

export type {{enumName}} = typeof {{enumName}}[keyof typeof {{enumName}}];
{{/isEnum}}
{{/vars}}
{{/hasEnums}}
3 changes: 0 additions & 3 deletions generator-templates/modelIndex.mustache

This file was deleted.

9 changes: 5 additions & 4 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"eslint": "^8.51.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"husky": "^9.1.5",
"husky": "^9.1.6",
"lint-staged": "^15.2.10",
"parcel": "^2.12.0",
"prettier": "^3.3.3",
Expand Down
2 changes: 1 addition & 1 deletion setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ cd ./examples/basic || exit

npm install

export API_BASE_PATH="https://testapi.regulaforensics.com"
export API_BASE_PATH="https://nightly-api.regulaforensics.com"

node index.js
53 changes: 51 additions & 2 deletions src/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ models/authenticity-check-result.ts
models/authenticity-result-all-of.ts
models/authenticity-result-type.ts
models/authenticity-result.ts
models/bar-code-module-type.ts
models/barcode-type.ts
models/bc-pdf417-info.ts
models/bc-roidetect.ts
models/binary-data.ts
models/check-diagnose.ts
models/check-result.ts
models/chosen-document-type-result-all-of.ts
Expand All @@ -29,8 +32,14 @@ models/device-info.ts
models/doc-bar-code-info-all-of.ts
models/doc-bar-code-info-fields-list.ts
models/doc-bar-code-info.ts
models/doc-visual-extended-field-rect-all-of.ts
models/doc-visual-extended-field-rect.ts
models/doc-visual-extended-field-rfid-all-of.ts
models/doc-visual-extended-field-rfid.ts
models/doc-visual-extended-field.ts
models/doc-visual-extended-info.ts
models/document-binary-info-result-all-of.ts
models/document-binary-info-result.ts
models/document-format.ts
models/document-image-result-all-of.ts
models/document-image-result.ts
Expand All @@ -44,6 +53,7 @@ models/document-types-candidates-list.ts
models/document-types-candidates-result-all-of.ts
models/document-types-candidates-result.ts
models/document-types-candidates.ts
models/documents-database.ts
models/encrypted-rclresult-all-of.ts
models/encrypted-rclresult.ts
models/face-api-search.ts
Expand All @@ -52,6 +62,9 @@ models/fdsidlist.ts
models/fiber-result-all-of.ts
models/fiber-result.ts
models/get-transactions-by-tag-response.ts
models/graphic-field-rect.ts
models/graphic-field-rfid-all-of.ts
models/graphic-field-rfid.ts
models/graphic-field-type.ts
models/graphic-field.ts
models/graphic-fields-list.ts
Expand All @@ -77,8 +90,6 @@ models/in-data-transaction-images-field-value.ts
models/in-data-video.ts
models/in-data.ts
models/index.ts
models/inline-response200.ts
models/inline-response2001.ts
models/lcid.ts
models/lexical-analysis-result-all-of.ts
models/lexical-analysis-result.ts
Expand All @@ -99,6 +110,7 @@ models/original-symbol.ts
models/out-data-transaction-images-field-value.ts
models/out-data.ts
models/parray-field.ts
models/parsing-error-codes.ts
models/parsing-notification-codes.ts
models/per-document-config.ts
models/photo-ident-result-all-of.ts
Expand All @@ -113,12 +125,43 @@ models/process-request.ts
models/process-response.ts
models/process-system-info.ts
models/processing-status.ts
models/raw-image-container-field-list-all-of.ts
models/raw-image-container-field-list.ts
models/raw-image-container-list.ts
models/rectangle-coordinates.ts
models/result-item.ts
models/result.ts
models/rfid-access-control-info.ts
models/rfid-access-control-procedure-type.ts
models/rfid-access-key.ts
models/rfid-achip.ts
models/rfid-application-type.ts
models/rfid-application.ts
models/rfid-attribute-data.ts
models/rfid-attribute-name.ts
models/rfid-authentication-procedure-type.ts
models/rfid-baud-rate.ts
models/rfid-card-properties-ext.ts
models/rfid-certificate-ex.ts
models/rfid-certificate-origin.ts
models/rfid-certificate-type.ts
models/rfid-data-file-type.ts
models/rfid-data-file.ts
models/rfid-data-group-type-tag.ts
models/rfid-dg1.ts
models/rfid-distinguished-name.ts
models/rfid-location.ts
models/rfid-origin.ts
models/rfid-password-type.ts
models/rfid-pki-extension.ts
models/rfid-security-object.ts
models/rfid-session-data.ts
models/rfid-signer-info-ex.ts
models/rfid-terminal-type.ts
models/rfid-terminal.ts
models/rfid-type.ts
models/rfid-validity.ts
models/rfiderror-codes.ts
models/scenario.ts
models/security-feature-result-all-of.ts
models/security-feature-result.ts
Expand All @@ -131,6 +174,7 @@ models/status.ts
models/string-recognition-result.ts
models/symbol-candidate.ts
models/symbol-recognition-result.ts
models/tdoc-binary-info.ts
models/text-available-source.ts
models/text-data-result-all-of.ts
models/text-data-result.ts
Expand All @@ -145,6 +189,11 @@ models/transaction-image.ts
models/transaction-info.ts
models/transaction-process-get-response.ts
models/transaction-process-request.ts
models/transaction-process-response-all-of.ts
models/transaction-process-response.ts
models/transaction-process-result.ts
models/trf-ft-bytes.ts
models/trf-ft-string.ts
models/verification-result.ts
models/verified-field-map.ts
models/visibility.ts
6 changes: 3 additions & 3 deletions src/api/default-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Regula Document Reader Web API
* Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core
*
* The version of the OpenAPI document: 7.2.0
* The version of the OpenAPI document: 7.4.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand All @@ -17,9 +17,9 @@ import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
import { Configuration } from '../configuration';
// Some imports not used depending on template conditions
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base.js';
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
// @ts-ignore
import { DeviceInfo } from '../models.js';
import { DeviceInfo } from '../models';
/**
* DefaultApi - axios parameter creator
* @export
Expand Down
8 changes: 4 additions & 4 deletions src/api/process-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Regula Document Reader Web API
* Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core
*
* The version of the OpenAPI document: 7.2.0
* The version of the OpenAPI document: 7.4.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
Expand All @@ -17,11 +17,11 @@ import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
import { Configuration } from '../configuration';
// Some imports not used depending on template conditions
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base.js';
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
// @ts-ignore
import { ProcessRequest } from '../models.js';
import { ProcessRequest } from '../models';
// @ts-ignore
import { ProcessResponse } from '../models.js';
import { ProcessResponse } from '../models';
/**
* ProcessApi - axios parameter creator
* @export
Expand Down
Loading
Loading