forked from loafle/openapi-generator-original
[typescript-fetch] drop support typescript under v4.0 (#12102)
* [typescript-fetch] drop support typescript under v4.0 * [typescript-fetch] update docs * [typescript-fetch] update package-lock.json manually & fix test * [typescript-fetch] fix test
This commit is contained in:
parent
478ed9b8ed
commit
877a3fc58d
@ -8,7 +8,6 @@ additionalProperties:
|
||||
npmRepository: https://skimdb.npmjs.com/registry
|
||||
useSingleRequestParameter: false
|
||||
supportsES6: true
|
||||
typescriptThreePlus: true
|
||||
sagasAndRecords: true
|
||||
detectPassthroughModelsWithSuffixAndField: 'Response.data'
|
||||
inferUniqueIdFromNameSuffix: true
|
||||
|
@ -1,10 +0,0 @@
|
||||
generatorName: typescript-fetch
|
||||
outputDir: samples/client/petstore/typescript-fetch/builds/typescript-three-plus
|
||||
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/typescript-fetch
|
||||
additionalProperties:
|
||||
npmVersion: 1.0.0
|
||||
npmName: '@openapitools/typescript-fetch-petstore'
|
||||
npmRepository: https://skimdb.npmjs.com/registry
|
||||
typescriptThreePlus: true
|
||||
snapshot: false
|
@ -39,7 +39,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|
||||
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true|
|
||||
|stringEnums|Generate string enums instead of objects for enum values.| |false|
|
||||
|supportsES6|Generate code that conforms to ES6.| |false|
|
||||
|typescriptThreePlus|Setting this property to true will generate TypeScript 3.6+ compatible code.| |true|
|
||||
|useSingleRequestParameter|Setting this property to true will generate functions with a single argument containing all API endpoint parameters instead of one argument per parameter.| |true|
|
||||
|withInterfaces|Setting this property to true will generate interfaces next to the default class implementations.| |false|
|
||||
|withoutRuntimeChecks|Setting this property to true will remove any runtime checks on the request and response payloads. Payloads will be casted to their expected types.| |false|
|
||||
|
@ -43,7 +43,6 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege
|
||||
public static final String WITH_INTERFACES = "withInterfaces";
|
||||
public static final String USE_SINGLE_REQUEST_PARAMETER = "useSingleRequestParameter";
|
||||
public static final String PREFIX_PARAMETER_INTERFACES = "prefixParameterInterfaces";
|
||||
public static final String TYPESCRIPT_THREE_PLUS = "typescriptThreePlus";
|
||||
public static final String WITHOUT_RUNTIME_CHECKS = "withoutRuntimeChecks";
|
||||
public static final String STRING_ENUMS = "stringEnums";
|
||||
public static final String STRING_ENUMS_DESC = "Generate string enums instead of objects for enum values.";
|
||||
@ -53,7 +52,6 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege
|
||||
private boolean prefixParameterInterfaces = false;
|
||||
protected boolean addedApiIndex = false;
|
||||
protected boolean addedModelIndex = false;
|
||||
protected boolean typescriptThreePlus = true;
|
||||
protected boolean withoutRuntimeChecks = false;
|
||||
protected boolean stringEnums = false;
|
||||
|
||||
@ -97,7 +95,6 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege
|
||||
this.cliOptions.add(new CliOption(WITH_INTERFACES, "Setting this property to true will generate interfaces next to the default class implementations.", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString()));
|
||||
this.cliOptions.add(new CliOption(CodegenConstants.USE_SINGLE_REQUEST_PARAMETER, CodegenConstants.USE_SINGLE_REQUEST_PARAMETER_DESC, SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.TRUE.toString()));
|
||||
this.cliOptions.add(new CliOption(PREFIX_PARAMETER_INTERFACES, "Setting this property to true will generate parameter interface declarations prefixed with API class name to avoid name conflicts.", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString()));
|
||||
this.cliOptions.add(new CliOption(TYPESCRIPT_THREE_PLUS, "Setting this property to true will generate TypeScript 3.6+ compatible code.", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.TRUE.toString()));
|
||||
this.cliOptions.add(new CliOption(WITHOUT_RUNTIME_CHECKS, "Setting this property to true will remove any runtime checks on the request and response payloads. Payloads will be casted to their expected types.", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString()));
|
||||
this.cliOptions.add(new CliOption(SAGAS_AND_RECORDS, "Setting this property to true will generate additional files for use with redux-saga and immutablejs.", SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString()));
|
||||
this.cliOptions.add(new CliOption(STRING_ENUMS, STRING_ENUMS_DESC, SchemaTypeUtil.BOOLEAN_TYPE).defaultValue(Boolean.FALSE.toString()));
|
||||
@ -121,14 +118,6 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege
|
||||
this.npmRepository = npmRepository;
|
||||
}
|
||||
|
||||
public Boolean getTypescriptThreePlus() {
|
||||
return typescriptThreePlus;
|
||||
}
|
||||
|
||||
public void setTypescriptThreePlus(Boolean typescriptThreePlus) {
|
||||
this.typescriptThreePlus = typescriptThreePlus;
|
||||
}
|
||||
|
||||
public Boolean getWithoutRuntimeChecks() {
|
||||
return withoutRuntimeChecks;
|
||||
}
|
||||
@ -233,10 +222,6 @@ public class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege
|
||||
addNpmPackageGeneration();
|
||||
}
|
||||
|
||||
if (additionalProperties.containsKey(TYPESCRIPT_THREE_PLUS)) {
|
||||
this.setTypescriptThreePlus(convertPropertyToBoolean(TYPESCRIPT_THREE_PLUS));
|
||||
}
|
||||
|
||||
if (additionalProperties.containsKey(WITHOUT_RUNTIME_CHECKS)) {
|
||||
this.setWithoutRuntimeChecks(convertPropertyToBoolean(WITHOUT_RUNTIME_CHECKS));
|
||||
}
|
||||
|
@ -367,9 +367,9 @@ export class {{classname}} extends runtime.BaseAPI {
|
||||
{{#isEnum}}
|
||||
{{#stringEnums}}
|
||||
/**
|
||||
* @export
|
||||
* @enum {string}
|
||||
*/
|
||||
* @export
|
||||
* @enum {string}
|
||||
*/
|
||||
export enum {{operationIdCamelCase}}{{enumName}} {
|
||||
{{#allowableValues}}
|
||||
{{#enumVars}}
|
||||
@ -379,7 +379,6 @@ export enum {{operationIdCamelCase}}{{enumName}} {
|
||||
}
|
||||
{{/stringEnums}}
|
||||
{{^stringEnums}}
|
||||
{{#typescriptThreePlus}}
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
@ -390,18 +389,6 @@ export const {{operationIdCamelCase}}{{enumName}} = {
|
||||
{{/enumVars}}
|
||||
{{/allowableValues}}
|
||||
} as const;
|
||||
{{/typescriptThreePlus}}
|
||||
{{^typescriptThreePlus}}
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const {{operationIdCamelCase}}{{enumName}} = {
|
||||
{{#allowableValues}}
|
||||
{{#enumVars}}
|
||||
{{{name}}}: {{{value}}} as {{{value}}}{{^-last}},{{/-last}}
|
||||
{{/enumVars}}
|
||||
{{/allowableValues}}
|
||||
};{{/typescriptThreePlus}}
|
||||
export type {{operationIdCamelCase}}{{enumName}} = typeof {{operationIdCamelCase}}{{enumName}}[keyof typeof {{operationIdCamelCase}}{{enumName}}];
|
||||
{{/stringEnums}}
|
||||
{{/isEnum}}
|
||||
|
@ -12,7 +12,6 @@ export enum {{classname}} {
|
||||
{{/allowableValues}}
|
||||
}
|
||||
{{/stringEnums}}{{^stringEnums}}
|
||||
{{#typescriptThreePlus}}
|
||||
/**
|
||||
* {{#lambda.indented_star_1}}{{{unescapedDescription}}}{{/lambda.indented_star_1}}
|
||||
* @export
|
||||
@ -24,18 +23,5 @@ export const {{classname}} = {
|
||||
{{/enumVars}}
|
||||
{{/allowableValues}}
|
||||
} as const;
|
||||
{{/typescriptThreePlus}}
|
||||
{{^typescriptThreePlus}}
|
||||
/**
|
||||
* {{#lambda.indented_star_1}}{{{unescapedDescription}}}{{/lambda.indented_star_1}}
|
||||
* @export
|
||||
*/
|
||||
export const {{classname}} = {
|
||||
{{#allowableValues}}
|
||||
{{#enumVars}}
|
||||
{{{name}}}: {{{value}}} as {{{value}}}{{^-last}},{{/-last}}
|
||||
{{/enumVars}}
|
||||
{{/allowableValues}}
|
||||
};{{/typescriptThreePlus}}
|
||||
export type {{classname}} = typeof {{classname}}[keyof typeof {{classname}}];
|
||||
{{/stringEnums}}
|
@ -35,7 +35,6 @@ export enum {{classname}}{{enumName}} {
|
||||
{{/allowableValues}}
|
||||
}
|
||||
{{/stringEnums}}{{^stringEnums}}
|
||||
{{#typescriptThreePlus}}
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
@ -46,18 +45,6 @@ export const {{classname}}{{enumName}} = {
|
||||
{{/enumVars}}
|
||||
{{/allowableValues}}
|
||||
} as const;
|
||||
{{/typescriptThreePlus}}
|
||||
{{^typescriptThreePlus}}
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const {{classname}}{{enumName}} = {
|
||||
{{#allowableValues}}
|
||||
{{#enumVars}}
|
||||
{{{name}}}: {{{value}}} as {{{value}}}{{^-last}},{{/-last}}
|
||||
{{/enumVars}}
|
||||
{{/allowableValues}}
|
||||
};{{/typescriptThreePlus}}
|
||||
export type {{classname}}{{enumName}} = typeof {{classname}}{{enumName}}[keyof typeof {{classname}}{{enumName}}];
|
||||
{{/stringEnums}}
|
||||
{{/isEnum}}{{/vars}}{{/hasEnums}}
|
@ -26,7 +26,7 @@
|
||||
"redux-ts-simple": "^3.2.0",
|
||||
"reselect": "^4.0.0",
|
||||
{{/sagasAndRecords}}
|
||||
"typescript": "^{{#typescriptThreePlus}}3.9.5{{/typescriptThreePlus}}{{^typescriptThreePlus}}2.4{{/typescriptThreePlus}}"
|
||||
"typescript": "^4.0"
|
||||
}{{#npmRepository}},{{/npmRepository}}
|
||||
{{#npmRepository}}
|
||||
"publishConfig": {
|
||||
|
@ -195,7 +195,7 @@ export const COLLECTION_FORMATS = {
|
||||
pipes: "|",
|
||||
};
|
||||
|
||||
export type FetchAPI = {{#typescriptThreePlus}}WindowOrWorkerGlobalScope{{/typescriptThreePlus}}{{^typescriptThreePlus}}GlobalFetch{{/typescriptThreePlus}}['fetch'];
|
||||
export type FetchAPI = WindowOrWorkerGlobalScope['fetch'];
|
||||
|
||||
export type Json = any;
|
||||
export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD';
|
||||
|
@ -39,7 +39,6 @@ public class TypeScriptFetchClientOptionsProvider implements OptionsProvider {
|
||||
private static final String NPM_REPOSITORY = "https://registry.npmjs.org";
|
||||
public static final String ALLOW_UNICODE_IDENTIFIERS_VALUE = "false";
|
||||
public static final String PREPEND_FORM_OR_BODY_PARAMETERS_VALUE = "true";
|
||||
public static final String TYPESCRIPT_THREE_PLUS = "true";
|
||||
public static final String WITHOUT_RUNTIME_CHECKS = "true";
|
||||
public static final String SAGAS_AND_RECORDS = "false";
|
||||
public static final String ENUM_UNKNOWN_DEFAULT_CASE_VALUE = "false";
|
||||
@ -69,7 +68,6 @@ public class TypeScriptFetchClientOptionsProvider implements OptionsProvider {
|
||||
.put(TypeScriptFetchClientCodegen.WITH_INTERFACES, Boolean.FALSE.toString())
|
||||
.put(TypeScriptFetchClientCodegen.USE_SINGLE_REQUEST_PARAMETER, Boolean.FALSE.toString())
|
||||
.put(TypeScriptFetchClientCodegen.PREFIX_PARAMETER_INTERFACES, Boolean.FALSE.toString())
|
||||
.put(TypeScriptFetchClientCodegen.TYPESCRIPT_THREE_PLUS, TYPESCRIPT_THREE_PLUS)
|
||||
.put(TypeScriptFetchClientCodegen.WITHOUT_RUNTIME_CHECKS, WITHOUT_RUNTIME_CHECKS)
|
||||
.put(TypeScriptFetchClientCodegen.SAGAS_AND_RECORDS, SAGAS_AND_RECORDS)
|
||||
.put(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, ALLOW_UNICODE_IDENTIFIERS_VALUE)
|
||||
|
@ -45,7 +45,6 @@ public class TypeScriptFetchClientOptionsTest extends AbstractOptionsTest {
|
||||
verify(clientCodegen).setParamNaming(TypeScriptFetchClientOptionsProvider.PARAM_NAMING_VALUE);
|
||||
verify(clientCodegen).setSupportsES6(TypeScriptFetchClientOptionsProvider.SUPPORTS_ES6_VALUE);
|
||||
verify(clientCodegen).setPrependFormOrBodyParameters(Boolean.valueOf(TypeScriptFetchClientOptionsProvider.PREPEND_FORM_OR_BODY_PARAMETERS_VALUE));
|
||||
verify(clientCodegen).setTypescriptThreePlus(Boolean.valueOf(TypeScriptFetchClientOptionsProvider.TYPESCRIPT_THREE_PLUS));
|
||||
verify(clientCodegen).setWithoutRuntimeChecks(Boolean.valueOf(TypeScriptFetchClientOptionsProvider.WITHOUT_RUNTIME_CHECKS));
|
||||
verify(clientCodegen).setSagasAndRecords(Boolean.valueOf(TypeScriptFetchClientOptionsProvider.SAGAS_AND_RECORDS));
|
||||
verify(clientCodegen).setEnumUnknownDefaultCase(Boolean.parseBoolean(TypeScriptFetchClientOptionsProvider.ENUM_UNKNOWN_DEFAULT_CASE_VALUE));
|
||||
|
@ -938,69 +938,69 @@ export class FakeApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
* @export
|
||||
*/
|
||||
export const TestEnumParametersEnumHeaderStringArrayEnum = {
|
||||
GreaterThan: '>' as '>',
|
||||
Dollar: '$' as '$'
|
||||
};
|
||||
GreaterThan: '>',
|
||||
Dollar: '$'
|
||||
} as const;
|
||||
export type TestEnumParametersEnumHeaderStringArrayEnum = typeof TestEnumParametersEnumHeaderStringArrayEnum[keyof typeof TestEnumParametersEnumHeaderStringArrayEnum];
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
* @export
|
||||
*/
|
||||
export const TestEnumParametersEnumHeaderStringEnum = {
|
||||
Abc: '_abc' as '_abc',
|
||||
Efg: '-efg' as '-efg',
|
||||
Xyz: '(xyz)' as '(xyz)'
|
||||
};
|
||||
Abc: '_abc',
|
||||
Efg: '-efg',
|
||||
Xyz: '(xyz)'
|
||||
} as const;
|
||||
export type TestEnumParametersEnumHeaderStringEnum = typeof TestEnumParametersEnumHeaderStringEnum[keyof typeof TestEnumParametersEnumHeaderStringEnum];
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
* @export
|
||||
*/
|
||||
export const TestEnumParametersEnumQueryStringArrayEnum = {
|
||||
GreaterThan: '>' as '>',
|
||||
Dollar: '$' as '$'
|
||||
};
|
||||
GreaterThan: '>',
|
||||
Dollar: '$'
|
||||
} as const;
|
||||
export type TestEnumParametersEnumQueryStringArrayEnum = typeof TestEnumParametersEnumQueryStringArrayEnum[keyof typeof TestEnumParametersEnumQueryStringArrayEnum];
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
* @export
|
||||
*/
|
||||
export const TestEnumParametersEnumQueryStringEnum = {
|
||||
Abc: '_abc' as '_abc',
|
||||
Efg: '-efg' as '-efg',
|
||||
Xyz: '(xyz)' as '(xyz)'
|
||||
};
|
||||
Abc: '_abc',
|
||||
Efg: '-efg',
|
||||
Xyz: '(xyz)'
|
||||
} as const;
|
||||
export type TestEnumParametersEnumQueryStringEnum = typeof TestEnumParametersEnumQueryStringEnum[keyof typeof TestEnumParametersEnumQueryStringEnum];
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
* @export
|
||||
*/
|
||||
export const TestEnumParametersEnumQueryIntegerEnum = {
|
||||
NUMBER_1: 1 as 1,
|
||||
NUMBER_MINUS_2: -2 as -2
|
||||
};
|
||||
NUMBER_1: 1,
|
||||
NUMBER_MINUS_2: -2
|
||||
} as const;
|
||||
export type TestEnumParametersEnumQueryIntegerEnum = typeof TestEnumParametersEnumQueryIntegerEnum[keyof typeof TestEnumParametersEnumQueryIntegerEnum];
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
* @export
|
||||
*/
|
||||
export const TestEnumParametersEnumQueryDoubleEnum = {
|
||||
NUMBER_1_DOT_1: 1.1 as 1.1,
|
||||
NUMBER_MINUS_1_DOT_2: -1.2 as -1.2
|
||||
};
|
||||
NUMBER_1_DOT_1: 1.1,
|
||||
NUMBER_MINUS_1_DOT_2: -1.2
|
||||
} as const;
|
||||
export type TestEnumParametersEnumQueryDoubleEnum = typeof TestEnumParametersEnumQueryDoubleEnum[keyof typeof TestEnumParametersEnumQueryDoubleEnum];
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
* @export
|
||||
*/
|
||||
export const TestEnumParametersEnumFormStringArrayEnum = {
|
||||
GreaterThan: '>' as '>',
|
||||
Dollar: '$' as '$'
|
||||
};
|
||||
GreaterThan: '>',
|
||||
Dollar: '$'
|
||||
} as const;
|
||||
export type TestEnumParametersEnumFormStringArrayEnum = typeof TestEnumParametersEnumFormStringArrayEnum[keyof typeof TestEnumParametersEnumFormStringArrayEnum];
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
* @export
|
||||
*/
|
||||
export const TestEnumParametersEnumFormStringEnum = {
|
||||
Abc: '_abc' as '_abc',
|
||||
Efg: '-efg' as '-efg',
|
||||
Xyz: '(xyz)' as '(xyz)'
|
||||
};
|
||||
Abc: '_abc',
|
||||
Efg: '-efg',
|
||||
Xyz: '(xyz)'
|
||||
} as const;
|
||||
export type TestEnumParametersEnumFormStringEnum = typeof TestEnumParametersEnumFormStringEnum[keyof typeof TestEnumParametersEnumFormStringEnum];
|
||||
|
@ -497,11 +497,11 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
* @export
|
||||
*/
|
||||
export const FindPetsByStatusStatusEnum = {
|
||||
Available: 'available' as 'available',
|
||||
Pending: 'pending' as 'pending',
|
||||
Sold: 'sold' as 'sold'
|
||||
};
|
||||
Available: 'available',
|
||||
Pending: 'pending',
|
||||
Sold: 'sold'
|
||||
} as const;
|
||||
export type FindPetsByStatusStatusEnum = typeof FindPetsByStatusStatusEnum[keyof typeof FindPetsByStatusStatusEnum];
|
||||
|
@ -38,18 +38,18 @@ export interface EnumArrays {
|
||||
* @export
|
||||
*/
|
||||
export const EnumArraysJustSymbolEnum = {
|
||||
GreaterThanOrEqualTo: '>=' as '>=',
|
||||
Dollar: '$' as '$'
|
||||
};
|
||||
GreaterThanOrEqualTo: '>=',
|
||||
Dollar: '$'
|
||||
} as const;
|
||||
export type EnumArraysJustSymbolEnum = typeof EnumArraysJustSymbolEnum[keyof typeof EnumArraysJustSymbolEnum];
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const EnumArraysArrayEnumEnum = {
|
||||
Fish: 'fish' as 'fish',
|
||||
Crab: 'crab' as 'crab'
|
||||
};
|
||||
Fish: 'fish',
|
||||
Crab: 'crab'
|
||||
} as const;
|
||||
export type EnumArraysArrayEnumEnum = typeof EnumArraysArrayEnumEnum[keyof typeof EnumArraysArrayEnumEnum];
|
||||
|
||||
|
||||
|
@ -18,10 +18,10 @@
|
||||
* @export
|
||||
*/
|
||||
export const EnumClass = {
|
||||
Abc: '_abc' as '_abc',
|
||||
Efg: '-efg' as '-efg',
|
||||
Xyz: '(xyz)' as '(xyz)'
|
||||
};
|
||||
Abc: '_abc',
|
||||
Efg: '-efg',
|
||||
Xyz: '(xyz)'
|
||||
} as const;
|
||||
export type EnumClass = typeof EnumClass[keyof typeof EnumClass];
|
||||
|
||||
|
||||
|
@ -99,38 +99,38 @@ export interface EnumTest {
|
||||
* @export
|
||||
*/
|
||||
export const EnumTestEnumStringEnum = {
|
||||
Upper: 'UPPER' as 'UPPER',
|
||||
Lower: 'lower' as 'lower',
|
||||
Empty: '' as ''
|
||||
};
|
||||
Upper: 'UPPER',
|
||||
Lower: 'lower',
|
||||
Empty: ''
|
||||
} as const;
|
||||
export type EnumTestEnumStringEnum = typeof EnumTestEnumStringEnum[keyof typeof EnumTestEnumStringEnum];
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const EnumTestEnumStringRequiredEnum = {
|
||||
Upper: 'UPPER' as 'UPPER',
|
||||
Lower: 'lower' as 'lower',
|
||||
Empty: '' as ''
|
||||
};
|
||||
Upper: 'UPPER',
|
||||
Lower: 'lower',
|
||||
Empty: ''
|
||||
} as const;
|
||||
export type EnumTestEnumStringRequiredEnum = typeof EnumTestEnumStringRequiredEnum[keyof typeof EnumTestEnumStringRequiredEnum];
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const EnumTestEnumIntegerEnum = {
|
||||
NUMBER_1: 1 as 1,
|
||||
NUMBER_MINUS_1: -1 as -1
|
||||
};
|
||||
NUMBER_1: 1,
|
||||
NUMBER_MINUS_1: -1
|
||||
} as const;
|
||||
export type EnumTestEnumIntegerEnum = typeof EnumTestEnumIntegerEnum[keyof typeof EnumTestEnumIntegerEnum];
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const EnumTestEnumNumberEnum = {
|
||||
NUMBER_1_DOT_1: 1.1 as 1.1,
|
||||
NUMBER_MINUS_1_DOT_2: -1.2 as -1.2
|
||||
};
|
||||
NUMBER_1_DOT_1: 1.1,
|
||||
NUMBER_MINUS_1_DOT_2: -1.2
|
||||
} as const;
|
||||
export type EnumTestEnumNumberEnum = typeof EnumTestEnumNumberEnum[keyof typeof EnumTestEnumNumberEnum];
|
||||
|
||||
|
||||
|
@ -50,9 +50,9 @@ export interface MapTest {
|
||||
* @export
|
||||
*/
|
||||
export const MapTestMapOfEnumStringEnum = {
|
||||
Upper: 'UPPER' as 'UPPER',
|
||||
Lower: 'lower' as 'lower'
|
||||
};
|
||||
Upper: 'UPPER',
|
||||
Lower: 'lower'
|
||||
} as const;
|
||||
export type MapTestMapOfEnumStringEnum = typeof MapTestMapOfEnumStringEnum[keyof typeof MapTestMapOfEnumStringEnum];
|
||||
|
||||
|
||||
|
@ -62,10 +62,10 @@ export interface Order {
|
||||
* @export
|
||||
*/
|
||||
export const OrderStatusEnum = {
|
||||
Placed: 'placed' as 'placed',
|
||||
Approved: 'approved' as 'approved',
|
||||
Delivered: 'delivered' as 'delivered'
|
||||
};
|
||||
Placed: 'placed',
|
||||
Approved: 'approved',
|
||||
Delivered: 'delivered'
|
||||
} as const;
|
||||
export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum];
|
||||
|
||||
|
||||
|
@ -18,10 +18,10 @@
|
||||
* @export
|
||||
*/
|
||||
export const OuterEnum = {
|
||||
Placed: 'placed' as 'placed',
|
||||
Approved: 'approved' as 'approved',
|
||||
Delivered: 'delivered' as 'delivered'
|
||||
};
|
||||
Placed: 'placed',
|
||||
Approved: 'approved',
|
||||
Delivered: 'delivered'
|
||||
} as const;
|
||||
export type OuterEnum = typeof OuterEnum[keyof typeof OuterEnum];
|
||||
|
||||
|
||||
|
@ -18,10 +18,10 @@
|
||||
* @export
|
||||
*/
|
||||
export const OuterEnumDefaultValue = {
|
||||
Placed: 'placed' as 'placed',
|
||||
Approved: 'approved' as 'approved',
|
||||
Delivered: 'delivered' as 'delivered'
|
||||
};
|
||||
Placed: 'placed',
|
||||
Approved: 'approved',
|
||||
Delivered: 'delivered'
|
||||
} as const;
|
||||
export type OuterEnumDefaultValue = typeof OuterEnumDefaultValue[keyof typeof OuterEnumDefaultValue];
|
||||
|
||||
|
||||
|
@ -18,10 +18,10 @@
|
||||
* @export
|
||||
*/
|
||||
export const OuterEnumInteger = {
|
||||
NUMBER_0: 0 as 0,
|
||||
NUMBER_1: 1 as 1,
|
||||
NUMBER_2: 2 as 2
|
||||
};
|
||||
NUMBER_0: 0,
|
||||
NUMBER_1: 1,
|
||||
NUMBER_2: 2
|
||||
} as const;
|
||||
export type OuterEnumInteger = typeof OuterEnumInteger[keyof typeof OuterEnumInteger];
|
||||
|
||||
|
||||
|
@ -18,10 +18,10 @@
|
||||
* @export
|
||||
*/
|
||||
export const OuterEnumIntegerDefaultValue = {
|
||||
NUMBER_0: 0 as 0,
|
||||
NUMBER_1: 1 as 1,
|
||||
NUMBER_2: 2 as 2
|
||||
};
|
||||
NUMBER_0: 0,
|
||||
NUMBER_1: 1,
|
||||
NUMBER_2: 2
|
||||
} as const;
|
||||
export type OuterEnumIntegerDefaultValue = typeof OuterEnumIntegerDefaultValue[keyof typeof OuterEnumIntegerDefaultValue];
|
||||
|
||||
|
||||
|
@ -75,10 +75,10 @@ export interface Pet {
|
||||
* @export
|
||||
*/
|
||||
export const PetStatusEnum = {
|
||||
Available: 'available' as 'available',
|
||||
Pending: 'pending' as 'pending',
|
||||
Sold: 'sold' as 'sold'
|
||||
};
|
||||
Available: 'available',
|
||||
Pending: 'pending',
|
||||
Sold: 'sold'
|
||||
} as const;
|
||||
export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum];
|
||||
|
||||
|
||||
|
@ -206,7 +206,7 @@ export const COLLECTION_FORMATS = {
|
||||
pipes: "|",
|
||||
};
|
||||
|
||||
export type FetchAPI = GlobalFetch['fetch'];
|
||||
export type FetchAPI = WindowOrWorkerGlobalScope['fetch'];
|
||||
|
||||
export type Json = any;
|
||||
export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD';
|
||||
|
@ -415,11 +415,11 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
* @export
|
||||
*/
|
||||
export const FindPetsByStatusStatusEnum = {
|
||||
Available: 'available' as 'available',
|
||||
Pending: 'pending' as 'pending',
|
||||
Sold: 'sold' as 'sold'
|
||||
};
|
||||
Available: 'available',
|
||||
Pending: 'pending',
|
||||
Sold: 'sold'
|
||||
} as const;
|
||||
export type FindPetsByStatusStatusEnum = typeof FindPetsByStatusStatusEnum[keyof typeof FindPetsByStatusStatusEnum];
|
||||
|
@ -62,10 +62,10 @@ export interface Order {
|
||||
* @export
|
||||
*/
|
||||
export const OrderStatusEnum = {
|
||||
Placed: 'placed' as 'placed',
|
||||
Approved: 'approved' as 'approved',
|
||||
Delivered: 'delivered' as 'delivered'
|
||||
};
|
||||
Placed: 'placed',
|
||||
Approved: 'approved',
|
||||
Delivered: 'delivered'
|
||||
} as const;
|
||||
export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum];
|
||||
|
||||
|
||||
|
@ -75,10 +75,10 @@ export interface Pet {
|
||||
* @export
|
||||
*/
|
||||
export const PetStatusEnum = {
|
||||
Available: 'available' as 'available',
|
||||
Pending: 'pending' as 'pending',
|
||||
Sold: 'sold' as 'sold'
|
||||
};
|
||||
Available: 'available',
|
||||
Pending: 'pending',
|
||||
Sold: 'sold'
|
||||
} as const;
|
||||
export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum];
|
||||
|
||||
|
||||
|
@ -206,7 +206,7 @@ export const COLLECTION_FORMATS = {
|
||||
pipes: "|",
|
||||
};
|
||||
|
||||
export type FetchAPI = GlobalFetch['fetch'];
|
||||
export type FetchAPI = WindowOrWorkerGlobalScope['fetch'];
|
||||
|
||||
export type Json = any;
|
||||
export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD';
|
||||
|
@ -196,20 +196,20 @@ export class DefaultApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
* @export
|
||||
*/
|
||||
export const FakeEnumRequestGetInlineStringEnumEnum = {
|
||||
One: 'one' as 'one',
|
||||
Two: 'two' as 'two',
|
||||
Three: 'three' as 'three'
|
||||
};
|
||||
One: 'one',
|
||||
Two: 'two',
|
||||
Three: 'three'
|
||||
} as const;
|
||||
export type FakeEnumRequestGetInlineStringEnumEnum = typeof FakeEnumRequestGetInlineStringEnumEnum[keyof typeof FakeEnumRequestGetInlineStringEnumEnum];
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
* @export
|
||||
*/
|
||||
export const FakeEnumRequestGetInlineNumberEnumEnum = {
|
||||
NUMBER_1: 1 as 1,
|
||||
NUMBER_2: 2 as 2,
|
||||
NUMBER_3: 3 as 3
|
||||
};
|
||||
NUMBER_1: 1,
|
||||
NUMBER_2: 2,
|
||||
NUMBER_3: 3
|
||||
} as const;
|
||||
export type FakeEnumRequestGetInlineNumberEnumEnum = typeof FakeEnumRequestGetInlineNumberEnumEnum[keyof typeof FakeEnumRequestGetInlineNumberEnumEnum];
|
||||
|
@ -50,20 +50,20 @@ export interface InlineObject {
|
||||
* @export
|
||||
*/
|
||||
export const InlineObjectStringEnumEnum = {
|
||||
One: 'one' as 'one',
|
||||
Two: 'two' as 'two',
|
||||
Three: 'three' as 'three'
|
||||
};
|
||||
One: 'one',
|
||||
Two: 'two',
|
||||
Three: 'three'
|
||||
} as const;
|
||||
export type InlineObjectStringEnumEnum = typeof InlineObjectStringEnumEnum[keyof typeof InlineObjectStringEnumEnum];
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const InlineObjectNumberEnumEnum = {
|
||||
NUMBER_1: 1 as 1,
|
||||
NUMBER_2: 2 as 2,
|
||||
NUMBER_3: 3 as 3
|
||||
};
|
||||
NUMBER_1: 1,
|
||||
NUMBER_2: 2,
|
||||
NUMBER_3: 3
|
||||
} as const;
|
||||
export type InlineObjectNumberEnumEnum = typeof InlineObjectNumberEnumEnum[keyof typeof InlineObjectNumberEnumEnum];
|
||||
|
||||
|
||||
|
@ -50,20 +50,20 @@ export interface InlineResponse200 {
|
||||
* @export
|
||||
*/
|
||||
export const InlineResponse200StringEnumEnum = {
|
||||
One: 'one' as 'one',
|
||||
Two: 'two' as 'two',
|
||||
Three: 'three' as 'three'
|
||||
};
|
||||
One: 'one',
|
||||
Two: 'two',
|
||||
Three: 'three'
|
||||
} as const;
|
||||
export type InlineResponse200StringEnumEnum = typeof InlineResponse200StringEnumEnum[keyof typeof InlineResponse200StringEnumEnum];
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const InlineResponse200NumberEnumEnum = {
|
||||
NUMBER_1: 1 as 1,
|
||||
NUMBER_2: 2 as 2,
|
||||
NUMBER_3: 3 as 3
|
||||
};
|
||||
NUMBER_1: 1,
|
||||
NUMBER_2: 2,
|
||||
NUMBER_3: 3
|
||||
} as const;
|
||||
export type InlineResponse200NumberEnumEnum = typeof InlineResponse200NumberEnumEnum[keyof typeof InlineResponse200NumberEnumEnum];
|
||||
|
||||
|
||||
|
@ -18,10 +18,10 @@
|
||||
* @export
|
||||
*/
|
||||
export const NumberEnum = {
|
||||
NUMBER_1: 1 as 1,
|
||||
NUMBER_2: 2 as 2,
|
||||
NUMBER_3: 3 as 3
|
||||
};
|
||||
NUMBER_1: 1,
|
||||
NUMBER_2: 2,
|
||||
NUMBER_3: 3
|
||||
} as const;
|
||||
export type NumberEnum = typeof NumberEnum[keyof typeof NumberEnum];
|
||||
|
||||
|
||||
|
@ -18,10 +18,10 @@
|
||||
* @export
|
||||
*/
|
||||
export const StringEnum = {
|
||||
One: 'one' as 'one',
|
||||
Two: 'two' as 'two',
|
||||
Three: 'three' as 'three'
|
||||
};
|
||||
One: 'one',
|
||||
Two: 'two',
|
||||
Three: 'three'
|
||||
} as const;
|
||||
export type StringEnum = typeof StringEnum[keyof typeof StringEnum];
|
||||
|
||||
|
||||
|
@ -206,7 +206,7 @@ export const COLLECTION_FORMATS = {
|
||||
pipes: "|",
|
||||
};
|
||||
|
||||
export type FetchAPI = GlobalFetch['fetch'];
|
||||
export type FetchAPI = WindowOrWorkerGlobalScope['fetch'];
|
||||
|
||||
export type Json = any;
|
||||
export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD';
|
||||
|
@ -12,7 +12,7 @@
|
||||
"prepare": "npm run build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^2.4"
|
||||
"typescript": "^4.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"registry": "https://skimdb.npmjs.com/registry"
|
||||
|
@ -415,11 +415,11 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
* @export
|
||||
*/
|
||||
export const FindPetsByStatusStatusEnum = {
|
||||
Available: 'available' as 'available',
|
||||
Pending: 'pending' as 'pending',
|
||||
Sold: 'sold' as 'sold'
|
||||
};
|
||||
Available: 'available',
|
||||
Pending: 'pending',
|
||||
Sold: 'sold'
|
||||
} as const;
|
||||
export type FindPetsByStatusStatusEnum = typeof FindPetsByStatusStatusEnum[keyof typeof FindPetsByStatusStatusEnum];
|
||||
|
@ -62,10 +62,10 @@ export interface Order {
|
||||
* @export
|
||||
*/
|
||||
export const OrderStatusEnum = {
|
||||
Placed: 'placed' as 'placed',
|
||||
Approved: 'approved' as 'approved',
|
||||
Delivered: 'delivered' as 'delivered'
|
||||
};
|
||||
Placed: 'placed',
|
||||
Approved: 'approved',
|
||||
Delivered: 'delivered'
|
||||
} as const;
|
||||
export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum];
|
||||
|
||||
|
||||
|
@ -75,10 +75,10 @@ export interface Pet {
|
||||
* @export
|
||||
*/
|
||||
export const PetStatusEnum = {
|
||||
Available: 'available' as 'available',
|
||||
Pending: 'pending' as 'pending',
|
||||
Sold: 'sold' as 'sold'
|
||||
};
|
||||
Available: 'available',
|
||||
Pending: 'pending',
|
||||
Sold: 'sold'
|
||||
} as const;
|
||||
export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum];
|
||||
|
||||
|
||||
|
@ -206,7 +206,7 @@ export const COLLECTION_FORMATS = {
|
||||
pipes: "|",
|
||||
};
|
||||
|
||||
export type FetchAPI = GlobalFetch['fetch'];
|
||||
export type FetchAPI = WindowOrWorkerGlobalScope['fetch'];
|
||||
|
||||
export type Json = any;
|
||||
export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD';
|
||||
|
@ -415,11 +415,11 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
* @export
|
||||
*/
|
||||
export const FindPetsByStatusStatusEnum = {
|
||||
Available: 'available' as 'available',
|
||||
Pending: 'pending' as 'pending',
|
||||
Sold: 'sold' as 'sold'
|
||||
};
|
||||
Available: 'available',
|
||||
Pending: 'pending',
|
||||
Sold: 'sold'
|
||||
} as const;
|
||||
export type FindPetsByStatusStatusEnum = typeof FindPetsByStatusStatusEnum[keyof typeof FindPetsByStatusStatusEnum];
|
||||
|
@ -62,10 +62,10 @@ export interface Order {
|
||||
* @export
|
||||
*/
|
||||
export const OrderStatusEnum = {
|
||||
Placed: 'placed' as 'placed',
|
||||
Approved: 'approved' as 'approved',
|
||||
Delivered: 'delivered' as 'delivered'
|
||||
};
|
||||
Placed: 'placed',
|
||||
Approved: 'approved',
|
||||
Delivered: 'delivered'
|
||||
} as const;
|
||||
export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum];
|
||||
|
||||
|
||||
|
@ -75,10 +75,10 @@ export interface Pet {
|
||||
* @export
|
||||
*/
|
||||
export const PetStatusEnum = {
|
||||
Available: 'available' as 'available',
|
||||
Pending: 'pending' as 'pending',
|
||||
Sold: 'sold' as 'sold'
|
||||
};
|
||||
Available: 'available',
|
||||
Pending: 'pending',
|
||||
Sold: 'sold'
|
||||
} as const;
|
||||
export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum];
|
||||
|
||||
|
||||
|
@ -206,7 +206,7 @@ export const COLLECTION_FORMATS = {
|
||||
pipes: "|",
|
||||
};
|
||||
|
||||
export type FetchAPI = GlobalFetch['fetch'];
|
||||
export type FetchAPI = WindowOrWorkerGlobalScope['fetch'];
|
||||
|
||||
export type Json = any;
|
||||
export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD';
|
||||
|
@ -10,7 +10,7 @@
|
||||
"prepare": "npm run build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^2.4"
|
||||
"typescript": "^4.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"registry": "https://skimdb.npmjs.com/registry"
|
||||
|
@ -415,11 +415,11 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
* @export
|
||||
*/
|
||||
export const FindPetsByStatusStatusEnum = {
|
||||
Available: 'available' as 'available',
|
||||
Pending: 'pending' as 'pending',
|
||||
Sold: 'sold' as 'sold'
|
||||
};
|
||||
Available: 'available',
|
||||
Pending: 'pending',
|
||||
Sold: 'sold'
|
||||
} as const;
|
||||
export type FindPetsByStatusStatusEnum = typeof FindPetsByStatusStatusEnum[keyof typeof FindPetsByStatusStatusEnum];
|
||||
|
@ -62,10 +62,10 @@ export interface Order {
|
||||
* @export
|
||||
*/
|
||||
export const OrderStatusEnum = {
|
||||
Placed: 'placed' as 'placed',
|
||||
Approved: 'approved' as 'approved',
|
||||
Delivered: 'delivered' as 'delivered'
|
||||
};
|
||||
Placed: 'placed',
|
||||
Approved: 'approved',
|
||||
Delivered: 'delivered'
|
||||
} as const;
|
||||
export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum];
|
||||
|
||||
|
||||
|
@ -75,10 +75,10 @@ export interface Pet {
|
||||
* @export
|
||||
*/
|
||||
export const PetStatusEnum = {
|
||||
Available: 'available' as 'available',
|
||||
Pending: 'pending' as 'pending',
|
||||
Sold: 'sold' as 'sold'
|
||||
};
|
||||
Available: 'available',
|
||||
Pending: 'pending',
|
||||
Sold: 'sold'
|
||||
} as const;
|
||||
export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum];
|
||||
|
||||
|
||||
|
@ -206,7 +206,7 @@ export const COLLECTION_FORMATS = {
|
||||
pipes: "|",
|
||||
};
|
||||
|
||||
export type FetchAPI = GlobalFetch['fetch'];
|
||||
export type FetchAPI = WindowOrWorkerGlobalScope['fetch'];
|
||||
|
||||
export type Json = any;
|
||||
export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD';
|
||||
|
@ -13,12 +13,12 @@
|
||||
"redux-saga": "^1.1.3",
|
||||
"redux-ts-simple": "^3.2.0",
|
||||
"reselect": "^4.0.0",
|
||||
"typescript": "^3.9.5"
|
||||
"typescript": "^4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/runtime": {
|
||||
"version": "7.12.5",
|
||||
"resolved": "http://verdaccio.corp.stingraydigital.com:4873/@babel%2fruntime/-/runtime-7.12.5.tgz",
|
||||
"resolved": "https://registry.npmjs.org/@babel%2fruntime/-/runtime-7.12.5.tgz",
|
||||
"integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
@ -28,7 +28,7 @@
|
||||
},
|
||||
"node_modules/@redux-saga/core": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "http://verdaccio.corp.stingraydigital.com:4873/@redux-saga%2fcore/-/core-1.1.3.tgz",
|
||||
"resolved": "https://registry.npmjs.org/@redux-saga%2fcore/-/core-1.1.3.tgz",
|
||||
"integrity": "sha512-8tInBftak8TPzE6X13ABmEtRJGjtK17w7VUs7qV17S8hCO5S3+aUTWZ/DBsBJPdE8Z5jOPwYALyvofgq1Ws+kg==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
@ -45,14 +45,14 @@
|
||||
},
|
||||
"node_modules/@redux-saga/deferred": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "http://verdaccio.corp.stingraydigital.com:4873/@redux-saga%2fdeferred/-/deferred-1.1.2.tgz",
|
||||
"resolved": "https://registry.npmjs.org/@redux-saga%2fdeferred/-/deferred-1.1.2.tgz",
|
||||
"integrity": "sha512-908rDLHFN2UUzt2jb4uOzj6afpjgJe3MjICaUNO3bvkV/kN/cNeI9PMr8BsFXB/MR8WTAZQq/PlTq8Kww3TBSQ==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@redux-saga/delay-p": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "http://verdaccio.corp.stingraydigital.com:4873/@redux-saga%2fdelay-p/-/delay-p-1.1.2.tgz",
|
||||
"resolved": "https://registry.npmjs.org/@redux-saga%2fdelay-p/-/delay-p-1.1.2.tgz",
|
||||
"integrity": "sha512-ojc+1IoC6OP65Ts5+ZHbEYdrohmIw1j9P7HS9MOJezqMYtCDgpkoqB5enAAZrNtnbSL6gVCWPHaoaTY5KeO0/g==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
@ -62,7 +62,7 @@
|
||||
},
|
||||
"node_modules/@redux-saga/is": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "http://verdaccio.corp.stingraydigital.com:4873/@redux-saga%2fis/-/is-1.1.2.tgz",
|
||||
"resolved": "https://registry.npmjs.org/@redux-saga%2fis/-/is-1.1.2.tgz",
|
||||
"integrity": "sha512-OLbunKVsCVNTKEf2cH4TYyNbbPgvmZ52iaxBD4I1fTif4+MTXMa4/Z07L83zW/hTCXwpSZvXogqMqLfex2Tg6w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
@ -73,35 +73,35 @@
|
||||
},
|
||||
"node_modules/@redux-saga/symbols": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "http://verdaccio.corp.stingraydigital.com:4873/@redux-saga%2fsymbols/-/symbols-1.1.2.tgz",
|
||||
"resolved": "https://registry.npmjs.org/@redux-saga%2fsymbols/-/symbols-1.1.2.tgz",
|
||||
"integrity": "sha512-EfdGnF423glv3uMwLsGAtE6bg+R9MdqlHEzExnfagXPrIiuxwr3bdiAwz3gi+PsrQ3yBlaBpfGLtDG8rf3LgQQ==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@redux-saga/types": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "http://verdaccio.corp.stingraydigital.com:4873/@redux-saga%2ftypes/-/types-1.1.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/@redux-saga%2ftypes/-/types-1.1.0.tgz",
|
||||
"integrity": "sha512-afmTuJrylUU/0OtqzaRkbyYFFNgCF73Bvel/sw90pvGrWIZ+vyoIJqA6eMSoA6+nb443kTmulmBtC9NerXboNg==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/immutable": {
|
||||
"version": "4.0.0-rc.12",
|
||||
"resolved": "http://verdaccio.corp.stingraydigital.com:4873/immutable/-/immutable-4.0.0-rc.12.tgz",
|
||||
"resolved": "https://registry.npmjs.org/immutable/-/immutable-4.0.0-rc.12.tgz",
|
||||
"integrity": "sha512-0M2XxkZLx/mi3t8NVwIm1g8nHoEmM9p9UBl/G9k4+hm0kBgOVdMV/B3CY5dQ8qG8qc80NN4gDV4HQv6FTJ5q7A==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/js-tokens": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "http://verdaccio.corp.stingraydigital.com:4873/js-tokens/-/js-tokens-4.0.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
|
||||
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/loose-envify": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "http://verdaccio.corp.stingraydigital.com:4873/loose-envify/-/loose-envify-1.4.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
|
||||
"integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
@ -114,14 +114,14 @@
|
||||
},
|
||||
"node_modules/normalizr": {
|
||||
"version": "3.6.1",
|
||||
"resolved": "http://verdaccio.corp.stingraydigital.com:4873/normalizr/-/normalizr-3.6.1.tgz",
|
||||
"resolved": "https://registry.npmjs.org/normalizr/-/normalizr-3.6.1.tgz",
|
||||
"integrity": "sha512-8iEmqXmPtll8PwbEFrbPoDxVw7MKnNvt3PZzR2Xvq9nggEEOgBlNICPXYzyZ4w4AkHUzCU998mdatER3n2VaMA==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/redux": {
|
||||
"version": "4.0.5",
|
||||
"resolved": "http://verdaccio.corp.stingraydigital.com:4873/redux/-/redux-4.0.5.tgz",
|
||||
"resolved": "https://registry.npmjs.org/redux/-/redux-4.0.5.tgz",
|
||||
"integrity": "sha512-VSz1uMAH24DM6MF72vcojpYPtrTUu3ByVWfPL1nPfVRb5mZVTve5GnNCUV53QM/BZ66xfWrm0CTWoM+Xlz8V1w==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
@ -132,7 +132,7 @@
|
||||
},
|
||||
"node_modules/redux-saga": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "http://verdaccio.corp.stingraydigital.com:4873/redux-saga/-/redux-saga-1.1.3.tgz",
|
||||
"resolved": "https://registry.npmjs.org/redux-saga/-/redux-saga-1.1.3.tgz",
|
||||
"integrity": "sha512-RkSn/z0mwaSa5/xH/hQLo8gNf4tlvT18qXDNvedihLcfzh+jMchDgaariQoehCpgRltEm4zHKJyINEz6aqswTw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
@ -142,28 +142,28 @@
|
||||
},
|
||||
"node_modules/redux-ts-simple": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "http://verdaccio.corp.stingraydigital.com:4873/redux-ts-simple/-/redux-ts-simple-3.2.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/redux-ts-simple/-/redux-ts-simple-3.2.0.tgz",
|
||||
"integrity": "sha512-cZGmkNlD+14tNKomgaLWv6giQmgI/c05g09UxbA04lr2TbqHH8/bUQLvJgTzPuGwsZCWQHizkQZt9EI0HLD+pg==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/regenerator-runtime": {
|
||||
"version": "0.13.7",
|
||||
"resolved": "http://verdaccio.corp.stingraydigital.com:4873/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz",
|
||||
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz",
|
||||
"integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/reselect": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "http://verdaccio.corp.stingraydigital.com:4873/reselect/-/reselect-4.0.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/reselect/-/reselect-4.0.0.tgz",
|
||||
"integrity": "sha512-qUgANli03jjAyGlnbYVAV5vvnOmJnODyABz51RdBN7M4WaVu8mecZWgyQNkG8Yqe3KRGRt0l4K4B3XVEULC4CA==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/symbol-observable": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "http://verdaccio.corp.stingraydigital.com:4873/symbol-observable/-/symbol-observable-1.2.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz",
|
||||
"integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
@ -172,11 +172,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "3.9.7",
|
||||
"resolved": "http://verdaccio.corp.stingraydigital.com:4873/typescript/-/typescript-3.9.7.tgz",
|
||||
"integrity": "sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==",
|
||||
"version": "4.6.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz",
|
||||
"integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==",
|
||||
"dev": true,
|
||||
"license": "Apache-2.0",
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
@ -187,7 +186,7 @@
|
||||
},
|
||||
"node_modules/typescript-compare": {
|
||||
"version": "0.0.2",
|
||||
"resolved": "http://verdaccio.corp.stingraydigital.com:4873/typescript-compare/-/typescript-compare-0.0.2.tgz",
|
||||
"resolved": "https://registry.npmjs.org/typescript-compare/-/typescript-compare-0.0.2.tgz",
|
||||
"integrity": "sha512-8ja4j7pMHkfLJQO2/8tut7ub+J3Lw2S3061eJLFQcvs3tsmJKp8KG5NtpLn7KcY2w08edF74BSVN7qJS0U6oHA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
@ -197,14 +196,14 @@
|
||||
},
|
||||
"node_modules/typescript-logic": {
|
||||
"version": "0.0.0",
|
||||
"resolved": "http://verdaccio.corp.stingraydigital.com:4873/typescript-logic/-/typescript-logic-0.0.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/typescript-logic/-/typescript-logic-0.0.0.tgz",
|
||||
"integrity": "sha512-zXFars5LUkI3zP492ls0VskH3TtdeHCqu0i7/duGt60i5IGPIpAHE/DWo5FqJ6EjQ15YKXrt+AETjv60Dat34Q==",
|
||||
"dev": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/typescript-tuple": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "http://verdaccio.corp.stingraydigital.com:4873/typescript-tuple/-/typescript-tuple-2.2.1.tgz",
|
||||
"resolved": "https://registry.npmjs.org/typescript-tuple/-/typescript-tuple-2.2.1.tgz",
|
||||
"integrity": "sha512-Zcr0lbt8z5ZdEzERHAMAniTiIKerFCMgd7yjq1fPnDJ43et/k9twIFQMUYff9k5oXcsQ0WpvFcgzK2ZKASoW6Q==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
@ -216,7 +215,7 @@
|
||||
"dependencies": {
|
||||
"@babel/runtime": {
|
||||
"version": "7.12.5",
|
||||
"resolved": "http://verdaccio.corp.stingraydigital.com:4873/@babel%2fruntime/-/runtime-7.12.5.tgz",
|
||||
"resolved": "https://registry.npmjs.org/@babel%2fruntime/-/runtime-7.12.5.tgz",
|
||||
"integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -225,7 +224,7 @@
|
||||
},
|
||||
"@redux-saga/core": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "http://verdaccio.corp.stingraydigital.com:4873/@redux-saga%2fcore/-/core-1.1.3.tgz",
|
||||
"resolved": "https://registry.npmjs.org/@redux-saga%2fcore/-/core-1.1.3.tgz",
|
||||
"integrity": "sha512-8tInBftak8TPzE6X13ABmEtRJGjtK17w7VUs7qV17S8hCO5S3+aUTWZ/DBsBJPdE8Z5jOPwYALyvofgq1Ws+kg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -241,13 +240,13 @@
|
||||
},
|
||||
"@redux-saga/deferred": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "http://verdaccio.corp.stingraydigital.com:4873/@redux-saga%2fdeferred/-/deferred-1.1.2.tgz",
|
||||
"resolved": "https://registry.npmjs.org/@redux-saga%2fdeferred/-/deferred-1.1.2.tgz",
|
||||
"integrity": "sha512-908rDLHFN2UUzt2jb4uOzj6afpjgJe3MjICaUNO3bvkV/kN/cNeI9PMr8BsFXB/MR8WTAZQq/PlTq8Kww3TBSQ==",
|
||||
"dev": true
|
||||
},
|
||||
"@redux-saga/delay-p": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "http://verdaccio.corp.stingraydigital.com:4873/@redux-saga%2fdelay-p/-/delay-p-1.1.2.tgz",
|
||||
"resolved": "https://registry.npmjs.org/@redux-saga%2fdelay-p/-/delay-p-1.1.2.tgz",
|
||||
"integrity": "sha512-ojc+1IoC6OP65Ts5+ZHbEYdrohmIw1j9P7HS9MOJezqMYtCDgpkoqB5enAAZrNtnbSL6gVCWPHaoaTY5KeO0/g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -256,7 +255,7 @@
|
||||
},
|
||||
"@redux-saga/is": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "http://verdaccio.corp.stingraydigital.com:4873/@redux-saga%2fis/-/is-1.1.2.tgz",
|
||||
"resolved": "https://registry.npmjs.org/@redux-saga%2fis/-/is-1.1.2.tgz",
|
||||
"integrity": "sha512-OLbunKVsCVNTKEf2cH4TYyNbbPgvmZ52iaxBD4I1fTif4+MTXMa4/Z07L83zW/hTCXwpSZvXogqMqLfex2Tg6w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -266,31 +265,31 @@
|
||||
},
|
||||
"@redux-saga/symbols": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "http://verdaccio.corp.stingraydigital.com:4873/@redux-saga%2fsymbols/-/symbols-1.1.2.tgz",
|
||||
"resolved": "https://registry.npmjs.org/@redux-saga%2fsymbols/-/symbols-1.1.2.tgz",
|
||||
"integrity": "sha512-EfdGnF423glv3uMwLsGAtE6bg+R9MdqlHEzExnfagXPrIiuxwr3bdiAwz3gi+PsrQ3yBlaBpfGLtDG8rf3LgQQ==",
|
||||
"dev": true
|
||||
},
|
||||
"@redux-saga/types": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "http://verdaccio.corp.stingraydigital.com:4873/@redux-saga%2ftypes/-/types-1.1.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/@redux-saga%2ftypes/-/types-1.1.0.tgz",
|
||||
"integrity": "sha512-afmTuJrylUU/0OtqzaRkbyYFFNgCF73Bvel/sw90pvGrWIZ+vyoIJqA6eMSoA6+nb443kTmulmBtC9NerXboNg==",
|
||||
"dev": true
|
||||
},
|
||||
"immutable": {
|
||||
"version": "4.0.0-rc.12",
|
||||
"resolved": "http://verdaccio.corp.stingraydigital.com:4873/immutable/-/immutable-4.0.0-rc.12.tgz",
|
||||
"resolved": "https://registry.npmjs.org/immutable/-/immutable-4.0.0-rc.12.tgz",
|
||||
"integrity": "sha512-0M2XxkZLx/mi3t8NVwIm1g8nHoEmM9p9UBl/G9k4+hm0kBgOVdMV/B3CY5dQ8qG8qc80NN4gDV4HQv6FTJ5q7A==",
|
||||
"dev": true
|
||||
},
|
||||
"js-tokens": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "http://verdaccio.corp.stingraydigital.com:4873/js-tokens/-/js-tokens-4.0.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
|
||||
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
|
||||
"dev": true
|
||||
},
|
||||
"loose-envify": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "http://verdaccio.corp.stingraydigital.com:4873/loose-envify/-/loose-envify-1.4.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
|
||||
"integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -299,13 +298,13 @@
|
||||
},
|
||||
"normalizr": {
|
||||
"version": "3.6.1",
|
||||
"resolved": "http://verdaccio.corp.stingraydigital.com:4873/normalizr/-/normalizr-3.6.1.tgz",
|
||||
"resolved": "https://registry.npmjs.org/normalizr/-/normalizr-3.6.1.tgz",
|
||||
"integrity": "sha512-8iEmqXmPtll8PwbEFrbPoDxVw7MKnNvt3PZzR2Xvq9nggEEOgBlNICPXYzyZ4w4AkHUzCU998mdatER3n2VaMA==",
|
||||
"dev": true
|
||||
},
|
||||
"redux": {
|
||||
"version": "4.0.5",
|
||||
"resolved": "http://verdaccio.corp.stingraydigital.com:4873/redux/-/redux-4.0.5.tgz",
|
||||
"resolved": "https://registry.npmjs.org/redux/-/redux-4.0.5.tgz",
|
||||
"integrity": "sha512-VSz1uMAH24DM6MF72vcojpYPtrTUu3ByVWfPL1nPfVRb5mZVTve5GnNCUV53QM/BZ66xfWrm0CTWoM+Xlz8V1w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -315,7 +314,7 @@
|
||||
},
|
||||
"redux-saga": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "http://verdaccio.corp.stingraydigital.com:4873/redux-saga/-/redux-saga-1.1.3.tgz",
|
||||
"resolved": "https://registry.npmjs.org/redux-saga/-/redux-saga-1.1.3.tgz",
|
||||
"integrity": "sha512-RkSn/z0mwaSa5/xH/hQLo8gNf4tlvT18qXDNvedihLcfzh+jMchDgaariQoehCpgRltEm4zHKJyINEz6aqswTw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -324,37 +323,37 @@
|
||||
},
|
||||
"redux-ts-simple": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "http://verdaccio.corp.stingraydigital.com:4873/redux-ts-simple/-/redux-ts-simple-3.2.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/redux-ts-simple/-/redux-ts-simple-3.2.0.tgz",
|
||||
"integrity": "sha512-cZGmkNlD+14tNKomgaLWv6giQmgI/c05g09UxbA04lr2TbqHH8/bUQLvJgTzPuGwsZCWQHizkQZt9EI0HLD+pg==",
|
||||
"dev": true
|
||||
},
|
||||
"regenerator-runtime": {
|
||||
"version": "0.13.7",
|
||||
"resolved": "http://verdaccio.corp.stingraydigital.com:4873/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz",
|
||||
"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz",
|
||||
"integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==",
|
||||
"dev": true
|
||||
},
|
||||
"reselect": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "http://verdaccio.corp.stingraydigital.com:4873/reselect/-/reselect-4.0.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/reselect/-/reselect-4.0.0.tgz",
|
||||
"integrity": "sha512-qUgANli03jjAyGlnbYVAV5vvnOmJnODyABz51RdBN7M4WaVu8mecZWgyQNkG8Yqe3KRGRt0l4K4B3XVEULC4CA==",
|
||||
"dev": true
|
||||
},
|
||||
"symbol-observable": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "http://verdaccio.corp.stingraydigital.com:4873/symbol-observable/-/symbol-observable-1.2.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz",
|
||||
"integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==",
|
||||
"dev": true
|
||||
},
|
||||
"typescript": {
|
||||
"version": "3.9.7",
|
||||
"resolved": "http://verdaccio.corp.stingraydigital.com:4873/typescript/-/typescript-3.9.7.tgz",
|
||||
"integrity": "sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==",
|
||||
"version": "4.6.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz",
|
||||
"integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==",
|
||||
"dev": true
|
||||
},
|
||||
"typescript-compare": {
|
||||
"version": "0.0.2",
|
||||
"resolved": "http://verdaccio.corp.stingraydigital.com:4873/typescript-compare/-/typescript-compare-0.0.2.tgz",
|
||||
"resolved": "https://registry.npmjs.org/typescript-compare/-/typescript-compare-0.0.2.tgz",
|
||||
"integrity": "sha512-8ja4j7pMHkfLJQO2/8tut7ub+J3Lw2S3061eJLFQcvs3tsmJKp8KG5NtpLn7KcY2w08edF74BSVN7qJS0U6oHA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
@ -363,13 +362,13 @@
|
||||
},
|
||||
"typescript-logic": {
|
||||
"version": "0.0.0",
|
||||
"resolved": "http://verdaccio.corp.stingraydigital.com:4873/typescript-logic/-/typescript-logic-0.0.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/typescript-logic/-/typescript-logic-0.0.0.tgz",
|
||||
"integrity": "sha512-zXFars5LUkI3zP492ls0VskH3TtdeHCqu0i7/duGt60i5IGPIpAHE/DWo5FqJ6EjQ15YKXrt+AETjv60Dat34Q==",
|
||||
"dev": true
|
||||
},
|
||||
"typescript-tuple": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "http://verdaccio.corp.stingraydigital.com:4873/typescript-tuple/-/typescript-tuple-2.2.1.tgz",
|
||||
"resolved": "https://registry.npmjs.org/typescript-tuple/-/typescript-tuple-2.2.1.tgz",
|
||||
"integrity": "sha512-Zcr0lbt8z5ZdEzERHAMAniTiIKerFCMgd7yjq1fPnDJ43et/k9twIFQMUYff9k5oXcsQ0WpvFcgzK2ZKASoW6Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -16,7 +16,7 @@
|
||||
"redux-saga": "^1.1.3",
|
||||
"redux-ts-simple": "^3.2.0",
|
||||
"reselect": "^4.0.0",
|
||||
"typescript": "^3.9.5"
|
||||
"typescript": "^4.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"registry": "https://skimdb.npmjs.com/registry"
|
||||
|
@ -600,5 +600,4 @@ export const FindPetsByStatusStatusEnum = {
|
||||
Pending: 'pending',
|
||||
Sold: 'sold'
|
||||
} as const;
|
||||
|
||||
export type FindPetsByStatusStatusEnum = typeof FindPetsByStatusStatusEnum[keyof typeof FindPetsByStatusStatusEnum];
|
||||
|
@ -22,7 +22,6 @@ export const BehaviorType = {
|
||||
Involuntary: 'Involuntary',
|
||||
Overt: 'Overt'
|
||||
} as const;
|
||||
|
||||
export type BehaviorType = typeof BehaviorType[keyof typeof BehaviorType];
|
||||
|
||||
|
||||
|
@ -31,7 +31,6 @@ export const DeploymentRequestStatus = {
|
||||
Pairing: 'Pairing',
|
||||
Paired: 'Paired'
|
||||
} as const;
|
||||
|
||||
export type DeploymentRequestStatus = typeof DeploymentRequestStatus[keyof typeof DeploymentRequestStatus];
|
||||
|
||||
|
||||
|
@ -37,7 +37,6 @@ export const ErrorCode = {
|
||||
MinimumVolumeBlocksMusicVolumeDecrease: 'Minimum_Volume_Blocks_Music_Volume_Decrease',
|
||||
MaximumVolumeBlocksMusicVolumeIncrease: 'Maximum_Volume_Blocks_Music_Volume_Increase'
|
||||
} as const;
|
||||
|
||||
export type ErrorCode = typeof ErrorCode[keyof typeof ErrorCode];
|
||||
|
||||
|
||||
|
@ -66,7 +66,6 @@ export const OrderStatusEnum = {
|
||||
Approved: 'approved',
|
||||
Delivered: 'delivered'
|
||||
} as const;
|
||||
|
||||
export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum];
|
||||
|
||||
|
||||
|
@ -181,7 +181,6 @@ export const PetStatusEnum = {
|
||||
Pending: 'pending',
|
||||
Sold: 'sold'
|
||||
} as const;
|
||||
|
||||
export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum];
|
||||
|
||||
|
||||
|
@ -22,7 +22,6 @@ export const PetPartType = {
|
||||
Smooth: 'Smooth',
|
||||
Long: 'Long'
|
||||
} as const;
|
||||
|
||||
export type PetPartType = typeof PetPartType[keyof typeof PetPartType];
|
||||
|
||||
|
||||
|
@ -93,7 +93,6 @@ export const ResponseMetaCodeEnum = {
|
||||
RecurlyTransactionErrorException: 'Recurly_Transaction_Error_Exception',
|
||||
GalaxieApiException: 'Galaxie_Api_Exception'
|
||||
} as const;
|
||||
|
||||
export type ResponseMetaCodeEnum = typeof ResponseMetaCodeEnum[keyof typeof ResponseMetaCodeEnum];
|
||||
|
||||
|
||||
|
@ -22,7 +22,6 @@ export const WarningCode = {
|
||||
RaiseAmplifierVolume: 'Raise_Amplifier_Volume',
|
||||
NoVolumeRangeSpecified: 'No_Volume_Range_Specified'
|
||||
} as const;
|
||||
|
||||
export type WarningCode = typeof WarningCode[keyof typeof WarningCode];
|
||||
|
||||
|
||||
|
@ -1,4 +0,0 @@
|
||||
wwwroot/*.js
|
||||
node_modules
|
||||
typings
|
||||
dist
|
@ -1 +0,0 @@
|
||||
README.md
|
@ -1,23 +0,0 @@
|
||||
# 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
|
@ -1,18 +0,0 @@
|
||||
.gitignore
|
||||
.npmignore
|
||||
README.md
|
||||
package.json
|
||||
src/apis/PetApi.ts
|
||||
src/apis/StoreApi.ts
|
||||
src/apis/UserApi.ts
|
||||
src/apis/index.ts
|
||||
src/index.ts
|
||||
src/models/Category.ts
|
||||
src/models/ModelApiResponse.ts
|
||||
src/models/Order.ts
|
||||
src/models/Pet.ts
|
||||
src/models/Tag.ts
|
||||
src/models/User.ts
|
||||
src/models/index.ts
|
||||
src/runtime.ts
|
||||
tsconfig.json
|
@ -1 +0,0 @@
|
||||
6.0.0-SNAPSHOT
|
@ -1,45 +0,0 @@
|
||||
## @openapitools/typescript-fetch-petstore@1.0.0
|
||||
|
||||
This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
|
||||
|
||||
Environment
|
||||
* Node.js
|
||||
* Webpack
|
||||
* Browserify
|
||||
|
||||
Language level
|
||||
* ES5 - you must have a Promises/A+ library installed
|
||||
* ES6
|
||||
|
||||
Module system
|
||||
* CommonJS
|
||||
* ES6 module system
|
||||
|
||||
It can be used in both TypeScript and JavaScript. In TypeScript, the definition should be automatically resolved via `package.json`. ([Reference](http://www.typescriptlang.org/docs/handbook/typings-for-npm-packages.html))
|
||||
|
||||
### Building
|
||||
|
||||
To build and compile the typescript sources to javascript use:
|
||||
```
|
||||
npm install
|
||||
npm run build
|
||||
```
|
||||
|
||||
### Publishing
|
||||
|
||||
First build the package then run ```npm publish```
|
||||
|
||||
### Consuming
|
||||
|
||||
navigate to the folder of your consuming project and run one of the following commands.
|
||||
|
||||
_published:_
|
||||
|
||||
```
|
||||
npm install @openapitools/typescript-fetch-petstore@1.0.0 --save
|
||||
```
|
||||
|
||||
_unPublished (not recommended):_
|
||||
|
||||
```
|
||||
npm install PATH_TO_GENERATED_PACKAGE --save
|
@ -1,18 +0,0 @@
|
||||
{
|
||||
"name": "@openapitools/typescript-fetch-petstore",
|
||||
"version": "1.0.0",
|
||||
"description": "OpenAPI client for @openapitools/typescript-fetch-petstore",
|
||||
"author": "OpenAPI-Generator",
|
||||
"main": "./dist/index.js",
|
||||
"typings": "./dist/index.d.ts",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"prepare": "npm run build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^3.9.5"
|
||||
},
|
||||
"publishConfig": {
|
||||
"registry": "https://skimdb.npmjs.com/registry"
|
||||
}
|
||||
}
|
@ -1,426 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import * as runtime from '../runtime';
|
||||
import {
|
||||
ModelApiResponse,
|
||||
ModelApiResponseFromJSON,
|
||||
ModelApiResponseToJSON,
|
||||
Pet,
|
||||
PetFromJSON,
|
||||
PetToJSON,
|
||||
} from '../models';
|
||||
|
||||
export interface AddPetRequest {
|
||||
body: Pet;
|
||||
}
|
||||
|
||||
export interface DeletePetRequest {
|
||||
petId: number;
|
||||
apiKey?: string;
|
||||
}
|
||||
|
||||
export interface FindPetsByStatusRequest {
|
||||
status: Array<FindPetsByStatusStatusEnum>;
|
||||
}
|
||||
|
||||
export interface FindPetsByTagsRequest {
|
||||
tags: Array<string>;
|
||||
}
|
||||
|
||||
export interface GetPetByIdRequest {
|
||||
petId: number;
|
||||
}
|
||||
|
||||
export interface UpdatePetRequest {
|
||||
body: Pet;
|
||||
}
|
||||
|
||||
export interface UpdatePetWithFormRequest {
|
||||
petId: number;
|
||||
name?: string;
|
||||
status?: string;
|
||||
}
|
||||
|
||||
export interface UploadFileRequest {
|
||||
petId: number;
|
||||
additionalMetadata?: string;
|
||||
file?: Blob;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class PetApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
*/
|
||||
async addPetRaw(requestParameters: AddPetRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters.body === null || requestParameters.body === undefined) {
|
||||
throw new runtime.RequiredError('body','Required parameter requestParameters.body was null or undefined when calling addPet.');
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]);
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/pet`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: PetToJSON(requestParameters.body),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
*/
|
||||
async addPet(requestParameters: AddPetRequest, initOverrides?: RequestInit): Promise<void> {
|
||||
await this.addPetRaw(requestParameters, initOverrides);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a pet
|
||||
*/
|
||||
async deletePetRaw(requestParameters: DeletePetRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters.petId === null || requestParameters.petId === undefined) {
|
||||
throw new runtime.RequiredError('petId','Required parameter requestParameters.petId was null or undefined when calling deletePet.');
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (requestParameters.apiKey !== undefined && requestParameters.apiKey !== null) {
|
||||
headerParameters['api_key'] = String(requestParameters.apiKey);
|
||||
}
|
||||
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]);
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters.petId))),
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a pet
|
||||
*/
|
||||
async deletePet(requestParameters: DeletePetRequest, initOverrides?: RequestInit): Promise<void> {
|
||||
await this.deletePetRaw(requestParameters, initOverrides);
|
||||
}
|
||||
|
||||
/**
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
* Finds Pets by status
|
||||
*/
|
||||
async findPetsByStatusRaw(requestParameters: FindPetsByStatusRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
if (requestParameters.status === null || requestParameters.status === undefined) {
|
||||
throw new runtime.RequiredError('status','Required parameter requestParameters.status was null or undefined when calling findPetsByStatus.');
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters.status) {
|
||||
queryParameters['status'] = requestParameters.status.join(runtime.COLLECTION_FORMATS["csv"]);
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]);
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/pet/findByStatus`,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PetFromJSON));
|
||||
}
|
||||
|
||||
/**
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
* Finds Pets by status
|
||||
*/
|
||||
async findPetsByStatus(requestParameters: FindPetsByStatusRequest, initOverrides?: RequestInit): Promise<Array<Pet>> {
|
||||
const response = await this.findPetsByStatusRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
*/
|
||||
async findPetsByTagsRaw(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Array<Pet>>> {
|
||||
if (requestParameters.tags === null || requestParameters.tags === undefined) {
|
||||
throw new runtime.RequiredError('tags','Required parameter requestParameters.tags was null or undefined when calling findPetsByTags.');
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters.tags) {
|
||||
queryParameters['tags'] = requestParameters.tags.join(runtime.COLLECTION_FORMATS["csv"]);
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]);
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/pet/findByTags`,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(PetFromJSON));
|
||||
}
|
||||
|
||||
/**
|
||||
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
||||
* Finds Pets by tags
|
||||
*/
|
||||
async findPetsByTags(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit): Promise<Array<Pet>> {
|
||||
const response = await this.findPetsByTagsRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a single pet
|
||||
* Find pet by ID
|
||||
*/
|
||||
async getPetByIdRaw(requestParameters: GetPetByIdRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Pet>> {
|
||||
if (requestParameters.petId === null || requestParameters.petId === undefined) {
|
||||
throw new runtime.RequiredError('petId','Required parameter requestParameters.petId was null or undefined when calling getPetById.');
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters.petId))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => PetFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a single pet
|
||||
* Find pet by ID
|
||||
*/
|
||||
async getPetById(requestParameters: GetPetByIdRequest, initOverrides?: RequestInit): Promise<Pet> {
|
||||
const response = await this.getPetByIdRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Update an existing pet
|
||||
*/
|
||||
async updatePetRaw(requestParameters: UpdatePetRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters.body === null || requestParameters.body === undefined) {
|
||||
throw new runtime.RequiredError('body','Required parameter requestParameters.body was null or undefined when calling updatePet.');
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]);
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/pet`,
|
||||
method: 'PUT',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: PetToJSON(requestParameters.body),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update an existing pet
|
||||
*/
|
||||
async updatePet(requestParameters: UpdatePetRequest, initOverrides?: RequestInit): Promise<void> {
|
||||
await this.updatePetRaw(requestParameters, initOverrides);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a pet in the store with form data
|
||||
*/
|
||||
async updatePetWithFormRaw(requestParameters: UpdatePetWithFormRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters.petId === null || requestParameters.petId === undefined) {
|
||||
throw new runtime.RequiredError('petId','Required parameter requestParameters.petId was null or undefined when calling updatePetWithForm.');
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]);
|
||||
}
|
||||
|
||||
const consumes: runtime.Consume[] = [
|
||||
{ contentType: 'application/x-www-form-urlencoded' },
|
||||
];
|
||||
// @ts-ignore: canConsumeForm may be unused
|
||||
const canConsumeForm = runtime.canConsumeForm(consumes);
|
||||
|
||||
let formParams: { append(param: string, value: any): any };
|
||||
let useForm = false;
|
||||
if (useForm) {
|
||||
formParams = new FormData();
|
||||
} else {
|
||||
formParams = new URLSearchParams();
|
||||
}
|
||||
|
||||
if (requestParameters.name !== undefined) {
|
||||
formParams.append('name', requestParameters.name as any);
|
||||
}
|
||||
|
||||
if (requestParameters.status !== undefined) {
|
||||
formParams.append('status', requestParameters.status as any);
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/pet/{petId}`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters.petId))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: formParams,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a pet in the store with form data
|
||||
*/
|
||||
async updatePetWithForm(requestParameters: UpdatePetWithFormRequest, initOverrides?: RequestInit): Promise<void> {
|
||||
await this.updatePetWithFormRaw(requestParameters, initOverrides);
|
||||
}
|
||||
|
||||
/**
|
||||
* uploads an image
|
||||
*/
|
||||
async uploadFileRaw(requestParameters: UploadFileRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<ModelApiResponse>> {
|
||||
if (requestParameters.petId === null || requestParameters.petId === undefined) {
|
||||
throw new runtime.RequiredError('petId','Required parameter requestParameters.petId was null or undefined when calling uploadFile.');
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.accessToken) {
|
||||
// oauth required
|
||||
headerParameters["Authorization"] = await this.configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]);
|
||||
}
|
||||
|
||||
const consumes: runtime.Consume[] = [
|
||||
{ contentType: 'multipart/form-data' },
|
||||
];
|
||||
// @ts-ignore: canConsumeForm may be unused
|
||||
const canConsumeForm = runtime.canConsumeForm(consumes);
|
||||
|
||||
let formParams: { append(param: string, value: any): any };
|
||||
let useForm = false;
|
||||
// use FormData to transmit files using content-type "multipart/form-data"
|
||||
useForm = canConsumeForm;
|
||||
if (useForm) {
|
||||
formParams = new FormData();
|
||||
} else {
|
||||
formParams = new URLSearchParams();
|
||||
}
|
||||
|
||||
if (requestParameters.additionalMetadata !== undefined) {
|
||||
formParams.append('additionalMetadata', requestParameters.additionalMetadata as any);
|
||||
}
|
||||
|
||||
if (requestParameters.file !== undefined) {
|
||||
formParams.append('file', requestParameters.file as any);
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/pet/{petId}/uploadImage`.replace(`{${"petId"}}`, encodeURIComponent(String(requestParameters.petId))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: formParams,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ModelApiResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* uploads an image
|
||||
*/
|
||||
async uploadFile(requestParameters: UploadFileRequest, initOverrides?: RequestInit): Promise<ModelApiResponse> {
|
||||
const response = await this.uploadFileRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const FindPetsByStatusStatusEnum = {
|
||||
Available: 'available',
|
||||
Pending: 'pending',
|
||||
Sold: 'sold'
|
||||
} as const;
|
||||
|
||||
export type FindPetsByStatusStatusEnum = typeof FindPetsByStatusStatusEnum[keyof typeof FindPetsByStatusStatusEnum];
|
@ -1,168 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import * as runtime from '../runtime';
|
||||
import {
|
||||
Order,
|
||||
OrderFromJSON,
|
||||
OrderToJSON,
|
||||
} from '../models';
|
||||
|
||||
export interface DeleteOrderRequest {
|
||||
orderId: string;
|
||||
}
|
||||
|
||||
export interface GetOrderByIdRequest {
|
||||
orderId: number;
|
||||
}
|
||||
|
||||
export interface PlaceOrderRequest {
|
||||
body: Order;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class StoreApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* Delete purchase order by ID
|
||||
*/
|
||||
async deleteOrderRaw(requestParameters: DeleteOrderRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters.orderId === null || requestParameters.orderId === undefined) {
|
||||
throw new runtime.RequiredError('orderId','Required parameter requestParameters.orderId was null or undefined when calling deleteOrder.');
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
const response = await this.request({
|
||||
path: `/store/order/{orderId}`.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters.orderId))),
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* Delete purchase order by ID
|
||||
*/
|
||||
async deleteOrder(requestParameters: DeleteOrderRequest, initOverrides?: RequestInit): Promise<void> {
|
||||
await this.deleteOrderRaw(requestParameters, initOverrides);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a map of status codes to quantities
|
||||
* Returns pet inventories by status
|
||||
*/
|
||||
async getInventoryRaw(initOverrides?: RequestInit): Promise<runtime.ApiResponse<{ [key: string]: number; }>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["api_key"] = this.configuration.apiKey("api_key"); // api_key authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/store/inventory`,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse<any>(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a map of status codes to quantities
|
||||
* Returns pet inventories by status
|
||||
*/
|
||||
async getInventory(initOverrides?: RequestInit): Promise<{ [key: string]: number; }> {
|
||||
const response = await this.getInventoryRaw(initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
* Find purchase order by ID
|
||||
*/
|
||||
async getOrderByIdRaw(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Order>> {
|
||||
if (requestParameters.orderId === null || requestParameters.orderId === undefined) {
|
||||
throw new runtime.RequiredError('orderId','Required parameter requestParameters.orderId was null or undefined when calling getOrderById.');
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
const response = await this.request({
|
||||
path: `/store/order/{orderId}`.replace(`{${"orderId"}}`, encodeURIComponent(String(requestParameters.orderId))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => OrderFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
* Find purchase order by ID
|
||||
*/
|
||||
async getOrderById(requestParameters: GetOrderByIdRequest, initOverrides?: RequestInit): Promise<Order> {
|
||||
const response = await this.getOrderByIdRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Place an order for a pet
|
||||
*/
|
||||
async placeOrderRaw(requestParameters: PlaceOrderRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Order>> {
|
||||
if (requestParameters.body === null || requestParameters.body === undefined) {
|
||||
throw new runtime.RequiredError('body','Required parameter requestParameters.body was null or undefined when calling placeOrder.');
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
const response = await this.request({
|
||||
path: `/store/order`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: OrderToJSON(requestParameters.body),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => OrderFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Place an order for a pet
|
||||
*/
|
||||
async placeOrder(requestParameters: PlaceOrderRequest, initOverrides?: RequestInit): Promise<Order> {
|
||||
const response = await this.placeOrderRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
}
|
@ -1,322 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import * as runtime from '../runtime';
|
||||
import {
|
||||
User,
|
||||
UserFromJSON,
|
||||
UserToJSON,
|
||||
} from '../models';
|
||||
|
||||
export interface CreateUserRequest {
|
||||
body: User;
|
||||
}
|
||||
|
||||
export interface CreateUsersWithArrayInputRequest {
|
||||
body: Array<User>;
|
||||
}
|
||||
|
||||
export interface CreateUsersWithListInputRequest {
|
||||
body: Array<User>;
|
||||
}
|
||||
|
||||
export interface DeleteUserRequest {
|
||||
username: string;
|
||||
}
|
||||
|
||||
export interface GetUserByNameRequest {
|
||||
username: string;
|
||||
}
|
||||
|
||||
export interface LoginUserRequest {
|
||||
username: string;
|
||||
password: string;
|
||||
}
|
||||
|
||||
export interface UpdateUserRequest {
|
||||
username: string;
|
||||
body: User;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class UserApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
* Create user
|
||||
*/
|
||||
async createUserRaw(requestParameters: CreateUserRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters.body === null || requestParameters.body === undefined) {
|
||||
throw new runtime.RequiredError('body','Required parameter requestParameters.body was null or undefined when calling createUser.');
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
const response = await this.request({
|
||||
path: `/user`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: UserToJSON(requestParameters.body),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
* Create user
|
||||
*/
|
||||
async createUser(requestParameters: CreateUserRequest, initOverrides?: RequestInit): Promise<void> {
|
||||
await this.createUserRaw(requestParameters, initOverrides);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithArrayInputRaw(requestParameters: CreateUsersWithArrayInputRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters.body === null || requestParameters.body === undefined) {
|
||||
throw new runtime.RequiredError('body','Required parameter requestParameters.body was null or undefined when calling createUsersWithArrayInput.');
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
const response = await this.request({
|
||||
path: `/user/createWithArray`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters.body.map(UserToJSON),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithArrayInput(requestParameters: CreateUsersWithArrayInputRequest, initOverrides?: RequestInit): Promise<void> {
|
||||
await this.createUsersWithArrayInputRaw(requestParameters, initOverrides);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithListInputRaw(requestParameters: CreateUsersWithListInputRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters.body === null || requestParameters.body === undefined) {
|
||||
throw new runtime.RequiredError('body','Required parameter requestParameters.body was null or undefined when calling createUsersWithListInput.');
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
const response = await this.request({
|
||||
path: `/user/createWithList`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: requestParameters.body.map(UserToJSON),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*/
|
||||
async createUsersWithListInput(requestParameters: CreateUsersWithListInputRequest, initOverrides?: RequestInit): Promise<void> {
|
||||
await this.createUsersWithListInputRaw(requestParameters, initOverrides);
|
||||
}
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
* Delete user
|
||||
*/
|
||||
async deleteUserRaw(requestParameters: DeleteUserRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters.username === null || requestParameters.username === undefined) {
|
||||
throw new runtime.RequiredError('username','Required parameter requestParameters.username was null or undefined when calling deleteUser.');
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
const response = await this.request({
|
||||
path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters.username))),
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
* Delete user
|
||||
*/
|
||||
async deleteUser(requestParameters: DeleteUserRequest, initOverrides?: RequestInit): Promise<void> {
|
||||
await this.deleteUserRaw(requestParameters, initOverrides);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user by user name
|
||||
*/
|
||||
async getUserByNameRaw(requestParameters: GetUserByNameRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<User>> {
|
||||
if (requestParameters.username === null || requestParameters.username === undefined) {
|
||||
throw new runtime.RequiredError('username','Required parameter requestParameters.username was null or undefined when calling getUserByName.');
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
const response = await this.request({
|
||||
path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters.username))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => UserFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user by user name
|
||||
*/
|
||||
async getUserByName(requestParameters: GetUserByNameRequest, initOverrides?: RequestInit): Promise<User> {
|
||||
const response = await this.getUserByNameRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs user into the system
|
||||
*/
|
||||
async loginUserRaw(requestParameters: LoginUserRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<string>> {
|
||||
if (requestParameters.username === null || requestParameters.username === undefined) {
|
||||
throw new runtime.RequiredError('username','Required parameter requestParameters.username was null or undefined when calling loginUser.');
|
||||
}
|
||||
|
||||
if (requestParameters.password === null || requestParameters.password === undefined) {
|
||||
throw new runtime.RequiredError('password','Required parameter requestParameters.password was null or undefined when calling loginUser.');
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters.username !== undefined) {
|
||||
queryParameters['username'] = requestParameters.username;
|
||||
}
|
||||
|
||||
if (requestParameters.password !== undefined) {
|
||||
queryParameters['password'] = requestParameters.password;
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
const response = await this.request({
|
||||
path: `/user/login`,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.TextApiResponse(response) as any;
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs user into the system
|
||||
*/
|
||||
async loginUser(requestParameters: LoginUserRequest, initOverrides?: RequestInit): Promise<string> {
|
||||
const response = await this.loginUserRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs out current logged in user session
|
||||
*/
|
||||
async logoutUserRaw(initOverrides?: RequestInit): Promise<runtime.ApiResponse<void>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
const response = await this.request({
|
||||
path: `/user/logout`,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs out current logged in user session
|
||||
*/
|
||||
async logoutUser(initOverrides?: RequestInit): Promise<void> {
|
||||
await this.logoutUserRaw(initOverrides);
|
||||
}
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
* Updated user
|
||||
*/
|
||||
async updateUserRaw(requestParameters: UpdateUserRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<void>> {
|
||||
if (requestParameters.username === null || requestParameters.username === undefined) {
|
||||
throw new runtime.RequiredError('username','Required parameter requestParameters.username was null or undefined when calling updateUser.');
|
||||
}
|
||||
|
||||
if (requestParameters.body === null || requestParameters.body === undefined) {
|
||||
throw new runtime.RequiredError('body','Required parameter requestParameters.body was null or undefined when calling updateUser.');
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
const response = await this.request({
|
||||
path: `/user/{username}`.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters.username))),
|
||||
method: 'PUT',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: UserToJSON(requestParameters.body),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.VoidApiResponse(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* This can only be done by the logged in user.
|
||||
* Updated user
|
||||
*/
|
||||
async updateUser(requestParameters: UpdateUserRequest, initOverrides?: RequestInit): Promise<void> {
|
||||
await this.updateUserRaw(requestParameters, initOverrides);
|
||||
}
|
||||
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export * from './PetApi';
|
||||
export * from './StoreApi';
|
||||
export * from './UserApi';
|
@ -1,5 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export * from './runtime';
|
||||
export * from './apis';
|
||||
export * from './models';
|
@ -1,64 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
/**
|
||||
* A category for a pet
|
||||
* @export
|
||||
* @interface Category
|
||||
*/
|
||||
export interface Category {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Category
|
||||
*/
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Category
|
||||
*/
|
||||
name?: string;
|
||||
}
|
||||
|
||||
export function CategoryFromJSON(json: any): Category {
|
||||
return CategoryFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function CategoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): Category {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'name': !exists(json, 'name') ? undefined : json['name'],
|
||||
};
|
||||
}
|
||||
|
||||
export function CategoryToJSON(value?: Category | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': value.id,
|
||||
'name': value.name,
|
||||
};
|
||||
}
|
||||
|
@ -1,72 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
/**
|
||||
* Describes the result of uploading an image resource
|
||||
* @export
|
||||
* @interface ModelApiResponse
|
||||
*/
|
||||
export interface ModelApiResponse {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ModelApiResponse
|
||||
*/
|
||||
code?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ModelApiResponse
|
||||
*/
|
||||
type?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ModelApiResponse
|
||||
*/
|
||||
message?: string;
|
||||
}
|
||||
|
||||
export function ModelApiResponseFromJSON(json: any): ModelApiResponse {
|
||||
return ModelApiResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ModelApiResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModelApiResponse {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'code': !exists(json, 'code') ? undefined : json['code'],
|
||||
'type': !exists(json, 'type') ? undefined : json['type'],
|
||||
'message': !exists(json, 'message') ? undefined : json['message'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ModelApiResponseToJSON(value?: ModelApiResponse | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'code': value.code,
|
||||
'type': value.type,
|
||||
'message': value.message,
|
||||
};
|
||||
}
|
||||
|
@ -1,109 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
/**
|
||||
* An order for a pets from the pet store
|
||||
* @export
|
||||
* @interface Order
|
||||
*/
|
||||
export interface Order {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Order
|
||||
*/
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Order
|
||||
*/
|
||||
petId?: number;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Order
|
||||
*/
|
||||
quantity?: number;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof Order
|
||||
*/
|
||||
shipDate?: Date;
|
||||
/**
|
||||
* Order Status
|
||||
* @type {string}
|
||||
* @memberof Order
|
||||
*/
|
||||
status?: OrderStatusEnum;
|
||||
/**
|
||||
*
|
||||
* @type {boolean}
|
||||
* @memberof Order
|
||||
*/
|
||||
complete?: boolean;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const OrderStatusEnum = {
|
||||
Placed: 'placed',
|
||||
Approved: 'approved',
|
||||
Delivered: 'delivered'
|
||||
} as const;
|
||||
|
||||
export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum];
|
||||
|
||||
|
||||
export function OrderFromJSON(json: any): Order {
|
||||
return OrderFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function OrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Order {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'petId': !exists(json, 'petId') ? undefined : json['petId'],
|
||||
'quantity': !exists(json, 'quantity') ? undefined : json['quantity'],
|
||||
'shipDate': !exists(json, 'shipDate') ? undefined : (new Date(json['shipDate'])),
|
||||
'status': !exists(json, 'status') ? undefined : json['status'],
|
||||
'complete': !exists(json, 'complete') ? undefined : json['complete'],
|
||||
};
|
||||
}
|
||||
|
||||
export function OrderToJSON(value?: Order | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': value.id,
|
||||
'petId': value.petId,
|
||||
'quantity': value.quantity,
|
||||
'shipDate': value.shipDate === undefined ? undefined : (value.shipDate.toISOString()),
|
||||
'status': value.status,
|
||||
'complete': value.complete,
|
||||
};
|
||||
}
|
||||
|
@ -1,122 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
import {
|
||||
Category,
|
||||
CategoryFromJSON,
|
||||
CategoryFromJSONTyped,
|
||||
CategoryToJSON,
|
||||
} from './Category';
|
||||
import {
|
||||
Tag,
|
||||
TagFromJSON,
|
||||
TagFromJSONTyped,
|
||||
TagToJSON,
|
||||
} from './Tag';
|
||||
|
||||
/**
|
||||
* A pet for sale in the pet store
|
||||
* @export
|
||||
* @interface Pet
|
||||
*/
|
||||
export interface Pet {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Pet
|
||||
*/
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {Category}
|
||||
* @memberof Pet
|
||||
*/
|
||||
category?: Category;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Pet
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
*
|
||||
* @type {Array<string>}
|
||||
* @memberof Pet
|
||||
*/
|
||||
photoUrls: Array<string>;
|
||||
/**
|
||||
*
|
||||
* @type {Array<Tag>}
|
||||
* @memberof Pet
|
||||
*/
|
||||
tags?: Array<Tag>;
|
||||
/**
|
||||
* pet status in the store
|
||||
* @type {string}
|
||||
* @memberof Pet
|
||||
*/
|
||||
status?: PetStatusEnum;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
export const PetStatusEnum = {
|
||||
Available: 'available',
|
||||
Pending: 'pending',
|
||||
Sold: 'sold'
|
||||
} as const;
|
||||
|
||||
export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum];
|
||||
|
||||
|
||||
export function PetFromJSON(json: any): Pet {
|
||||
return PetFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function PetFromJSONTyped(json: any, ignoreDiscriminator: boolean): Pet {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'category': !exists(json, 'category') ? undefined : CategoryFromJSON(json['category']),
|
||||
'name': json['name'],
|
||||
'photoUrls': json['photoUrls'],
|
||||
'tags': !exists(json, 'tags') ? undefined : ((json['tags'] as Array<any>).map(TagFromJSON)),
|
||||
'status': !exists(json, 'status') ? undefined : json['status'],
|
||||
};
|
||||
}
|
||||
|
||||
export function PetToJSON(value?: Pet | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': value.id,
|
||||
'category': CategoryToJSON(value.category),
|
||||
'name': value.name,
|
||||
'photoUrls': value.photoUrls,
|
||||
'tags': value.tags === undefined ? undefined : ((value.tags as Array<any>).map(TagToJSON)),
|
||||
'status': value.status,
|
||||
};
|
||||
}
|
||||
|
@ -1,64 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
/**
|
||||
* A tag for a pet
|
||||
* @export
|
||||
* @interface Tag
|
||||
*/
|
||||
export interface Tag {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof Tag
|
||||
*/
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof Tag
|
||||
*/
|
||||
name?: string;
|
||||
}
|
||||
|
||||
export function TagFromJSON(json: any): Tag {
|
||||
return TagFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function TagFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tag {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'name': !exists(json, 'name') ? undefined : json['name'],
|
||||
};
|
||||
}
|
||||
|
||||
export function TagToJSON(value?: Tag | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': value.id,
|
||||
'name': value.name,
|
||||
};
|
||||
}
|
||||
|
@ -1,112 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { exists, mapValues } from '../runtime';
|
||||
/**
|
||||
* A User who is purchasing from the pet store
|
||||
* @export
|
||||
* @interface User
|
||||
*/
|
||||
export interface User {
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof User
|
||||
*/
|
||||
id?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
username?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
firstName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
lastName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
email?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
password?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof User
|
||||
*/
|
||||
phone?: string;
|
||||
/**
|
||||
* User Status
|
||||
* @type {number}
|
||||
* @memberof User
|
||||
*/
|
||||
userStatus?: number;
|
||||
}
|
||||
|
||||
export function UserFromJSON(json: any): User {
|
||||
return UserFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function UserFromJSONTyped(json: any, ignoreDiscriminator: boolean): User {
|
||||
if ((json === undefined) || (json === null)) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': !exists(json, 'id') ? undefined : json['id'],
|
||||
'username': !exists(json, 'username') ? undefined : json['username'],
|
||||
'firstName': !exists(json, 'firstName') ? undefined : json['firstName'],
|
||||
'lastName': !exists(json, 'lastName') ? undefined : json['lastName'],
|
||||
'email': !exists(json, 'email') ? undefined : json['email'],
|
||||
'password': !exists(json, 'password') ? undefined : json['password'],
|
||||
'phone': !exists(json, 'phone') ? undefined : json['phone'],
|
||||
'userStatus': !exists(json, 'userStatus') ? undefined : json['userStatus'],
|
||||
};
|
||||
}
|
||||
|
||||
export function UserToJSON(value?: User | null): any {
|
||||
if (value === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
if (value === null) {
|
||||
return null;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': value.id,
|
||||
'username': value.username,
|
||||
'firstName': value.firstName,
|
||||
'lastName': value.lastName,
|
||||
'email': value.email,
|
||||
'password': value.password,
|
||||
'phone': value.phone,
|
||||
'userStatus': value.userStatus,
|
||||
};
|
||||
}
|
||||
|
@ -1,8 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export * from './Category';
|
||||
export * from './ModelApiResponse';
|
||||
export * from './Order';
|
||||
export * from './Pet';
|
||||
export * from './Tag';
|
||||
export * from './User';
|
@ -1,335 +0,0 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
export const BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, "");
|
||||
|
||||
export interface ConfigurationParameters {
|
||||
basePath?: string; // override base path
|
||||
fetchApi?: FetchAPI; // override for fetch implementation
|
||||
middleware?: Middleware[]; // middleware to apply before/after fetch requests
|
||||
queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings
|
||||
username?: string; // parameter for basic security
|
||||
password?: string; // parameter for basic security
|
||||
apiKey?: string | ((name: string) => string); // parameter for apiKey security
|
||||
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string | Promise<string>); // parameter for oauth2 security
|
||||
headers?: HTTPHeaders; //header params we want to use on every request
|
||||
credentials?: RequestCredentials; //value for the credentials param we want to use on each request
|
||||
}
|
||||
|
||||
export class Configuration {
|
||||
constructor(private configuration: ConfigurationParameters = {}) {}
|
||||
|
||||
set config(configuration: Configuration) {
|
||||
this.configuration = configuration;
|
||||
}
|
||||
|
||||
get basePath(): string {
|
||||
return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH;
|
||||
}
|
||||
|
||||
get fetchApi(): FetchAPI | undefined {
|
||||
return this.configuration.fetchApi;
|
||||
}
|
||||
|
||||
get middleware(): Middleware[] {
|
||||
return this.configuration.middleware || [];
|
||||
}
|
||||
|
||||
get queryParamsStringify(): (params: HTTPQuery) => string {
|
||||
return this.configuration.queryParamsStringify || querystring;
|
||||
}
|
||||
|
||||
get username(): string | undefined {
|
||||
return this.configuration.username;
|
||||
}
|
||||
|
||||
get password(): string | undefined {
|
||||
return this.configuration.password;
|
||||
}
|
||||
|
||||
get apiKey(): ((name: string) => string) | undefined {
|
||||
const apiKey = this.configuration.apiKey;
|
||||
if (apiKey) {
|
||||
return typeof apiKey === 'function' ? apiKey : () => apiKey;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
get accessToken(): ((name?: string, scopes?: string[]) => string | Promise<string>) | undefined {
|
||||
const accessToken = this.configuration.accessToken;
|
||||
if (accessToken) {
|
||||
return typeof accessToken === 'function' ? accessToken : async () => accessToken;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
get headers(): HTTPHeaders | undefined {
|
||||
return this.configuration.headers;
|
||||
}
|
||||
|
||||
get credentials(): RequestCredentials | undefined {
|
||||
return this.configuration.credentials;
|
||||
}
|
||||
}
|
||||
|
||||
export const DefaultConfig = new Configuration();
|
||||
|
||||
const isBlob = (value: any) => typeof Blob !== 'undefined' && value instanceof Blob;
|
||||
|
||||
/**
|
||||
* This is the base class for all generated API classes.
|
||||
*/
|
||||
export class BaseAPI {
|
||||
|
||||
private middleware: Middleware[];
|
||||
|
||||
constructor(protected configuration = DefaultConfig) {
|
||||
this.middleware = configuration.middleware;
|
||||
}
|
||||
|
||||
withMiddleware<T extends BaseAPI>(this: T, ...middlewares: Middleware[]) {
|
||||
const next = this.clone<T>();
|
||||
next.middleware = next.middleware.concat(...middlewares);
|
||||
return next;
|
||||
}
|
||||
|
||||
withPreMiddleware<T extends BaseAPI>(this: T, ...preMiddlewares: Array<Middleware['pre']>) {
|
||||
const middlewares = preMiddlewares.map((pre) => ({ pre }));
|
||||
return this.withMiddleware<T>(...middlewares);
|
||||
}
|
||||
|
||||
withPostMiddleware<T extends BaseAPI>(this: T, ...postMiddlewares: Array<Middleware['post']>) {
|
||||
const middlewares = postMiddlewares.map((post) => ({ post }));
|
||||
return this.withMiddleware<T>(...middlewares);
|
||||
}
|
||||
|
||||
protected async request(context: RequestOpts, initOverrides?: RequestInit): Promise<Response> {
|
||||
const { url, init } = this.createFetchParams(context, initOverrides);
|
||||
const response = await this.fetchApi(url, init);
|
||||
if (response.status >= 200 && response.status < 300) {
|
||||
return response;
|
||||
}
|
||||
throw new ResponseError(response, 'Response returned an error code');
|
||||
}
|
||||
|
||||
private createFetchParams(context: RequestOpts, initOverrides?: RequestInit) {
|
||||
let url = this.configuration.basePath + context.path;
|
||||
if (context.query !== undefined && Object.keys(context.query).length !== 0) {
|
||||
// only add the querystring to the URL if there are query parameters.
|
||||
// this is done to avoid urls ending with a "?" character which buggy webservers
|
||||
// do not handle correctly sometimes.
|
||||
url += '?' + this.configuration.queryParamsStringify(context.query);
|
||||
}
|
||||
const body = ((typeof FormData !== "undefined" && context.body instanceof FormData) || context.body instanceof URLSearchParams || isBlob(context.body))
|
||||
? context.body
|
||||
: JSON.stringify(context.body);
|
||||
|
||||
const headers = Object.assign({}, this.configuration.headers, context.headers);
|
||||
Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {});
|
||||
|
||||
const init = {
|
||||
method: context.method,
|
||||
headers: headers,
|
||||
body,
|
||||
credentials: this.configuration.credentials,
|
||||
...initOverrides
|
||||
};
|
||||
return { url, init };
|
||||
}
|
||||
|
||||
private fetchApi = async (url: string, init: RequestInit) => {
|
||||
let fetchParams = { url, init };
|
||||
for (const middleware of this.middleware) {
|
||||
if (middleware.pre) {
|
||||
fetchParams = await middleware.pre({
|
||||
fetch: this.fetchApi,
|
||||
...fetchParams,
|
||||
}) || fetchParams;
|
||||
}
|
||||
}
|
||||
let response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init);
|
||||
for (const middleware of this.middleware) {
|
||||
if (middleware.post) {
|
||||
response = await middleware.post({
|
||||
fetch: this.fetchApi,
|
||||
url: fetchParams.url,
|
||||
init: fetchParams.init,
|
||||
response: response.clone(),
|
||||
}) || response;
|
||||
}
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a shallow clone of `this` by constructing a new instance
|
||||
* and then shallow cloning data members.
|
||||
*/
|
||||
private clone<T extends BaseAPI>(this: T): T {
|
||||
const constructor = this.constructor as any;
|
||||
const next = new constructor(this.configuration);
|
||||
next.middleware = this.middleware.slice();
|
||||
return next;
|
||||
}
|
||||
};
|
||||
|
||||
export class ResponseError extends Error {
|
||||
name: "ResponseError" = "ResponseError";
|
||||
constructor(public response: Response, msg?: string) {
|
||||
super(msg);
|
||||
}
|
||||
}
|
||||
|
||||
export class RequiredError extends Error {
|
||||
name: "RequiredError" = "RequiredError";
|
||||
constructor(public field: string, msg?: string) {
|
||||
super(msg);
|
||||
}
|
||||
}
|
||||
|
||||
export const COLLECTION_FORMATS = {
|
||||
csv: ",",
|
||||
ssv: " ",
|
||||
tsv: "\t",
|
||||
pipes: "|",
|
||||
};
|
||||
|
||||
export type FetchAPI = WindowOrWorkerGlobalScope['fetch'];
|
||||
|
||||
export type Json = any;
|
||||
export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD';
|
||||
export type HTTPHeaders = { [key: string]: string };
|
||||
export type HTTPQuery = { [key: string]: string | number | null | boolean | Array<string | number | null | boolean> | HTTPQuery };
|
||||
export type HTTPBody = Json | FormData | URLSearchParams;
|
||||
export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original';
|
||||
|
||||
export interface FetchParams {
|
||||
url: string;
|
||||
init: RequestInit;
|
||||
}
|
||||
|
||||
export interface RequestOpts {
|
||||
path: string;
|
||||
method: HTTPMethod;
|
||||
headers: HTTPHeaders;
|
||||
query?: HTTPQuery;
|
||||
body?: HTTPBody;
|
||||
}
|
||||
|
||||
export function exists(json: any, key: string) {
|
||||
const value = json[key];
|
||||
return value !== null && value !== undefined;
|
||||
}
|
||||
|
||||
export function querystring(params: HTTPQuery, prefix: string = ''): string {
|
||||
return Object.keys(params)
|
||||
.map((key) => {
|
||||
const fullKey = prefix + (prefix.length ? `[${key}]` : key);
|
||||
const value = params[key];
|
||||
if (value instanceof Array) {
|
||||
const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue)))
|
||||
.join(`&${encodeURIComponent(fullKey)}=`);
|
||||
return `${encodeURIComponent(fullKey)}=${multiValue}`;
|
||||
}
|
||||
if (value instanceof Date) {
|
||||
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`;
|
||||
}
|
||||
if (value instanceof Object) {
|
||||
return querystring(value as HTTPQuery, fullKey);
|
||||
}
|
||||
return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
|
||||
})
|
||||
.filter(part => part.length > 0)
|
||||
.join('&');
|
||||
}
|
||||
|
||||
export function mapValues(data: any, fn: (item: any) => any) {
|
||||
return Object.keys(data).reduce(
|
||||
(acc, key) => ({ ...acc, [key]: fn(data[key]) }),
|
||||
{}
|
||||
);
|
||||
}
|
||||
|
||||
export function canConsumeForm(consumes: Consume[]): boolean {
|
||||
for (const consume of consumes) {
|
||||
if ('multipart/form-data' === consume.contentType) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
export interface Consume {
|
||||
contentType: string
|
||||
}
|
||||
|
||||
export interface RequestContext {
|
||||
fetch: FetchAPI;
|
||||
url: string;
|
||||
init: RequestInit;
|
||||
}
|
||||
|
||||
export interface ResponseContext {
|
||||
fetch: FetchAPI;
|
||||
url: string;
|
||||
init: RequestInit;
|
||||
response: Response;
|
||||
}
|
||||
|
||||
export interface Middleware {
|
||||
pre?(context: RequestContext): Promise<FetchParams | void>;
|
||||
post?(context: ResponseContext): Promise<Response | void>;
|
||||
}
|
||||
|
||||
export interface ApiResponse<T> {
|
||||
raw: Response;
|
||||
value(): Promise<T>;
|
||||
}
|
||||
|
||||
export interface ResponseTransformer<T> {
|
||||
(json: any): T;
|
||||
}
|
||||
|
||||
export class JSONApiResponse<T> {
|
||||
constructor(public raw: Response, private transformer: ResponseTransformer<T> = (jsonValue: any) => jsonValue) {}
|
||||
|
||||
async value(): Promise<T> {
|
||||
return this.transformer(await this.raw.json());
|
||||
}
|
||||
}
|
||||
|
||||
export class VoidApiResponse {
|
||||
constructor(public raw: Response) {}
|
||||
|
||||
async value(): Promise<void> {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
export class BlobApiResponse {
|
||||
constructor(public raw: Response) {}
|
||||
|
||||
async value(): Promise<Blob> {
|
||||
return await this.raw.blob();
|
||||
};
|
||||
}
|
||||
|
||||
export class TextApiResponse {
|
||||
constructor(public raw: Response) {}
|
||||
|
||||
async value(): Promise<string> {
|
||||
return await this.raw.text();
|
||||
};
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"declaration": true,
|
||||
"target": "es5",
|
||||
"module": "commonjs",
|
||||
"moduleResolution": "node",
|
||||
"outDir": "dist",
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"typeRoots": [
|
||||
"node_modules/@types"
|
||||
]
|
||||
},
|
||||
"exclude": [
|
||||
"dist",
|
||||
"node_modules"
|
||||
]
|
||||
}
|
@ -553,11 +553,11 @@ export class PetApi extends runtime.BaseAPI implements PetApiInterface {
|
||||
}
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
* @export
|
||||
*/
|
||||
export const FindPetsByStatusStatusEnum = {
|
||||
Available: 'available' as 'available',
|
||||
Pending: 'pending' as 'pending',
|
||||
Sold: 'sold' as 'sold'
|
||||
};
|
||||
Available: 'available',
|
||||
Pending: 'pending',
|
||||
Sold: 'sold'
|
||||
} as const;
|
||||
export type FindPetsByStatusStatusEnum = typeof FindPetsByStatusStatusEnum[keyof typeof FindPetsByStatusStatusEnum];
|
||||
|
@ -62,10 +62,10 @@ export interface Order {
|
||||
* @export
|
||||
*/
|
||||
export const OrderStatusEnum = {
|
||||
Placed: 'placed' as 'placed',
|
||||
Approved: 'approved' as 'approved',
|
||||
Delivered: 'delivered' as 'delivered'
|
||||
};
|
||||
Placed: 'placed',
|
||||
Approved: 'approved',
|
||||
Delivered: 'delivered'
|
||||
} as const;
|
||||
export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum];
|
||||
|
||||
|
||||
|
@ -75,10 +75,10 @@ export interface Pet {
|
||||
* @export
|
||||
*/
|
||||
export const PetStatusEnum = {
|
||||
Available: 'available' as 'available',
|
||||
Pending: 'pending' as 'pending',
|
||||
Sold: 'sold' as 'sold'
|
||||
};
|
||||
Available: 'available',
|
||||
Pending: 'pending',
|
||||
Sold: 'sold'
|
||||
} as const;
|
||||
export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum];
|
||||
|
||||
|
||||
|
@ -206,7 +206,7 @@ export const COLLECTION_FORMATS = {
|
||||
pipes: "|",
|
||||
};
|
||||
|
||||
export type FetchAPI = GlobalFetch['fetch'];
|
||||
export type FetchAPI = WindowOrWorkerGlobalScope['fetch'];
|
||||
|
||||
export type Json = any;
|
||||
export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD';
|
||||
|
@ -1,13 +1,35 @@
|
||||
{
|
||||
"name": "@openapitools/typescript-fetch-petstore",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 1,
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@openapitools/typescript-fetch-petstore",
|
||||
"version": "1.0.0",
|
||||
"devDependencies": {
|
||||
"typescript": "^4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "4.6.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz",
|
||||
"integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4.2.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"typescript": {
|
||||
"version": "2.9.2",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz",
|
||||
"integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==",
|
||||
"version": "4.6.3",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.3.tgz",
|
||||
"integrity": "sha512-yNIatDa5iaofVozS/uQJEl3JRWLKKGJKh6Yaiv0GLGSuhpFJe7P3SbHZ8/yjAHRQwKRoA6YZqlfjXWmVzoVSMw==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
|
@ -10,7 +10,7 @@
|
||||
"prepare": "npm run build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^2.4"
|
||||
"typescript": "^4.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"registry": "https://skimdb.npmjs.com/registry"
|
||||
|
@ -415,11 +415,11 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
* @export
|
||||
*/
|
||||
export const FindPetsByStatusStatusEnum = {
|
||||
Available: 'available' as 'available',
|
||||
Pending: 'pending' as 'pending',
|
||||
Sold: 'sold' as 'sold'
|
||||
};
|
||||
Available: 'available',
|
||||
Pending: 'pending',
|
||||
Sold: 'sold'
|
||||
} as const;
|
||||
export type FindPetsByStatusStatusEnum = typeof FindPetsByStatusStatusEnum[keyof typeof FindPetsByStatusStatusEnum];
|
||||
|
@ -62,10 +62,10 @@ export interface Order {
|
||||
* @export
|
||||
*/
|
||||
export const OrderStatusEnum = {
|
||||
Placed: 'placed' as 'placed',
|
||||
Approved: 'approved' as 'approved',
|
||||
Delivered: 'delivered' as 'delivered'
|
||||
};
|
||||
Placed: 'placed',
|
||||
Approved: 'approved',
|
||||
Delivered: 'delivered'
|
||||
} as const;
|
||||
export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum];
|
||||
|
||||
|
||||
|
@ -75,10 +75,10 @@ export interface Pet {
|
||||
* @export
|
||||
*/
|
||||
export const PetStatusEnum = {
|
||||
Available: 'available' as 'available',
|
||||
Pending: 'pending' as 'pending',
|
||||
Sold: 'sold' as 'sold'
|
||||
};
|
||||
Available: 'available',
|
||||
Pending: 'pending',
|
||||
Sold: 'sold'
|
||||
} as const;
|
||||
export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum];
|
||||
|
||||
|
||||
|
@ -206,7 +206,7 @@ export const COLLECTION_FORMATS = {
|
||||
pipes: "|",
|
||||
};
|
||||
|
||||
export type FetchAPI = GlobalFetch['fetch'];
|
||||
export type FetchAPI = WindowOrWorkerGlobalScope['fetch'];
|
||||
|
||||
export type Json = any;
|
||||
export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD';
|
||||
|
@ -196,18 +196,18 @@ export class DefaultApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* @export
|
||||
* @enum {string}
|
||||
*/
|
||||
* @export
|
||||
* @enum {string}
|
||||
*/
|
||||
export enum FakeEnumRequestGetInlineStringEnumEnum {
|
||||
One = 'one',
|
||||
Two = 'two',
|
||||
Three = 'three'
|
||||
}
|
||||
/**
|
||||
* @export
|
||||
* @enum {string}
|
||||
*/
|
||||
* @export
|
||||
* @enum {string}
|
||||
*/
|
||||
export enum FakeEnumRequestGetInlineNumberEnumEnum {
|
||||
NUMBER_1 = 1,
|
||||
NUMBER_2 = 2,
|
||||
|
@ -206,7 +206,7 @@ export const COLLECTION_FORMATS = {
|
||||
pipes: "|",
|
||||
};
|
||||
|
||||
export type FetchAPI = GlobalFetch['fetch'];
|
||||
export type FetchAPI = WindowOrWorkerGlobalScope['fetch'];
|
||||
|
||||
export type Json = any;
|
||||
export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD';
|
||||
|
@ -10,7 +10,7 @@
|
||||
"prepare": "npm run build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^2.4"
|
||||
"typescript": "^4.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"registry": "https://skimdb.npmjs.com/registry"
|
||||
|
@ -411,11 +411,11 @@ export class PetApi extends runtime.BaseAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* @export
|
||||
*/
|
||||
* @export
|
||||
*/
|
||||
export const FindPetsByStatusStatusEnum = {
|
||||
Available: 'available' as 'available',
|
||||
Pending: 'pending' as 'pending',
|
||||
Sold: 'sold' as 'sold'
|
||||
};
|
||||
Available: 'available',
|
||||
Pending: 'pending',
|
||||
Sold: 'sold'
|
||||
} as const;
|
||||
export type FindPetsByStatusStatusEnum = typeof FindPetsByStatusStatusEnum[keyof typeof FindPetsByStatusStatusEnum];
|
||||
|
@ -93,10 +93,10 @@ export interface Order {
|
||||
* @export
|
||||
*/
|
||||
export const OrderStatusEnum = {
|
||||
Placed: 'placed' as 'placed',
|
||||
Approved: 'approved' as 'approved',
|
||||
Delivered: 'delivered' as 'delivered'
|
||||
};
|
||||
Placed: 'placed',
|
||||
Approved: 'approved',
|
||||
Delivered: 'delivered'
|
||||
} as const;
|
||||
export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum];
|
||||
|
||||
/**
|
||||
@ -148,10 +148,10 @@ export interface Pet {
|
||||
* @export
|
||||
*/
|
||||
export const PetStatusEnum = {
|
||||
Available: 'available' as 'available',
|
||||
Pending: 'pending' as 'pending',
|
||||
Sold: 'sold' as 'sold'
|
||||
};
|
||||
Available: 'available',
|
||||
Pending: 'pending',
|
||||
Sold: 'sold'
|
||||
} as const;
|
||||
export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum];
|
||||
|
||||
/**
|
||||
|
@ -206,7 +206,7 @@ export const COLLECTION_FORMATS = {
|
||||
pipes: "|",
|
||||
};
|
||||
|
||||
export type FetchAPI = GlobalFetch['fetch'];
|
||||
export type FetchAPI = WindowOrWorkerGlobalScope['fetch'];
|
||||
|
||||
export type Json = any;
|
||||
export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD';
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -18,7 +18,7 @@
|
||||
"@types/form-data": "^2.2.1",
|
||||
"@types/isomorphic-fetch": "0.0.34",
|
||||
"@types/mocha": "^2.2.41",
|
||||
"@types/node": "^8.0.14",
|
||||
"@types/node": "^12.0.14",
|
||||
"@types/node-fetch": "^2.1.2",
|
||||
"browserify": "^14.4.0",
|
||||
"form-data": "^2.3.2",
|
||||
@ -26,7 +26,7 @@
|
||||
"node-fetch": "^2.2.0",
|
||||
"ts-loader": "^2.3.0",
|
||||
"tsify": "^3.0.4",
|
||||
"typescript": "^2.4.1",
|
||||
"typescript": "^4.0",
|
||||
"typings": "^2.1.1",
|
||||
"webpack": "^1.13.0"
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user