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