@emilgroup/partner-sdk-node 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. package/.openapi-generator/FILES +41 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +51 -0
  5. package/api/default-api.ts +120 -0
  6. package/api/partner-relations-api.ts +349 -0
  7. package/api/partner-types-api.ts +693 -0
  8. package/api/partner-version-api.ts +375 -0
  9. package/api/partners-api.ts +693 -0
  10. package/api.ts +35 -0
  11. package/base.ts +252 -0
  12. package/common.ts +198 -0
  13. package/configuration.ts +101 -0
  14. package/dist/api/default-api.d.ts +66 -0
  15. package/dist/api/default-api.js +196 -0
  16. package/dist/api/partner-relations-api.d.ts +206 -0
  17. package/dist/api/partner-relations-api.js +352 -0
  18. package/dist/api/partner-types-api.d.ts +394 -0
  19. package/dist/api/partner-types-api.js +642 -0
  20. package/dist/api/partner-version-api.d.ts +224 -0
  21. package/dist/api/partner-version-api.js +363 -0
  22. package/dist/api/partners-api.d.ts +394 -0
  23. package/dist/api/partners-api.js +642 -0
  24. package/dist/api.d.ts +16 -0
  25. package/dist/api.js +34 -0
  26. package/dist/base.d.ts +74 -0
  27. package/dist/base.js +299 -0
  28. package/dist/common.d.ts +91 -0
  29. package/dist/common.js +276 -0
  30. package/dist/configuration.d.ts +83 -0
  31. package/dist/configuration.js +44 -0
  32. package/dist/index.d.ts +15 -0
  33. package/dist/index.js +36 -0
  34. package/dist/models/create-partner-request-dto.d.ts +30 -0
  35. package/dist/models/create-partner-request-dto.js +15 -0
  36. package/dist/models/create-partner-response-class.d.ts +25 -0
  37. package/dist/models/create-partner-response-class.js +15 -0
  38. package/dist/models/create-partner-type-request-dto.d.ts +31 -0
  39. package/dist/models/create-partner-type-request-dto.js +15 -0
  40. package/dist/models/create-partner-type-response-class.d.ts +25 -0
  41. package/dist/models/create-partner-type-response-class.js +15 -0
  42. package/dist/models/delete-response-class.d.ts +24 -0
  43. package/dist/models/delete-response-class.js +15 -0
  44. package/dist/models/get-partner-relation-type-class.d.ts +25 -0
  45. package/dist/models/get-partner-relation-type-class.js +15 -0
  46. package/dist/models/get-partner-response-class.d.ts +25 -0
  47. package/dist/models/get-partner-response-class.js +15 -0
  48. package/dist/models/get-partner-type-response-class.d.ts +25 -0
  49. package/dist/models/get-partner-type-response-class.js +15 -0
  50. package/dist/models/get-partner-version-response-class.d.ts +25 -0
  51. package/dist/models/get-partner-version-response-class.js +15 -0
  52. package/dist/models/index.d.ts +23 -0
  53. package/dist/models/index.js +39 -0
  54. package/dist/models/inline-response200.d.ts +54 -0
  55. package/dist/models/inline-response200.js +15 -0
  56. package/dist/models/inline-response503.d.ts +54 -0
  57. package/dist/models/inline-response503.js +15 -0
  58. package/dist/models/list-partner-relation-types-class.d.ts +31 -0
  59. package/dist/models/list-partner-relation-types-class.js +15 -0
  60. package/dist/models/list-partner-types-response-class.d.ts +31 -0
  61. package/dist/models/list-partner-types-response-class.js +15 -0
  62. package/dist/models/list-partner-versions-response-class.d.ts +25 -0
  63. package/dist/models/list-partner-versions-response-class.js +15 -0
  64. package/dist/models/list-partners-response-class.d.ts +31 -0
  65. package/dist/models/list-partners-response-class.js +15 -0
  66. package/dist/models/partner-class.d.ts +79 -0
  67. package/dist/models/partner-class.js +15 -0
  68. package/dist/models/partner-relation-type-class.d.ts +66 -0
  69. package/dist/models/partner-relation-type-class.js +15 -0
  70. package/dist/models/partner-type-class.d.ts +60 -0
  71. package/dist/models/partner-type-class.js +15 -0
  72. package/dist/models/partner-type-custom-schema-dto.d.ts +66 -0
  73. package/dist/models/partner-type-custom-schema-dto.js +15 -0
  74. package/dist/models/update-partner-request-dto.d.ts +24 -0
  75. package/dist/models/update-partner-request-dto.js +15 -0
  76. package/dist/models/update-partner-response-class.d.ts +25 -0
  77. package/dist/models/update-partner-response-class.js +15 -0
  78. package/dist/models/update-partner-type-request-dto.d.ts +31 -0
  79. package/dist/models/update-partner-type-request-dto.js +15 -0
  80. package/dist/models/update-partner-type-response-class.d.ts +25 -0
  81. package/dist/models/update-partner-type-response-class.js +15 -0
  82. package/git_push.sh +57 -0
  83. package/index.ts +19 -0
  84. package/models/create-partner-request-dto.ts +36 -0
  85. package/models/create-partner-response-class.ts +31 -0
  86. package/models/create-partner-type-request-dto.ts +37 -0
  87. package/models/create-partner-type-response-class.ts +31 -0
  88. package/models/delete-response-class.ts +30 -0
  89. package/models/get-partner-relation-type-class.ts +31 -0
  90. package/models/get-partner-response-class.ts +31 -0
  91. package/models/get-partner-type-response-class.ts +31 -0
  92. package/models/get-partner-version-response-class.ts +31 -0
  93. package/models/index.ts +23 -0
  94. package/models/inline-response200.ts +48 -0
  95. package/models/inline-response503.ts +48 -0
  96. package/models/list-partner-relation-types-class.ts +37 -0
  97. package/models/list-partner-types-response-class.ts +37 -0
  98. package/models/list-partner-versions-response-class.ts +31 -0
  99. package/models/list-partners-response-class.ts +37 -0
  100. package/models/partner-class.ts +85 -0
  101. package/models/partner-relation-type-class.ts +72 -0
  102. package/models/partner-type-class.ts +66 -0
  103. package/models/partner-type-custom-schema-dto.ts +72 -0
  104. package/models/update-partner-request-dto.ts +30 -0
  105. package/models/update-partner-response-class.ts +31 -0
  106. package/models/update-partner-type-request-dto.ts +37 -0
  107. package/models/update-partner-type-response-class.ts +31 -0
  108. package/package.json +29 -0
  109. package/tsconfig.json +22 -0
@@ -0,0 +1,693 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL PartnerService
5
+ * The EMIL PartnerService API description
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 { CreatePartnerRequestDto } from '../models';
25
+ // @ts-ignore
26
+ import { CreatePartnerResponseClass } from '../models';
27
+ // @ts-ignore
28
+ import { DeleteResponseClass } from '../models';
29
+ // @ts-ignore
30
+ import { GetPartnerResponseClass } from '../models';
31
+ // @ts-ignore
32
+ import { ListPartnersResponseClass } from '../models';
33
+ // @ts-ignore
34
+ import { UpdatePartnerRequestDto } from '../models';
35
+ // @ts-ignore
36
+ import { UpdatePartnerResponseClass } from '../models';
37
+ /**
38
+ * PartnersApi - axios parameter creator
39
+ * @export
40
+ */
41
+ export const PartnersApiAxiosParamCreator = function (configuration?: Configuration) {
42
+ return {
43
+ /**
44
+ * This will create a partner.
45
+ * @summary Create the partner
46
+ * @param {CreatePartnerRequestDto} createPartnerRequestDto
47
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
48
+ * @param {*} [options] Override http request option.
49
+ * @throws {RequiredError}
50
+ */
51
+ createPartner: async (createPartnerRequestDto: CreatePartnerRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
52
+ // verify required parameter 'createPartnerRequestDto' is not null or undefined
53
+ assertParamExists('createPartner', 'createPartnerRequestDto', createPartnerRequestDto)
54
+ const localVarPath = `/partnerservice/v1/partners`;
55
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
56
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
57
+ let baseOptions;
58
+ let baseAccessToken;
59
+ if (configuration) {
60
+ baseOptions = configuration.baseOptions;
61
+ baseAccessToken = configuration.accessToken;
62
+ }
63
+
64
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
65
+ const localVarHeaderParameter = {} as any;
66
+ const localVarQueryParameter = {} as any;
67
+
68
+ // authentication bearer required
69
+ // http bearer authentication required
70
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
71
+
72
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
73
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
74
+ }
75
+
76
+
77
+
78
+ localVarHeaderParameter['Content-Type'] = 'application/json';
79
+
80
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
81
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
82
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
83
+ localVarRequestOptions.data = serializeDataIfNeeded(createPartnerRequestDto, localVarRequestOptions, configuration)
84
+
85
+ return {
86
+ url: toPathString(localVarUrlObj),
87
+ options: localVarRequestOptions,
88
+ };
89
+ },
90
+ /**
91
+ * Permanently deletes the partner. Supply the unique code that was returned when you created the partner and this will delete it.
92
+ * @summary Delete the partner
93
+ * @param {string} code
94
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
95
+ * @param {*} [options] Override http request option.
96
+ * @throws {RequiredError}
97
+ */
98
+ deletePartner: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
99
+ // verify required parameter 'code' is not null or undefined
100
+ assertParamExists('deletePartner', 'code', code)
101
+ const localVarPath = `/partnerservice/v1/partners/{code}`
102
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
103
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
104
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
105
+ let baseOptions;
106
+ let baseAccessToken;
107
+ if (configuration) {
108
+ baseOptions = configuration.baseOptions;
109
+ baseAccessToken = configuration.accessToken;
110
+ }
111
+
112
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
113
+ const localVarHeaderParameter = {} as any;
114
+ const localVarQueryParameter = {} as any;
115
+
116
+ // authentication bearer required
117
+ // http bearer authentication required
118
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
119
+
120
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
121
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
122
+ }
123
+
124
+
125
+
126
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
127
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
128
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
129
+
130
+ return {
131
+ url: toPathString(localVarUrlObj),
132
+ options: localVarRequestOptions,
133
+ };
134
+ },
135
+ /**
136
+ * Retrieves the details of the partner that was previously created. Supply the unique partner code that was returned when you created it and Emil Api will return the corresponding partner information.
137
+ * @summary Retrieve the partner
138
+ * @param {string} code Unique identifier for the object.
139
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
140
+ * @param {any} [expand]
141
+ * @param {*} [options] Override http request option.
142
+ * @throws {RequiredError}
143
+ */
144
+ getPartner: async (code: string, authorization?: string, expand?: any, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
145
+ // verify required parameter 'code' is not null or undefined
146
+ assertParamExists('getPartner', 'code', code)
147
+ const localVarPath = `/partnerservice/v1/partners/{code}`
148
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
149
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
150
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
151
+ let baseOptions;
152
+ let baseAccessToken;
153
+ if (configuration) {
154
+ baseOptions = configuration.baseOptions;
155
+ baseAccessToken = configuration.accessToken;
156
+ }
157
+
158
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
159
+ const localVarHeaderParameter = {} as any;
160
+ const localVarQueryParameter = {} as any;
161
+
162
+ // authentication bearer required
163
+ // http bearer authentication required
164
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
165
+
166
+ if (expand !== undefined) {
167
+ localVarQueryParameter['expand'] = expand;
168
+ }
169
+
170
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
171
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
172
+ }
173
+
174
+
175
+
176
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
177
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
178
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
179
+
180
+ return {
181
+ url: toPathString(localVarUrlObj),
182
+ options: localVarRequestOptions,
183
+ };
184
+ },
185
+ /**
186
+ * Returns a list of partners you have previously created. The partners are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
187
+ * @summary List partners
188
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
189
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
190
+ * @param {any} [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.
191
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
192
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
193
+ * @param {any} [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.
194
+ * @param {any} [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.
195
+ * @param {any} [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.
196
+ * @param {*} [options] Override http request option.
197
+ * @throws {RequiredError}
198
+ */
199
+ listPartners: async (authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, filters?: any, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
200
+ const localVarPath = `/partnerservice/v1/partners`;
201
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
202
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
203
+ let baseOptions;
204
+ let baseAccessToken;
205
+ if (configuration) {
206
+ baseOptions = configuration.baseOptions;
207
+ baseAccessToken = configuration.accessToken;
208
+ }
209
+
210
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
211
+ const localVarHeaderParameter = {} as any;
212
+ const localVarQueryParameter = {} as any;
213
+
214
+ // authentication bearer required
215
+ // http bearer authentication required
216
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
217
+
218
+ if (pageSize !== undefined) {
219
+ localVarQueryParameter['pageSize'] = pageSize;
220
+ }
221
+
222
+ if (pageToken !== undefined) {
223
+ localVarQueryParameter['pageToken'] = pageToken;
224
+ }
225
+
226
+ if (filter !== undefined) {
227
+ localVarQueryParameter['filter'] = filter;
228
+ }
229
+
230
+ if (search !== undefined) {
231
+ localVarQueryParameter['search'] = search;
232
+ }
233
+
234
+ if (order !== undefined) {
235
+ localVarQueryParameter['order'] = order;
236
+ }
237
+
238
+ if (expand !== undefined) {
239
+ localVarQueryParameter['expand'] = expand;
240
+ }
241
+
242
+ if (filters !== undefined) {
243
+ localVarQueryParameter['filters'] = filters;
244
+ }
245
+
246
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
247
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
248
+ }
249
+
250
+
251
+
252
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
253
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
254
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
255
+
256
+ return {
257
+ url: toPathString(localVarUrlObj),
258
+ options: localVarRequestOptions,
259
+ };
260
+ },
261
+ /**
262
+ * Updates the specified partner by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
263
+ * @summary Update the partner
264
+ * @param {string} code Unique identifier for the object.
265
+ * @param {UpdatePartnerRequestDto} updatePartnerRequestDto
266
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
267
+ * @param {*} [options] Override http request option.
268
+ * @throws {RequiredError}
269
+ */
270
+ updatePartner: async (code: string, updatePartnerRequestDto: UpdatePartnerRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
271
+ // verify required parameter 'code' is not null or undefined
272
+ assertParamExists('updatePartner', 'code', code)
273
+ // verify required parameter 'updatePartnerRequestDto' is not null or undefined
274
+ assertParamExists('updatePartner', 'updatePartnerRequestDto', updatePartnerRequestDto)
275
+ const localVarPath = `/partnerservice/v1/partners/{code}`
276
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
277
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
278
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
279
+ let baseOptions;
280
+ let baseAccessToken;
281
+ if (configuration) {
282
+ baseOptions = configuration.baseOptions;
283
+ baseAccessToken = configuration.accessToken;
284
+ }
285
+
286
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
287
+ const localVarHeaderParameter = {} as any;
288
+ const localVarQueryParameter = {} as any;
289
+
290
+ // authentication bearer required
291
+ // http bearer authentication required
292
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
293
+
294
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
295
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
296
+ }
297
+
298
+
299
+
300
+ localVarHeaderParameter['Content-Type'] = 'application/json';
301
+
302
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
303
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
304
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
305
+ localVarRequestOptions.data = serializeDataIfNeeded(updatePartnerRequestDto, localVarRequestOptions, configuration)
306
+
307
+ return {
308
+ url: toPathString(localVarUrlObj),
309
+ options: localVarRequestOptions,
310
+ };
311
+ },
312
+ }
313
+ };
314
+
315
+ /**
316
+ * PartnersApi - functional programming interface
317
+ * @export
318
+ */
319
+ export const PartnersApiFp = function(configuration?: Configuration) {
320
+ const localVarAxiosParamCreator = PartnersApiAxiosParamCreator(configuration)
321
+ return {
322
+ /**
323
+ * This will create a partner.
324
+ * @summary Create the partner
325
+ * @param {CreatePartnerRequestDto} createPartnerRequestDto
326
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
327
+ * @param {*} [options] Override http request option.
328
+ * @throws {RequiredError}
329
+ */
330
+ async createPartner(createPartnerRequestDto: CreatePartnerRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreatePartnerResponseClass>> {
331
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createPartner(createPartnerRequestDto, authorization, options);
332
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
333
+ },
334
+ /**
335
+ * Permanently deletes the partner. Supply the unique code that was returned when you created the partner and this will delete it.
336
+ * @summary Delete the partner
337
+ * @param {string} code
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
+ async deletePartner(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeleteResponseClass>> {
343
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deletePartner(code, authorization, options);
344
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
345
+ },
346
+ /**
347
+ * Retrieves the details of the partner that was previously created. Supply the unique partner code that was returned when you created it and Emil Api will return the corresponding partner information.
348
+ * @summary Retrieve the partner
349
+ * @param {string} code Unique identifier for the object.
350
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
351
+ * @param {any} [expand]
352
+ * @param {*} [options] Override http request option.
353
+ * @throws {RequiredError}
354
+ */
355
+ async getPartner(code: string, authorization?: string, expand?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetPartnerResponseClass>> {
356
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getPartner(code, authorization, expand, options);
357
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
358
+ },
359
+ /**
360
+ * Returns a list of partners you have previously created. The partners are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
361
+ * @summary List partners
362
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
363
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
364
+ * @param {any} [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.
365
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
366
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
367
+ * @param {any} [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.
368
+ * @param {any} [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.
369
+ * @param {any} [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.
370
+ * @param {*} [options] Override http request option.
371
+ * @throws {RequiredError}
372
+ */
373
+ async listPartners(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, filters?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListPartnersResponseClass>> {
374
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listPartners(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
375
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
376
+ },
377
+ /**
378
+ * Updates the specified partner by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
379
+ * @summary Update the partner
380
+ * @param {string} code Unique identifier for the object.
381
+ * @param {UpdatePartnerRequestDto} updatePartnerRequestDto
382
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
383
+ * @param {*} [options] Override http request option.
384
+ * @throws {RequiredError}
385
+ */
386
+ async updatePartner(code: string, updatePartnerRequestDto: UpdatePartnerRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdatePartnerResponseClass>> {
387
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updatePartner(code, updatePartnerRequestDto, authorization, options);
388
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
389
+ },
390
+ }
391
+ };
392
+
393
+ /**
394
+ * PartnersApi - factory interface
395
+ * @export
396
+ */
397
+ export const PartnersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
398
+ const localVarFp = PartnersApiFp(configuration)
399
+ return {
400
+ /**
401
+ * This will create a partner.
402
+ * @summary Create the partner
403
+ * @param {CreatePartnerRequestDto} createPartnerRequestDto
404
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
405
+ * @param {*} [options] Override http request option.
406
+ * @throws {RequiredError}
407
+ */
408
+ createPartner(createPartnerRequestDto: CreatePartnerRequestDto, authorization?: string, options?: any): AxiosPromise<CreatePartnerResponseClass> {
409
+ return localVarFp.createPartner(createPartnerRequestDto, authorization, options).then((request) => request(axios, basePath));
410
+ },
411
+ /**
412
+ * Permanently deletes the partner. Supply the unique code that was returned when you created the partner and this will delete it.
413
+ * @summary Delete the partner
414
+ * @param {string} code
415
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
416
+ * @param {*} [options] Override http request option.
417
+ * @throws {RequiredError}
418
+ */
419
+ deletePartner(code: string, authorization?: string, options?: any): AxiosPromise<DeleteResponseClass> {
420
+ return localVarFp.deletePartner(code, authorization, options).then((request) => request(axios, basePath));
421
+ },
422
+ /**
423
+ * Retrieves the details of the partner that was previously created. Supply the unique partner code that was returned when you created it and Emil Api will return the corresponding partner information.
424
+ * @summary Retrieve the partner
425
+ * @param {string} code Unique identifier for the object.
426
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
427
+ * @param {any} [expand]
428
+ * @param {*} [options] Override http request option.
429
+ * @throws {RequiredError}
430
+ */
431
+ getPartner(code: string, authorization?: string, expand?: any, options?: any): AxiosPromise<GetPartnerResponseClass> {
432
+ return localVarFp.getPartner(code, authorization, expand, options).then((request) => request(axios, basePath));
433
+ },
434
+ /**
435
+ * Returns a list of partners you have previously created. The partners are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
436
+ * @summary List partners
437
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
438
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
439
+ * @param {any} [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.
440
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
441
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
442
+ * @param {any} [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.
443
+ * @param {any} [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.
444
+ * @param {any} [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.
445
+ * @param {*} [options] Override http request option.
446
+ * @throws {RequiredError}
447
+ */
448
+ listPartners(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, filters?: any, options?: any): AxiosPromise<ListPartnersResponseClass> {
449
+ return localVarFp.listPartners(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
450
+ },
451
+ /**
452
+ * Updates the specified partner by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
453
+ * @summary Update the partner
454
+ * @param {string} code Unique identifier for the object.
455
+ * @param {UpdatePartnerRequestDto} updatePartnerRequestDto
456
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
457
+ * @param {*} [options] Override http request option.
458
+ * @throws {RequiredError}
459
+ */
460
+ updatePartner(code: string, updatePartnerRequestDto: UpdatePartnerRequestDto, authorization?: string, options?: any): AxiosPromise<UpdatePartnerResponseClass> {
461
+ return localVarFp.updatePartner(code, updatePartnerRequestDto, authorization, options).then((request) => request(axios, basePath));
462
+ },
463
+ };
464
+ };
465
+
466
+ /**
467
+ * Request parameters for createPartner operation in PartnersApi.
468
+ * @export
469
+ * @interface PartnersApiCreatePartnerRequest
470
+ */
471
+ export interface PartnersApiCreatePartnerRequest {
472
+ /**
473
+ *
474
+ * @type {CreatePartnerRequestDto}
475
+ * @memberof PartnersApiCreatePartner
476
+ */
477
+ readonly createPartnerRequestDto: CreatePartnerRequestDto
478
+
479
+ /**
480
+ * Bearer Token: provided by the login endpoint under the name accessToken.
481
+ * @type {string}
482
+ * @memberof PartnersApiCreatePartner
483
+ */
484
+ readonly authorization?: string
485
+ }
486
+
487
+ /**
488
+ * Request parameters for deletePartner operation in PartnersApi.
489
+ * @export
490
+ * @interface PartnersApiDeletePartnerRequest
491
+ */
492
+ export interface PartnersApiDeletePartnerRequest {
493
+ /**
494
+ *
495
+ * @type {string}
496
+ * @memberof PartnersApiDeletePartner
497
+ */
498
+ readonly code: string
499
+
500
+ /**
501
+ * Bearer Token: provided by the login endpoint under the name accessToken.
502
+ * @type {string}
503
+ * @memberof PartnersApiDeletePartner
504
+ */
505
+ readonly authorization?: string
506
+ }
507
+
508
+ /**
509
+ * Request parameters for getPartner operation in PartnersApi.
510
+ * @export
511
+ * @interface PartnersApiGetPartnerRequest
512
+ */
513
+ export interface PartnersApiGetPartnerRequest {
514
+ /**
515
+ * Unique identifier for the object.
516
+ * @type {string}
517
+ * @memberof PartnersApiGetPartner
518
+ */
519
+ readonly code: string
520
+
521
+ /**
522
+ * Bearer Token: provided by the login endpoint under the name accessToken.
523
+ * @type {string}
524
+ * @memberof PartnersApiGetPartner
525
+ */
526
+ readonly authorization?: string
527
+
528
+ /**
529
+ *
530
+ * @type {any}
531
+ * @memberof PartnersApiGetPartner
532
+ */
533
+ readonly expand?: any
534
+ }
535
+
536
+ /**
537
+ * Request parameters for listPartners operation in PartnersApi.
538
+ * @export
539
+ * @interface PartnersApiListPartnersRequest
540
+ */
541
+ export interface PartnersApiListPartnersRequest {
542
+ /**
543
+ * Bearer Token: provided by the login endpoint under the name accessToken.
544
+ * @type {string}
545
+ * @memberof PartnersApiListPartners
546
+ */
547
+ readonly authorization?: string
548
+
549
+ /**
550
+ * A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
551
+ * @type {any}
552
+ * @memberof PartnersApiListPartners
553
+ */
554
+ readonly pageSize?: any
555
+
556
+ /**
557
+ * 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.
558
+ * @type {any}
559
+ * @memberof PartnersApiListPartners
560
+ */
561
+ readonly pageToken?: any
562
+
563
+ /**
564
+ * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
565
+ * @type {any}
566
+ * @memberof PartnersApiListPartners
567
+ */
568
+ readonly filter?: any
569
+
570
+ /**
571
+ * Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
572
+ * @type {any}
573
+ * @memberof PartnersApiListPartners
574
+ */
575
+ readonly search?: any
576
+
577
+ /**
578
+ * 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.
579
+ * @type {any}
580
+ * @memberof PartnersApiListPartners
581
+ */
582
+ readonly order?: any
583
+
584
+ /**
585
+ * 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.
586
+ * @type {any}
587
+ * @memberof PartnersApiListPartners
588
+ */
589
+ readonly expand?: any
590
+
591
+ /**
592
+ * 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.
593
+ * @type {any}
594
+ * @memberof PartnersApiListPartners
595
+ */
596
+ readonly filters?: any
597
+ }
598
+
599
+ /**
600
+ * Request parameters for updatePartner operation in PartnersApi.
601
+ * @export
602
+ * @interface PartnersApiUpdatePartnerRequest
603
+ */
604
+ export interface PartnersApiUpdatePartnerRequest {
605
+ /**
606
+ * Unique identifier for the object.
607
+ * @type {string}
608
+ * @memberof PartnersApiUpdatePartner
609
+ */
610
+ readonly code: string
611
+
612
+ /**
613
+ *
614
+ * @type {UpdatePartnerRequestDto}
615
+ * @memberof PartnersApiUpdatePartner
616
+ */
617
+ readonly updatePartnerRequestDto: UpdatePartnerRequestDto
618
+
619
+ /**
620
+ * Bearer Token: provided by the login endpoint under the name accessToken.
621
+ * @type {string}
622
+ * @memberof PartnersApiUpdatePartner
623
+ */
624
+ readonly authorization?: string
625
+ }
626
+
627
+ /**
628
+ * PartnersApi - object-oriented interface
629
+ * @export
630
+ * @class PartnersApi
631
+ * @extends {BaseAPI}
632
+ */
633
+ export class PartnersApi extends BaseAPI {
634
+ /**
635
+ * This will create a partner.
636
+ * @summary Create the partner
637
+ * @param {PartnersApiCreatePartnerRequest} requestParameters Request parameters.
638
+ * @param {*} [options] Override http request option.
639
+ * @throws {RequiredError}
640
+ * @memberof PartnersApi
641
+ */
642
+ public createPartner(requestParameters: PartnersApiCreatePartnerRequest, options?: AxiosRequestConfig) {
643
+ return PartnersApiFp(this.configuration).createPartner(requestParameters.createPartnerRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
644
+ }
645
+
646
+ /**
647
+ * Permanently deletes the partner. Supply the unique code that was returned when you created the partner and this will delete it.
648
+ * @summary Delete the partner
649
+ * @param {PartnersApiDeletePartnerRequest} requestParameters Request parameters.
650
+ * @param {*} [options] Override http request option.
651
+ * @throws {RequiredError}
652
+ * @memberof PartnersApi
653
+ */
654
+ public deletePartner(requestParameters: PartnersApiDeletePartnerRequest, options?: AxiosRequestConfig) {
655
+ return PartnersApiFp(this.configuration).deletePartner(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
656
+ }
657
+
658
+ /**
659
+ * Retrieves the details of the partner that was previously created. Supply the unique partner code that was returned when you created it and Emil Api will return the corresponding partner information.
660
+ * @summary Retrieve the partner
661
+ * @param {PartnersApiGetPartnerRequest} requestParameters Request parameters.
662
+ * @param {*} [options] Override http request option.
663
+ * @throws {RequiredError}
664
+ * @memberof PartnersApi
665
+ */
666
+ public getPartner(requestParameters: PartnersApiGetPartnerRequest, options?: AxiosRequestConfig) {
667
+ return PartnersApiFp(this.configuration).getPartner(requestParameters.code, requestParameters.authorization, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
668
+ }
669
+
670
+ /**
671
+ * Returns a list of partners you have previously created. The partners are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
672
+ * @summary List partners
673
+ * @param {PartnersApiListPartnersRequest} requestParameters Request parameters.
674
+ * @param {*} [options] Override http request option.
675
+ * @throws {RequiredError}
676
+ * @memberof PartnersApi
677
+ */
678
+ public listPartners(requestParameters: PartnersApiListPartnersRequest = {}, options?: AxiosRequestConfig) {
679
+ return PartnersApiFp(this.configuration).listPartners(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.filters, options).then((request) => request(this.axios, this.basePath));
680
+ }
681
+
682
+ /**
683
+ * Updates the specified partner by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
684
+ * @summary Update the partner
685
+ * @param {PartnersApiUpdatePartnerRequest} requestParameters Request parameters.
686
+ * @param {*} [options] Override http request option.
687
+ * @throws {RequiredError}
688
+ * @memberof PartnersApi
689
+ */
690
+ public updatePartner(requestParameters: PartnersApiUpdatePartnerRequest, options?: AxiosRequestConfig) {
691
+ return PartnersApiFp(this.configuration).updatePartner(requestParameters.code, requestParameters.updatePartnerRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
692
+ }
693
+ }