@teemill/pickfaces 0.1.1
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/.openapi-generator/FILES +21 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/README.md +45 -0
- package/dist/apis/PickfacesApi.d.ts +91 -0
- package/dist/apis/PickfacesApi.js +366 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +19 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +21 -0
- package/dist/models/CreatePickfaceRequest.d.ts +38 -0
- package/dist/models/CreatePickfaceRequest.js +53 -0
- package/dist/models/CreatePickfaceRequestDimensions.d.ts +43 -0
- package/dist/models/CreatePickfaceRequestDimensions.js +54 -0
- package/dist/models/GetPickfaces200Response.d.ts +38 -0
- package/dist/models/GetPickfaces200Response.js +53 -0
- package/dist/models/ModelError.d.ts +37 -0
- package/dist/models/ModelError.js +53 -0
- package/dist/models/Pickface.d.ts +63 -0
- package/dist/models/Pickface.js +62 -0
- package/dist/models/PickfaceContentsInner.d.ts +58 -0
- package/dist/models/PickfaceContentsInner.js +61 -0
- package/dist/models/PickfaceContentsInnerApplicationsInner.d.ts +37 -0
- package/dist/models/PickfaceContentsInnerApplicationsInner.js +52 -0
- package/dist/models/PickfaceContentsInnerMetadata.d.ts +43 -0
- package/dist/models/PickfaceContentsInnerMetadata.js +54 -0
- package/dist/models/PickfaceContentsInnerQuantity.d.ts +43 -0
- package/dist/models/PickfaceContentsInnerQuantity.js +54 -0
- package/dist/models/UpdatePickfaceRequest.d.ts +31 -0
- package/dist/models/UpdatePickfaceRequest.js +50 -0
- package/dist/models/index.d.ts +10 -0
- package/dist/models/index.js +28 -0
- package/dist/runtime.d.ts +182 -0
- package/dist/runtime.js +562 -0
- package/package.json +19 -0
- package/src/apis/PickfacesApi.ts +304 -0
- package/src/apis/index.ts +3 -0
- package/src/index.ts +5 -0
- package/src/models/CreatePickfaceRequest.ts +80 -0
- package/src/models/CreatePickfaceRequestDimensions.ts +81 -0
- package/src/models/GetPickfaces200Response.ts +80 -0
- package/src/models/ModelError.ts +74 -0
- package/src/models/Pickface.ts +118 -0
- package/src/models/PickfaceContentsInner.ts +116 -0
- package/src/models/PickfaceContentsInnerApplicationsInner.ts +73 -0
- package/src/models/PickfaceContentsInnerMetadata.ts +81 -0
- package/src/models/PickfaceContentsInnerQuantity.ts +81 -0
- package/src/models/UpdatePickfaceRequest.ts +65 -0
- package/src/models/index.ts +12 -0
- package/src/runtime.ts +431 -0
- package/tsconfig.json +20 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pickfaces API
|
|
3
|
+
* Manage Teemill Pickfaces Currently this API is in development and is not yet publicly accessible. All paths and models are subject to change. 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.1
|
|
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
|
+
* Any additional metadata
|
|
14
|
+
* @export
|
|
15
|
+
* @interface PickfaceContentsInnerMetadata
|
|
16
|
+
*/
|
|
17
|
+
export interface PickfaceContentsInnerMetadata {
|
|
18
|
+
/**
|
|
19
|
+
* The title of the product
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof PickfaceContentsInnerMetadata
|
|
22
|
+
*/
|
|
23
|
+
title?: string | null;
|
|
24
|
+
/**
|
|
25
|
+
* The image of the front of the product
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof PickfaceContentsInnerMetadata
|
|
28
|
+
*/
|
|
29
|
+
frontImage?: string | null;
|
|
30
|
+
/**
|
|
31
|
+
* The image of the back of the product
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof PickfaceContentsInnerMetadata
|
|
34
|
+
*/
|
|
35
|
+
backImage?: string | null;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Check if a given object implements the PickfaceContentsInnerMetadata interface.
|
|
39
|
+
*/
|
|
40
|
+
export declare function instanceOfPickfaceContentsInnerMetadata(value: object): boolean;
|
|
41
|
+
export declare function PickfaceContentsInnerMetadataFromJSON(json: any): PickfaceContentsInnerMetadata;
|
|
42
|
+
export declare function PickfaceContentsInnerMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): PickfaceContentsInnerMetadata;
|
|
43
|
+
export declare function PickfaceContentsInnerMetadataToJSON(value?: PickfaceContentsInnerMetadata | null): any;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Pickfaces API
|
|
6
|
+
* Manage Teemill Pickfaces Currently this API is in development and is not yet publicly accessible. All paths and models are subject to change. 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.1
|
|
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.PickfaceContentsInnerMetadataToJSON = exports.PickfaceContentsInnerMetadataFromJSONTyped = exports.PickfaceContentsInnerMetadataFromJSON = exports.instanceOfPickfaceContentsInnerMetadata = void 0;
|
|
17
|
+
var runtime_1 = require("../runtime");
|
|
18
|
+
/**
|
|
19
|
+
* Check if a given object implements the PickfaceContentsInnerMetadata interface.
|
|
20
|
+
*/
|
|
21
|
+
function instanceOfPickfaceContentsInnerMetadata(value) {
|
|
22
|
+
var isInstance = true;
|
|
23
|
+
return isInstance;
|
|
24
|
+
}
|
|
25
|
+
exports.instanceOfPickfaceContentsInnerMetadata = instanceOfPickfaceContentsInnerMetadata;
|
|
26
|
+
function PickfaceContentsInnerMetadataFromJSON(json) {
|
|
27
|
+
return PickfaceContentsInnerMetadataFromJSONTyped(json, false);
|
|
28
|
+
}
|
|
29
|
+
exports.PickfaceContentsInnerMetadataFromJSON = PickfaceContentsInnerMetadataFromJSON;
|
|
30
|
+
function PickfaceContentsInnerMetadataFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if ((json === undefined) || (json === null)) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'title': !(0, runtime_1.exists)(json, 'title') ? undefined : json['title'],
|
|
36
|
+
'frontImage': !(0, runtime_1.exists)(json, 'frontImage') ? undefined : json['frontImage'],
|
|
37
|
+
'backImage': !(0, runtime_1.exists)(json, 'backImage') ? undefined : json['backImage'],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
exports.PickfaceContentsInnerMetadataFromJSONTyped = PickfaceContentsInnerMetadataFromJSONTyped;
|
|
41
|
+
function PickfaceContentsInnerMetadataToJSON(value) {
|
|
42
|
+
if (value === undefined) {
|
|
43
|
+
return undefined;
|
|
44
|
+
}
|
|
45
|
+
if (value === null) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'title': value.title,
|
|
50
|
+
'frontImage': value.frontImage,
|
|
51
|
+
'backImage': value.backImage,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
exports.PickfaceContentsInnerMetadataToJSON = PickfaceContentsInnerMetadataToJSON;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pickfaces API
|
|
3
|
+
* Manage Teemill Pickfaces Currently this API is in development and is not yet publicly accessible. All paths and models are subject to change. 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.1
|
|
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 PickfaceContentsInnerQuantity
|
|
16
|
+
*/
|
|
17
|
+
export interface PickfaceContentsInnerQuantity {
|
|
18
|
+
/**
|
|
19
|
+
* How many are in the box
|
|
20
|
+
* @type {number}
|
|
21
|
+
* @memberof PickfaceContentsInnerQuantity
|
|
22
|
+
*/
|
|
23
|
+
total?: number;
|
|
24
|
+
/**
|
|
25
|
+
* How many are available to reserve
|
|
26
|
+
* @type {number}
|
|
27
|
+
* @memberof PickfaceContentsInnerQuantity
|
|
28
|
+
*/
|
|
29
|
+
available?: number;
|
|
30
|
+
/**
|
|
31
|
+
* How many are pending some action e.g. to be picked
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof PickfaceContentsInnerQuantity
|
|
34
|
+
*/
|
|
35
|
+
reserved?: number;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Check if a given object implements the PickfaceContentsInnerQuantity interface.
|
|
39
|
+
*/
|
|
40
|
+
export declare function instanceOfPickfaceContentsInnerQuantity(value: object): boolean;
|
|
41
|
+
export declare function PickfaceContentsInnerQuantityFromJSON(json: any): PickfaceContentsInnerQuantity;
|
|
42
|
+
export declare function PickfaceContentsInnerQuantityFromJSONTyped(json: any, ignoreDiscriminator: boolean): PickfaceContentsInnerQuantity;
|
|
43
|
+
export declare function PickfaceContentsInnerQuantityToJSON(value?: PickfaceContentsInnerQuantity | null): any;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Pickfaces API
|
|
6
|
+
* Manage Teemill Pickfaces Currently this API is in development and is not yet publicly accessible. All paths and models are subject to change. 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.1
|
|
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.PickfaceContentsInnerQuantityToJSON = exports.PickfaceContentsInnerQuantityFromJSONTyped = exports.PickfaceContentsInnerQuantityFromJSON = exports.instanceOfPickfaceContentsInnerQuantity = void 0;
|
|
17
|
+
var runtime_1 = require("../runtime");
|
|
18
|
+
/**
|
|
19
|
+
* Check if a given object implements the PickfaceContentsInnerQuantity interface.
|
|
20
|
+
*/
|
|
21
|
+
function instanceOfPickfaceContentsInnerQuantity(value) {
|
|
22
|
+
var isInstance = true;
|
|
23
|
+
return isInstance;
|
|
24
|
+
}
|
|
25
|
+
exports.instanceOfPickfaceContentsInnerQuantity = instanceOfPickfaceContentsInnerQuantity;
|
|
26
|
+
function PickfaceContentsInnerQuantityFromJSON(json) {
|
|
27
|
+
return PickfaceContentsInnerQuantityFromJSONTyped(json, false);
|
|
28
|
+
}
|
|
29
|
+
exports.PickfaceContentsInnerQuantityFromJSON = PickfaceContentsInnerQuantityFromJSON;
|
|
30
|
+
function PickfaceContentsInnerQuantityFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if ((json === undefined) || (json === null)) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'total': !(0, runtime_1.exists)(json, 'total') ? undefined : json['total'],
|
|
36
|
+
'available': !(0, runtime_1.exists)(json, 'available') ? undefined : json['available'],
|
|
37
|
+
'reserved': !(0, runtime_1.exists)(json, 'reserved') ? undefined : json['reserved'],
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
exports.PickfaceContentsInnerQuantityFromJSONTyped = PickfaceContentsInnerQuantityFromJSONTyped;
|
|
41
|
+
function PickfaceContentsInnerQuantityToJSON(value) {
|
|
42
|
+
if (value === undefined) {
|
|
43
|
+
return undefined;
|
|
44
|
+
}
|
|
45
|
+
if (value === null) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
return {
|
|
49
|
+
'total': value.total,
|
|
50
|
+
'available': value.available,
|
|
51
|
+
'reserved': value.reserved,
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
exports.PickfaceContentsInnerQuantityToJSON = PickfaceContentsInnerQuantityToJSON;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pickfaces API
|
|
3
|
+
* Manage Teemill Pickfaces Currently this API is in development and is not yet publicly accessible. All paths and models are subject to change. 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.1
|
|
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 UpdatePickfaceRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface UpdatePickfaceRequest {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {boolean}
|
|
21
|
+
* @memberof UpdatePickfaceRequest
|
|
22
|
+
*/
|
|
23
|
+
enabled?: boolean;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the UpdatePickfaceRequest interface.
|
|
27
|
+
*/
|
|
28
|
+
export declare function instanceOfUpdatePickfaceRequest(value: object): boolean;
|
|
29
|
+
export declare function UpdatePickfaceRequestFromJSON(json: any): UpdatePickfaceRequest;
|
|
30
|
+
export declare function UpdatePickfaceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdatePickfaceRequest;
|
|
31
|
+
export declare function UpdatePickfaceRequestToJSON(value?: UpdatePickfaceRequest | null): any;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Pickfaces API
|
|
6
|
+
* Manage Teemill Pickfaces Currently this API is in development and is not yet publicly accessible. All paths and models are subject to change. 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.1
|
|
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.UpdatePickfaceRequestToJSON = exports.UpdatePickfaceRequestFromJSONTyped = exports.UpdatePickfaceRequestFromJSON = exports.instanceOfUpdatePickfaceRequest = void 0;
|
|
17
|
+
var runtime_1 = require("../runtime");
|
|
18
|
+
/**
|
|
19
|
+
* Check if a given object implements the UpdatePickfaceRequest interface.
|
|
20
|
+
*/
|
|
21
|
+
function instanceOfUpdatePickfaceRequest(value) {
|
|
22
|
+
var isInstance = true;
|
|
23
|
+
return isInstance;
|
|
24
|
+
}
|
|
25
|
+
exports.instanceOfUpdatePickfaceRequest = instanceOfUpdatePickfaceRequest;
|
|
26
|
+
function UpdatePickfaceRequestFromJSON(json) {
|
|
27
|
+
return UpdatePickfaceRequestFromJSONTyped(json, false);
|
|
28
|
+
}
|
|
29
|
+
exports.UpdatePickfaceRequestFromJSON = UpdatePickfaceRequestFromJSON;
|
|
30
|
+
function UpdatePickfaceRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
31
|
+
if ((json === undefined) || (json === null)) {
|
|
32
|
+
return json;
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
'enabled': !(0, runtime_1.exists)(json, 'enabled') ? undefined : json['enabled'],
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
exports.UpdatePickfaceRequestFromJSONTyped = UpdatePickfaceRequestFromJSONTyped;
|
|
39
|
+
function UpdatePickfaceRequestToJSON(value) {
|
|
40
|
+
if (value === undefined) {
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
if (value === null) {
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
'enabled': value.enabled,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
exports.UpdatePickfaceRequestToJSON = UpdatePickfaceRequestToJSON;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './CreatePickfaceRequest';
|
|
2
|
+
export * from './CreatePickfaceRequestDimensions';
|
|
3
|
+
export * from './GetPickfaces200Response';
|
|
4
|
+
export * from './ModelError';
|
|
5
|
+
export * from './Pickface';
|
|
6
|
+
export * from './PickfaceContentsInner';
|
|
7
|
+
export * from './PickfaceContentsInnerApplicationsInner';
|
|
8
|
+
export * from './PickfaceContentsInnerMetadata';
|
|
9
|
+
export * from './PickfaceContentsInnerQuantity';
|
|
10
|
+
export * from './UpdatePickfaceRequest';
|
|
@@ -0,0 +1,28 @@
|
|
|
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("./CreatePickfaceRequest"), exports);
|
|
20
|
+
__exportStar(require("./CreatePickfaceRequestDimensions"), exports);
|
|
21
|
+
__exportStar(require("./GetPickfaces200Response"), exports);
|
|
22
|
+
__exportStar(require("./ModelError"), exports);
|
|
23
|
+
__exportStar(require("./Pickface"), exports);
|
|
24
|
+
__exportStar(require("./PickfaceContentsInner"), exports);
|
|
25
|
+
__exportStar(require("./PickfaceContentsInnerApplicationsInner"), exports);
|
|
26
|
+
__exportStar(require("./PickfaceContentsInnerMetadata"), exports);
|
|
27
|
+
__exportStar(require("./PickfaceContentsInnerQuantity"), exports);
|
|
28
|
+
__exportStar(require("./UpdatePickfaceRequest"), exports);
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pickfaces API
|
|
3
|
+
* Manage Teemill Pickfaces Currently this API is in development and is not yet publicly accessible. All paths and models are subject to change. 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.1
|
|
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 declare const BASE_PATH: string;
|
|
13
|
+
export interface ConfigurationParameters {
|
|
14
|
+
basePath?: string;
|
|
15
|
+
fetchApi?: FetchAPI;
|
|
16
|
+
middleware?: Middleware[];
|
|
17
|
+
queryParamsStringify?: (params: HTTPQuery) => string;
|
|
18
|
+
username?: string;
|
|
19
|
+
password?: string;
|
|
20
|
+
apiKey?: string | ((name: string) => string);
|
|
21
|
+
accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string | Promise<string>);
|
|
22
|
+
headers?: HTTPHeaders;
|
|
23
|
+
credentials?: RequestCredentials;
|
|
24
|
+
}
|
|
25
|
+
export declare class Configuration {
|
|
26
|
+
private configuration;
|
|
27
|
+
constructor(configuration?: ConfigurationParameters);
|
|
28
|
+
set config(configuration: Configuration);
|
|
29
|
+
get basePath(): string;
|
|
30
|
+
get fetchApi(): FetchAPI | undefined;
|
|
31
|
+
get middleware(): Middleware[];
|
|
32
|
+
get queryParamsStringify(): (params: HTTPQuery) => string;
|
|
33
|
+
get username(): string | undefined;
|
|
34
|
+
get password(): string | undefined;
|
|
35
|
+
get apiKey(): ((name: string) => string) | undefined;
|
|
36
|
+
get accessToken(): ((name?: string, scopes?: string[]) => string | Promise<string>) | undefined;
|
|
37
|
+
get headers(): HTTPHeaders | undefined;
|
|
38
|
+
get credentials(): RequestCredentials | undefined;
|
|
39
|
+
}
|
|
40
|
+
export declare const DefaultConfig: Configuration;
|
|
41
|
+
/**
|
|
42
|
+
* This is the base class for all generated API classes.
|
|
43
|
+
*/
|
|
44
|
+
export declare class BaseAPI {
|
|
45
|
+
protected configuration: Configuration;
|
|
46
|
+
private static readonly jsonRegex;
|
|
47
|
+
private middleware;
|
|
48
|
+
constructor(configuration?: Configuration);
|
|
49
|
+
withMiddleware<T extends BaseAPI>(this: T, ...middlewares: Middleware[]): T;
|
|
50
|
+
withPreMiddleware<T extends BaseAPI>(this: T, ...preMiddlewares: Array<Middleware['pre']>): T;
|
|
51
|
+
withPostMiddleware<T extends BaseAPI>(this: T, ...postMiddlewares: Array<Middleware['post']>): T;
|
|
52
|
+
/**
|
|
53
|
+
* Check if the given MIME is a JSON MIME.
|
|
54
|
+
* JSON MIME examples:
|
|
55
|
+
* application/json
|
|
56
|
+
* application/json; charset=UTF8
|
|
57
|
+
* APPLICATION/JSON
|
|
58
|
+
* application/vnd.company+json
|
|
59
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
60
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
61
|
+
*/
|
|
62
|
+
protected isJsonMime(mime: string | null | undefined): boolean;
|
|
63
|
+
protected request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise<Response>;
|
|
64
|
+
private createFetchParams;
|
|
65
|
+
private fetchApi;
|
|
66
|
+
/**
|
|
67
|
+
* Create a shallow clone of `this` by constructing a new instance
|
|
68
|
+
* and then shallow cloning data members.
|
|
69
|
+
*/
|
|
70
|
+
private clone;
|
|
71
|
+
}
|
|
72
|
+
export declare class ResponseError extends Error {
|
|
73
|
+
response: Response;
|
|
74
|
+
name: "ResponseError";
|
|
75
|
+
constructor(response: Response, msg?: string);
|
|
76
|
+
}
|
|
77
|
+
export declare class FetchError extends Error {
|
|
78
|
+
cause: Error;
|
|
79
|
+
name: "FetchError";
|
|
80
|
+
constructor(cause: Error, msg?: string);
|
|
81
|
+
}
|
|
82
|
+
export declare class RequiredError extends Error {
|
|
83
|
+
field: string;
|
|
84
|
+
name: "RequiredError";
|
|
85
|
+
constructor(field: string, msg?: string);
|
|
86
|
+
}
|
|
87
|
+
export declare const COLLECTION_FORMATS: {
|
|
88
|
+
csv: string;
|
|
89
|
+
ssv: string;
|
|
90
|
+
tsv: string;
|
|
91
|
+
pipes: string;
|
|
92
|
+
};
|
|
93
|
+
export type FetchAPI = WindowOrWorkerGlobalScope['fetch'];
|
|
94
|
+
export type Json = any;
|
|
95
|
+
export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD';
|
|
96
|
+
export type HTTPHeaders = {
|
|
97
|
+
[key: string]: string;
|
|
98
|
+
};
|
|
99
|
+
export type HTTPQuery = {
|
|
100
|
+
[key: string]: string | number | null | boolean | Array<string | number | null | boolean> | Set<string | number | null | boolean> | HTTPQuery;
|
|
101
|
+
};
|
|
102
|
+
export type HTTPBody = Json | FormData | URLSearchParams;
|
|
103
|
+
export type HTTPRequestInit = {
|
|
104
|
+
headers?: HTTPHeaders;
|
|
105
|
+
method: HTTPMethod;
|
|
106
|
+
credentials?: RequestCredentials;
|
|
107
|
+
body?: HTTPBody;
|
|
108
|
+
};
|
|
109
|
+
export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original';
|
|
110
|
+
export type InitOverrideFunction = (requestContext: {
|
|
111
|
+
init: HTTPRequestInit;
|
|
112
|
+
context: RequestOpts;
|
|
113
|
+
}) => Promise<RequestInit>;
|
|
114
|
+
export interface FetchParams {
|
|
115
|
+
url: string;
|
|
116
|
+
init: RequestInit;
|
|
117
|
+
}
|
|
118
|
+
export interface RequestOpts {
|
|
119
|
+
path: string;
|
|
120
|
+
method: HTTPMethod;
|
|
121
|
+
headers: HTTPHeaders;
|
|
122
|
+
query?: HTTPQuery;
|
|
123
|
+
body?: HTTPBody;
|
|
124
|
+
}
|
|
125
|
+
export declare function exists(json: any, key: string): boolean;
|
|
126
|
+
export declare function querystring(params: HTTPQuery, prefix?: string): string;
|
|
127
|
+
export declare function mapValues(data: any, fn: (item: any) => any): {};
|
|
128
|
+
export declare function canConsumeForm(consumes: Consume[]): boolean;
|
|
129
|
+
export interface Consume {
|
|
130
|
+
contentType: string;
|
|
131
|
+
}
|
|
132
|
+
export interface RequestContext {
|
|
133
|
+
fetch: FetchAPI;
|
|
134
|
+
url: string;
|
|
135
|
+
init: RequestInit;
|
|
136
|
+
}
|
|
137
|
+
export interface ResponseContext {
|
|
138
|
+
fetch: FetchAPI;
|
|
139
|
+
url: string;
|
|
140
|
+
init: RequestInit;
|
|
141
|
+
response: Response;
|
|
142
|
+
}
|
|
143
|
+
export interface ErrorContext {
|
|
144
|
+
fetch: FetchAPI;
|
|
145
|
+
url: string;
|
|
146
|
+
init: RequestInit;
|
|
147
|
+
error: unknown;
|
|
148
|
+
response?: Response;
|
|
149
|
+
}
|
|
150
|
+
export interface Middleware {
|
|
151
|
+
pre?(context: RequestContext): Promise<FetchParams | void>;
|
|
152
|
+
post?(context: ResponseContext): Promise<Response | void>;
|
|
153
|
+
onError?(context: ErrorContext): Promise<Response | void>;
|
|
154
|
+
}
|
|
155
|
+
export interface ApiResponse<T> {
|
|
156
|
+
raw: Response;
|
|
157
|
+
value(): Promise<T>;
|
|
158
|
+
}
|
|
159
|
+
export interface ResponseTransformer<T> {
|
|
160
|
+
(json: any): T;
|
|
161
|
+
}
|
|
162
|
+
export declare class JSONApiResponse<T> {
|
|
163
|
+
raw: Response;
|
|
164
|
+
private transformer;
|
|
165
|
+
constructor(raw: Response, transformer?: ResponseTransformer<T>);
|
|
166
|
+
value(): Promise<T>;
|
|
167
|
+
}
|
|
168
|
+
export declare class VoidApiResponse {
|
|
169
|
+
raw: Response;
|
|
170
|
+
constructor(raw: Response);
|
|
171
|
+
value(): Promise<void>;
|
|
172
|
+
}
|
|
173
|
+
export declare class BlobApiResponse {
|
|
174
|
+
raw: Response;
|
|
175
|
+
constructor(raw: Response);
|
|
176
|
+
value(): Promise<Blob>;
|
|
177
|
+
}
|
|
178
|
+
export declare class TextApiResponse {
|
|
179
|
+
raw: Response;
|
|
180
|
+
constructor(raw: Response);
|
|
181
|
+
value(): Promise<string>;
|
|
182
|
+
}
|