@lcdp/api-react-rest-client 2.4.0 → 2.5.0-develop.5667295877
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,480 @@
|
|
|
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 __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 __assign = (this && this.__assign) || function () {
|
|
31
|
+
__assign = Object.assign || function(t) {
|
|
32
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
33
|
+
s = arguments[i];
|
|
34
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
35
|
+
t[p] = s[p];
|
|
36
|
+
}
|
|
37
|
+
return t;
|
|
38
|
+
};
|
|
39
|
+
return __assign.apply(this, arguments);
|
|
40
|
+
};
|
|
41
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
42
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
43
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
44
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
45
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
46
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
47
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
51
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
52
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
53
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
54
|
+
function step(op) {
|
|
55
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
56
|
+
while (_) try {
|
|
57
|
+
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;
|
|
58
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
59
|
+
switch (op[0]) {
|
|
60
|
+
case 0: case 1: t = op; break;
|
|
61
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
62
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
63
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
64
|
+
default:
|
|
65
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
66
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
67
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
68
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
69
|
+
if (t[2]) _.ops.pop();
|
|
70
|
+
_.trys.pop(); continue;
|
|
71
|
+
}
|
|
72
|
+
op = body.call(thisArg, _);
|
|
73
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
74
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
78
|
+
exports.TextApiResponse = exports.BlobWithMetaApiResponse = exports.instanceOfBlobWithMeta = exports.VoidApiResponse = exports.JSONApiResponse = exports.toDateISOString = exports.canConsumeForm = exports.mapValues = exports.querystring = exports.exists = exports.Configuration = exports.COLLECTION_FORMATS = exports.RequiredError = exports.BaseAPI = exports.BASE_PATH = void 0;
|
|
79
|
+
exports.BASE_PATH = "/api/v1";
|
|
80
|
+
var isBlob = function (value) { return typeof Blob !== 'undefined' && value instanceof Blob; };
|
|
81
|
+
/**
|
|
82
|
+
* This is the base class for all generated API classes.
|
|
83
|
+
*/
|
|
84
|
+
var BaseAPI = /** @class */ (function () {
|
|
85
|
+
function BaseAPI(configuration) {
|
|
86
|
+
if (configuration === void 0) { configuration = new Configuration(); }
|
|
87
|
+
var _this = this;
|
|
88
|
+
this.configuration = configuration;
|
|
89
|
+
this.fetchApi = function (url, init) { return __awaiter(_this, void 0, void 0, function () {
|
|
90
|
+
var fetchParams, _i, _a, middleware, response, _b, _c, middleware;
|
|
91
|
+
return __generator(this, function (_d) {
|
|
92
|
+
switch (_d.label) {
|
|
93
|
+
case 0:
|
|
94
|
+
fetchParams = { url: url, init: init };
|
|
95
|
+
_i = 0, _a = this.middleware;
|
|
96
|
+
_d.label = 1;
|
|
97
|
+
case 1:
|
|
98
|
+
if (!(_i < _a.length)) return [3 /*break*/, 4];
|
|
99
|
+
middleware = _a[_i];
|
|
100
|
+
if (!middleware.pre) return [3 /*break*/, 3];
|
|
101
|
+
return [4 /*yield*/, middleware.pre(__assign({ fetch: this.fetchApi }, fetchParams))];
|
|
102
|
+
case 2:
|
|
103
|
+
fetchParams = (_d.sent()) || fetchParams;
|
|
104
|
+
_d.label = 3;
|
|
105
|
+
case 3:
|
|
106
|
+
_i++;
|
|
107
|
+
return [3 /*break*/, 1];
|
|
108
|
+
case 4: return [4 /*yield*/, this.configuration.fetchApi(fetchParams.url, fetchParams.init)];
|
|
109
|
+
case 5:
|
|
110
|
+
response = _d.sent();
|
|
111
|
+
_b = 0, _c = this.middleware;
|
|
112
|
+
_d.label = 6;
|
|
113
|
+
case 6:
|
|
114
|
+
if (!(_b < _c.length)) return [3 /*break*/, 9];
|
|
115
|
+
middleware = _c[_b];
|
|
116
|
+
if (!middleware.post) return [3 /*break*/, 8];
|
|
117
|
+
return [4 /*yield*/, middleware.post({
|
|
118
|
+
fetch: this.fetchApi,
|
|
119
|
+
url: url,
|
|
120
|
+
init: init,
|
|
121
|
+
response: response.clone(),
|
|
122
|
+
})];
|
|
123
|
+
case 7:
|
|
124
|
+
response = (_d.sent()) || response;
|
|
125
|
+
_d.label = 8;
|
|
126
|
+
case 8:
|
|
127
|
+
_b++;
|
|
128
|
+
return [3 /*break*/, 6];
|
|
129
|
+
case 9: return [2 /*return*/, response];
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
}); };
|
|
133
|
+
this.middleware = configuration.middleware;
|
|
134
|
+
}
|
|
135
|
+
BaseAPI.prototype.withMiddleware = function () {
|
|
136
|
+
var _a;
|
|
137
|
+
var middlewares = [];
|
|
138
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
139
|
+
middlewares[_i] = arguments[_i];
|
|
140
|
+
}
|
|
141
|
+
var next = this.clone();
|
|
142
|
+
next.middleware = (_a = next.middleware).concat.apply(_a, middlewares);
|
|
143
|
+
return next;
|
|
144
|
+
};
|
|
145
|
+
BaseAPI.prototype.withPreMiddleware = function () {
|
|
146
|
+
var preMiddlewares = [];
|
|
147
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
148
|
+
preMiddlewares[_i] = arguments[_i];
|
|
149
|
+
}
|
|
150
|
+
var middlewares = preMiddlewares.map(function (pre) { return ({ pre: pre }); });
|
|
151
|
+
return this.withMiddleware.apply(this, middlewares);
|
|
152
|
+
};
|
|
153
|
+
BaseAPI.prototype.withPostMiddleware = function () {
|
|
154
|
+
var postMiddlewares = [];
|
|
155
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
156
|
+
postMiddlewares[_i] = arguments[_i];
|
|
157
|
+
}
|
|
158
|
+
var middlewares = postMiddlewares.map(function (post) { return ({ post: post }); });
|
|
159
|
+
return this.withMiddleware.apply(this, middlewares);
|
|
160
|
+
};
|
|
161
|
+
BaseAPI.prototype.request = function (context) {
|
|
162
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
163
|
+
var _a, url, init, response;
|
|
164
|
+
return __generator(this, function (_b) {
|
|
165
|
+
switch (_b.label) {
|
|
166
|
+
case 0:
|
|
167
|
+
_a = this.createFetchParams(context), url = _a.url, init = _a.init;
|
|
168
|
+
return [4 /*yield*/, this.fetchApi(url, init)];
|
|
169
|
+
case 1:
|
|
170
|
+
response = _b.sent();
|
|
171
|
+
if (response.status >= 200 && response.status < 300) {
|
|
172
|
+
return [2 /*return*/, response];
|
|
173
|
+
}
|
|
174
|
+
throw response;
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
});
|
|
178
|
+
};
|
|
179
|
+
BaseAPI.prototype.createFetchParams = function (context) {
|
|
180
|
+
var url = this.configuration.basePath + context.path;
|
|
181
|
+
if (context.query !== undefined && Object.keys(context.query).length !== 0) {
|
|
182
|
+
// only add the querystring to the URL if there are query parameters.
|
|
183
|
+
// this is done to avoid urls ending with a "?" character which buggy webservers
|
|
184
|
+
// do not handle correctly sometimes.
|
|
185
|
+
url += '?' + this.configuration.queryParamsStringify(context.query);
|
|
186
|
+
}
|
|
187
|
+
var body = (context.body instanceof FormData || context.body instanceof URLSearchParams || isBlob(context.body))
|
|
188
|
+
? context.body
|
|
189
|
+
: JSON.stringify(context.body);
|
|
190
|
+
var headers = Object.assign({}, this.configuration.headers, context.headers);
|
|
191
|
+
Object.keys(headers).forEach(function (key) { return headers[key] === undefined ? delete headers[key] : {}; });
|
|
192
|
+
var init = {
|
|
193
|
+
method: context.method,
|
|
194
|
+
headers: headers,
|
|
195
|
+
body: body,
|
|
196
|
+
credentials: this.configuration.credentials,
|
|
197
|
+
referrerPolicy: this.configuration.referrerPolicy,
|
|
198
|
+
};
|
|
199
|
+
return { url: url, init: init };
|
|
200
|
+
};
|
|
201
|
+
/**
|
|
202
|
+
* Create a shallow clone of `this` by constructing a new instance
|
|
203
|
+
* and then shallow cloning data members.
|
|
204
|
+
*/
|
|
205
|
+
BaseAPI.prototype.clone = function () {
|
|
206
|
+
var constructor = this.constructor;
|
|
207
|
+
var next = new constructor(this.configuration);
|
|
208
|
+
next.middleware = this.middleware.slice();
|
|
209
|
+
return next;
|
|
210
|
+
};
|
|
211
|
+
return BaseAPI;
|
|
212
|
+
}());
|
|
213
|
+
exports.BaseAPI = BaseAPI;
|
|
214
|
+
;
|
|
215
|
+
var RequiredError = /** @class */ (function (_super) {
|
|
216
|
+
__extends(RequiredError, _super);
|
|
217
|
+
function RequiredError(field, msg) {
|
|
218
|
+
var _this = _super.call(this, msg) || this;
|
|
219
|
+
_this.field = field;
|
|
220
|
+
_this.name = "RequiredError";
|
|
221
|
+
return _this;
|
|
222
|
+
}
|
|
223
|
+
return RequiredError;
|
|
224
|
+
}(Error));
|
|
225
|
+
exports.RequiredError = RequiredError;
|
|
226
|
+
exports.COLLECTION_FORMATS = {
|
|
227
|
+
csv: ",",
|
|
228
|
+
ssv: " ",
|
|
229
|
+
tsv: "\t",
|
|
230
|
+
pipes: "|",
|
|
231
|
+
};
|
|
232
|
+
var Configuration = /** @class */ (function () {
|
|
233
|
+
function Configuration(configuration) {
|
|
234
|
+
if (configuration === void 0) { configuration = {}; }
|
|
235
|
+
this.configuration = configuration;
|
|
236
|
+
}
|
|
237
|
+
Object.defineProperty(Configuration.prototype, "basePath", {
|
|
238
|
+
get: function () {
|
|
239
|
+
return this.configuration.basePath != null ? this.configuration.basePath : exports.BASE_PATH;
|
|
240
|
+
},
|
|
241
|
+
enumerable: false,
|
|
242
|
+
configurable: true
|
|
243
|
+
});
|
|
244
|
+
Object.defineProperty(Configuration.prototype, "fetchApi", {
|
|
245
|
+
get: function () {
|
|
246
|
+
return this.configuration.fetchApi || window.fetch.bind(window);
|
|
247
|
+
},
|
|
248
|
+
enumerable: false,
|
|
249
|
+
configurable: true
|
|
250
|
+
});
|
|
251
|
+
Object.defineProperty(Configuration.prototype, "middleware", {
|
|
252
|
+
get: function () {
|
|
253
|
+
return this.configuration.middleware || [];
|
|
254
|
+
},
|
|
255
|
+
enumerable: false,
|
|
256
|
+
configurable: true
|
|
257
|
+
});
|
|
258
|
+
Object.defineProperty(Configuration.prototype, "queryParamsStringify", {
|
|
259
|
+
get: function () {
|
|
260
|
+
return this.configuration.queryParamsStringify || querystring;
|
|
261
|
+
},
|
|
262
|
+
enumerable: false,
|
|
263
|
+
configurable: true
|
|
264
|
+
});
|
|
265
|
+
Object.defineProperty(Configuration.prototype, "username", {
|
|
266
|
+
get: function () {
|
|
267
|
+
return this.configuration.username;
|
|
268
|
+
},
|
|
269
|
+
enumerable: false,
|
|
270
|
+
configurable: true
|
|
271
|
+
});
|
|
272
|
+
Object.defineProperty(Configuration.prototype, "password", {
|
|
273
|
+
get: function () {
|
|
274
|
+
return this.configuration.password;
|
|
275
|
+
},
|
|
276
|
+
enumerable: false,
|
|
277
|
+
configurable: true
|
|
278
|
+
});
|
|
279
|
+
Object.defineProperty(Configuration.prototype, "apiKey", {
|
|
280
|
+
get: function () {
|
|
281
|
+
var apiKey = this.configuration.apiKey;
|
|
282
|
+
if (apiKey) {
|
|
283
|
+
return typeof apiKey === 'function' ? apiKey : function () { return apiKey; };
|
|
284
|
+
}
|
|
285
|
+
return undefined;
|
|
286
|
+
},
|
|
287
|
+
enumerable: false,
|
|
288
|
+
configurable: true
|
|
289
|
+
});
|
|
290
|
+
Object.defineProperty(Configuration.prototype, "accessToken", {
|
|
291
|
+
get: function () {
|
|
292
|
+
var accessToken = this.configuration.accessToken;
|
|
293
|
+
if (accessToken) {
|
|
294
|
+
return typeof accessToken === 'function' ? accessToken : function () { return accessToken; };
|
|
295
|
+
}
|
|
296
|
+
return undefined;
|
|
297
|
+
},
|
|
298
|
+
enumerable: false,
|
|
299
|
+
configurable: true
|
|
300
|
+
});
|
|
301
|
+
Object.defineProperty(Configuration.prototype, "headers", {
|
|
302
|
+
get: function () {
|
|
303
|
+
return this.configuration.headers;
|
|
304
|
+
},
|
|
305
|
+
enumerable: false,
|
|
306
|
+
configurable: true
|
|
307
|
+
});
|
|
308
|
+
Object.defineProperty(Configuration.prototype, "credentials", {
|
|
309
|
+
get: function () {
|
|
310
|
+
var _a;
|
|
311
|
+
return (_a = this.configuration.credentials) !== null && _a !== void 0 ? _a : "omit";
|
|
312
|
+
},
|
|
313
|
+
enumerable: false,
|
|
314
|
+
configurable: true
|
|
315
|
+
});
|
|
316
|
+
Object.defineProperty(Configuration.prototype, "referrerPolicy", {
|
|
317
|
+
get: function () {
|
|
318
|
+
var _a;
|
|
319
|
+
return (_a = this.configuration.referrerPolicy) !== null && _a !== void 0 ? _a : "origin";
|
|
320
|
+
},
|
|
321
|
+
enumerable: false,
|
|
322
|
+
configurable: true
|
|
323
|
+
});
|
|
324
|
+
return Configuration;
|
|
325
|
+
}());
|
|
326
|
+
exports.Configuration = Configuration;
|
|
327
|
+
function exists(json, key) {
|
|
328
|
+
var value = json[key];
|
|
329
|
+
return value !== null && value !== undefined;
|
|
330
|
+
}
|
|
331
|
+
exports.exists = exists;
|
|
332
|
+
function querystring(params, prefix) {
|
|
333
|
+
if (prefix === void 0) { prefix = ''; }
|
|
334
|
+
return Object.keys(params)
|
|
335
|
+
.map(function (key) {
|
|
336
|
+
var fullKey = prefix + (prefix.length ? "[".concat(key, "]") : key);
|
|
337
|
+
var value = params[key];
|
|
338
|
+
if (value instanceof Array) {
|
|
339
|
+
var multiValue = value.map(function (singleValue) { return encodeURIComponent(String(singleValue)); })
|
|
340
|
+
.join("&".concat(encodeURIComponent(fullKey), "="));
|
|
341
|
+
return "".concat(encodeURIComponent(fullKey), "=").concat(multiValue);
|
|
342
|
+
}
|
|
343
|
+
if (value instanceof Object) {
|
|
344
|
+
return querystring(value, fullKey);
|
|
345
|
+
}
|
|
346
|
+
return "".concat(encodeURIComponent(fullKey), "=").concat(encodeURIComponent(String(value)));
|
|
347
|
+
})
|
|
348
|
+
.filter(function (part) { return part.length > 0; })
|
|
349
|
+
.join('&');
|
|
350
|
+
}
|
|
351
|
+
exports.querystring = querystring;
|
|
352
|
+
function mapValues(data, fn) {
|
|
353
|
+
return Object.keys(data).reduce(function (acc, key) {
|
|
354
|
+
var _a;
|
|
355
|
+
return (__assign(__assign({}, acc), (_a = {}, _a[key] = fn(data[key]), _a)));
|
|
356
|
+
}, {});
|
|
357
|
+
}
|
|
358
|
+
exports.mapValues = mapValues;
|
|
359
|
+
function canConsumeForm(consumes) {
|
|
360
|
+
for (var _i = 0, consumes_1 = consumes; _i < consumes_1.length; _i++) {
|
|
361
|
+
var consume = consumes_1[_i];
|
|
362
|
+
if ('multipart/form-data' === consume.contentType) {
|
|
363
|
+
return true;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
return false;
|
|
367
|
+
}
|
|
368
|
+
exports.canConsumeForm = canConsumeForm;
|
|
369
|
+
function toDateISOString(date) {
|
|
370
|
+
if (date === undefined) {
|
|
371
|
+
return undefined;
|
|
372
|
+
}
|
|
373
|
+
if (date === null) {
|
|
374
|
+
return null;
|
|
375
|
+
}
|
|
376
|
+
return date.toLocaleDateString('ja-JP', {
|
|
377
|
+
year: 'numeric',
|
|
378
|
+
month: '2-digit',
|
|
379
|
+
day: '2-digit'
|
|
380
|
+
}).replace(/\//gi, '-');
|
|
381
|
+
}
|
|
382
|
+
exports.toDateISOString = toDateISOString;
|
|
383
|
+
var JSONApiResponse = /** @class */ (function () {
|
|
384
|
+
function JSONApiResponse(raw, transformer) {
|
|
385
|
+
if (transformer === void 0) { transformer = function (jsonValue) { return jsonValue; }; }
|
|
386
|
+
this.raw = raw;
|
|
387
|
+
this.transformer = transformer;
|
|
388
|
+
}
|
|
389
|
+
JSONApiResponse.prototype.value = function () {
|
|
390
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
391
|
+
var _a;
|
|
392
|
+
return __generator(this, function (_b) {
|
|
393
|
+
switch (_b.label) {
|
|
394
|
+
case 0:
|
|
395
|
+
_a = this.transformer;
|
|
396
|
+
return [4 /*yield*/, this.raw.json()];
|
|
397
|
+
case 1: return [2 /*return*/, _a.apply(this, [_b.sent()])];
|
|
398
|
+
}
|
|
399
|
+
});
|
|
400
|
+
});
|
|
401
|
+
};
|
|
402
|
+
return JSONApiResponse;
|
|
403
|
+
}());
|
|
404
|
+
exports.JSONApiResponse = JSONApiResponse;
|
|
405
|
+
var VoidApiResponse = /** @class */ (function () {
|
|
406
|
+
function VoidApiResponse(raw) {
|
|
407
|
+
this.raw = raw;
|
|
408
|
+
}
|
|
409
|
+
VoidApiResponse.prototype.value = function () {
|
|
410
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
411
|
+
return __generator(this, function (_a) {
|
|
412
|
+
return [2 /*return*/, undefined];
|
|
413
|
+
});
|
|
414
|
+
});
|
|
415
|
+
};
|
|
416
|
+
return VoidApiResponse;
|
|
417
|
+
}());
|
|
418
|
+
exports.VoidApiResponse = VoidApiResponse;
|
|
419
|
+
function instanceOfBlobWithMeta(object) {
|
|
420
|
+
return 'filename' in object && 'blob' in object;
|
|
421
|
+
}
|
|
422
|
+
exports.instanceOfBlobWithMeta = instanceOfBlobWithMeta;
|
|
423
|
+
var BlobWithMetaApiResponse = /** @class */ (function () {
|
|
424
|
+
function BlobWithMetaApiResponse(raw) {
|
|
425
|
+
this.raw = raw;
|
|
426
|
+
}
|
|
427
|
+
BlobWithMetaApiResponse.prototype.value = function () {
|
|
428
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
429
|
+
var _a;
|
|
430
|
+
return __generator(this, function (_b) {
|
|
431
|
+
switch (_b.label) {
|
|
432
|
+
case 0:
|
|
433
|
+
_a = {};
|
|
434
|
+
return [4 /*yield*/, this.raw.blob()];
|
|
435
|
+
case 1: return [2 /*return*/, (_a.blob = _b.sent(),
|
|
436
|
+
_a.filename = this.extractFilename(this.raw.headers),
|
|
437
|
+
_a)];
|
|
438
|
+
}
|
|
439
|
+
});
|
|
440
|
+
});
|
|
441
|
+
};
|
|
442
|
+
;
|
|
443
|
+
BlobWithMetaApiResponse.prototype.extractFilename = function (headers) {
|
|
444
|
+
var headerName = 'Content-Disposition';
|
|
445
|
+
if (headers.has(headerName)) {
|
|
446
|
+
var headerValue = headers.get(headerName);
|
|
447
|
+
var filenameRegex = /filename\*?=['"]?(?:UTF-\d['"]*)?([^;\r\n"']*)['"]?;?/;
|
|
448
|
+
var matches = filenameRegex.exec(headerValue);
|
|
449
|
+
if (matches != null && matches[1]) {
|
|
450
|
+
return matches[1];
|
|
451
|
+
}
|
|
452
|
+
else {
|
|
453
|
+
return undefined;
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
else {
|
|
457
|
+
return undefined;
|
|
458
|
+
}
|
|
459
|
+
};
|
|
460
|
+
return BlobWithMetaApiResponse;
|
|
461
|
+
}());
|
|
462
|
+
exports.BlobWithMetaApiResponse = BlobWithMetaApiResponse;
|
|
463
|
+
var TextApiResponse = /** @class */ (function () {
|
|
464
|
+
function TextApiResponse(raw) {
|
|
465
|
+
this.raw = raw;
|
|
466
|
+
}
|
|
467
|
+
TextApiResponse.prototype.value = function () {
|
|
468
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
469
|
+
return __generator(this, function (_a) {
|
|
470
|
+
switch (_a.label) {
|
|
471
|
+
case 0: return [4 /*yield*/, this.raw.text()];
|
|
472
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
473
|
+
}
|
|
474
|
+
});
|
|
475
|
+
});
|
|
476
|
+
};
|
|
477
|
+
;
|
|
478
|
+
return TextApiResponse;
|
|
479
|
+
}());
|
|
480
|
+
exports.TextApiResponse = TextApiResponse;
|
|
@@ -10,7 +10,10 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import { BaseAPI, ApiResponse, BlobWithMeta } from '../runtime';
|
|
13
|
-
import { NotificationTypeAttachment, NotificationTypeId, PaginatedNotificationTypes } from '../models';
|
|
13
|
+
import { NotificationType, NotificationTypeAttachment, NotificationTypeId, PaginatedNotificationTypes } from '../models';
|
|
14
|
+
export interface GetNotificationTypeRequest {
|
|
15
|
+
notificationTypeId: NotificationTypeId;
|
|
16
|
+
}
|
|
14
17
|
export interface GetNotificationTypeAttachmentRequest {
|
|
15
18
|
notificationTypeId: NotificationTypeId;
|
|
16
19
|
attachmentId: number;
|
|
@@ -18,7 +21,7 @@ export interface GetNotificationTypeAttachmentRequest {
|
|
|
18
21
|
export interface GetNotificationTypesRequest {
|
|
19
22
|
idEq?: Array<NotificationTypeId>;
|
|
20
23
|
eEq?: boolean;
|
|
21
|
-
orderBy?: GetNotificationTypesOrderByEnum
|
|
24
|
+
orderBy?: Array<GetNotificationTypesOrderByEnum>;
|
|
22
25
|
p?: number;
|
|
23
26
|
pp?: number;
|
|
24
27
|
}
|
|
@@ -26,6 +29,14 @@ export interface GetNotificationTypesRequest {
|
|
|
26
29
|
* no description
|
|
27
30
|
*/
|
|
28
31
|
export declare class SearchNotificationTypeApi extends BaseAPI {
|
|
32
|
+
/**
|
|
33
|
+
* Get one notification type
|
|
34
|
+
*/
|
|
35
|
+
getNotificationTypeRaw(requestParameters: GetNotificationTypeRequest): Promise<ApiResponse<NotificationType | BlobWithMeta>>;
|
|
36
|
+
/**
|
|
37
|
+
* Get one notification type
|
|
38
|
+
*/
|
|
39
|
+
getNotificationType(requestParameters: GetNotificationTypeRequest): Promise<NotificationType | BlobWithMeta>;
|
|
29
40
|
/**
|
|
30
41
|
* Get an attachment
|
|
31
42
|
*/
|
|
@@ -75,12 +75,85 @@ var SearchNotificationTypeApi = /** @class */ (function (_super) {
|
|
|
75
75
|
function SearchNotificationTypeApi() {
|
|
76
76
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
77
77
|
}
|
|
78
|
+
/**
|
|
79
|
+
* Get one notification type
|
|
80
|
+
*/
|
|
81
|
+
SearchNotificationTypeApi.prototype.getNotificationTypeRaw = function (requestParameters) {
|
|
82
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
83
|
+
var queryParameters, headerParameters, token, tokenString, response, contentType, response_1;
|
|
84
|
+
return __generator(this, function (_a) {
|
|
85
|
+
switch (_a.label) {
|
|
86
|
+
case 0:
|
|
87
|
+
if (requestParameters.notificationTypeId === null || requestParameters.notificationTypeId === undefined) {
|
|
88
|
+
throw new runtime_1.RequiredError('notificationTypeId', 'Required parameter requestParameters.notificationTypeId was null or undefined when calling getNotificationType.');
|
|
89
|
+
}
|
|
90
|
+
queryParameters = {};
|
|
91
|
+
headerParameters = {};
|
|
92
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
93
|
+
headerParameters["x-api-key"] = this.configuration.apiKey("x-api-key"); // apiKeyAuth authentication
|
|
94
|
+
}
|
|
95
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
96
|
+
token = this.configuration.accessToken;
|
|
97
|
+
tokenString = typeof token === 'function' ? token("bearerAuth", []) : token;
|
|
98
|
+
if (tokenString) {
|
|
99
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
_a.label = 1;
|
|
103
|
+
case 1:
|
|
104
|
+
_a.trys.push([1, 3, , 4]);
|
|
105
|
+
return [4 /*yield*/, this.request({
|
|
106
|
+
path: "/notifications/types/{notificationTypeId}".replace("{".concat("notificationTypeId", "}"), encodeURIComponent(String(requestParameters.notificationTypeId))),
|
|
107
|
+
method: 'GET',
|
|
108
|
+
headers: headerParameters,
|
|
109
|
+
query: queryParameters,
|
|
110
|
+
})];
|
|
111
|
+
case 2:
|
|
112
|
+
response = _a.sent();
|
|
113
|
+
contentType = response.headers.get("content-type");
|
|
114
|
+
if (contentType && contentType.indexOf("application/json") !== -1) {
|
|
115
|
+
return [2 /*return*/, new runtime_1.JSONApiResponse(response, function (jsonValue) { return (0, models_1.NotificationTypeFromJSON)(jsonValue); })];
|
|
116
|
+
}
|
|
117
|
+
else if (contentType && contentType.indexOf("text/plain") !== -1) {
|
|
118
|
+
return [2 /*return*/, new runtime_1.TextApiResponse(response)];
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
// TODO : Better handling of others application types
|
|
122
|
+
return [2 /*return*/, new runtime_1.BlobWithMetaApiResponse(response)];
|
|
123
|
+
}
|
|
124
|
+
return [3 /*break*/, 4];
|
|
125
|
+
case 3:
|
|
126
|
+
response_1 = _a.sent();
|
|
127
|
+
console.debug(response_1);
|
|
128
|
+
throw response_1;
|
|
129
|
+
case 4: return [2 /*return*/];
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
});
|
|
133
|
+
};
|
|
134
|
+
/**
|
|
135
|
+
* Get one notification type
|
|
136
|
+
*/
|
|
137
|
+
SearchNotificationTypeApi.prototype.getNotificationType = function (requestParameters) {
|
|
138
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
139
|
+
var response;
|
|
140
|
+
return __generator(this, function (_a) {
|
|
141
|
+
switch (_a.label) {
|
|
142
|
+
case 0: return [4 /*yield*/, this.getNotificationTypeRaw(requestParameters)];
|
|
143
|
+
case 1:
|
|
144
|
+
response = _a.sent();
|
|
145
|
+
return [4 /*yield*/, response.value()];
|
|
146
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
});
|
|
150
|
+
};
|
|
78
151
|
/**
|
|
79
152
|
* Get an attachment
|
|
80
153
|
*/
|
|
81
154
|
SearchNotificationTypeApi.prototype.getNotificationTypeAttachmentRaw = function (requestParameters) {
|
|
82
155
|
return __awaiter(this, void 0, void 0, function () {
|
|
83
|
-
var queryParameters, headerParameters, token, tokenString, response, contentType,
|
|
156
|
+
var queryParameters, headerParameters, token, tokenString, response, contentType, response_2;
|
|
84
157
|
return __generator(this, function (_a) {
|
|
85
158
|
switch (_a.label) {
|
|
86
159
|
case 0:
|
|
@@ -126,9 +199,9 @@ var SearchNotificationTypeApi = /** @class */ (function (_super) {
|
|
|
126
199
|
}
|
|
127
200
|
return [3 /*break*/, 4];
|
|
128
201
|
case 3:
|
|
129
|
-
|
|
130
|
-
console.debug(
|
|
131
|
-
throw
|
|
202
|
+
response_2 = _a.sent();
|
|
203
|
+
console.debug(response_2);
|
|
204
|
+
throw response_2;
|
|
132
205
|
case 4: return [2 /*return*/];
|
|
133
206
|
}
|
|
134
207
|
});
|
|
@@ -156,7 +229,7 @@ var SearchNotificationTypeApi = /** @class */ (function (_super) {
|
|
|
156
229
|
*/
|
|
157
230
|
SearchNotificationTypeApi.prototype.getNotificationTypesRaw = function (requestParameters) {
|
|
158
231
|
return __awaiter(this, void 0, void 0, function () {
|
|
159
|
-
var queryParameters, headerParameters, token, tokenString, response, contentType,
|
|
232
|
+
var queryParameters, headerParameters, token, tokenString, response, contentType, response_3;
|
|
160
233
|
return __generator(this, function (_a) {
|
|
161
234
|
switch (_a.label) {
|
|
162
235
|
case 0:
|
|
@@ -167,7 +240,7 @@ var SearchNotificationTypeApi = /** @class */ (function (_super) {
|
|
|
167
240
|
if (requestParameters.eEq !== undefined) {
|
|
168
241
|
queryParameters['e[eq]'] = requestParameters.eEq;
|
|
169
242
|
}
|
|
170
|
-
if (requestParameters.orderBy
|
|
243
|
+
if (requestParameters.orderBy) {
|
|
171
244
|
queryParameters['orderBy'] = requestParameters.orderBy;
|
|
172
245
|
}
|
|
173
246
|
if (requestParameters.p !== undefined) {
|
|
@@ -211,9 +284,9 @@ var SearchNotificationTypeApi = /** @class */ (function (_super) {
|
|
|
211
284
|
}
|
|
212
285
|
return [3 /*break*/, 4];
|
|
213
286
|
case 3:
|
|
214
|
-
|
|
215
|
-
console.debug(
|
|
216
|
-
throw
|
|
287
|
+
response_3 = _a.sent();
|
|
288
|
+
console.debug(response_3);
|
|
289
|
+
throw response_3;
|
|
217
290
|
case 4: return [2 /*return*/];
|
|
218
291
|
}
|
|
219
292
|
});
|
package/package.json
CHANGED
|
@@ -13,10 +13,12 @@ import { BaseAPI, ApiResponse, BlobWithMeta } from '../runtime';
|
|
|
13
13
|
import { Product, ProductCreationOrUpdateParameters } from '../models';
|
|
14
14
|
export interface CreateProductRequest {
|
|
15
15
|
productCreationOrUpdateParameters: ProductCreationOrUpdateParameters;
|
|
16
|
+
xWithSync?: boolean;
|
|
16
17
|
}
|
|
17
18
|
export interface UpdateProductRequest {
|
|
18
19
|
productId: number;
|
|
19
20
|
productCreationOrUpdateParameters: ProductCreationOrUpdateParameters;
|
|
21
|
+
xWithSync?: boolean;
|
|
20
22
|
}
|
|
21
23
|
/**
|
|
22
24
|
* no description
|