@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,825 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
- /**
4
- * EMIL Number Generator Service
5
- * 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.
6
- *
7
- * The version of the OpenAPI document: 1.0
8
- * Contact: kontakt@emil.de
9
- *
10
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
- * https://openapi-generator.tech
12
- * Do not edit the class manually.
13
- */
14
-
15
-
16
- import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
17
- import { Configuration } from '../configuration';
18
- // Some imports not used depending on template conditions
19
- // @ts-ignore
20
- import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
21
- // @ts-ignore
22
- import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
23
- // @ts-ignore
24
- import { CreateNumberResponseClass } from '../models';
25
- // @ts-ignore
26
- import { GetNumberResponseClass } from '../models';
27
- // @ts-ignore
28
- import { ListNumbersResponseClass } from '../models';
29
- // @ts-ignore
30
- import { LookupNumberRequestDto } from '../models';
31
- // @ts-ignore
32
- import { ResetNumberRequestDto } from '../models';
33
- // @ts-ignore
34
- import { UpdateNumberResponseClass } from '../models';
35
- // URLSearchParams not necessarily used
36
- // @ts-ignore
37
- import { URL, URLSearchParams } from 'url';
38
- const FormData = require('form-data');
39
- /**
40
- * NumbersApi - axios parameter creator
41
- * @export
42
- */
43
- export const NumbersApiAxiosParamCreator = function (configuration?: Configuration) {
44
- return {
45
- /**
46
- * 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.
47
- * @summary Create the number
48
- * @param {string} slug The slug of the number
49
- * @param {string} type The type of number generator. This determines the structure of the config object.
50
- * @param {object} config Configuration object that varies based on the type field
51
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
52
- * @param {*} [options] Override http request option.
53
- * @throws {RequiredError}
54
- */
55
- createNumber: async (slug: string, type: string, config: object, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
56
- // verify required parameter 'slug' is not null or undefined
57
- assertParamExists('createNumber', 'slug', slug)
58
- // verify required parameter 'type' is not null or undefined
59
- assertParamExists('createNumber', 'type', type)
60
- // verify required parameter 'config' is not null or undefined
61
- assertParamExists('createNumber', 'config', config)
62
- const localVarPath = `/numbergenerator/v1/numbers`;
63
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
64
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
65
- let baseOptions;
66
- let baseAccessToken;
67
- if (configuration) {
68
- baseOptions = configuration.baseOptions;
69
- baseAccessToken = configuration.accessToken;
70
- }
71
-
72
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
73
- const localVarHeaderParameter = {} as any;
74
- const localVarQueryParameter = {} as any;
75
- const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
76
-
77
- // authentication bearer required
78
- // http bearer authentication required
79
- await setBearerAuthToObject(localVarHeaderParameter, configuration)
80
-
81
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
82
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
83
- }
84
-
85
-
86
- if (slug !== undefined) {
87
- localVarFormParams.append('slug', slug as any);
88
- }
89
-
90
- if (type !== undefined) {
91
- localVarFormParams.append('type', type as any);
92
- }
93
-
94
- if (config !== undefined) {
95
- localVarFormParams.append('config', new Blob([JSON.stringify(config)], { type: "application/json", }));
96
- }
97
-
98
-
99
- localVarHeaderParameter['Content-Type'] = 'multipart/form-data; boundary=' + localVarFormParams.getBoundary();
100
-
101
-
102
- setSearchParams(localVarUrlObj, localVarQueryParameter);
103
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
104
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
105
- localVarRequestOptions.data = localVarFormParams;
106
-
107
- return {
108
- url: toPathString(localVarUrlObj),
109
- options: localVarRequestOptions,
110
- };
111
- },
112
- /**
113
- * 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.
114
- * @summary Retrieve the number
115
- * @param {string} code Unique identifier for the object.
116
- * @param {string} expand
117
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
118
- * @param {*} [options] Override http request option.
119
- * @throws {RequiredError}
120
- */
121
- getNumber: async (code: string, expand: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
122
- // verify required parameter 'code' is not null or undefined
123
- assertParamExists('getNumber', 'code', code)
124
- // verify required parameter 'expand' is not null or undefined
125
- assertParamExists('getNumber', 'expand', expand)
126
- const localVarPath = `/numbergenerator/v1/numbers/{code}`
127
- .replace(`{${"code"}}`, encodeURIComponent(String(code)));
128
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
129
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
130
- let baseOptions;
131
- let baseAccessToken;
132
- if (configuration) {
133
- baseOptions = configuration.baseOptions;
134
- baseAccessToken = configuration.accessToken;
135
- }
136
-
137
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
138
- const localVarHeaderParameter = {} as any;
139
- const localVarQueryParameter = {} as any;
140
-
141
- // authentication bearer required
142
- // http bearer authentication required
143
- await setBearerAuthToObject(localVarHeaderParameter, configuration)
144
-
145
- if (expand !== undefined) {
146
- localVarQueryParameter['expand'] = expand;
147
- }
148
-
149
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
150
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
151
- }
152
-
153
-
154
-
155
- setSearchParams(localVarUrlObj, localVarQueryParameter);
156
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
157
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
158
-
159
- return {
160
- url: toPathString(localVarUrlObj),
161
- options: localVarRequestOptions,
162
- };
163
- },
164
- /**
165
- * 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.
166
- * @summary List Numbers
167
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
168
- * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
169
- * @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.
170
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
171
- * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
172
- * @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.
173
- * @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.
174
- * @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.
175
- * @param {*} [options] Override http request option.
176
- * @throws {RequiredError}
177
- */
178
- listNumbers: async (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
179
- const localVarPath = `/numbergenerator/v1/numbers`;
180
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
181
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
182
- let baseOptions;
183
- let baseAccessToken;
184
- if (configuration) {
185
- baseOptions = configuration.baseOptions;
186
- baseAccessToken = configuration.accessToken;
187
- }
188
-
189
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
190
- const localVarHeaderParameter = {} as any;
191
- const localVarQueryParameter = {} as any;
192
-
193
- // authentication bearer required
194
- // http bearer authentication required
195
- await setBearerAuthToObject(localVarHeaderParameter, configuration)
196
-
197
- if (pageSize !== undefined) {
198
- localVarQueryParameter['pageSize'] = pageSize;
199
- }
200
-
201
- if (pageToken !== undefined) {
202
- localVarQueryParameter['pageToken'] = pageToken;
203
- }
204
-
205
- if (filter !== undefined) {
206
- localVarQueryParameter['filter'] = filter;
207
- }
208
-
209
- if (search !== undefined) {
210
- localVarQueryParameter['search'] = search;
211
- }
212
-
213
- if (order !== undefined) {
214
- localVarQueryParameter['order'] = order;
215
- }
216
-
217
- if (expand !== undefined) {
218
- localVarQueryParameter['expand'] = expand;
219
- }
220
-
221
- if (filters !== undefined) {
222
- localVarQueryParameter['filters'] = filters;
223
- }
224
-
225
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
226
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
227
- }
228
-
229
-
230
-
231
- setSearchParams(localVarUrlObj, localVarQueryParameter);
232
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
233
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
234
-
235
- return {
236
- url: toPathString(localVarUrlObj),
237
- options: localVarRequestOptions,
238
- };
239
- },
240
- /**
241
- * The endpoint performs a lookup based on an entity number to retrieve a unique string.
242
- * @summary Lookup entity number
243
- * @param {LookupNumberRequestDto} lookupNumberRequestDto
244
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
245
- * @param {*} [options] Override http request option.
246
- * @throws {RequiredError}
247
- */
248
- lookupNumber: async (lookupNumberRequestDto: LookupNumberRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
249
- // verify required parameter 'lookupNumberRequestDto' is not null or undefined
250
- assertParamExists('lookupNumber', 'lookupNumberRequestDto', lookupNumberRequestDto)
251
- const localVarPath = `/numbergenerator/v1/numbers/lookup`;
252
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
253
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
254
- let baseOptions;
255
- let baseAccessToken;
256
- if (configuration) {
257
- baseOptions = configuration.baseOptions;
258
- baseAccessToken = configuration.accessToken;
259
- }
260
-
261
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
262
- const localVarHeaderParameter = {} as any;
263
- const localVarQueryParameter = {} as any;
264
-
265
- // authentication bearer required
266
- // http bearer authentication required
267
- await setBearerAuthToObject(localVarHeaderParameter, configuration)
268
-
269
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
270
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
271
- }
272
-
273
-
274
-
275
- localVarHeaderParameter['Content-Type'] = 'application/json';
276
-
277
- setSearchParams(localVarUrlObj, localVarQueryParameter);
278
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
279
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
280
- localVarRequestOptions.data = serializeDataIfNeeded(lookupNumberRequestDto, localVarRequestOptions, configuration)
281
-
282
- return {
283
- url: toPathString(localVarUrlObj),
284
- options: localVarRequestOptions,
285
- };
286
- },
287
- /**
288
- * This endpoint facilitates the resetting of an entity number useful for sequence type numbers.
289
- * @summary Reset entity number
290
- * @param {ResetNumberRequestDto} resetNumberRequestDto
291
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
292
- * @param {*} [options] Override http request option.
293
- * @throws {RequiredError}
294
- */
295
- resetNumber: async (resetNumberRequestDto: ResetNumberRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
296
- // verify required parameter 'resetNumberRequestDto' is not null or undefined
297
- assertParamExists('resetNumber', 'resetNumberRequestDto', resetNumberRequestDto)
298
- const localVarPath = `/numbergenerator/v1/numbers/reset`;
299
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
300
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
301
- let baseOptions;
302
- let baseAccessToken;
303
- if (configuration) {
304
- baseOptions = configuration.baseOptions;
305
- baseAccessToken = configuration.accessToken;
306
- }
307
-
308
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
309
- const localVarHeaderParameter = {} as any;
310
- const localVarQueryParameter = {} as any;
311
-
312
- // authentication bearer required
313
- // http bearer authentication required
314
- await setBearerAuthToObject(localVarHeaderParameter, configuration)
315
-
316
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
317
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
318
- }
319
-
320
-
321
-
322
- localVarHeaderParameter['Content-Type'] = 'application/json';
323
-
324
- setSearchParams(localVarUrlObj, localVarQueryParameter);
325
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
326
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
327
- localVarRequestOptions.data = serializeDataIfNeeded(resetNumberRequestDto, localVarRequestOptions, configuration)
328
-
329
- return {
330
- url: toPathString(localVarUrlObj),
331
- options: localVarRequestOptions,
332
- };
333
- },
334
- /**
335
- * This will update an entity number in the database.
336
- * @summary Update the number
337
- * @param {string} code Unique identifier for the object.
338
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
339
- * @param {*} [options] Override http request option.
340
- * @throws {RequiredError}
341
- */
342
- updateNumber: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
343
- // verify required parameter 'code' is not null or undefined
344
- assertParamExists('updateNumber', 'code', code)
345
- const localVarPath = `/numbergenerator/v1/numbers/{code}`
346
- .replace(`{${"code"}}`, encodeURIComponent(String(code)));
347
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
348
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
349
- let baseOptions;
350
- let baseAccessToken;
351
- if (configuration) {
352
- baseOptions = configuration.baseOptions;
353
- baseAccessToken = configuration.accessToken;
354
- }
355
-
356
- const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
357
- const localVarHeaderParameter = {} as any;
358
- const localVarQueryParameter = {} as any;
359
-
360
- // authentication bearer required
361
- // http bearer authentication required
362
- await setBearerAuthToObject(localVarHeaderParameter, configuration)
363
-
364
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
365
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
366
- }
367
-
368
-
369
-
370
- setSearchParams(localVarUrlObj, localVarQueryParameter);
371
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
372
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
373
-
374
- return {
375
- url: toPathString(localVarUrlObj),
376
- options: localVarRequestOptions,
377
- };
378
- },
379
- }
380
- };
381
-
382
- /**
383
- * NumbersApi - functional programming interface
384
- * @export
385
- */
386
- export const NumbersApiFp = function(configuration?: Configuration) {
387
- const localVarAxiosParamCreator = NumbersApiAxiosParamCreator(configuration)
388
- return {
389
- /**
390
- * 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.
391
- * @summary Create the number
392
- * @param {string} slug The slug of the number
393
- * @param {string} type The type of number generator. This determines the structure of the config object.
394
- * @param {object} config Configuration object that varies based on the type field
395
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
396
- * @param {*} [options] Override http request option.
397
- * @throws {RequiredError}
398
- */
399
- async createNumber(slug: string, type: string, config: object, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateNumberResponseClass>> {
400
- const localVarAxiosArgs = await localVarAxiosParamCreator.createNumber(slug, type, config, authorization, options);
401
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
402
- },
403
- /**
404
- * 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.
405
- * @summary Retrieve the number
406
- * @param {string} code Unique identifier for the object.
407
- * @param {string} expand
408
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
409
- * @param {*} [options] Override http request option.
410
- * @throws {RequiredError}
411
- */
412
- async getNumber(code: string, expand: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetNumberResponseClass>> {
413
- const localVarAxiosArgs = await localVarAxiosParamCreator.getNumber(code, expand, authorization, options);
414
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
415
- },
416
- /**
417
- * 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.
418
- * @summary List Numbers
419
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
420
- * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
421
- * @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.
422
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
423
- * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
424
- * @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.
425
- * @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.
426
- * @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.
427
- * @param {*} [options] Override http request option.
428
- * @throws {RequiredError}
429
- */
430
- async listNumbers(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListNumbersResponseClass>> {
431
- const localVarAxiosArgs = await localVarAxiosParamCreator.listNumbers(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
432
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
433
- },
434
- /**
435
- * The endpoint performs a lookup based on an entity number to retrieve a unique string.
436
- * @summary Lookup entity number
437
- * @param {LookupNumberRequestDto} lookupNumberRequestDto
438
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
439
- * @param {*} [options] Override http request option.
440
- * @throws {RequiredError}
441
- */
442
- async lookupNumber(lookupNumberRequestDto: LookupNumberRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
443
- const localVarAxiosArgs = await localVarAxiosParamCreator.lookupNumber(lookupNumberRequestDto, authorization, options);
444
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
445
- },
446
- /**
447
- * This endpoint facilitates the resetting of an entity number useful for sequence type numbers.
448
- * @summary Reset entity number
449
- * @param {ResetNumberRequestDto} resetNumberRequestDto
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
- async resetNumber(resetNumberRequestDto: ResetNumberRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
455
- const localVarAxiosArgs = await localVarAxiosParamCreator.resetNumber(resetNumberRequestDto, authorization, options);
456
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
457
- },
458
- /**
459
- * This will update an entity number in the database.
460
- * @summary Update the number
461
- * @param {string} code Unique identifier for the object.
462
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
463
- * @param {*} [options] Override http request option.
464
- * @throws {RequiredError}
465
- */
466
- async updateNumber(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdateNumberResponseClass>> {
467
- const localVarAxiosArgs = await localVarAxiosParamCreator.updateNumber(code, authorization, options);
468
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
469
- },
470
- }
471
- };
472
-
473
- /**
474
- * NumbersApi - factory interface
475
- * @export
476
- */
477
- export const NumbersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
478
- const localVarFp = NumbersApiFp(configuration)
479
- return {
480
- /**
481
- * 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.
482
- * @summary Create the number
483
- * @param {string} slug The slug of the number
484
- * @param {string} type The type of number generator. This determines the structure of the config object.
485
- * @param {object} config Configuration object that varies based on the type field
486
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
487
- * @param {*} [options] Override http request option.
488
- * @throws {RequiredError}
489
- */
490
- createNumber(slug: string, type: string, config: object, authorization?: string, options?: any): AxiosPromise<CreateNumberResponseClass> {
491
- return localVarFp.createNumber(slug, type, config, authorization, options).then((request) => request(axios, basePath));
492
- },
493
- /**
494
- * 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.
495
- * @summary Retrieve the number
496
- * @param {string} code Unique identifier for the object.
497
- * @param {string} expand
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
- getNumber(code: string, expand: string, authorization?: string, options?: any): AxiosPromise<GetNumberResponseClass> {
503
- return localVarFp.getNumber(code, expand, authorization, options).then((request) => request(axios, basePath));
504
- },
505
- /**
506
- * 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.
507
- * @summary List Numbers
508
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
509
- * @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
510
- * @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.
511
- * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
512
- * @param {string} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
513
- * @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.
514
- * @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.
515
- * @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.
516
- * @param {*} [options] Override http request option.
517
- * @throws {RequiredError}
518
- */
519
- listNumbers(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListNumbersResponseClass> {
520
- return localVarFp.listNumbers(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
521
- },
522
- /**
523
- * The endpoint performs a lookup based on an entity number to retrieve a unique string.
524
- * @summary Lookup entity number
525
- * @param {LookupNumberRequestDto} lookupNumberRequestDto
526
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
527
- * @param {*} [options] Override http request option.
528
- * @throws {RequiredError}
529
- */
530
- lookupNumber(lookupNumberRequestDto: LookupNumberRequestDto, authorization?: string, options?: any): AxiosPromise<void> {
531
- return localVarFp.lookupNumber(lookupNumberRequestDto, authorization, options).then((request) => request(axios, basePath));
532
- },
533
- /**
534
- * This endpoint facilitates the resetting of an entity number useful for sequence type numbers.
535
- * @summary Reset entity number
536
- * @param {ResetNumberRequestDto} resetNumberRequestDto
537
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
538
- * @param {*} [options] Override http request option.
539
- * @throws {RequiredError}
540
- */
541
- resetNumber(resetNumberRequestDto: ResetNumberRequestDto, authorization?: string, options?: any): AxiosPromise<void> {
542
- return localVarFp.resetNumber(resetNumberRequestDto, authorization, options).then((request) => request(axios, basePath));
543
- },
544
- /**
545
- * This will update an entity number in the database.
546
- * @summary Update the number
547
- * @param {string} code Unique identifier for the object.
548
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
549
- * @param {*} [options] Override http request option.
550
- * @throws {RequiredError}
551
- */
552
- updateNumber(code: string, authorization?: string, options?: any): AxiosPromise<UpdateNumberResponseClass> {
553
- return localVarFp.updateNumber(code, authorization, options).then((request) => request(axios, basePath));
554
- },
555
- };
556
- };
557
-
558
- /**
559
- * Request parameters for createNumber operation in NumbersApi.
560
- * @export
561
- * @interface NumbersApiCreateNumberRequest
562
- */
563
- export interface NumbersApiCreateNumberRequest {
564
- /**
565
- * The slug of the number
566
- * @type {string}
567
- * @memberof NumbersApiCreateNumber
568
- */
569
- readonly slug: string
570
-
571
- /**
572
- * The type of number generator. This determines the structure of the config object.
573
- * @type {string}
574
- * @memberof NumbersApiCreateNumber
575
- */
576
- readonly type: string
577
-
578
- /**
579
- * Configuration object that varies based on the type field
580
- * @type {object}
581
- * @memberof NumbersApiCreateNumber
582
- */
583
- readonly config: object
584
-
585
- /**
586
- * Bearer Token: provided by the login endpoint under the name accessToken.
587
- * @type {string}
588
- * @memberof NumbersApiCreateNumber
589
- */
590
- readonly authorization?: string
591
- }
592
-
593
- /**
594
- * Request parameters for getNumber operation in NumbersApi.
595
- * @export
596
- * @interface NumbersApiGetNumberRequest
597
- */
598
- export interface NumbersApiGetNumberRequest {
599
- /**
600
- * Unique identifier for the object.
601
- * @type {string}
602
- * @memberof NumbersApiGetNumber
603
- */
604
- readonly code: string
605
-
606
- /**
607
- *
608
- * @type {string}
609
- * @memberof NumbersApiGetNumber
610
- */
611
- readonly expand: string
612
-
613
- /**
614
- * Bearer Token: provided by the login endpoint under the name accessToken.
615
- * @type {string}
616
- * @memberof NumbersApiGetNumber
617
- */
618
- readonly authorization?: string
619
- }
620
-
621
- /**
622
- * Request parameters for listNumbers operation in NumbersApi.
623
- * @export
624
- * @interface NumbersApiListNumbersRequest
625
- */
626
- export interface NumbersApiListNumbersRequest {
627
- /**
628
- * Bearer Token: provided by the login endpoint under the name accessToken.
629
- * @type {string}
630
- * @memberof NumbersApiListNumbers
631
- */
632
- readonly authorization?: string
633
-
634
- /**
635
- * A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
636
- * @type {number}
637
- * @memberof NumbersApiListNumbers
638
- */
639
- readonly pageSize?: number
640
-
641
- /**
642
- * 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.
643
- * @type {string}
644
- * @memberof NumbersApiListNumbers
645
- */
646
- readonly pageToken?: string
647
-
648
- /**
649
- * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
650
- * @type {string}
651
- * @memberof NumbersApiListNumbers
652
- */
653
- readonly filter?: string
654
-
655
- /**
656
- * To search the list by any field, pass search&#x3D;xxx to fetch the result.
657
- * @type {string}
658
- * @memberof NumbersApiListNumbers
659
- */
660
- readonly search?: string
661
-
662
- /**
663
- * 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.
664
- * @type {string}
665
- * @memberof NumbersApiListNumbers
666
- */
667
- readonly order?: string
668
-
669
- /**
670
- * 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.
671
- * @type {string}
672
- * @memberof NumbersApiListNumbers
673
- */
674
- readonly expand?: string
675
-
676
- /**
677
- * 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.
678
- * @type {string}
679
- * @memberof NumbersApiListNumbers
680
- */
681
- readonly filters?: string
682
- }
683
-
684
- /**
685
- * Request parameters for lookupNumber operation in NumbersApi.
686
- * @export
687
- * @interface NumbersApiLookupNumberRequest
688
- */
689
- export interface NumbersApiLookupNumberRequest {
690
- /**
691
- *
692
- * @type {LookupNumberRequestDto}
693
- * @memberof NumbersApiLookupNumber
694
- */
695
- readonly lookupNumberRequestDto: LookupNumberRequestDto
696
-
697
- /**
698
- * Bearer Token: provided by the login endpoint under the name accessToken.
699
- * @type {string}
700
- * @memberof NumbersApiLookupNumber
701
- */
702
- readonly authorization?: string
703
- }
704
-
705
- /**
706
- * Request parameters for resetNumber operation in NumbersApi.
707
- * @export
708
- * @interface NumbersApiResetNumberRequest
709
- */
710
- export interface NumbersApiResetNumberRequest {
711
- /**
712
- *
713
- * @type {ResetNumberRequestDto}
714
- * @memberof NumbersApiResetNumber
715
- */
716
- readonly resetNumberRequestDto: ResetNumberRequestDto
717
-
718
- /**
719
- * Bearer Token: provided by the login endpoint under the name accessToken.
720
- * @type {string}
721
- * @memberof NumbersApiResetNumber
722
- */
723
- readonly authorization?: string
724
- }
725
-
726
- /**
727
- * Request parameters for updateNumber operation in NumbersApi.
728
- * @export
729
- * @interface NumbersApiUpdateNumberRequest
730
- */
731
- export interface NumbersApiUpdateNumberRequest {
732
- /**
733
- * Unique identifier for the object.
734
- * @type {string}
735
- * @memberof NumbersApiUpdateNumber
736
- */
737
- readonly code: string
738
-
739
- /**
740
- * Bearer Token: provided by the login endpoint under the name accessToken.
741
- * @type {string}
742
- * @memberof NumbersApiUpdateNumber
743
- */
744
- readonly authorization?: string
745
- }
746
-
747
- /**
748
- * NumbersApi - object-oriented interface
749
- * @export
750
- * @class NumbersApi
751
- * @extends {BaseAPI}
752
- */
753
- export class NumbersApi extends BaseAPI {
754
- /**
755
- * 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.
756
- * @summary Create the number
757
- * @param {NumbersApiCreateNumberRequest} requestParameters Request parameters.
758
- * @param {*} [options] Override http request option.
759
- * @throws {RequiredError}
760
- * @memberof NumbersApi
761
- */
762
- public createNumber(requestParameters: NumbersApiCreateNumberRequest, options?: AxiosRequestConfig) {
763
- return NumbersApiFp(this.configuration).createNumber(requestParameters.slug, requestParameters.type, requestParameters.config, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
764
- }
765
-
766
- /**
767
- * 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.
768
- * @summary Retrieve the number
769
- * @param {NumbersApiGetNumberRequest} requestParameters Request parameters.
770
- * @param {*} [options] Override http request option.
771
- * @throws {RequiredError}
772
- * @memberof NumbersApi
773
- */
774
- public getNumber(requestParameters: NumbersApiGetNumberRequest, options?: AxiosRequestConfig) {
775
- return NumbersApiFp(this.configuration).getNumber(requestParameters.code, requestParameters.expand, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
776
- }
777
-
778
- /**
779
- * 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.
780
- * @summary List Numbers
781
- * @param {NumbersApiListNumbersRequest} requestParameters Request parameters.
782
- * @param {*} [options] Override http request option.
783
- * @throws {RequiredError}
784
- * @memberof NumbersApi
785
- */
786
- public listNumbers(requestParameters: NumbersApiListNumbersRequest = {}, options?: AxiosRequestConfig) {
787
- return NumbersApiFp(this.configuration).listNumbers(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
788
- }
789
-
790
- /**
791
- * The endpoint performs a lookup based on an entity number to retrieve a unique string.
792
- * @summary Lookup entity number
793
- * @param {NumbersApiLookupNumberRequest} requestParameters Request parameters.
794
- * @param {*} [options] Override http request option.
795
- * @throws {RequiredError}
796
- * @memberof NumbersApi
797
- */
798
- public lookupNumber(requestParameters: NumbersApiLookupNumberRequest, options?: AxiosRequestConfig) {
799
- return NumbersApiFp(this.configuration).lookupNumber(requestParameters.lookupNumberRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
800
- }
801
-
802
- /**
803
- * This endpoint facilitates the resetting of an entity number useful for sequence type numbers.
804
- * @summary Reset entity number
805
- * @param {NumbersApiResetNumberRequest} requestParameters Request parameters.
806
- * @param {*} [options] Override http request option.
807
- * @throws {RequiredError}
808
- * @memberof NumbersApi
809
- */
810
- public resetNumber(requestParameters: NumbersApiResetNumberRequest, options?: AxiosRequestConfig) {
811
- return NumbersApiFp(this.configuration).resetNumber(requestParameters.resetNumberRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
812
- }
813
-
814
- /**
815
- * This will update an entity number in the database.
816
- * @summary Update the number
817
- * @param {NumbersApiUpdateNumberRequest} requestParameters Request parameters.
818
- * @param {*} [options] Override http request option.
819
- * @throws {RequiredError}
820
- * @memberof NumbersApi
821
- */
822
- public updateNumber(requestParameters: NumbersApiUpdateNumberRequest, options?: AxiosRequestConfig) {
823
- return NumbersApiFp(this.configuration).updateNumber(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
824
- }
825
- }