@emilgroup/numbergenerator-sdk-node 1.3.0 → 1.3.1

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