@emilgroup/numbergenerator-sdk-node 1.0.1-beta.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.
Files changed (52) hide show
  1. package/.openapi-generator/FILES +22 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +84 -0
  5. package/api/default-api.ts +124 -0
  6. package/api/numbers-api.ts +768 -0
  7. package/api.ts +33 -0
  8. package/base.ts +328 -0
  9. package/common.ts +199 -0
  10. package/configuration.ts +118 -0
  11. package/dist/api/default-api.d.ts +66 -0
  12. package/dist/api/default-api.js +200 -0
  13. package/dist/api/numbers-api.d.ts +428 -0
  14. package/dist/api/numbers-api.js +729 -0
  15. package/dist/api.d.ts +13 -0
  16. package/dist/api.js +31 -0
  17. package/dist/base.d.ts +88 -0
  18. package/dist/base.js +434 -0
  19. package/dist/common.d.ts +92 -0
  20. package/dist/common.js +277 -0
  21. package/dist/configuration.d.ts +96 -0
  22. package/dist/configuration.js +52 -0
  23. package/dist/index.d.ts +15 -0
  24. package/dist/index.js +36 -0
  25. package/dist/models/create-number-response-class.d.ts +25 -0
  26. package/dist/models/create-number-response-class.js +15 -0
  27. package/dist/models/entity-number-class.d.ts +66 -0
  28. package/dist/models/entity-number-class.js +21 -0
  29. package/dist/models/get-number-response-class.d.ts +25 -0
  30. package/dist/models/get-number-response-class.js +15 -0
  31. package/dist/models/index.d.ts +7 -0
  32. package/dist/models/index.js +23 -0
  33. package/dist/models/inline-response200.d.ts +54 -0
  34. package/dist/models/inline-response200.js +15 -0
  35. package/dist/models/inline-response503.d.ts +54 -0
  36. package/dist/models/inline-response503.js +15 -0
  37. package/dist/models/list-numbers-response-class.d.ts +31 -0
  38. package/dist/models/list-numbers-response-class.js +15 -0
  39. package/dist/models/update-number-response-class.d.ts +25 -0
  40. package/dist/models/update-number-response-class.js +15 -0
  41. package/git_push.sh +57 -0
  42. package/index.ts +19 -0
  43. package/models/create-number-response-class.ts +31 -0
  44. package/models/entity-number-class.ts +75 -0
  45. package/models/get-number-response-class.ts +31 -0
  46. package/models/index.ts +7 -0
  47. package/models/inline-response200.ts +48 -0
  48. package/models/inline-response503.ts +48 -0
  49. package/models/list-numbers-response-class.ts +37 -0
  50. package/models/update-number-response-class.ts +31 -0
  51. package/package.json +29 -0
  52. package/tsconfig.json +23 -0
@@ -0,0 +1,729 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL Number Generator Service
6
+ * The EMIL Number Generator Service API is a robust tool designed to generate unique and structured entity numbers like policies, accounts, invoices, and other entities. This API streamlines the process of creating distinct identifiers for various business objects.
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ * Contact: kontakt@emil.de
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 (g && (g = 0, op[0] && (_ = 0)), _) 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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
78
+ return (mod && mod.__esModule) ? mod : { "default": mod };
79
+ };
80
+ Object.defineProperty(exports, "__esModule", { value: true });
81
+ exports.NumbersApi = exports.NumbersApiFactory = exports.NumbersApiFp = exports.NumbersApiAxiosParamCreator = void 0;
82
+ var axios_1 = __importDefault(require("axios"));
83
+ // Some imports not used depending on template conditions
84
+ // @ts-ignore
85
+ var common_1 = require("../common");
86
+ // @ts-ignore
87
+ var base_1 = require("../base");
88
+ // URLSearchParams not necessarily used
89
+ // @ts-ignore
90
+ var url_1 = require("url");
91
+ var FormData = require('form-data');
92
+ /**
93
+ * NumbersApi - axios parameter creator
94
+ * @export
95
+ */
96
+ var NumbersApiAxiosParamCreator = function (configuration) {
97
+ var _this = this;
98
+ return {
99
+ /**
100
+ * This will create an entity number in the database. Entity number is a way to generate unique numbers for your entities. You can create as many numbers as you want.
101
+ * @summary Create the number
102
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
103
+ * @param {*} [options] Override http request option.
104
+ * @throws {RequiredError}
105
+ */
106
+ createNumber: function (authorization, options) {
107
+ if (options === void 0) { options = {}; }
108
+ return __awaiter(_this, void 0, void 0, function () {
109
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
110
+ return __generator(this, function (_a) {
111
+ switch (_a.label) {
112
+ case 0:
113
+ localVarPath = "/numbergenerator/v1/numbers";
114
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
115
+ if (configuration) {
116
+ baseOptions = configuration.baseOptions;
117
+ baseAccessToken = configuration.accessToken;
118
+ }
119
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
120
+ localVarHeaderParameter = {};
121
+ localVarQueryParameter = {};
122
+ // authentication bearer required
123
+ // http bearer authentication required
124
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
125
+ case 1:
126
+ // authentication bearer required
127
+ // http bearer authentication required
128
+ _a.sent();
129
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
130
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
131
+ }
132
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
133
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
134
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
135
+ return [2 /*return*/, {
136
+ url: (0, common_1.toPathString)(localVarUrlObj),
137
+ options: localVarRequestOptions,
138
+ }];
139
+ }
140
+ });
141
+ });
142
+ },
143
+ /**
144
+ * Retrieves the details of the number that was previously created. Supply the unique number code that was returned when you created it and Emil Api will return the corresponding number information.
145
+ * @summary Retrieve the number
146
+ * @param {string} code Unique identifier for the object.
147
+ * @param {string} expand
148
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
149
+ * @param {*} [options] Override http request option.
150
+ * @throws {RequiredError}
151
+ */
152
+ getNumber: function (code, expand, authorization, options) {
153
+ if (options === void 0) { options = {}; }
154
+ return __awaiter(_this, void 0, void 0, function () {
155
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
156
+ return __generator(this, function (_a) {
157
+ switch (_a.label) {
158
+ case 0:
159
+ // verify required parameter 'code' is not null or undefined
160
+ (0, common_1.assertParamExists)('getNumber', 'code', code);
161
+ // verify required parameter 'expand' is not null or undefined
162
+ (0, common_1.assertParamExists)('getNumber', 'expand', expand);
163
+ localVarPath = "/numbergenerator/v1/numbers/{code}"
164
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
165
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
166
+ if (configuration) {
167
+ baseOptions = configuration.baseOptions;
168
+ baseAccessToken = configuration.accessToken;
169
+ }
170
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
171
+ localVarHeaderParameter = {};
172
+ localVarQueryParameter = {};
173
+ // authentication bearer required
174
+ // http bearer authentication required
175
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
176
+ case 1:
177
+ // authentication bearer required
178
+ // http bearer authentication required
179
+ _a.sent();
180
+ if (expand !== undefined) {
181
+ localVarQueryParameter['expand'] = expand;
182
+ }
183
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
184
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
185
+ }
186
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
187
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
188
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
189
+ return [2 /*return*/, {
190
+ url: (0, common_1.toPathString)(localVarUrlObj),
191
+ options: localVarRequestOptions,
192
+ }];
193
+ }
194
+ });
195
+ });
196
+ },
197
+ /**
198
+ * Returns a list of Numbers you have previously created. The Numbers are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
199
+ * @summary List Numbers
200
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
201
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
202
+ * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
203
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
204
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
205
+ * @param {string} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
206
+ * @param {string} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
207
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
208
+ * @param {*} [options] Override http request option.
209
+ * @throws {RequiredError}
210
+ */
211
+ listNumbers: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
212
+ if (options === void 0) { options = {}; }
213
+ return __awaiter(_this, void 0, void 0, function () {
214
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
215
+ return __generator(this, function (_a) {
216
+ switch (_a.label) {
217
+ case 0:
218
+ localVarPath = "/numbergenerator/v1/numbers";
219
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
220
+ if (configuration) {
221
+ baseOptions = configuration.baseOptions;
222
+ baseAccessToken = configuration.accessToken;
223
+ }
224
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
225
+ localVarHeaderParameter = {};
226
+ localVarQueryParameter = {};
227
+ // authentication bearer required
228
+ // http bearer authentication required
229
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
230
+ case 1:
231
+ // authentication bearer required
232
+ // http bearer authentication required
233
+ _a.sent();
234
+ if (pageSize !== undefined) {
235
+ localVarQueryParameter['pageSize'] = pageSize;
236
+ }
237
+ if (pageToken !== undefined) {
238
+ localVarQueryParameter['pageToken'] = pageToken;
239
+ }
240
+ if (filter !== undefined) {
241
+ localVarQueryParameter['filter'] = filter;
242
+ }
243
+ if (search !== undefined) {
244
+ localVarQueryParameter['search'] = search;
245
+ }
246
+ if (order !== undefined) {
247
+ localVarQueryParameter['order'] = order;
248
+ }
249
+ if (expand !== undefined) {
250
+ localVarQueryParameter['expand'] = expand;
251
+ }
252
+ if (filters !== undefined) {
253
+ localVarQueryParameter['filters'] = filters;
254
+ }
255
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
256
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
257
+ }
258
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
259
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
260
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
261
+ return [2 /*return*/, {
262
+ url: (0, common_1.toPathString)(localVarUrlObj),
263
+ options: localVarRequestOptions,
264
+ }];
265
+ }
266
+ });
267
+ });
268
+ },
269
+ /**
270
+ * The endpoint performs a lookup based on an entity number to retrieve a unique string.
271
+ * @summary Lookup entity number
272
+ * @param {object} body
273
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
274
+ * @param {*} [options] Override http request option.
275
+ * @throws {RequiredError}
276
+ */
277
+ lookupNumber: function (body, authorization, options) {
278
+ if (options === void 0) { options = {}; }
279
+ return __awaiter(_this, void 0, void 0, function () {
280
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
281
+ return __generator(this, function (_a) {
282
+ switch (_a.label) {
283
+ case 0:
284
+ // verify required parameter 'body' is not null or undefined
285
+ (0, common_1.assertParamExists)('lookupNumber', 'body', body);
286
+ localVarPath = "/numbergenerator/v1/numbers/lookup";
287
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
288
+ if (configuration) {
289
+ baseOptions = configuration.baseOptions;
290
+ baseAccessToken = configuration.accessToken;
291
+ }
292
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
293
+ localVarHeaderParameter = {};
294
+ localVarQueryParameter = {};
295
+ // authentication bearer required
296
+ // http bearer authentication required
297
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
298
+ case 1:
299
+ // authentication bearer required
300
+ // http bearer authentication required
301
+ _a.sent();
302
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
303
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
304
+ }
305
+ localVarHeaderParameter['Content-Type'] = 'application/json';
306
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
307
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
308
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
309
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
310
+ return [2 /*return*/, {
311
+ url: (0, common_1.toPathString)(localVarUrlObj),
312
+ options: localVarRequestOptions,
313
+ }];
314
+ }
315
+ });
316
+ });
317
+ },
318
+ /**
319
+ * This endpoint facilitates the resetting of an entity number useful for sequence type numbers.
320
+ * @summary Reset entity number
321
+ * @param {object} body
322
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
323
+ * @param {*} [options] Override http request option.
324
+ * @throws {RequiredError}
325
+ */
326
+ resetNumber: function (body, authorization, options) {
327
+ if (options === void 0) { options = {}; }
328
+ return __awaiter(_this, void 0, void 0, function () {
329
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
330
+ return __generator(this, function (_a) {
331
+ switch (_a.label) {
332
+ case 0:
333
+ // verify required parameter 'body' is not null or undefined
334
+ (0, common_1.assertParamExists)('resetNumber', 'body', body);
335
+ localVarPath = "/numbergenerator/v1/numbers/reset";
336
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
337
+ if (configuration) {
338
+ baseOptions = configuration.baseOptions;
339
+ baseAccessToken = configuration.accessToken;
340
+ }
341
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
342
+ localVarHeaderParameter = {};
343
+ localVarQueryParameter = {};
344
+ // authentication bearer required
345
+ // http bearer authentication required
346
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
347
+ case 1:
348
+ // authentication bearer required
349
+ // http bearer authentication required
350
+ _a.sent();
351
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
352
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
353
+ }
354
+ localVarHeaderParameter['Content-Type'] = 'application/json';
355
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
356
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
357
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
358
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
359
+ return [2 /*return*/, {
360
+ url: (0, common_1.toPathString)(localVarUrlObj),
361
+ options: localVarRequestOptions,
362
+ }];
363
+ }
364
+ });
365
+ });
366
+ },
367
+ /**
368
+ * This will update an entity number in the database.
369
+ * @summary Update the number
370
+ * @param {string} code Unique identifier for the object.
371
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
372
+ * @param {*} [options] Override http request option.
373
+ * @throws {RequiredError}
374
+ */
375
+ updateNumber: function (code, authorization, options) {
376
+ if (options === void 0) { options = {}; }
377
+ return __awaiter(_this, void 0, void 0, function () {
378
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
379
+ return __generator(this, function (_a) {
380
+ switch (_a.label) {
381
+ case 0:
382
+ // verify required parameter 'code' is not null or undefined
383
+ (0, common_1.assertParamExists)('updateNumber', 'code', code);
384
+ localVarPath = "/numbergenerator/v1/numbers/{code}"
385
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
386
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
387
+ if (configuration) {
388
+ baseOptions = configuration.baseOptions;
389
+ baseAccessToken = configuration.accessToken;
390
+ }
391
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
392
+ localVarHeaderParameter = {};
393
+ localVarQueryParameter = {};
394
+ // authentication bearer required
395
+ // http bearer authentication required
396
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
397
+ case 1:
398
+ // authentication bearer required
399
+ // http bearer authentication required
400
+ _a.sent();
401
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
402
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
403
+ }
404
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
405
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
406
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
407
+ return [2 /*return*/, {
408
+ url: (0, common_1.toPathString)(localVarUrlObj),
409
+ options: localVarRequestOptions,
410
+ }];
411
+ }
412
+ });
413
+ });
414
+ },
415
+ };
416
+ };
417
+ exports.NumbersApiAxiosParamCreator = NumbersApiAxiosParamCreator;
418
+ /**
419
+ * NumbersApi - functional programming interface
420
+ * @export
421
+ */
422
+ var NumbersApiFp = function (configuration) {
423
+ var localVarAxiosParamCreator = (0, exports.NumbersApiAxiosParamCreator)(configuration);
424
+ return {
425
+ /**
426
+ * This will create an entity number in the database. Entity number is a way to generate unique numbers for your entities. You can create as many numbers as you want.
427
+ * @summary Create the number
428
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
429
+ * @param {*} [options] Override http request option.
430
+ * @throws {RequiredError}
431
+ */
432
+ createNumber: function (authorization, options) {
433
+ return __awaiter(this, void 0, void 0, function () {
434
+ var localVarAxiosArgs;
435
+ return __generator(this, function (_a) {
436
+ switch (_a.label) {
437
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createNumber(authorization, options)];
438
+ case 1:
439
+ localVarAxiosArgs = _a.sent();
440
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
441
+ }
442
+ });
443
+ });
444
+ },
445
+ /**
446
+ * Retrieves the details of the number that was previously created. Supply the unique number code that was returned when you created it and Emil Api will return the corresponding number information.
447
+ * @summary Retrieve the number
448
+ * @param {string} code Unique identifier for the object.
449
+ * @param {string} expand
450
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
451
+ * @param {*} [options] Override http request option.
452
+ * @throws {RequiredError}
453
+ */
454
+ getNumber: function (code, expand, authorization, options) {
455
+ return __awaiter(this, void 0, void 0, function () {
456
+ var localVarAxiosArgs;
457
+ return __generator(this, function (_a) {
458
+ switch (_a.label) {
459
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getNumber(code, expand, authorization, options)];
460
+ case 1:
461
+ localVarAxiosArgs = _a.sent();
462
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
463
+ }
464
+ });
465
+ });
466
+ },
467
+ /**
468
+ * Returns a list of Numbers you have previously created. The Numbers are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
469
+ * @summary List Numbers
470
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
471
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
472
+ * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
473
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
474
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
475
+ * @param {string} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
476
+ * @param {string} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
477
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
478
+ * @param {*} [options] Override http request option.
479
+ * @throws {RequiredError}
480
+ */
481
+ listNumbers: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
482
+ return __awaiter(this, void 0, void 0, function () {
483
+ var localVarAxiosArgs;
484
+ return __generator(this, function (_a) {
485
+ switch (_a.label) {
486
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listNumbers(authorization, pageSize, pageToken, filter, search, order, expand, filters, options)];
487
+ case 1:
488
+ localVarAxiosArgs = _a.sent();
489
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
490
+ }
491
+ });
492
+ });
493
+ },
494
+ /**
495
+ * The endpoint performs a lookup based on an entity number to retrieve a unique string.
496
+ * @summary Lookup entity number
497
+ * @param {object} body
498
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
499
+ * @param {*} [options] Override http request option.
500
+ * @throws {RequiredError}
501
+ */
502
+ lookupNumber: function (body, authorization, options) {
503
+ return __awaiter(this, void 0, void 0, function () {
504
+ var localVarAxiosArgs;
505
+ return __generator(this, function (_a) {
506
+ switch (_a.label) {
507
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.lookupNumber(body, authorization, options)];
508
+ case 1:
509
+ localVarAxiosArgs = _a.sent();
510
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
511
+ }
512
+ });
513
+ });
514
+ },
515
+ /**
516
+ * This endpoint facilitates the resetting of an entity number useful for sequence type numbers.
517
+ * @summary Reset entity number
518
+ * @param {object} body
519
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
520
+ * @param {*} [options] Override http request option.
521
+ * @throws {RequiredError}
522
+ */
523
+ resetNumber: function (body, authorization, options) {
524
+ return __awaiter(this, void 0, void 0, function () {
525
+ var localVarAxiosArgs;
526
+ return __generator(this, function (_a) {
527
+ switch (_a.label) {
528
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.resetNumber(body, authorization, options)];
529
+ case 1:
530
+ localVarAxiosArgs = _a.sent();
531
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
532
+ }
533
+ });
534
+ });
535
+ },
536
+ /**
537
+ * This will update an entity number in the database.
538
+ * @summary Update the number
539
+ * @param {string} code Unique identifier for the object.
540
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
541
+ * @param {*} [options] Override http request option.
542
+ * @throws {RequiredError}
543
+ */
544
+ updateNumber: function (code, authorization, options) {
545
+ return __awaiter(this, void 0, void 0, function () {
546
+ var localVarAxiosArgs;
547
+ return __generator(this, function (_a) {
548
+ switch (_a.label) {
549
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateNumber(code, authorization, options)];
550
+ case 1:
551
+ localVarAxiosArgs = _a.sent();
552
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
553
+ }
554
+ });
555
+ });
556
+ },
557
+ };
558
+ };
559
+ exports.NumbersApiFp = NumbersApiFp;
560
+ /**
561
+ * NumbersApi - factory interface
562
+ * @export
563
+ */
564
+ var NumbersApiFactory = function (configuration, basePath, axios) {
565
+ var localVarFp = (0, exports.NumbersApiFp)(configuration);
566
+ return {
567
+ /**
568
+ * This will create an entity number in the database. Entity number is a way to generate unique numbers for your entities. You can create as many numbers as you want.
569
+ * @summary Create the number
570
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
571
+ * @param {*} [options] Override http request option.
572
+ * @throws {RequiredError}
573
+ */
574
+ createNumber: function (authorization, options) {
575
+ return localVarFp.createNumber(authorization, options).then(function (request) { return request(axios, basePath); });
576
+ },
577
+ /**
578
+ * Retrieves the details of the number that was previously created. Supply the unique number code that was returned when you created it and Emil Api will return the corresponding number information.
579
+ * @summary Retrieve the number
580
+ * @param {string} code Unique identifier for the object.
581
+ * @param {string} expand
582
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
583
+ * @param {*} [options] Override http request option.
584
+ * @throws {RequiredError}
585
+ */
586
+ getNumber: function (code, expand, authorization, options) {
587
+ return localVarFp.getNumber(code, expand, authorization, options).then(function (request) { return request(axios, basePath); });
588
+ },
589
+ /**
590
+ * Returns a list of Numbers you have previously created. The Numbers are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
591
+ * @summary List Numbers
592
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
593
+ * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
594
+ * @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
595
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
596
+ * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
597
+ * @param {string} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
598
+ * @param {string} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
599
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations. In general, fetching filtered responses conserves bandwidth and reduces response time.
600
+ * @param {*} [options] Override http request option.
601
+ * @throws {RequiredError}
602
+ */
603
+ listNumbers: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
604
+ return localVarFp.listNumbers(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
605
+ },
606
+ /**
607
+ * The endpoint performs a lookup based on an entity number to retrieve a unique string.
608
+ * @summary Lookup entity number
609
+ * @param {object} body
610
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
611
+ * @param {*} [options] Override http request option.
612
+ * @throws {RequiredError}
613
+ */
614
+ lookupNumber: function (body, authorization, options) {
615
+ return localVarFp.lookupNumber(body, authorization, options).then(function (request) { return request(axios, basePath); });
616
+ },
617
+ /**
618
+ * This endpoint facilitates the resetting of an entity number useful for sequence type numbers.
619
+ * @summary Reset entity number
620
+ * @param {object} body
621
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
622
+ * @param {*} [options] Override http request option.
623
+ * @throws {RequiredError}
624
+ */
625
+ resetNumber: function (body, authorization, options) {
626
+ return localVarFp.resetNumber(body, authorization, options).then(function (request) { return request(axios, basePath); });
627
+ },
628
+ /**
629
+ * This will update an entity number in the database.
630
+ * @summary Update the number
631
+ * @param {string} code Unique identifier for the object.
632
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
633
+ * @param {*} [options] Override http request option.
634
+ * @throws {RequiredError}
635
+ */
636
+ updateNumber: function (code, authorization, options) {
637
+ return localVarFp.updateNumber(code, authorization, options).then(function (request) { return request(axios, basePath); });
638
+ },
639
+ };
640
+ };
641
+ exports.NumbersApiFactory = NumbersApiFactory;
642
+ /**
643
+ * NumbersApi - object-oriented interface
644
+ * @export
645
+ * @class NumbersApi
646
+ * @extends {BaseAPI}
647
+ */
648
+ var NumbersApi = /** @class */ (function (_super) {
649
+ __extends(NumbersApi, _super);
650
+ function NumbersApi() {
651
+ return _super !== null && _super.apply(this, arguments) || this;
652
+ }
653
+ /**
654
+ * This will create an entity number in the database. Entity number is a way to generate unique numbers for your entities. You can create as many numbers as you want.
655
+ * @summary Create the number
656
+ * @param {NumbersApiCreateNumberRequest} requestParameters Request parameters.
657
+ * @param {*} [options] Override http request option.
658
+ * @throws {RequiredError}
659
+ * @memberof NumbersApi
660
+ */
661
+ NumbersApi.prototype.createNumber = function (requestParameters, options) {
662
+ var _this = this;
663
+ if (requestParameters === void 0) { requestParameters = {}; }
664
+ return (0, exports.NumbersApiFp)(this.configuration).createNumber(requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
665
+ };
666
+ /**
667
+ * Retrieves the details of the number that was previously created. Supply the unique number code that was returned when you created it and Emil Api will return the corresponding number information.
668
+ * @summary Retrieve the number
669
+ * @param {NumbersApiGetNumberRequest} requestParameters Request parameters.
670
+ * @param {*} [options] Override http request option.
671
+ * @throws {RequiredError}
672
+ * @memberof NumbersApi
673
+ */
674
+ NumbersApi.prototype.getNumber = function (requestParameters, options) {
675
+ var _this = this;
676
+ return (0, exports.NumbersApiFp)(this.configuration).getNumber(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
677
+ };
678
+ /**
679
+ * Returns a list of Numbers you have previously created. The Numbers are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
680
+ * @summary List Numbers
681
+ * @param {NumbersApiListNumbersRequest} requestParameters Request parameters.
682
+ * @param {*} [options] Override http request option.
683
+ * @throws {RequiredError}
684
+ * @memberof NumbersApi
685
+ */
686
+ NumbersApi.prototype.listNumbers = function (requestParameters, options) {
687
+ var _this = this;
688
+ if (requestParameters === void 0) { requestParameters = {}; }
689
+ return (0, exports.NumbersApiFp)(this.configuration).listNumbers(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then(function (request) { return request(_this.axios, _this.basePath); });
690
+ };
691
+ /**
692
+ * The endpoint performs a lookup based on an entity number to retrieve a unique string.
693
+ * @summary Lookup entity number
694
+ * @param {NumbersApiLookupNumberRequest} requestParameters Request parameters.
695
+ * @param {*} [options] Override http request option.
696
+ * @throws {RequiredError}
697
+ * @memberof NumbersApi
698
+ */
699
+ NumbersApi.prototype.lookupNumber = function (requestParameters, options) {
700
+ var _this = this;
701
+ return (0, exports.NumbersApiFp)(this.configuration).lookupNumber(requestParameters.body, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
702
+ };
703
+ /**
704
+ * This endpoint facilitates the resetting of an entity number useful for sequence type numbers.
705
+ * @summary Reset entity number
706
+ * @param {NumbersApiResetNumberRequest} requestParameters Request parameters.
707
+ * @param {*} [options] Override http request option.
708
+ * @throws {RequiredError}
709
+ * @memberof NumbersApi
710
+ */
711
+ NumbersApi.prototype.resetNumber = function (requestParameters, options) {
712
+ var _this = this;
713
+ return (0, exports.NumbersApiFp)(this.configuration).resetNumber(requestParameters.body, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
714
+ };
715
+ /**
716
+ * This will update an entity number in the database.
717
+ * @summary Update the number
718
+ * @param {NumbersApiUpdateNumberRequest} requestParameters Request parameters.
719
+ * @param {*} [options] Override http request option.
720
+ * @throws {RequiredError}
721
+ * @memberof NumbersApi
722
+ */
723
+ NumbersApi.prototype.updateNumber = function (requestParameters, options) {
724
+ var _this = this;
725
+ return (0, exports.NumbersApiFp)(this.configuration).updateNumber(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
726
+ };
727
+ return NumbersApi;
728
+ }(base_1.BaseAPI));
729
+ exports.NumbersApi = NumbersApi;