@emilgroup/partner-sdk 1.1.0 → 1.3.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 (79) hide show
  1. package/.openapi-generator/FILES +14 -1
  2. package/README.md +2 -2
  3. package/api/default-api.ts +8 -4
  4. package/api/partner-relations-api.ts +638 -19
  5. package/api/partner-tags-api.ts +662 -0
  6. package/api/partner-version-api.ts +31 -31
  7. package/api/partners-api.ts +118 -0
  8. package/api.ts +2 -0
  9. package/base.ts +5 -1
  10. package/dist/api/default-api.d.ts +8 -4
  11. package/dist/api/default-api.js +8 -4
  12. package/dist/api/partner-relations-api.d.ts +360 -16
  13. package/dist/api/partner-relations-api.js +513 -8
  14. package/dist/api/partner-tags-api.d.ts +375 -0
  15. package/dist/api/partner-tags-api.js +629 -0
  16. package/dist/api/partner-version-api.d.ts +31 -31
  17. package/dist/api/partner-version-api.js +16 -16
  18. package/dist/api/partners-api.d.ts +65 -0
  19. package/dist/api/partners-api.js +99 -0
  20. package/dist/api.d.ts +1 -0
  21. package/dist/api.js +1 -0
  22. package/dist/base.d.ts +1 -0
  23. package/dist/base.js +4 -1
  24. package/dist/models/create-partner-relation-request-dto-rest.d.ts +65 -0
  25. package/dist/models/create-partner-relation-request-dto-rest.js +26 -0
  26. package/dist/models/create-partner-relation-response-class.d.ts +25 -0
  27. package/dist/models/create-partner-type-request-dto.d.ts +13 -3
  28. package/dist/models/create-partner-type-request-dto.js +5 -0
  29. package/dist/models/create-tag-request-dto.d.ts +36 -0
  30. package/dist/models/create-tag-request-dto.js +15 -0
  31. package/dist/models/create-tag-response-class.d.ts +25 -0
  32. package/dist/models/create-tag-response-class.js +15 -0
  33. package/dist/models/get-partner-relation-class.d.ts +25 -0
  34. package/dist/models/get-partner-relation-class.js +15 -0
  35. package/dist/models/get-tag-response-class.d.ts +25 -0
  36. package/dist/models/get-tag-response-class.js +15 -0
  37. package/dist/models/index.d.ts +13 -1
  38. package/dist/models/index.js +13 -1
  39. package/dist/models/list-partner-relation-class.d.ts +31 -0
  40. package/dist/models/list-partner-relation-class.js +15 -0
  41. package/dist/models/list-tags-response-class.d.ts +31 -0
  42. package/dist/models/list-tags-response-class.js +15 -0
  43. package/dist/models/partner-class.d.ts +6 -0
  44. package/dist/models/partner-relation-class.d.ts +72 -0
  45. package/dist/models/partner-relation-class.js +15 -0
  46. package/dist/models/partner-type-class.d.ts +11 -0
  47. package/dist/models/partner-type-class.js +5 -0
  48. package/dist/models/tag-class.d.ts +54 -0
  49. package/dist/models/tag-class.js +15 -0
  50. package/dist/models/tag-partner-request-dto-rest.d.ts +24 -0
  51. package/dist/models/tag-partner-request-dto-rest.js +15 -0
  52. package/dist/models/update-partner-relation-request-dto-rest.d.ts +36 -0
  53. package/dist/models/update-partner-relation-request-dto-rest.js +15 -0
  54. package/dist/models/update-partner-type-request-dto.d.ts +14 -4
  55. package/dist/models/update-partner-type-request-dto.js +5 -0
  56. package/dist/models/update-tag-response-class.d.ts +25 -0
  57. package/dist/models/update-tag-response-class.js +15 -0
  58. package/models/create-partner-relation-request-dto-rest.ts +74 -0
  59. package/models/create-partner-relation-response-class.ts +31 -0
  60. package/models/create-partner-type-request-dto.ts +16 -3
  61. package/models/create-tag-request-dto.ts +42 -0
  62. package/models/create-tag-response-class.ts +31 -0
  63. package/models/get-partner-relation-class.ts +31 -0
  64. package/models/get-tag-response-class.ts +31 -0
  65. package/models/index.ts +13 -1
  66. package/models/list-partner-relation-class.ts +37 -0
  67. package/models/list-tags-response-class.ts +37 -0
  68. package/models/partner-class.ts +6 -0
  69. package/models/partner-relation-class.ts +78 -0
  70. package/models/partner-type-class.ts +14 -0
  71. package/models/tag-class.ts +60 -0
  72. package/models/tag-partner-request-dto-rest.ts +30 -0
  73. package/models/update-partner-relation-request-dto-rest.ts +42 -0
  74. package/models/update-partner-type-request-dto.ts +17 -4
  75. package/models/update-tag-response-class.ts +31 -0
  76. package/package.json +1 -1
  77. package/dist/models/partner-type-custom-schema-dto.d.ts +0 -66
  78. package/models/partner-type-custom-schema-dto.ts +0 -72
  79. /package/dist/models/{partner-type-custom-schema-dto.js → create-partner-relation-response-class.js} +0 -0
@@ -0,0 +1,629 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL PartnerService
6
+ * The EMIL PartnerService API description
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.PartnerTagsApi = exports.PartnerTagsApiFactory = exports.PartnerTagsApiFp = exports.PartnerTagsApiAxiosParamCreator = void 0;
82
+ var axios_1 = __importDefault(require("axios"));
83
+ // Some imports not used depending on template conditions
84
+ // @ts-ignore
85
+ var common_1 = require("../common");
86
+ // @ts-ignore
87
+ var base_1 = require("../base");
88
+ /**
89
+ * PartnerTagsApi - axios parameter creator
90
+ * @export
91
+ */
92
+ var PartnerTagsApiAxiosParamCreator = function (configuration) {
93
+ var _this = this;
94
+ return {
95
+ /**
96
+ * This will create a tag that can be used tag partners. Tags can be used to categorize partners and to apply specific rules to them.
97
+ * @summary Create the partner tag
98
+ * @param {CreateTagRequestDto} createTagRequestDto
99
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
100
+ * @param {*} [options] Override http request option.
101
+ * @throws {RequiredError}
102
+ */
103
+ createTag: function (createTagRequestDto, authorization, options) {
104
+ if (options === void 0) { options = {}; }
105
+ return __awaiter(_this, void 0, void 0, function () {
106
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
107
+ return __generator(this, function (_a) {
108
+ switch (_a.label) {
109
+ case 0:
110
+ // verify required parameter 'createTagRequestDto' is not null or undefined
111
+ (0, common_1.assertParamExists)('createTag', 'createTagRequestDto', createTagRequestDto);
112
+ localVarPath = "/partnerservice/v1/tags";
113
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
114
+ if (configuration) {
115
+ baseOptions = configuration.baseOptions;
116
+ baseAccessToken = configuration.accessToken;
117
+ }
118
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
119
+ localVarHeaderParameter = {};
120
+ localVarQueryParameter = {};
121
+ // authentication bearer required
122
+ // http bearer authentication required
123
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
124
+ case 1:
125
+ // authentication bearer required
126
+ // http bearer authentication required
127
+ _a.sent();
128
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
129
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
130
+ }
131
+ localVarHeaderParameter['Content-Type'] = 'application/json';
132
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
133
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
134
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
135
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createTagRequestDto, localVarRequestOptions, configuration);
136
+ return [2 /*return*/, {
137
+ url: (0, common_1.toPathString)(localVarUrlObj),
138
+ options: localVarRequestOptions,
139
+ }];
140
+ }
141
+ });
142
+ });
143
+ },
144
+ /**
145
+ * Permanently deletes the partner tag. Supply the unique code that was returned when you created the partner tag and this will delete it.
146
+ * @summary Delete the partner tag
147
+ * @param {string} code
148
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
149
+ * @param {*} [options] Override http request option.
150
+ * @throws {RequiredError}
151
+ */
152
+ deleteTag: function (code, authorization, options) {
153
+ if (options === void 0) { options = {}; }
154
+ return __awaiter(_this, void 0, void 0, function () {
155
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
156
+ return __generator(this, function (_a) {
157
+ switch (_a.label) {
158
+ case 0:
159
+ // verify required parameter 'code' is not null or undefined
160
+ (0, common_1.assertParamExists)('deleteTag', 'code', code);
161
+ localVarPath = "/partnerservice/v1/tags/{code}"
162
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
163
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
164
+ if (configuration) {
165
+ baseOptions = configuration.baseOptions;
166
+ baseAccessToken = configuration.accessToken;
167
+ }
168
+ localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
169
+ localVarHeaderParameter = {};
170
+ localVarQueryParameter = {};
171
+ // authentication bearer required
172
+ // http bearer authentication required
173
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
174
+ case 1:
175
+ // authentication bearer required
176
+ // http bearer authentication required
177
+ _a.sent();
178
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
179
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
180
+ }
181
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
182
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
183
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
184
+ return [2 /*return*/, {
185
+ url: (0, common_1.toPathString)(localVarUrlObj),
186
+ options: localVarRequestOptions,
187
+ }];
188
+ }
189
+ });
190
+ });
191
+ },
192
+ /**
193
+ * Retrieves the details of the partner tag that was previously created. Supply the unique partner tag code that was returned when you created it and Emil Api will return the corresponding partner tag information.
194
+ * @summary Retrieve the partner tag
195
+ * @param {string} code Unique identifier for the object.
196
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
197
+ * @param {*} [options] Override http request option.
198
+ * @throws {RequiredError}
199
+ */
200
+ getTag: function (code, authorization, options) {
201
+ if (options === void 0) { options = {}; }
202
+ return __awaiter(_this, void 0, void 0, function () {
203
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
204
+ return __generator(this, function (_a) {
205
+ switch (_a.label) {
206
+ case 0:
207
+ // verify required parameter 'code' is not null or undefined
208
+ (0, common_1.assertParamExists)('getTag', 'code', code);
209
+ localVarPath = "/partnerservice/v1/tags/{code}"
210
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
211
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
212
+ if (configuration) {
213
+ baseOptions = configuration.baseOptions;
214
+ baseAccessToken = configuration.accessToken;
215
+ }
216
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
217
+ localVarHeaderParameter = {};
218
+ localVarQueryParameter = {};
219
+ // authentication bearer required
220
+ // http bearer authentication required
221
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
222
+ case 1:
223
+ // authentication bearer required
224
+ // http bearer authentication required
225
+ _a.sent();
226
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
227
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
228
+ }
229
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
230
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
231
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
232
+ return [2 /*return*/, {
233
+ url: (0, common_1.toPathString)(localVarUrlObj),
234
+ options: localVarRequestOptions,
235
+ }];
236
+ }
237
+ });
238
+ });
239
+ },
240
+ /**
241
+ * Returns a list of partner tags you have previously created. The partner tags are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
242
+ * @summary List partner tags
243
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
244
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
245
+ * @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.
246
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, slug, label&lt;/i&gt;
247
+ * @param {any} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
248
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, slug, label, createdAt, updatedAt&lt;/i&gt;
249
+ * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: .&lt;i&gt;
250
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, slug, label&lt;/i&gt;
251
+ * @param {*} [options] Override http request option.
252
+ * @throws {RequiredError}
253
+ */
254
+ listTags: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
255
+ if (options === void 0) { options = {}; }
256
+ return __awaiter(_this, void 0, void 0, function () {
257
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
258
+ return __generator(this, function (_a) {
259
+ switch (_a.label) {
260
+ case 0:
261
+ localVarPath = "/partnerservice/v1/tags";
262
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
263
+ if (configuration) {
264
+ baseOptions = configuration.baseOptions;
265
+ baseAccessToken = configuration.accessToken;
266
+ }
267
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
268
+ localVarHeaderParameter = {};
269
+ localVarQueryParameter = {};
270
+ // authentication bearer required
271
+ // http bearer authentication required
272
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
273
+ case 1:
274
+ // authentication bearer required
275
+ // http bearer authentication required
276
+ _a.sent();
277
+ if (pageSize !== undefined) {
278
+ localVarQueryParameter['pageSize'] = pageSize;
279
+ }
280
+ if (pageToken !== undefined) {
281
+ localVarQueryParameter['pageToken'] = pageToken;
282
+ }
283
+ if (filter !== undefined) {
284
+ localVarQueryParameter['filter'] = filter;
285
+ }
286
+ if (search !== undefined) {
287
+ localVarQueryParameter['search'] = search;
288
+ }
289
+ if (order !== undefined) {
290
+ localVarQueryParameter['order'] = order;
291
+ }
292
+ if (expand !== undefined) {
293
+ localVarQueryParameter['expand'] = expand;
294
+ }
295
+ if (filters !== undefined) {
296
+ localVarQueryParameter['filters'] = filters;
297
+ }
298
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
299
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
300
+ }
301
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
302
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
303
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
304
+ return [2 /*return*/, {
305
+ url: (0, common_1.toPathString)(localVarUrlObj),
306
+ options: localVarRequestOptions,
307
+ }];
308
+ }
309
+ });
310
+ });
311
+ },
312
+ /**
313
+ * Updates the specified partner tag by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
314
+ * @summary Update the partner tag
315
+ * @param {string} code
316
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
317
+ * @param {*} [options] Override http request option.
318
+ * @throws {RequiredError}
319
+ */
320
+ updateTag: function (code, authorization, options) {
321
+ if (options === void 0) { options = {}; }
322
+ return __awaiter(_this, void 0, void 0, function () {
323
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
324
+ return __generator(this, function (_a) {
325
+ switch (_a.label) {
326
+ case 0:
327
+ // verify required parameter 'code' is not null or undefined
328
+ (0, common_1.assertParamExists)('updateTag', 'code', code);
329
+ localVarPath = "/partnerservice/v1/tags/{code}"
330
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
331
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
332
+ if (configuration) {
333
+ baseOptions = configuration.baseOptions;
334
+ baseAccessToken = configuration.accessToken;
335
+ }
336
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
337
+ localVarHeaderParameter = {};
338
+ localVarQueryParameter = {};
339
+ // authentication bearer required
340
+ // http bearer authentication required
341
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
342
+ case 1:
343
+ // authentication bearer required
344
+ // http bearer authentication required
345
+ _a.sent();
346
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
347
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
348
+ }
349
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
350
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
351
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
352
+ return [2 /*return*/, {
353
+ url: (0, common_1.toPathString)(localVarUrlObj),
354
+ options: localVarRequestOptions,
355
+ }];
356
+ }
357
+ });
358
+ });
359
+ },
360
+ };
361
+ };
362
+ exports.PartnerTagsApiAxiosParamCreator = PartnerTagsApiAxiosParamCreator;
363
+ /**
364
+ * PartnerTagsApi - functional programming interface
365
+ * @export
366
+ */
367
+ var PartnerTagsApiFp = function (configuration) {
368
+ var localVarAxiosParamCreator = (0, exports.PartnerTagsApiAxiosParamCreator)(configuration);
369
+ return {
370
+ /**
371
+ * This will create a tag that can be used tag partners. Tags can be used to categorize partners and to apply specific rules to them.
372
+ * @summary Create the partner tag
373
+ * @param {CreateTagRequestDto} createTagRequestDto
374
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
375
+ * @param {*} [options] Override http request option.
376
+ * @throws {RequiredError}
377
+ */
378
+ createTag: function (createTagRequestDto, authorization, options) {
379
+ return __awaiter(this, void 0, void 0, function () {
380
+ var localVarAxiosArgs;
381
+ return __generator(this, function (_a) {
382
+ switch (_a.label) {
383
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createTag(createTagRequestDto, authorization, options)];
384
+ case 1:
385
+ localVarAxiosArgs = _a.sent();
386
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
387
+ }
388
+ });
389
+ });
390
+ },
391
+ /**
392
+ * Permanently deletes the partner tag. Supply the unique code that was returned when you created the partner tag and this will delete it.
393
+ * @summary Delete the partner tag
394
+ * @param {string} code
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
+ deleteTag: function (code, authorization, options) {
400
+ return __awaiter(this, void 0, void 0, function () {
401
+ var localVarAxiosArgs;
402
+ return __generator(this, function (_a) {
403
+ switch (_a.label) {
404
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteTag(code, authorization, options)];
405
+ case 1:
406
+ localVarAxiosArgs = _a.sent();
407
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
408
+ }
409
+ });
410
+ });
411
+ },
412
+ /**
413
+ * Retrieves the details of the partner tag that was previously created. Supply the unique partner tag code that was returned when you created it and Emil Api will return the corresponding partner tag information.
414
+ * @summary Retrieve the partner tag
415
+ * @param {string} code Unique identifier for the object.
416
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
417
+ * @param {*} [options] Override http request option.
418
+ * @throws {RequiredError}
419
+ */
420
+ getTag: function (code, authorization, options) {
421
+ return __awaiter(this, void 0, void 0, function () {
422
+ var localVarAxiosArgs;
423
+ return __generator(this, function (_a) {
424
+ switch (_a.label) {
425
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getTag(code, authorization, options)];
426
+ case 1:
427
+ localVarAxiosArgs = _a.sent();
428
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
429
+ }
430
+ });
431
+ });
432
+ },
433
+ /**
434
+ * Returns a list of partner tags you have previously created. The partner tags are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
435
+ * @summary List partner tags
436
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
437
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
438
+ * @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.
439
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, slug, label&lt;/i&gt;
440
+ * @param {any} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
441
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, slug, label, createdAt, updatedAt&lt;/i&gt;
442
+ * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: .&lt;i&gt;
443
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, slug, label&lt;/i&gt;
444
+ * @param {*} [options] Override http request option.
445
+ * @throws {RequiredError}
446
+ */
447
+ listTags: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
448
+ return __awaiter(this, void 0, void 0, function () {
449
+ var localVarAxiosArgs;
450
+ return __generator(this, function (_a) {
451
+ switch (_a.label) {
452
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listTags(authorization, pageSize, pageToken, filter, search, order, expand, filters, options)];
453
+ case 1:
454
+ localVarAxiosArgs = _a.sent();
455
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
456
+ }
457
+ });
458
+ });
459
+ },
460
+ /**
461
+ * Updates the specified partner tag by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
462
+ * @summary Update the partner tag
463
+ * @param {string} code
464
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
465
+ * @param {*} [options] Override http request option.
466
+ * @throws {RequiredError}
467
+ */
468
+ updateTag: function (code, authorization, options) {
469
+ return __awaiter(this, void 0, void 0, function () {
470
+ var localVarAxiosArgs;
471
+ return __generator(this, function (_a) {
472
+ switch (_a.label) {
473
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateTag(code, authorization, options)];
474
+ case 1:
475
+ localVarAxiosArgs = _a.sent();
476
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
477
+ }
478
+ });
479
+ });
480
+ },
481
+ };
482
+ };
483
+ exports.PartnerTagsApiFp = PartnerTagsApiFp;
484
+ /**
485
+ * PartnerTagsApi - factory interface
486
+ * @export
487
+ */
488
+ var PartnerTagsApiFactory = function (configuration, basePath, axios) {
489
+ var localVarFp = (0, exports.PartnerTagsApiFp)(configuration);
490
+ return {
491
+ /**
492
+ * This will create a tag that can be used tag partners. Tags can be used to categorize partners and to apply specific rules to them.
493
+ * @summary Create the partner tag
494
+ * @param {CreateTagRequestDto} createTagRequestDto
495
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
496
+ * @param {*} [options] Override http request option.
497
+ * @throws {RequiredError}
498
+ */
499
+ createTag: function (createTagRequestDto, authorization, options) {
500
+ return localVarFp.createTag(createTagRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
501
+ },
502
+ /**
503
+ * Permanently deletes the partner tag. Supply the unique code that was returned when you created the partner tag and this will delete it.
504
+ * @summary Delete the partner tag
505
+ * @param {string} code
506
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
507
+ * @param {*} [options] Override http request option.
508
+ * @throws {RequiredError}
509
+ */
510
+ deleteTag: function (code, authorization, options) {
511
+ return localVarFp.deleteTag(code, authorization, options).then(function (request) { return request(axios, basePath); });
512
+ },
513
+ /**
514
+ * Retrieves the details of the partner tag that was previously created. Supply the unique partner tag code that was returned when you created it and Emil Api will return the corresponding partner tag information.
515
+ * @summary Retrieve the partner tag
516
+ * @param {string} code Unique identifier for the object.
517
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
518
+ * @param {*} [options] Override http request option.
519
+ * @throws {RequiredError}
520
+ */
521
+ getTag: function (code, authorization, options) {
522
+ return localVarFp.getTag(code, authorization, options).then(function (request) { return request(axios, basePath); });
523
+ },
524
+ /**
525
+ * Returns a list of partner tags you have previously created. The partner tags are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
526
+ * @summary List partner tags
527
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
528
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
529
+ * @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.
530
+ * @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, slug, label&lt;/i&gt;
531
+ * @param {any} [search] To search the list by any field, pass search&#x3D;xxx to fetch the result.
532
+ * @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, slug, label, createdAt, updatedAt&lt;/i&gt;
533
+ * @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: .&lt;i&gt;
534
+ * @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: code, slug, label&lt;/i&gt;
535
+ * @param {*} [options] Override http request option.
536
+ * @throws {RequiredError}
537
+ */
538
+ listTags: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
539
+ return localVarFp.listTags(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then(function (request) { return request(axios, basePath); });
540
+ },
541
+ /**
542
+ * Updates the specified partner tag by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
543
+ * @summary Update the partner tag
544
+ * @param {string} code
545
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
546
+ * @param {*} [options] Override http request option.
547
+ * @throws {RequiredError}
548
+ */
549
+ updateTag: function (code, authorization, options) {
550
+ return localVarFp.updateTag(code, authorization, options).then(function (request) { return request(axios, basePath); });
551
+ },
552
+ };
553
+ };
554
+ exports.PartnerTagsApiFactory = PartnerTagsApiFactory;
555
+ /**
556
+ * PartnerTagsApi - object-oriented interface
557
+ * @export
558
+ * @class PartnerTagsApi
559
+ * @extends {BaseAPI}
560
+ */
561
+ var PartnerTagsApi = /** @class */ (function (_super) {
562
+ __extends(PartnerTagsApi, _super);
563
+ function PartnerTagsApi() {
564
+ return _super !== null && _super.apply(this, arguments) || this;
565
+ }
566
+ /**
567
+ * This will create a tag that can be used tag partners. Tags can be used to categorize partners and to apply specific rules to them.
568
+ * @summary Create the partner tag
569
+ * @param {PartnerTagsApiCreateTagRequest} requestParameters Request parameters.
570
+ * @param {*} [options] Override http request option.
571
+ * @throws {RequiredError}
572
+ * @memberof PartnerTagsApi
573
+ */
574
+ PartnerTagsApi.prototype.createTag = function (requestParameters, options) {
575
+ var _this = this;
576
+ return (0, exports.PartnerTagsApiFp)(this.configuration).createTag(requestParameters.createTagRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
577
+ };
578
+ /**
579
+ * Permanently deletes the partner tag. Supply the unique code that was returned when you created the partner tag and this will delete it.
580
+ * @summary Delete the partner tag
581
+ * @param {PartnerTagsApiDeleteTagRequest} requestParameters Request parameters.
582
+ * @param {*} [options] Override http request option.
583
+ * @throws {RequiredError}
584
+ * @memberof PartnerTagsApi
585
+ */
586
+ PartnerTagsApi.prototype.deleteTag = function (requestParameters, options) {
587
+ var _this = this;
588
+ return (0, exports.PartnerTagsApiFp)(this.configuration).deleteTag(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
589
+ };
590
+ /**
591
+ * Retrieves the details of the partner tag that was previously created. Supply the unique partner tag code that was returned when you created it and Emil Api will return the corresponding partner tag information.
592
+ * @summary Retrieve the partner tag
593
+ * @param {PartnerTagsApiGetTagRequest} requestParameters Request parameters.
594
+ * @param {*} [options] Override http request option.
595
+ * @throws {RequiredError}
596
+ * @memberof PartnerTagsApi
597
+ */
598
+ PartnerTagsApi.prototype.getTag = function (requestParameters, options) {
599
+ var _this = this;
600
+ return (0, exports.PartnerTagsApiFp)(this.configuration).getTag(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
601
+ };
602
+ /**
603
+ * Returns a list of partner tags you have previously created. The partner tags are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
604
+ * @summary List partner tags
605
+ * @param {PartnerTagsApiListTagsRequest} requestParameters Request parameters.
606
+ * @param {*} [options] Override http request option.
607
+ * @throws {RequiredError}
608
+ * @memberof PartnerTagsApi
609
+ */
610
+ PartnerTagsApi.prototype.listTags = function (requestParameters, options) {
611
+ var _this = this;
612
+ if (requestParameters === void 0) { requestParameters = {}; }
613
+ return (0, exports.PartnerTagsApiFp)(this.configuration).listTags(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); });
614
+ };
615
+ /**
616
+ * Updates the specified partner tag by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
617
+ * @summary Update the partner tag
618
+ * @param {PartnerTagsApiUpdateTagRequest} requestParameters Request parameters.
619
+ * @param {*} [options] Override http request option.
620
+ * @throws {RequiredError}
621
+ * @memberof PartnerTagsApi
622
+ */
623
+ PartnerTagsApi.prototype.updateTag = function (requestParameters, options) {
624
+ var _this = this;
625
+ return (0, exports.PartnerTagsApiFp)(this.configuration).updateTag(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
626
+ };
627
+ return PartnerTagsApi;
628
+ }(base_1.BaseAPI));
629
+ exports.PartnerTagsApi = PartnerTagsApi;