Fix a generate
This commit is contained in:
@@ -2,3 +2,6 @@
|
|||||||
|
|
||||||
<code> docker build -t shini89/geradoresws ..</code>
|
<code> docker build -t shini89/geradoresws ..</code>
|
||||||
<code> docker run --rm -p 44329:8080 shini89/geradoresws</code>
|
<code> docker run --rm -p 44329:8080 shini89/geradoresws</code>
|
||||||
|
<code>npx swagger-typescript-api generate -p http://localhost:29191/swagger/v1/swagger.json -o src/service -n api.ts --enum-names-as-values</code>
|
||||||
|
|
||||||
|
npx swagger-typescript-api generate -p http://localhost:29191/swagger/v1/swagger.json -o src/service -n api.ts --http-client axios --enum-names-as-values
|
||||||
@@ -1 +1 @@
|
|||||||
VITE_API_URL=http://localhost:44329/
|
VITE_API_URL=https://localhost:44329/
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "tsc -b && vite build",
|
"build": "vite build",
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
"preview": "vite preview"
|
"preview": "vite preview"
|
||||||
},
|
},
|
||||||
@@ -35,6 +35,7 @@
|
|||||||
"eslint-plugin-react-refresh": "^0.4.20",
|
"eslint-plugin-react-refresh": "^0.4.20",
|
||||||
"globals": "^16.3.0",
|
"globals": "^16.3.0",
|
||||||
"postcss": "^8.5.6",
|
"postcss": "^8.5.6",
|
||||||
|
"swagger-typescript-api": "^13.2.7",
|
||||||
"tailwindcss": "^4.1.11",
|
"tailwindcss": "^4.1.11",
|
||||||
"typescript": "~5.8.3",
|
"typescript": "~5.8.3",
|
||||||
"typescript-eslint": "^8.35.1",
|
"typescript-eslint": "^8.35.1",
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import type { AxiosResponse } from 'axios';
|
import type { AxiosResponse } from 'axios';
|
||||||
import { NIFType } from '../service/api';
|
|
||||||
import { toast } from 'react-hot-toast';
|
import { toast } from 'react-hot-toast';
|
||||||
|
|
||||||
const API_URL = import.meta.env.VITE_API_URL;
|
const API_URL = import.meta.env.VITE_API_URL;
|
||||||
@@ -8,6 +7,7 @@ const API_URL = import.meta.env.VITE_API_URL;
|
|||||||
class GeradorService {
|
class GeradorService {
|
||||||
static async GenerateNIF(type: string | null): Promise<any[]> {
|
static async GenerateNIF(type: string | null): Promise<any[]> {
|
||||||
try {
|
try {
|
||||||
|
debugger;
|
||||||
const response: AxiosResponse = await axios.get(API_URL + 'Generate/GenerateNIF',
|
const response: AxiosResponse = await axios.get(API_URL + 'Generate/GenerateNIF',
|
||||||
{
|
{
|
||||||
params: {
|
params: {
|
||||||
@@ -15,7 +15,7 @@ class GeradorService {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
return response.data;
|
return response.data;
|
||||||
} catch (error) {
|
} catch (error : any) {
|
||||||
|
|
||||||
toast.error('Error fetching NIF:' + error.message);
|
toast.error('Error fetching NIF:' + error.message);
|
||||||
return [];
|
return [];
|
||||||
|
|||||||
@@ -22,8 +22,7 @@ function App() {
|
|||||||
background: theme === 'dark' ? '#1f2937' : '#fff',
|
background: theme === 'dark' ? '#1f2937' : '#fff',
|
||||||
color: theme === 'dark' ? '#fff' : '#000',
|
color: theme === 'dark' ? '#fff' : '#000',
|
||||||
},
|
},
|
||||||
}}
|
}} />
|
||||||
theme={theme} />
|
|
||||||
</Layout>
|
</Layout>
|
||||||
</Router>
|
</Router>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import React, { useState } from "react";
|
import { useState } from "react";
|
||||||
import { RefreshCwIcon, CopyIcon } from "lucide-react";
|
import { RefreshCwIcon, CopyIcon } from "lucide-react";
|
||||||
import { Button } from "../ui/Button";
|
import { Button } from "../ui/Button";
|
||||||
import { Input } from "../ui/Input";
|
import { Input } from "../ui/Input";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import React from "react";
|
|
||||||
import GeradorCard from "../GeradorCard";
|
import GeradorCard from "../GeradorCard";
|
||||||
import { EnumToOptions } from "../../../library/utils";
|
import { EnumToOptions } from "../../../library/utils";
|
||||||
import { NIFType } from "../../../service/api";
|
import { NIFType } from "../../../service/api";
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import { useEffect, useState } from "react";
|
|
||||||
import GeradorService from "../../../Api/GeradorApi";
|
import GeradorService from "../../../Api/GeradorApi";
|
||||||
import GeradorCard from "../GeradorCard.tsx";
|
import GeradorCard from "../GeradorCard.tsx";
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
// components/layout/Layout.tsx
|
// components/layout/Layout.tsx
|
||||||
import Footer from './Footer';
|
import Footer from './Footer';
|
||||||
import Header from './Header';
|
import Header from './Header';
|
||||||
import { useTheme } from "../context/ThemeContext"; // caminho conforme a tua estrutura
|
|
||||||
|
|
||||||
export const Layout = ({ children }: { children: React.ReactNode }) => {
|
export const Layout = ({ children }: { children: React.ReactNode }) => {
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
import React from "react";
|
|
||||||
|
|
||||||
|
|
||||||
export default function Blank() {
|
export default function Blank() {
|
||||||
console.log("inicalizar componente");
|
console.log("inicalizar componente");
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
/* tslint:disable */
|
/* tslint:disable */
|
||||||
|
// @ts-nocheck
|
||||||
/*
|
/*
|
||||||
* ---------------------------------------------------------------
|
* ---------------------------------------------------------------
|
||||||
* ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
|
* ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
|
||||||
@@ -10,12 +11,19 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
export enum NIFType {
|
export enum NIFType {
|
||||||
|
/** Pessoa singular (1) */
|
||||||
PessoaSingular1 = "Pessoa singular (1)",
|
PessoaSingular1 = "Pessoa singular (1)",
|
||||||
|
/** Pessoa singular (2) */
|
||||||
PessoaSingular2 = "Pessoa singular (2)",
|
PessoaSingular2 = "Pessoa singular (2)",
|
||||||
|
/** Pessoa singular (3; novo em 2019) */
|
||||||
PessoaSingular3 = "Pessoa singular (3; novo em 2019)",
|
PessoaSingular3 = "Pessoa singular (3; novo em 2019)",
|
||||||
|
/** Pessoa colectiva (5) */
|
||||||
PessoaColectiva = "Pessoa colectiva (5)",
|
PessoaColectiva = "Pessoa colectiva (5)",
|
||||||
|
/** Pessoa colectiva pública (6) */
|
||||||
PessoaColectivaPublica = "Pessoa colectiva pública (6)",
|
PessoaColectivaPublica = "Pessoa colectiva pública (6)",
|
||||||
|
/** Empresário em nome individual (8) */
|
||||||
EmpresarioIndividual = "Empresário em nome individual (8)",
|
EmpresarioIndividual = "Empresário em nome individual (8)",
|
||||||
|
/** Pessoa colectiva irregular ou número provisório (9) */
|
||||||
PessoaColectivaIrregular = "Pessoa colectiva irregular ou número provisório (9)",
|
PessoaColectivaIrregular = "Pessoa colectiva irregular ou número provisório (9)",
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -29,10 +37,19 @@ export interface WeatherForecast {
|
|||||||
summary?: string | null;
|
summary?: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type QueryParamsType = Record<string | number, any>;
|
import type {
|
||||||
export type ResponseFormat = keyof Omit<Body, "body" | "bodyUsed">;
|
AxiosInstance,
|
||||||
|
AxiosRequestConfig,
|
||||||
|
AxiosResponse,
|
||||||
|
HeadersDefaults,
|
||||||
|
ResponseType,
|
||||||
|
} from "axios";
|
||||||
|
import axios from "axios";
|
||||||
|
|
||||||
export interface FullRequestParams extends Omit<RequestInit, "body"> {
|
export type QueryParamsType = Record<string | number, any>;
|
||||||
|
|
||||||
|
export interface FullRequestParams
|
||||||
|
extends Omit<AxiosRequestConfig, "data" | "params" | "url" | "responseType"> {
|
||||||
/** set parameter to `true` for call `securityWorker` for this request */
|
/** set parameter to `true` for call `securityWorker` for this request */
|
||||||
secure?: boolean;
|
secure?: boolean;
|
||||||
/** request path */
|
/** request path */
|
||||||
@@ -42,199 +59,155 @@ export interface FullRequestParams extends Omit<RequestInit, "body"> {
|
|||||||
/** query params */
|
/** query params */
|
||||||
query?: QueryParamsType;
|
query?: QueryParamsType;
|
||||||
/** format of response (i.e. response.json() -> format: "json") */
|
/** format of response (i.e. response.json() -> format: "json") */
|
||||||
format?: ResponseFormat;
|
format?: ResponseType;
|
||||||
/** request body */
|
/** request body */
|
||||||
body?: unknown;
|
body?: unknown;
|
||||||
/** base url */
|
|
||||||
baseUrl?: string;
|
|
||||||
/** request cancellation token */
|
|
||||||
cancelToken?: CancelToken;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type RequestParams = Omit<FullRequestParams, "body" | "method" | "query" | "path">;
|
export type RequestParams = Omit<
|
||||||
|
FullRequestParams,
|
||||||
|
"body" | "method" | "query" | "path"
|
||||||
|
>;
|
||||||
|
|
||||||
export interface ApiConfig<SecurityDataType = unknown> {
|
export interface ApiConfig<SecurityDataType = unknown>
|
||||||
baseUrl?: string;
|
extends Omit<AxiosRequestConfig, "data" | "cancelToken"> {
|
||||||
baseApiParams?: Omit<RequestParams, "baseUrl" | "cancelToken" | "signal">;
|
securityWorker?: (
|
||||||
securityWorker?: (securityData: SecurityDataType | null) => Promise<RequestParams | void> | RequestParams | void;
|
securityData: SecurityDataType | null,
|
||||||
customFetch?: typeof fetch;
|
) => Promise<AxiosRequestConfig | void> | AxiosRequestConfig | void;
|
||||||
|
secure?: boolean;
|
||||||
|
format?: ResponseType;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface HttpResponse<D extends unknown, E extends unknown = unknown> extends Response {
|
|
||||||
data: D;
|
|
||||||
error: E;
|
|
||||||
}
|
|
||||||
|
|
||||||
type CancelToken = Symbol | string | number;
|
|
||||||
|
|
||||||
export enum ContentType {
|
export enum ContentType {
|
||||||
Json = "application/json",
|
Json = "application/json",
|
||||||
|
JsonApi = "application/vnd.api+json",
|
||||||
FormData = "multipart/form-data",
|
FormData = "multipart/form-data",
|
||||||
UrlEncoded = "application/x-www-form-urlencoded",
|
UrlEncoded = "application/x-www-form-urlencoded",
|
||||||
Text = "text/plain",
|
Text = "text/plain",
|
||||||
}
|
}
|
||||||
|
|
||||||
export class HttpClient<SecurityDataType = unknown> {
|
export class HttpClient<SecurityDataType = unknown> {
|
||||||
public baseUrl: string = "";
|
public instance: AxiosInstance;
|
||||||
private securityData: SecurityDataType | null = null;
|
private securityData: SecurityDataType | null = null;
|
||||||
private securityWorker?: ApiConfig<SecurityDataType>["securityWorker"];
|
private securityWorker?: ApiConfig<SecurityDataType>["securityWorker"];
|
||||||
private abortControllers = new Map<CancelToken, AbortController>();
|
private secure?: boolean;
|
||||||
private customFetch = (...fetchParams: Parameters<typeof fetch>) => fetch(...fetchParams);
|
private format?: ResponseType;
|
||||||
|
|
||||||
private baseApiParams: RequestParams = {
|
constructor({
|
||||||
credentials: "same-origin",
|
securityWorker,
|
||||||
headers: {},
|
secure,
|
||||||
redirect: "follow",
|
format,
|
||||||
referrerPolicy: "no-referrer",
|
...axiosConfig
|
||||||
};
|
}: ApiConfig<SecurityDataType> = {}) {
|
||||||
|
this.instance = axios.create({
|
||||||
constructor(apiConfig: ApiConfig<SecurityDataType> = {}) {
|
...axiosConfig,
|
||||||
Object.assign(this, apiConfig);
|
baseURL: axiosConfig.baseURL || "",
|
||||||
|
});
|
||||||
|
this.secure = secure;
|
||||||
|
this.format = format;
|
||||||
|
this.securityWorker = securityWorker;
|
||||||
}
|
}
|
||||||
|
|
||||||
public setSecurityData = (data: SecurityDataType | null) => {
|
public setSecurityData = (data: SecurityDataType | null) => {
|
||||||
this.securityData = data;
|
this.securityData = data;
|
||||||
};
|
};
|
||||||
|
|
||||||
protected encodeQueryParam(key: string, value: any) {
|
protected mergeRequestParams(
|
||||||
const encodedKey = encodeURIComponent(key);
|
params1: AxiosRequestConfig,
|
||||||
return `${encodedKey}=${encodeURIComponent(typeof value === "number" ? value : `${value}`)}`;
|
params2?: AxiosRequestConfig,
|
||||||
}
|
): AxiosRequestConfig {
|
||||||
|
const method = params1.method || (params2 && params2.method);
|
||||||
|
|
||||||
protected addQueryParam(query: QueryParamsType, key: string) {
|
|
||||||
return this.encodeQueryParam(key, query[key]);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected addArrayQueryParam(query: QueryParamsType, key: string) {
|
|
||||||
const value = query[key];
|
|
||||||
return value.map((v: any) => this.encodeQueryParam(key, v)).join("&");
|
|
||||||
}
|
|
||||||
|
|
||||||
protected toQueryString(rawQuery?: QueryParamsType): string {
|
|
||||||
const query = rawQuery || {};
|
|
||||||
const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]);
|
|
||||||
return keys
|
|
||||||
.map((key) => (Array.isArray(query[key]) ? this.addArrayQueryParam(query, key) : this.addQueryParam(query, key)))
|
|
||||||
.join("&");
|
|
||||||
}
|
|
||||||
|
|
||||||
protected addQueryParams(rawQuery?: QueryParamsType): string {
|
|
||||||
const queryString = this.toQueryString(rawQuery);
|
|
||||||
return queryString ? `?${queryString}` : "";
|
|
||||||
}
|
|
||||||
|
|
||||||
private contentFormatters: Record<ContentType, (input: any) => any> = {
|
|
||||||
[ContentType.Json]: (input: any) =>
|
|
||||||
input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input,
|
|
||||||
[ContentType.Text]: (input: any) => (input !== null && typeof input !== "string" ? JSON.stringify(input) : input),
|
|
||||||
[ContentType.FormData]: (input: any) =>
|
|
||||||
Object.keys(input || {}).reduce((formData, key) => {
|
|
||||||
const property = input[key];
|
|
||||||
formData.append(
|
|
||||||
key,
|
|
||||||
property instanceof Blob
|
|
||||||
? property
|
|
||||||
: typeof property === "object" && property !== null
|
|
||||||
? JSON.stringify(property)
|
|
||||||
: `${property}`,
|
|
||||||
);
|
|
||||||
return formData;
|
|
||||||
}, new FormData()),
|
|
||||||
[ContentType.UrlEncoded]: (input: any) => this.toQueryString(input),
|
|
||||||
};
|
|
||||||
|
|
||||||
protected mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams {
|
|
||||||
return {
|
return {
|
||||||
...this.baseApiParams,
|
...this.instance.defaults,
|
||||||
...params1,
|
...params1,
|
||||||
...(params2 || {}),
|
...(params2 || {}),
|
||||||
headers: {
|
headers: {
|
||||||
...(this.baseApiParams.headers || {}),
|
...((method &&
|
||||||
|
this.instance.defaults.headers[
|
||||||
|
method.toLowerCase() as keyof HeadersDefaults
|
||||||
|
]) ||
|
||||||
|
{}),
|
||||||
...(params1.headers || {}),
|
...(params1.headers || {}),
|
||||||
...((params2 && params2.headers) || {}),
|
...((params2 && params2.headers) || {}),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
protected createAbortSignal = (cancelToken: CancelToken): AbortSignal | undefined => {
|
protected stringifyFormItem(formItem: unknown) {
|
||||||
if (this.abortControllers.has(cancelToken)) {
|
if (typeof formItem === "object" && formItem !== null) {
|
||||||
const abortController = this.abortControllers.get(cancelToken);
|
return JSON.stringify(formItem);
|
||||||
if (abortController) {
|
} else {
|
||||||
return abortController.signal;
|
return `${formItem}`;
|
||||||
}
|
}
|
||||||
return void 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const abortController = new AbortController();
|
protected createFormData(input: Record<string, unknown>): FormData {
|
||||||
this.abortControllers.set(cancelToken, abortController);
|
if (input instanceof FormData) {
|
||||||
return abortController.signal;
|
return input;
|
||||||
};
|
|
||||||
|
|
||||||
public abortRequest = (cancelToken: CancelToken) => {
|
|
||||||
const abortController = this.abortControllers.get(cancelToken);
|
|
||||||
|
|
||||||
if (abortController) {
|
|
||||||
abortController.abort();
|
|
||||||
this.abortControllers.delete(cancelToken);
|
|
||||||
}
|
}
|
||||||
};
|
return Object.keys(input || {}).reduce((formData, key) => {
|
||||||
|
const property = input[key];
|
||||||
|
const propertyContent: any[] =
|
||||||
|
property instanceof Array ? property : [property];
|
||||||
|
|
||||||
public request = async <T = any, E = any>({
|
for (const formItem of propertyContent) {
|
||||||
body,
|
const isFileType = formItem instanceof Blob || formItem instanceof File;
|
||||||
|
formData.append(
|
||||||
|
key,
|
||||||
|
isFileType ? formItem : this.stringifyFormItem(formItem),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return formData;
|
||||||
|
}, new FormData());
|
||||||
|
}
|
||||||
|
|
||||||
|
public request = async <T = any, _E = any>({
|
||||||
secure,
|
secure,
|
||||||
path,
|
path,
|
||||||
type,
|
type,
|
||||||
query,
|
query,
|
||||||
format,
|
format,
|
||||||
baseUrl,
|
body,
|
||||||
cancelToken,
|
|
||||||
...params
|
...params
|
||||||
}: FullRequestParams): Promise<HttpResponse<T, E>> => {
|
}: FullRequestParams): Promise<AxiosResponse<T>> => {
|
||||||
const secureParams =
|
const secureParams =
|
||||||
((typeof secure === "boolean" ? secure : this.baseApiParams.secure) &&
|
((typeof secure === "boolean" ? secure : this.secure) &&
|
||||||
this.securityWorker &&
|
this.securityWorker &&
|
||||||
(await this.securityWorker(this.securityData))) ||
|
(await this.securityWorker(this.securityData))) ||
|
||||||
{};
|
{};
|
||||||
const requestParams = this.mergeRequestParams(params, secureParams);
|
const requestParams = this.mergeRequestParams(params, secureParams);
|
||||||
const queryString = query && this.toQueryString(query);
|
const responseFormat = format || this.format || undefined;
|
||||||
const payloadFormatter = this.contentFormatters[type || ContentType.Json];
|
|
||||||
const responseFormat = format || requestParams.format;
|
|
||||||
|
|
||||||
return this.customFetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, {
|
if (
|
||||||
|
type === ContentType.FormData &&
|
||||||
|
body &&
|
||||||
|
body !== null &&
|
||||||
|
typeof body === "object"
|
||||||
|
) {
|
||||||
|
body = this.createFormData(body as Record<string, unknown>);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
type === ContentType.Text &&
|
||||||
|
body &&
|
||||||
|
body !== null &&
|
||||||
|
typeof body !== "string"
|
||||||
|
) {
|
||||||
|
body = JSON.stringify(body);
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.instance.request({
|
||||||
...requestParams,
|
...requestParams,
|
||||||
headers: {
|
headers: {
|
||||||
...(requestParams.headers || {}),
|
...(requestParams.headers || {}),
|
||||||
...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}),
|
...(type ? { "Content-Type": type } : {}),
|
||||||
},
|
},
|
||||||
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
|
params: query,
|
||||||
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
|
responseType: responseFormat,
|
||||||
}).then(async (response) => {
|
data: body,
|
||||||
const r = response.clone() as HttpResponse<T, E>;
|
url: path,
|
||||||
r.data = null as unknown as T;
|
|
||||||
r.error = null as unknown as E;
|
|
||||||
|
|
||||||
const data = !responseFormat
|
|
||||||
? r
|
|
||||||
: await response[responseFormat]()
|
|
||||||
.then((data) => {
|
|
||||||
if (r.ok) {
|
|
||||||
r.data = data;
|
|
||||||
} else {
|
|
||||||
r.error = data;
|
|
||||||
}
|
|
||||||
return r;
|
|
||||||
})
|
|
||||||
.catch((e) => {
|
|
||||||
r.error = e;
|
|
||||||
return r;
|
|
||||||
});
|
|
||||||
|
|
||||||
if (cancelToken) {
|
|
||||||
this.abortControllers.delete(cancelToken);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!response.ok) throw data;
|
|
||||||
return data;
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -244,7 +217,9 @@ export class HttpClient<SecurityDataType = unknown> {
|
|||||||
* @version v1
|
* @version v1
|
||||||
* @contact Marco Santos
|
* @contact Marco Santos
|
||||||
*/
|
*/
|
||||||
export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
|
export class Api<
|
||||||
|
SecurityDataType extends unknown,
|
||||||
|
> extends HttpClient<SecurityDataType> {
|
||||||
generate = {
|
generate = {
|
||||||
/**
|
/**
|
||||||
* No description
|
* No description
|
||||||
@@ -255,14 +230,7 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|||||||
*/
|
*/
|
||||||
generateNifList: (
|
generateNifList: (
|
||||||
query?: {
|
query?: {
|
||||||
type?:
|
type?: NIFType;
|
||||||
| "Pessoa singular (1)"
|
|
||||||
| "Pessoa singular (2)"
|
|
||||||
| "Pessoa singular (3; novo em 2019)"
|
|
||||||
| "Pessoa colectiva (5)"
|
|
||||||
| "Pessoa colectiva pública (6)"
|
|
||||||
| "Empresário em nome individual (8)"
|
|
||||||
| "Pessoa colectiva irregular ou número provisório (9)";
|
|
||||||
},
|
},
|
||||||
params: RequestParams = {},
|
params: RequestParams = {},
|
||||||
) =>
|
) =>
|
||||||
@@ -330,6 +298,21 @@ export class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDa
|
|||||||
format: "json",
|
format: "json",
|
||||||
...params,
|
...params,
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* No description
|
||||||
|
*
|
||||||
|
* @tags Generate
|
||||||
|
* @name GenerateCcList
|
||||||
|
* @request GET:/Generate/GenerateCC
|
||||||
|
*/
|
||||||
|
generateCcList: (params: RequestParams = {}) =>
|
||||||
|
this.request<string, any>({
|
||||||
|
path: `/Generate/GenerateCC`,
|
||||||
|
method: "GET",
|
||||||
|
format: "json",
|
||||||
|
...params,
|
||||||
|
}),
|
||||||
};
|
};
|
||||||
weatherForecast = {
|
weatherForecast = {
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user