@lcdp/api-react-rest-client 2.4.0 → 2.5.0
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/catalog/index.d.ts +1 -0
- package/catalog/index.js +17 -0
- package/catalog/src/apis/ManageProductInsightApi.d.ts +54 -0
- package/catalog/src/apis/ManageProductInsightApi.js +295 -0
- package/catalog/src/apis/SearchProductInsightApi.d.ts +54 -0
- package/catalog/src/apis/SearchProductInsightApi.js +249 -0
- package/catalog/src/apis/index.d.ts +2 -0
- package/catalog/src/apis/index.js +18 -0
- package/catalog/src/index.d.ts +3 -0
- package/catalog/src/index.js +19 -0
- package/catalog/src/models/Barcodes.d.ts +45 -0
- package/catalog/src/models/Barcodes.js +48 -0
- package/catalog/src/models/HttpLink.d.ts +27 -0
- package/catalog/src/models/HttpLink.js +41 -0
- package/catalog/src/models/LaboratoryLink.d.ts +34 -0
- package/catalog/src/models/LaboratoryLink.js +50 -0
- package/catalog/src/models/LaboratoryLinkAllOf.d.ts +33 -0
- package/catalog/src/models/LaboratoryLinkAllOf.js +44 -0
- package/catalog/src/models/PaginatedObject.d.ts +28 -0
- package/catalog/src/models/PaginatedObject.js +42 -0
- package/catalog/src/models/PaginatedProductInsights.d.ts +29 -0
- package/catalog/src/models/PaginatedProductInsights.js +50 -0
- package/catalog/src/models/PaginatedProductInsightsAllOf.d.ts +28 -0
- package/catalog/src/models/PaginatedProductInsightsAllOf.js +42 -0
- package/catalog/src/models/PagingMetadata.d.ts +45 -0
- package/catalog/src/models/PagingMetadata.js +47 -0
- package/catalog/src/models/ProductInsight.d.ts +106 -0
- package/catalog/src/models/ProductInsight.js +73 -0
- package/catalog/src/models/ProductInsightCreateOrUpdateParameters.d.ts +89 -0
- package/catalog/src/models/ProductInsightCreateOrUpdateParameters.js +64 -0
- package/catalog/src/models/ProductInsightJournal.d.ts +33 -0
- package/catalog/src/models/ProductInsightJournal.js +44 -0
- package/catalog/src/models/ProductSecondaryTypeLink.d.ts +34 -0
- package/catalog/src/models/ProductSecondaryTypeLink.js +50 -0
- package/catalog/src/models/ProductSecondaryTypeLinkAllOf.d.ts +33 -0
- package/catalog/src/models/ProductSecondaryTypeLinkAllOf.js +44 -0
- package/catalog/src/models/ProductStorageType.d.ts +25 -0
- package/catalog/src/models/ProductStorageType.js +40 -0
- package/catalog/src/models/ProductTypeLink.d.ts +34 -0
- package/catalog/src/models/ProductTypeLink.js +50 -0
- package/catalog/src/models/ProductTypeLinkAllOf.d.ts +33 -0
- package/catalog/src/models/ProductTypeLinkAllOf.js +44 -0
- package/catalog/src/models/RestError.d.ts +85 -0
- package/catalog/src/models/RestError.js +97 -0
- package/catalog/src/models/VatLink.d.ts +40 -0
- package/catalog/src/models/VatLink.js +50 -0
- package/catalog/src/models/VatLinkAllOf.d.ts +39 -0
- package/catalog/src/models/VatLinkAllOf.js +46 -0
- package/catalog/src/models/index.d.ts +19 -0
- package/catalog/src/models/index.js +35 -0
- package/catalog/src/runtime.d.ts +149 -0
- package/catalog/src/runtime.js +480 -0
- package/notification/src/apis/SearchNotificationTypeApi.d.ts +13 -2
- package/notification/src/apis/SearchNotificationTypeApi.js +82 -9
- package/package.json +1 -1
- package/product/src/apis/ManageProductApi.d.ts +2 -0
- package/product/src/apis/ManageProductApi.js +6 -0
- package/product/src/apis/SearchProductApi.d.ts +1 -0
- package/product/src/apis/SearchProductApi.js +3 -0
- package/product/src/apis/SearchProductMetadataApi.d.ts +22 -0
- package/product/src/apis/SearchProductMetadataApi.js +154 -8
- package/product/src/models/{ProductProvider.d.ts → DataProvider.d.ts} +7 -5
- package/product/src/models/DataProvider.js +40 -0
- package/product/src/models/Image.d.ts +7 -0
- package/product/src/models/Image.js +3 -0
- package/product/src/models/Product.d.ts +44 -37
- package/product/src/models/Product.js +33 -31
- package/product/src/models/ProductCreationOrUpdateParameters.d.ts +6 -6
- package/product/src/models/ProductCreationOrUpdateParameters.js +2 -2
- package/product/src/models/ProductJournal.d.ts +27 -0
- package/product/src/models/ProductJournal.js +41 -0
- package/product/src/models/ProductProscription.d.ts +7 -0
- package/product/src/models/ProductProscription.js +3 -0
- package/product/src/models/ProductSource.d.ts +47 -0
- package/product/src/models/ProductSource.js +49 -0
- package/product/src/models/ProductSourceBcb.d.ts +39 -0
- package/product/src/models/ProductSourceBcb.js +46 -0
- package/product/src/models/ProductSourceFields.d.ts +131 -0
- package/product/src/models/ProductSourceFields.js +77 -0
- package/product/src/models/ProductSourceFieldsBarcodes.d.ts +46 -0
- package/product/src/models/ProductSourceFieldsBarcodes.js +48 -0
- package/product/src/models/index.d.ts +6 -1
- package/product/src/models/index.js +6 -1
- package/product/src/models/ProductProvider.js +0 -38
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* lcdp-catalog
|
|
6
|
+
* This is the REST API of LCDP catalog
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: contact@lecomptoirdespharmacies.fr
|
|
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 __assign = (this && this.__assign) || function () {
|
|
16
|
+
__assign = Object.assign || function(t) {
|
|
17
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
18
|
+
s = arguments[i];
|
|
19
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
20
|
+
t[p] = s[p];
|
|
21
|
+
}
|
|
22
|
+
return t;
|
|
23
|
+
};
|
|
24
|
+
return __assign.apply(this, arguments);
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.VatLinkToJSON = exports.VatLinkFromJSONTyped = exports.VatLinkFromJSON = void 0;
|
|
28
|
+
var runtime_1 = require("../runtime");
|
|
29
|
+
var HttpLink_1 = require("./HttpLink");
|
|
30
|
+
function VatLinkFromJSON(json) {
|
|
31
|
+
return VatLinkFromJSONTyped(json, false);
|
|
32
|
+
}
|
|
33
|
+
exports.VatLinkFromJSON = VatLinkFromJSON;
|
|
34
|
+
function VatLinkFromJSONTyped(json, ignoreDiscriminator) {
|
|
35
|
+
if ((json === undefined) || (json === null)) {
|
|
36
|
+
return json;
|
|
37
|
+
}
|
|
38
|
+
return __assign(__assign({}, (0, HttpLink_1.HttpLinkFromJSONTyped)(json, ignoreDiscriminator)), { 'id': !(0, runtime_1.exists)(json, 'id') ? undefined : json['id'], 'name': !(0, runtime_1.exists)(json, 'name') ? undefined : json['name'], 'value': !(0, runtime_1.exists)(json, 'value') ? undefined : json['value'] });
|
|
39
|
+
}
|
|
40
|
+
exports.VatLinkFromJSONTyped = VatLinkFromJSONTyped;
|
|
41
|
+
function VatLinkToJSON(value) {
|
|
42
|
+
if (value === undefined) {
|
|
43
|
+
return undefined;
|
|
44
|
+
}
|
|
45
|
+
if (value === null) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
return __assign(__assign({}, (0, HttpLink_1.HttpLinkToJSON)(value)), { 'id': value.id, 'name': value.name, 'value': value.value });
|
|
49
|
+
}
|
|
50
|
+
exports.VatLinkToJSON = VatLinkToJSON;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* lcdp-catalog
|
|
3
|
+
* This is the REST API of LCDP catalog
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: contact@lecomptoirdespharmacies.fr
|
|
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 VatLinkAllOf
|
|
16
|
+
*/
|
|
17
|
+
export interface VatLinkAllOf {
|
|
18
|
+
/**
|
|
19
|
+
* Vat Id
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof VatLinkAllOf
|
|
22
|
+
*/
|
|
23
|
+
id?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Vat name
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof VatLinkAllOf
|
|
28
|
+
*/
|
|
29
|
+
name?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Vat value
|
|
32
|
+
* @type {number}
|
|
33
|
+
* @memberof VatLinkAllOf
|
|
34
|
+
*/
|
|
35
|
+
value?: number;
|
|
36
|
+
}
|
|
37
|
+
export declare function VatLinkAllOfFromJSON(json: any): VatLinkAllOf;
|
|
38
|
+
export declare function VatLinkAllOfFromJSONTyped(json: any, ignoreDiscriminator: boolean): VatLinkAllOf;
|
|
39
|
+
export declare function VatLinkAllOfToJSON(value?: VatLinkAllOf | null): any;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* lcdp-catalog
|
|
6
|
+
* This is the REST API of LCDP catalog
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
* Contact: contact@lecomptoirdespharmacies.fr
|
|
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.VatLinkAllOfToJSON = exports.VatLinkAllOfFromJSONTyped = exports.VatLinkAllOfFromJSON = void 0;
|
|
17
|
+
var runtime_1 = require("../runtime");
|
|
18
|
+
function VatLinkAllOfFromJSON(json) {
|
|
19
|
+
return VatLinkAllOfFromJSONTyped(json, false);
|
|
20
|
+
}
|
|
21
|
+
exports.VatLinkAllOfFromJSON = VatLinkAllOfFromJSON;
|
|
22
|
+
function VatLinkAllOfFromJSONTyped(json, ignoreDiscriminator) {
|
|
23
|
+
if ((json === undefined) || (json === null)) {
|
|
24
|
+
return json;
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
'id': !(0, runtime_1.exists)(json, 'id') ? undefined : json['id'],
|
|
28
|
+
'name': !(0, runtime_1.exists)(json, 'name') ? undefined : json['name'],
|
|
29
|
+
'value': !(0, runtime_1.exists)(json, 'value') ? undefined : json['value'],
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
exports.VatLinkAllOfFromJSONTyped = VatLinkAllOfFromJSONTyped;
|
|
33
|
+
function VatLinkAllOfToJSON(value) {
|
|
34
|
+
if (value === undefined) {
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
37
|
+
if (value === null) {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
'id': value.id,
|
|
42
|
+
'name': value.name,
|
|
43
|
+
'value': value.value,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
exports.VatLinkAllOfToJSON = VatLinkAllOfToJSON;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export * from './Barcodes';
|
|
2
|
+
export * from './HttpLink';
|
|
3
|
+
export * from './LaboratoryLink';
|
|
4
|
+
export * from './LaboratoryLinkAllOf';
|
|
5
|
+
export * from './PaginatedObject';
|
|
6
|
+
export * from './PaginatedProductInsights';
|
|
7
|
+
export * from './PaginatedProductInsightsAllOf';
|
|
8
|
+
export * from './PagingMetadata';
|
|
9
|
+
export * from './ProductInsight';
|
|
10
|
+
export * from './ProductInsightCreateOrUpdateParameters';
|
|
11
|
+
export * from './ProductInsightJournal';
|
|
12
|
+
export * from './ProductSecondaryTypeLink';
|
|
13
|
+
export * from './ProductSecondaryTypeLinkAllOf';
|
|
14
|
+
export * from './ProductStorageType';
|
|
15
|
+
export * from './ProductTypeLink';
|
|
16
|
+
export * from './ProductTypeLinkAllOf';
|
|
17
|
+
export * from './RestError';
|
|
18
|
+
export * from './VatLink';
|
|
19
|
+
export * from './VatLinkAllOf';
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
__exportStar(require("./Barcodes"), exports);
|
|
18
|
+
__exportStar(require("./HttpLink"), exports);
|
|
19
|
+
__exportStar(require("./LaboratoryLink"), exports);
|
|
20
|
+
__exportStar(require("./LaboratoryLinkAllOf"), exports);
|
|
21
|
+
__exportStar(require("./PaginatedObject"), exports);
|
|
22
|
+
__exportStar(require("./PaginatedProductInsights"), exports);
|
|
23
|
+
__exportStar(require("./PaginatedProductInsightsAllOf"), exports);
|
|
24
|
+
__exportStar(require("./PagingMetadata"), exports);
|
|
25
|
+
__exportStar(require("./ProductInsight"), exports);
|
|
26
|
+
__exportStar(require("./ProductInsightCreateOrUpdateParameters"), exports);
|
|
27
|
+
__exportStar(require("./ProductInsightJournal"), exports);
|
|
28
|
+
__exportStar(require("./ProductSecondaryTypeLink"), exports);
|
|
29
|
+
__exportStar(require("./ProductSecondaryTypeLinkAllOf"), exports);
|
|
30
|
+
__exportStar(require("./ProductStorageType"), exports);
|
|
31
|
+
__exportStar(require("./ProductTypeLink"), exports);
|
|
32
|
+
__exportStar(require("./ProductTypeLinkAllOf"), exports);
|
|
33
|
+
__exportStar(require("./RestError"), exports);
|
|
34
|
+
__exportStar(require("./VatLink"), exports);
|
|
35
|
+
__exportStar(require("./VatLinkAllOf"), exports);
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* lcdp-catalog
|
|
3
|
+
* This is the REST API of LCDP catalog
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
* Contact: contact@lecomptoirdespharmacies.fr
|
|
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 = "/api/v1";
|
|
13
|
+
/**
|
|
14
|
+
* This is the base class for all generated API classes.
|
|
15
|
+
*/
|
|
16
|
+
export declare class BaseAPI {
|
|
17
|
+
protected configuration: Configuration;
|
|
18
|
+
private middleware;
|
|
19
|
+
constructor(configuration?: Configuration);
|
|
20
|
+
withMiddleware<T extends BaseAPI>(this: T, ...middlewares: Middleware[]): T;
|
|
21
|
+
withPreMiddleware<T extends BaseAPI>(this: T, ...preMiddlewares: Array<Middleware['pre']>): T;
|
|
22
|
+
withPostMiddleware<T extends BaseAPI>(this: T, ...postMiddlewares: Array<Middleware['post']>): T;
|
|
23
|
+
protected request(context: RequestOpts): Promise<Response>;
|
|
24
|
+
private createFetchParams;
|
|
25
|
+
private fetchApi;
|
|
26
|
+
/**
|
|
27
|
+
* Create a shallow clone of `this` by constructing a new instance
|
|
28
|
+
* and then shallow cloning data members.
|
|
29
|
+
*/
|
|
30
|
+
private clone;
|
|
31
|
+
}
|
|
32
|
+
export declare class RequiredError extends Error {
|
|
33
|
+
field: string;
|
|
34
|
+
name: "RequiredError";
|
|
35
|
+
constructor(field: string, msg?: string);
|
|
36
|
+
}
|
|
37
|
+
export declare const COLLECTION_FORMATS: {
|
|
38
|
+
csv: string;
|
|
39
|
+
ssv: string;
|
|
40
|
+
tsv: string;
|
|
41
|
+
pipes: string;
|
|
42
|
+
};
|
|
43
|
+
export declare type FetchAPI = WindowOrWorkerGlobalScope['fetch'];
|
|
44
|
+
export interface ConfigurationParameters {
|
|
45
|
+
basePath?: string;
|
|
46
|
+
fetchApi?: FetchAPI;
|
|
47
|
+
middleware?: Middleware[];
|
|
48
|
+
queryParamsStringify?: (params: HTTPQuery) => string;
|
|
49
|
+
username?: string;
|
|
50
|
+
password?: string;
|
|
51
|
+
apiKey?: string | ((name: string) => string);
|
|
52
|
+
accessToken?: string | ((name?: string, scopes?: string[]) => string);
|
|
53
|
+
headers?: HTTPHeaders;
|
|
54
|
+
credentials?: RequestCredentials;
|
|
55
|
+
referrerPolicy?: ReferrerPolicy;
|
|
56
|
+
}
|
|
57
|
+
export declare class Configuration {
|
|
58
|
+
private configuration;
|
|
59
|
+
constructor(configuration?: ConfigurationParameters);
|
|
60
|
+
get basePath(): string;
|
|
61
|
+
get fetchApi(): FetchAPI;
|
|
62
|
+
get middleware(): Middleware[];
|
|
63
|
+
get queryParamsStringify(): (params: HTTPQuery) => string;
|
|
64
|
+
get username(): string | undefined;
|
|
65
|
+
get password(): string | undefined;
|
|
66
|
+
get apiKey(): ((name: string) => string) | undefined;
|
|
67
|
+
get accessToken(): ((name: string, scopes?: string[]) => string) | undefined;
|
|
68
|
+
get headers(): HTTPHeaders | undefined;
|
|
69
|
+
get credentials(): RequestCredentials | undefined;
|
|
70
|
+
get referrerPolicy(): ReferrerPolicy | undefined;
|
|
71
|
+
}
|
|
72
|
+
export declare type Json = any;
|
|
73
|
+
export declare type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD';
|
|
74
|
+
export declare type HTTPHeaders = {
|
|
75
|
+
[key: string]: string;
|
|
76
|
+
};
|
|
77
|
+
export declare type HTTPQuery = {
|
|
78
|
+
[key: string]: string | number | null | boolean | Array<string | number | null | boolean> | HTTPQuery;
|
|
79
|
+
};
|
|
80
|
+
export declare type HTTPBody = Json | FormData | URLSearchParams;
|
|
81
|
+
export declare type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original';
|
|
82
|
+
export interface FetchParams {
|
|
83
|
+
url: string;
|
|
84
|
+
init: RequestInit;
|
|
85
|
+
}
|
|
86
|
+
export interface RequestOpts {
|
|
87
|
+
path: string;
|
|
88
|
+
method: HTTPMethod;
|
|
89
|
+
headers: HTTPHeaders;
|
|
90
|
+
query?: HTTPQuery;
|
|
91
|
+
body?: HTTPBody;
|
|
92
|
+
}
|
|
93
|
+
export declare function exists(json: any, key: string): boolean;
|
|
94
|
+
export declare function querystring(params: HTTPQuery, prefix?: string): string;
|
|
95
|
+
export declare function mapValues(data: any, fn: (item: any) => any): {};
|
|
96
|
+
export declare function canConsumeForm(consumes: Consume[]): boolean;
|
|
97
|
+
export declare function toDateISOString(date: Date): string;
|
|
98
|
+
export interface Consume {
|
|
99
|
+
contentType: string;
|
|
100
|
+
}
|
|
101
|
+
export interface RequestContext {
|
|
102
|
+
fetch: FetchAPI;
|
|
103
|
+
url: string;
|
|
104
|
+
init: RequestInit;
|
|
105
|
+
}
|
|
106
|
+
export interface ResponseContext {
|
|
107
|
+
fetch: FetchAPI;
|
|
108
|
+
url: string;
|
|
109
|
+
init: RequestInit;
|
|
110
|
+
response: Response;
|
|
111
|
+
}
|
|
112
|
+
export interface Middleware {
|
|
113
|
+
pre?(context: RequestContext): Promise<FetchParams | void>;
|
|
114
|
+
post?(context: ResponseContext): Promise<Response | void>;
|
|
115
|
+
}
|
|
116
|
+
export interface ApiResponse<T> {
|
|
117
|
+
raw: Response;
|
|
118
|
+
value(): Promise<T>;
|
|
119
|
+
}
|
|
120
|
+
export interface ResponseTransformer<T> {
|
|
121
|
+
(json: any): T;
|
|
122
|
+
}
|
|
123
|
+
export declare class JSONApiResponse<T> {
|
|
124
|
+
raw: Response;
|
|
125
|
+
private transformer;
|
|
126
|
+
constructor(raw: Response, transformer?: ResponseTransformer<T>);
|
|
127
|
+
value(): Promise<T>;
|
|
128
|
+
}
|
|
129
|
+
export declare class VoidApiResponse {
|
|
130
|
+
raw: Response;
|
|
131
|
+
constructor(raw: Response);
|
|
132
|
+
value(): Promise<void>;
|
|
133
|
+
}
|
|
134
|
+
export interface BlobWithMeta {
|
|
135
|
+
blob: Blob;
|
|
136
|
+
filename: string;
|
|
137
|
+
}
|
|
138
|
+
export declare function instanceOfBlobWithMeta(object: any): object is BlobWithMeta;
|
|
139
|
+
export declare class BlobWithMetaApiResponse {
|
|
140
|
+
raw: Response;
|
|
141
|
+
constructor(raw: Response);
|
|
142
|
+
value(): Promise<BlobWithMeta>;
|
|
143
|
+
private extractFilename;
|
|
144
|
+
}
|
|
145
|
+
export declare class TextApiResponse {
|
|
146
|
+
raw: Response;
|
|
147
|
+
constructor(raw: Response);
|
|
148
|
+
value(): Promise<string>;
|
|
149
|
+
}
|