@teemill/countries 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -3
- package/api.ts +185 -0
- package/base.ts +86 -0
- package/common.ts +150 -0
- package/configuration.ts +115 -0
- package/dist/api.d.ts +121 -0
- package/dist/api.js +133 -0
- package/dist/base.d.ts +66 -0
- package/dist/base.js +65 -0
- package/dist/common.d.ts +65 -0
- package/dist/common.js +161 -0
- package/dist/configuration.d.ts +91 -0
- package/dist/configuration.js +44 -0
- package/dist/esm/api.d.ts +121 -0
- package/dist/esm/api.js +126 -0
- package/dist/esm/base.d.ts +66 -0
- package/dist/esm/base.js +60 -0
- package/dist/esm/common.d.ts +65 -0
- package/dist/esm/common.js +149 -0
- package/dist/esm/configuration.d.ts +91 -0
- package/dist/esm/configuration.js +40 -0
- package/dist/esm/index.d.ts +13 -0
- package/dist/esm/index.js +15 -0
- package/dist/index.d.ts +13 -3
- package/dist/index.js +15 -5
- package/docs/ApiError.md +22 -0
- package/docs/CountriesApi.md +55 -0
- package/docs/Country.md +22 -0
- package/docs/InlineObject.md +20 -0
- package/git_push.sh +57 -0
- package/index.ts +18 -0
- package/package.json +18 -4
- package/tsconfig.esm.json +7 -0
- package/tsconfig.json +4 -6
- package/.openapi-generator/FILES +0 -13
- package/.openapi-generator/VERSION +0 -1
- package/.openapi-generator-ignore +0 -23
- package/dist/apis/CountriesApi.d.ts +0 -28
- package/dist/apis/CountriesApi.js +0 -136
- package/dist/apis/index.d.ts +0 -1
- package/dist/apis/index.js +0 -19
- package/dist/models/ApiError.d.ts +0 -37
- package/dist/models/ApiError.js +0 -53
- package/dist/models/Country.d.ts +0 -37
- package/dist/models/Country.js +0 -53
- package/dist/models/GetCountries200Response.d.ts +0 -32
- package/dist/models/GetCountries200Response.js +0 -51
- package/dist/models/index.d.ts +0 -3
- package/dist/models/index.js +0 -21
- package/dist/runtime.d.ts +0 -187
- package/dist/runtime.js +0 -565
- package/src/apis/CountriesApi.ts +0 -77
- package/src/apis/index.ts +0 -3
- package/src/index.ts +0 -5
- package/src/models/ApiError.ts +0 -74
- package/src/models/Country.ts +0 -75
- package/src/models/GetCountries200Response.ts +0 -72
- package/src/models/index.ts +0 -5
- package/src/runtime.ts +0 -441
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* tslint:disable */
|
|
3
|
-
/* eslint-disable */
|
|
4
|
-
/**
|
|
5
|
-
* Countries API
|
|
6
|
-
* Manage Teemill Countries. For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
|
|
7
|
-
*
|
|
8
|
-
* The version of the OpenAPI document: 0.1.0
|
|
9
|
-
* Contact: hello@teemill.com
|
|
10
|
-
*
|
|
11
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
-
* https://openapi-generator.tech
|
|
13
|
-
* Do not edit the class manually.
|
|
14
|
-
*/
|
|
15
|
-
var __extends = (this && this.__extends) || (function () {
|
|
16
|
-
var extendStatics = function (d, b) {
|
|
17
|
-
extendStatics = Object.setPrototypeOf ||
|
|
18
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
19
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
20
|
-
return extendStatics(d, b);
|
|
21
|
-
};
|
|
22
|
-
return function (d, b) {
|
|
23
|
-
if (typeof b !== "function" && b !== null)
|
|
24
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
25
|
-
extendStatics(d, b);
|
|
26
|
-
function __() { this.constructor = d; }
|
|
27
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
28
|
-
};
|
|
29
|
-
})();
|
|
30
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
31
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
32
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
33
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
34
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
35
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
36
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
37
|
-
});
|
|
38
|
-
};
|
|
39
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
40
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
41
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
42
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
43
|
-
function step(op) {
|
|
44
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
45
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
46
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
47
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
48
|
-
switch (op[0]) {
|
|
49
|
-
case 0: case 1: t = op; break;
|
|
50
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
51
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
52
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
53
|
-
default:
|
|
54
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
55
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
56
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
57
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
58
|
-
if (t[2]) _.ops.pop();
|
|
59
|
-
_.trys.pop(); continue;
|
|
60
|
-
}
|
|
61
|
-
op = body.call(thisArg, _);
|
|
62
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
63
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
67
|
-
exports.CountriesApi = void 0;
|
|
68
|
-
var runtime = require("../runtime");
|
|
69
|
-
var index_1 = require("../models/index");
|
|
70
|
-
/**
|
|
71
|
-
*
|
|
72
|
-
*/
|
|
73
|
-
var CountriesApi = /** @class */ (function (_super) {
|
|
74
|
-
__extends(CountriesApi, _super);
|
|
75
|
-
function CountriesApi() {
|
|
76
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* List all countries
|
|
80
|
-
* List countries
|
|
81
|
-
*/
|
|
82
|
-
CountriesApi.prototype.getCountriesRaw = function (initOverrides) {
|
|
83
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
84
|
-
var queryParameters, headerParameters, _a, _b, response;
|
|
85
|
-
return __generator(this, function (_c) {
|
|
86
|
-
switch (_c.label) {
|
|
87
|
-
case 0:
|
|
88
|
-
queryParameters = {};
|
|
89
|
-
headerParameters = {};
|
|
90
|
-
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
91
|
-
// oauth required
|
|
92
|
-
_a = headerParameters;
|
|
93
|
-
_b = "Authorization";
|
|
94
|
-
return [4 /*yield*/, this.configuration.accessToken("session-oauth", [])];
|
|
95
|
-
case 1:
|
|
96
|
-
// oauth required
|
|
97
|
-
_a[_b] = _c.sent();
|
|
98
|
-
_c.label = 2;
|
|
99
|
-
case 2:
|
|
100
|
-
if (this.configuration && this.configuration.apiKey) {
|
|
101
|
-
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // api-key authentication
|
|
102
|
-
}
|
|
103
|
-
return [4 /*yield*/, this.request({
|
|
104
|
-
path: "/v1/countries",
|
|
105
|
-
method: 'GET',
|
|
106
|
-
headers: headerParameters,
|
|
107
|
-
query: queryParameters,
|
|
108
|
-
}, initOverrides)];
|
|
109
|
-
case 3:
|
|
110
|
-
response = _c.sent();
|
|
111
|
-
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.GetCountries200ResponseFromJSON)(jsonValue); })];
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
});
|
|
115
|
-
};
|
|
116
|
-
/**
|
|
117
|
-
* List all countries
|
|
118
|
-
* List countries
|
|
119
|
-
*/
|
|
120
|
-
CountriesApi.prototype.getCountries = function (initOverrides) {
|
|
121
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
122
|
-
var response;
|
|
123
|
-
return __generator(this, function (_a) {
|
|
124
|
-
switch (_a.label) {
|
|
125
|
-
case 0: return [4 /*yield*/, this.getCountriesRaw(initOverrides)];
|
|
126
|
-
case 1:
|
|
127
|
-
response = _a.sent();
|
|
128
|
-
return [4 /*yield*/, response.value()];
|
|
129
|
-
case 2: return [2 /*return*/, _a.sent()];
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
});
|
|
133
|
-
};
|
|
134
|
-
return CountriesApi;
|
|
135
|
-
}(runtime.BaseAPI));
|
|
136
|
-
exports.CountriesApi = CountriesApi;
|
package/dist/apis/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './CountriesApi';
|
package/dist/apis/index.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
/* tslint:disable */
|
|
18
|
-
/* eslint-disable */
|
|
19
|
-
__exportStar(require("./CountriesApi"), exports);
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Countries API
|
|
3
|
-
* Manage Teemill Countries. For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 0.1.0
|
|
6
|
-
* Contact: hello@teemill.com
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
-
* https://openapi-generator.tech
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
*
|
|
14
|
-
* @export
|
|
15
|
-
* @interface ApiError
|
|
16
|
-
*/
|
|
17
|
-
export interface ApiError {
|
|
18
|
-
/**
|
|
19
|
-
*
|
|
20
|
-
* @type {string}
|
|
21
|
-
* @memberof ApiError
|
|
22
|
-
*/
|
|
23
|
-
code?: string;
|
|
24
|
-
/**
|
|
25
|
-
*
|
|
26
|
-
* @type {string}
|
|
27
|
-
* @memberof ApiError
|
|
28
|
-
*/
|
|
29
|
-
message: string;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Check if a given object implements the ApiError interface.
|
|
33
|
-
*/
|
|
34
|
-
export declare function instanceOfApiError(value: object): boolean;
|
|
35
|
-
export declare function ApiErrorFromJSON(json: any): ApiError;
|
|
36
|
-
export declare function ApiErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ApiError;
|
|
37
|
-
export declare function ApiErrorToJSON(value?: ApiError | null): any;
|
package/dist/models/ApiError.js
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* tslint:disable */
|
|
3
|
-
/* eslint-disable */
|
|
4
|
-
/**
|
|
5
|
-
* Countries API
|
|
6
|
-
* Manage Teemill Countries. For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
|
|
7
|
-
*
|
|
8
|
-
* The version of the OpenAPI document: 0.1.0
|
|
9
|
-
* Contact: hello@teemill.com
|
|
10
|
-
*
|
|
11
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
-
* https://openapi-generator.tech
|
|
13
|
-
* Do not edit the class manually.
|
|
14
|
-
*/
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.ApiErrorToJSON = exports.ApiErrorFromJSONTyped = exports.ApiErrorFromJSON = exports.instanceOfApiError = void 0;
|
|
17
|
-
var runtime_1 = require("../runtime");
|
|
18
|
-
/**
|
|
19
|
-
* Check if a given object implements the ApiError interface.
|
|
20
|
-
*/
|
|
21
|
-
function instanceOfApiError(value) {
|
|
22
|
-
var isInstance = true;
|
|
23
|
-
isInstance = isInstance && "message" in value;
|
|
24
|
-
return isInstance;
|
|
25
|
-
}
|
|
26
|
-
exports.instanceOfApiError = instanceOfApiError;
|
|
27
|
-
function ApiErrorFromJSON(json) {
|
|
28
|
-
return ApiErrorFromJSONTyped(json, false);
|
|
29
|
-
}
|
|
30
|
-
exports.ApiErrorFromJSON = ApiErrorFromJSON;
|
|
31
|
-
function ApiErrorFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
|
-
if ((json === undefined) || (json === null)) {
|
|
33
|
-
return json;
|
|
34
|
-
}
|
|
35
|
-
return {
|
|
36
|
-
'code': !(0, runtime_1.exists)(json, 'code') ? undefined : json['code'],
|
|
37
|
-
'message': json['message'],
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
exports.ApiErrorFromJSONTyped = ApiErrorFromJSONTyped;
|
|
41
|
-
function ApiErrorToJSON(value) {
|
|
42
|
-
if (value === undefined) {
|
|
43
|
-
return undefined;
|
|
44
|
-
}
|
|
45
|
-
if (value === null) {
|
|
46
|
-
return null;
|
|
47
|
-
}
|
|
48
|
-
return {
|
|
49
|
-
'code': value.code,
|
|
50
|
-
'message': value.message,
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
exports.ApiErrorToJSON = ApiErrorToJSON;
|
package/dist/models/Country.d.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Countries API
|
|
3
|
-
* Manage Teemill Countries. For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 0.1.0
|
|
6
|
-
* Contact: hello@teemill.com
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
-
* https://openapi-generator.tech
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*/
|
|
12
|
-
/**
|
|
13
|
-
*
|
|
14
|
-
* @export
|
|
15
|
-
* @interface Country
|
|
16
|
-
*/
|
|
17
|
-
export interface Country {
|
|
18
|
-
/**
|
|
19
|
-
* The unique identifier for the country
|
|
20
|
-
* @type {string}
|
|
21
|
-
* @memberof Country
|
|
22
|
-
*/
|
|
23
|
-
id: string;
|
|
24
|
-
/**
|
|
25
|
-
* The name of the country
|
|
26
|
-
* @type {string}
|
|
27
|
-
* @memberof Country
|
|
28
|
-
*/
|
|
29
|
-
name: string;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Check if a given object implements the Country interface.
|
|
33
|
-
*/
|
|
34
|
-
export declare function instanceOfCountry(value: object): boolean;
|
|
35
|
-
export declare function CountryFromJSON(json: any): Country;
|
|
36
|
-
export declare function CountryFromJSONTyped(json: any, ignoreDiscriminator: boolean): Country;
|
|
37
|
-
export declare function CountryToJSON(value?: Country | null): any;
|
package/dist/models/Country.js
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* tslint:disable */
|
|
3
|
-
/* eslint-disable */
|
|
4
|
-
/**
|
|
5
|
-
* Countries API
|
|
6
|
-
* Manage Teemill Countries. For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
|
|
7
|
-
*
|
|
8
|
-
* The version of the OpenAPI document: 0.1.0
|
|
9
|
-
* Contact: hello@teemill.com
|
|
10
|
-
*
|
|
11
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
-
* https://openapi-generator.tech
|
|
13
|
-
* Do not edit the class manually.
|
|
14
|
-
*/
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.CountryToJSON = exports.CountryFromJSONTyped = exports.CountryFromJSON = exports.instanceOfCountry = void 0;
|
|
17
|
-
/**
|
|
18
|
-
* Check if a given object implements the Country interface.
|
|
19
|
-
*/
|
|
20
|
-
function instanceOfCountry(value) {
|
|
21
|
-
var isInstance = true;
|
|
22
|
-
isInstance = isInstance && "id" in value;
|
|
23
|
-
isInstance = isInstance && "name" in value;
|
|
24
|
-
return isInstance;
|
|
25
|
-
}
|
|
26
|
-
exports.instanceOfCountry = instanceOfCountry;
|
|
27
|
-
function CountryFromJSON(json) {
|
|
28
|
-
return CountryFromJSONTyped(json, false);
|
|
29
|
-
}
|
|
30
|
-
exports.CountryFromJSON = CountryFromJSON;
|
|
31
|
-
function CountryFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
|
-
if ((json === undefined) || (json === null)) {
|
|
33
|
-
return json;
|
|
34
|
-
}
|
|
35
|
-
return {
|
|
36
|
-
'id': json['id'],
|
|
37
|
-
'name': json['name'],
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
exports.CountryFromJSONTyped = CountryFromJSONTyped;
|
|
41
|
-
function CountryToJSON(value) {
|
|
42
|
-
if (value === undefined) {
|
|
43
|
-
return undefined;
|
|
44
|
-
}
|
|
45
|
-
if (value === null) {
|
|
46
|
-
return null;
|
|
47
|
-
}
|
|
48
|
-
return {
|
|
49
|
-
'id': value.id,
|
|
50
|
-
'name': value.name,
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
exports.CountryToJSON = CountryToJSON;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Countries API
|
|
3
|
-
* Manage Teemill Countries. For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 0.1.0
|
|
6
|
-
* Contact: hello@teemill.com
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
-
* https://openapi-generator.tech
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*/
|
|
12
|
-
import type { Country } from './Country';
|
|
13
|
-
/**
|
|
14
|
-
*
|
|
15
|
-
* @export
|
|
16
|
-
* @interface GetCountries200Response
|
|
17
|
-
*/
|
|
18
|
-
export interface GetCountries200Response {
|
|
19
|
-
/**
|
|
20
|
-
*
|
|
21
|
-
* @type {Array<Country>}
|
|
22
|
-
* @memberof GetCountries200Response
|
|
23
|
-
*/
|
|
24
|
-
countries?: Array<Country>;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Check if a given object implements the GetCountries200Response interface.
|
|
28
|
-
*/
|
|
29
|
-
export declare function instanceOfGetCountries200Response(value: object): boolean;
|
|
30
|
-
export declare function GetCountries200ResponseFromJSON(json: any): GetCountries200Response;
|
|
31
|
-
export declare function GetCountries200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetCountries200Response;
|
|
32
|
-
export declare function GetCountries200ResponseToJSON(value?: GetCountries200Response | null): any;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* tslint:disable */
|
|
3
|
-
/* eslint-disable */
|
|
4
|
-
/**
|
|
5
|
-
* Countries API
|
|
6
|
-
* Manage Teemill Countries. For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
|
|
7
|
-
*
|
|
8
|
-
* The version of the OpenAPI document: 0.1.0
|
|
9
|
-
* Contact: hello@teemill.com
|
|
10
|
-
*
|
|
11
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
-
* https://openapi-generator.tech
|
|
13
|
-
* Do not edit the class manually.
|
|
14
|
-
*/
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.GetCountries200ResponseToJSON = exports.GetCountries200ResponseFromJSONTyped = exports.GetCountries200ResponseFromJSON = exports.instanceOfGetCountries200Response = void 0;
|
|
17
|
-
var runtime_1 = require("../runtime");
|
|
18
|
-
var Country_1 = require("./Country");
|
|
19
|
-
/**
|
|
20
|
-
* Check if a given object implements the GetCountries200Response interface.
|
|
21
|
-
*/
|
|
22
|
-
function instanceOfGetCountries200Response(value) {
|
|
23
|
-
var isInstance = true;
|
|
24
|
-
return isInstance;
|
|
25
|
-
}
|
|
26
|
-
exports.instanceOfGetCountries200Response = instanceOfGetCountries200Response;
|
|
27
|
-
function GetCountries200ResponseFromJSON(json) {
|
|
28
|
-
return GetCountries200ResponseFromJSONTyped(json, false);
|
|
29
|
-
}
|
|
30
|
-
exports.GetCountries200ResponseFromJSON = GetCountries200ResponseFromJSON;
|
|
31
|
-
function GetCountries200ResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
|
-
if ((json === undefined) || (json === null)) {
|
|
33
|
-
return json;
|
|
34
|
-
}
|
|
35
|
-
return {
|
|
36
|
-
'countries': !(0, runtime_1.exists)(json, 'countries') ? undefined : (json['countries'].map(Country_1.CountryFromJSON)),
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
exports.GetCountries200ResponseFromJSONTyped = GetCountries200ResponseFromJSONTyped;
|
|
40
|
-
function GetCountries200ResponseToJSON(value) {
|
|
41
|
-
if (value === undefined) {
|
|
42
|
-
return undefined;
|
|
43
|
-
}
|
|
44
|
-
if (value === null) {
|
|
45
|
-
return null;
|
|
46
|
-
}
|
|
47
|
-
return {
|
|
48
|
-
'countries': value.countries === undefined ? undefined : (value.countries.map(Country_1.CountryToJSON)),
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
exports.GetCountries200ResponseToJSON = GetCountries200ResponseToJSON;
|
package/dist/models/index.d.ts
DELETED
package/dist/models/index.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
/* tslint:disable */
|
|
18
|
-
/* eslint-disable */
|
|
19
|
-
__exportStar(require("./ApiError"), exports);
|
|
20
|
-
__exportStar(require("./Country"), exports);
|
|
21
|
-
__exportStar(require("./GetCountries200Response"), exports);
|
package/dist/runtime.d.ts
DELETED
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Countries API
|
|
3
|
-
* Manage Teemill Countries. For full documentation on functionality and account settings go to [teemill.com](https://teemill.com)
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 0.1.0
|
|
6
|
-
* Contact: hello@teemill.com
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
-
* https://openapi-generator.tech
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*/
|
|
12
|
-
export type OptionalProperties<T> = {
|
|
13
|
-
[K in keyof T]-?: undefined extends T[K] ? K : never;
|
|
14
|
-
}[keyof T];
|
|
15
|
-
export type OptionalOnly<T> = Partial<Pick<T, OptionalProperties<T>>>;
|
|
16
|
-
export declare const BASE_PATH: string;
|
|
17
|
-
export interface ConfigurationParameters {
|
|
18
|
-
basePath?: string;
|
|
19
|
-
fetchApi?: FetchAPI;
|
|
20
|
-
middleware?: Middleware[];
|
|
21
|
-
queryParamsStringify?: (params: HTTPQuery) => string;
|
|
22
|
-
username?: string;
|
|
23
|
-
password?: string;
|
|
24
|
-
apiKey?: string | ((name: string) => string);
|
|
25
|
-
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string | Promise<string>);
|
|
26
|
-
headers?: HTTPHeaders;
|
|
27
|
-
credentials?: RequestCredentials;
|
|
28
|
-
}
|
|
29
|
-
export declare class Configuration {
|
|
30
|
-
private configuration;
|
|
31
|
-
constructor(configuration?: ConfigurationParameters);
|
|
32
|
-
set config(configuration: Configuration);
|
|
33
|
-
get basePath(): string;
|
|
34
|
-
get fetchApi(): FetchAPI | undefined;
|
|
35
|
-
get middleware(): Middleware[];
|
|
36
|
-
get queryParamsStringify(): (params: HTTPQuery) => string;
|
|
37
|
-
get username(): string | undefined;
|
|
38
|
-
get password(): string | undefined;
|
|
39
|
-
get apiKey(): ((name: string) => string) | undefined;
|
|
40
|
-
get accessToken(): ((name?: string, scopes?: string[]) => string | Promise<string>) | undefined;
|
|
41
|
-
get headers(): HTTPHeaders | undefined;
|
|
42
|
-
get credentials(): RequestCredentials | undefined;
|
|
43
|
-
}
|
|
44
|
-
export declare const DefaultConfig: Configuration;
|
|
45
|
-
/**
|
|
46
|
-
* This is the base class for all generated API classes.
|
|
47
|
-
*/
|
|
48
|
-
export declare class BaseAPI {
|
|
49
|
-
protected configuration: Configuration;
|
|
50
|
-
private static readonly jsonRegex;
|
|
51
|
-
private middleware;
|
|
52
|
-
constructor(configuration?: Configuration);
|
|
53
|
-
isResponseError(error: any): error is ResponseError;
|
|
54
|
-
withMiddleware<T extends BaseAPI>(this: T, ...middlewares: Middleware[]): T;
|
|
55
|
-
withPreMiddleware<T extends BaseAPI>(this: T, ...preMiddlewares: Array<Middleware['pre']>): T;
|
|
56
|
-
withPostMiddleware<T extends BaseAPI>(this: T, ...postMiddlewares: Array<Middleware['post']>): T;
|
|
57
|
-
/**
|
|
58
|
-
* Check if the given MIME is a JSON MIME.
|
|
59
|
-
* JSON MIME examples:
|
|
60
|
-
* application/json
|
|
61
|
-
* application/json; charset=UTF8
|
|
62
|
-
* APPLICATION/JSON
|
|
63
|
-
* application/vnd.company+json
|
|
64
|
-
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
65
|
-
* @return True if the given MIME is JSON, false otherwise.
|
|
66
|
-
*/
|
|
67
|
-
protected isJsonMime(mime: string | null | undefined): boolean;
|
|
68
|
-
protected request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise<Response>;
|
|
69
|
-
private createFetchParams;
|
|
70
|
-
private fetchApi;
|
|
71
|
-
/**
|
|
72
|
-
* Create a shallow clone of `this` by constructing a new instance
|
|
73
|
-
* and then shallow cloning data members.
|
|
74
|
-
*/
|
|
75
|
-
private clone;
|
|
76
|
-
}
|
|
77
|
-
export declare class ResponseError extends Error {
|
|
78
|
-
response: Response;
|
|
79
|
-
name: "ResponseError";
|
|
80
|
-
constructor(response: Response, msg?: string);
|
|
81
|
-
}
|
|
82
|
-
export declare class FetchError extends Error {
|
|
83
|
-
cause: Error;
|
|
84
|
-
name: "FetchError";
|
|
85
|
-
constructor(cause: Error, msg?: string);
|
|
86
|
-
}
|
|
87
|
-
export declare class RequiredError extends Error {
|
|
88
|
-
field: string;
|
|
89
|
-
name: "RequiredError";
|
|
90
|
-
constructor(field: string, msg?: string);
|
|
91
|
-
}
|
|
92
|
-
export declare const COLLECTION_FORMATS: {
|
|
93
|
-
csv: string;
|
|
94
|
-
ssv: string;
|
|
95
|
-
tsv: string;
|
|
96
|
-
pipes: string;
|
|
97
|
-
};
|
|
98
|
-
export type FetchAPI = WindowOrWorkerGlobalScope['fetch'];
|
|
99
|
-
export type Json = any;
|
|
100
|
-
export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD';
|
|
101
|
-
export type HTTPHeaders = {
|
|
102
|
-
[key: string]: string;
|
|
103
|
-
};
|
|
104
|
-
export type HTTPQuery = {
|
|
105
|
-
[key: string]: string | number | null | boolean | Array<string | number | null | boolean> | Set<string | number | null | boolean> | HTTPQuery;
|
|
106
|
-
};
|
|
107
|
-
export type HTTPBody = Json | FormData | URLSearchParams;
|
|
108
|
-
export type HTTPRequestInit = {
|
|
109
|
-
headers?: HTTPHeaders;
|
|
110
|
-
method: HTTPMethod;
|
|
111
|
-
credentials?: RequestCredentials;
|
|
112
|
-
body?: HTTPBody;
|
|
113
|
-
};
|
|
114
|
-
export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original';
|
|
115
|
-
export type InitOverrideFunction = (requestContext: {
|
|
116
|
-
init: HTTPRequestInit;
|
|
117
|
-
context: RequestOpts;
|
|
118
|
-
}) => Promise<RequestInit>;
|
|
119
|
-
export interface FetchParams {
|
|
120
|
-
url: string;
|
|
121
|
-
init: RequestInit;
|
|
122
|
-
}
|
|
123
|
-
export interface RequestOpts {
|
|
124
|
-
path: string;
|
|
125
|
-
method: HTTPMethod;
|
|
126
|
-
headers: HTTPHeaders;
|
|
127
|
-
query?: HTTPQuery;
|
|
128
|
-
body?: HTTPBody;
|
|
129
|
-
}
|
|
130
|
-
export declare function exists(json: any, key: string): boolean;
|
|
131
|
-
export declare function querystring(params: HTTPQuery, prefix?: string): string;
|
|
132
|
-
export declare function mapValues(data: any, fn: (item: any) => any): {};
|
|
133
|
-
export declare function canConsumeForm(consumes: Consume[]): boolean;
|
|
134
|
-
export interface Consume {
|
|
135
|
-
contentType: string;
|
|
136
|
-
}
|
|
137
|
-
export interface RequestContext {
|
|
138
|
-
fetch: FetchAPI;
|
|
139
|
-
url: string;
|
|
140
|
-
init: RequestInit;
|
|
141
|
-
}
|
|
142
|
-
export interface ResponseContext {
|
|
143
|
-
fetch: FetchAPI;
|
|
144
|
-
url: string;
|
|
145
|
-
init: RequestInit;
|
|
146
|
-
response: Response;
|
|
147
|
-
}
|
|
148
|
-
export interface ErrorContext {
|
|
149
|
-
fetch: FetchAPI;
|
|
150
|
-
url: string;
|
|
151
|
-
init: RequestInit;
|
|
152
|
-
error: unknown;
|
|
153
|
-
response?: Response;
|
|
154
|
-
}
|
|
155
|
-
export interface Middleware {
|
|
156
|
-
pre?(context: RequestContext): Promise<FetchParams | void>;
|
|
157
|
-
post?(context: ResponseContext): Promise<Response | void>;
|
|
158
|
-
onError?(context: ErrorContext): Promise<Response | void>;
|
|
159
|
-
}
|
|
160
|
-
export interface ApiResponse<T> {
|
|
161
|
-
raw: Response;
|
|
162
|
-
value(): Promise<T>;
|
|
163
|
-
}
|
|
164
|
-
export interface ResponseTransformer<T> {
|
|
165
|
-
(json: any): T;
|
|
166
|
-
}
|
|
167
|
-
export declare class JSONApiResponse<T> {
|
|
168
|
-
raw: Response;
|
|
169
|
-
private transformer;
|
|
170
|
-
constructor(raw: Response, transformer?: ResponseTransformer<T>);
|
|
171
|
-
value(): Promise<T>;
|
|
172
|
-
}
|
|
173
|
-
export declare class VoidApiResponse {
|
|
174
|
-
raw: Response;
|
|
175
|
-
constructor(raw: Response);
|
|
176
|
-
value(): Promise<void>;
|
|
177
|
-
}
|
|
178
|
-
export declare class BlobApiResponse {
|
|
179
|
-
raw: Response;
|
|
180
|
-
constructor(raw: Response);
|
|
181
|
-
value(): Promise<Blob>;
|
|
182
|
-
}
|
|
183
|
-
export declare class TextApiResponse {
|
|
184
|
-
raw: Response;
|
|
185
|
-
constructor(raw: Response);
|
|
186
|
-
value(): Promise<string>;
|
|
187
|
-
}
|