@emilgroup/partner-sdk-node 1.3.1-beta.1 → 1.4.1-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/.openapi-generator/FILES +1 -0
  2. package/README.md +38 -5
  3. package/api/default-api.ts +4 -0
  4. package/api/partner-relations-api.ts +12 -8
  5. package/api/partner-tags-api.ts +12 -8
  6. package/api/partner-types-api.ts +8 -4
  7. package/api/partner-version-api.ts +8 -4
  8. package/api/partners-api.ts +12 -8
  9. package/api.ts +4 -0
  10. package/base.ts +91 -62
  11. package/common.ts +1 -0
  12. package/configuration.ts +8 -0
  13. package/dist/api/default-api.js +5 -1
  14. package/dist/api/partner-relations-api.d.ts +8 -8
  15. package/dist/api/partner-relations-api.js +17 -13
  16. package/dist/api/partner-tags-api.d.ts +8 -8
  17. package/dist/api/partner-tags-api.js +16 -12
  18. package/dist/api/partner-types-api.d.ts +4 -4
  19. package/dist/api/partner-types-api.js +13 -9
  20. package/dist/api/partner-version-api.d.ts +4 -4
  21. package/dist/api/partner-version-api.js +9 -5
  22. package/dist/api/partners-api.d.ts +8 -8
  23. package/dist/api/partners-api.js +17 -13
  24. package/dist/base.d.ts +9 -6
  25. package/dist/base.js +137 -45
  26. package/dist/common.d.ts +1 -0
  27. package/dist/common.js +2 -1
  28. package/dist/configuration.d.ts +7 -0
  29. package/dist/models/create-partner-type-request-dto.d.ts +3 -2
  30. package/dist/models/create-partner-type-response-class.d.ts +1 -1
  31. package/dist/models/create-tag-request-dto.d.ts +1 -1
  32. package/dist/models/get-partner-type-response-class.d.ts +1 -1
  33. package/dist/models/get-partner-version-response-class.d.ts +3 -3
  34. package/dist/models/index.d.ts +1 -0
  35. package/dist/models/index.js +1 -0
  36. package/dist/models/list-partner-relation-class.d.ts +1 -1
  37. package/dist/models/list-partner-relation-types-class.d.ts +1 -1
  38. package/dist/models/list-partner-types-response-class.d.ts +1 -1
  39. package/dist/models/list-partner-versions-response-class.d.ts +1 -7
  40. package/dist/models/list-partners-response-class.d.ts +1 -1
  41. package/dist/models/partner-class.d.ts +6 -12
  42. package/dist/models/partner-relation-class.d.ts +0 -12
  43. package/dist/models/partner-relation-type-class.d.ts +0 -12
  44. package/dist/models/partner-type-class.d.ts +0 -12
  45. package/dist/models/partner-type-custom-schema-dto.d.ts +102 -0
  46. package/dist/models/partner-type-custom-schema-dto.js +15 -0
  47. package/dist/models/tag-class.d.ts +0 -12
  48. package/dist/models/update-partner-type-request-dto.d.ts +3 -2
  49. package/dist/models/update-partner-type-response-class.d.ts +1 -1
  50. package/models/create-partner-type-request-dto.ts +3 -2
  51. package/models/create-partner-type-response-class.ts +1 -1
  52. package/models/create-tag-request-dto.ts +1 -1
  53. package/models/get-partner-type-response-class.ts +1 -1
  54. package/models/get-partner-version-response-class.ts +3 -3
  55. package/models/index.ts +1 -0
  56. package/models/list-partner-relation-class.ts +1 -1
  57. package/models/list-partner-relation-types-class.ts +1 -1
  58. package/models/list-partner-types-response-class.ts +1 -1
  59. package/models/list-partner-versions-response-class.ts +1 -7
  60. package/models/list-partners-response-class.ts +1 -1
  61. package/models/partner-class.ts +6 -12
  62. package/models/partner-relation-class.ts +0 -12
  63. package/models/partner-relation-type-class.ts +0 -12
  64. package/models/partner-type-class.ts +0 -12
  65. package/models/partner-type-custom-schema-dto.ts +108 -0
  66. package/models/tag-class.ts +0 -12
  67. package/models/update-partner-type-request-dto.ts +3 -2
  68. package/models/update-partner-type-response-class.ts +1 -1
  69. package/package.json +5 -2
package/dist/base.js CHANGED
@@ -38,6 +38,29 @@ var __assign = (this && this.__assign) || function () {
38
38
  };
39
39
  return __assign.apply(this, arguments);
40
40
  };
41
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
42
+ if (k2 === undefined) k2 = k;
43
+ var desc = Object.getOwnPropertyDescriptor(m, k);
44
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
45
+ desc = { enumerable: true, get: function() { return m[k]; } };
46
+ }
47
+ Object.defineProperty(o, k2, desc);
48
+ }) : (function(o, m, k, k2) {
49
+ if (k2 === undefined) k2 = k;
50
+ o[k2] = m[k];
51
+ }));
52
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
53
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
54
+ }) : function(o, v) {
55
+ o["default"] = v;
56
+ });
57
+ var __importStar = (this && this.__importStar) || function (mod) {
58
+ if (mod && mod.__esModule) return mod;
59
+ var result = {};
60
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
61
+ __setModuleDefault(result, mod);
62
+ return result;
63
+ };
41
64
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
42
65
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
43
66
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -80,11 +103,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
80
103
  Object.defineProperty(exports, "__esModule", { value: true });
81
104
  exports.RequiredError = exports.BaseAPI = exports.resetRetry = exports.Environment = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
82
105
  var configuration_1 = require("./configuration");
83
- var common_1 = require("./common");
84
106
  // Some imports not used depending on template conditions
85
107
  // @ts-ignore
86
108
  var axios_1 = __importDefault(require("axios"));
109
+ var fs = __importStar(require("fs"));
110
+ var path = __importStar(require("path"));
111
+ var os = __importStar(require("os"));
87
112
  exports.BASE_PATH = "https://apiv2.emil.de".replace(/\/+$/, "");
113
+ var CONFIG_DIRECTORY = '.emil';
114
+ var CONFIG_FILENAME = 'credentials';
115
+ var KEY_USERNAME = 'emil_username';
116
+ var KEY_PASSWORD = 'emil_password';
117
+ var filePath = os.homedir() + path.sep + CONFIG_DIRECTORY + path.sep + CONFIG_FILENAME;
88
118
  /**
89
119
  *
90
120
  * @export
@@ -109,7 +139,6 @@ function resetRetry() {
109
139
  }
110
140
  exports.resetRetry = resetRetry;
111
141
  var NETWORK_ERROR_MESSAGE = "Network Error";
112
- var TOKEN_DATA = 'APP_TOKEN';
113
142
  /**
114
143
  *
115
144
  * @export
@@ -122,34 +151,104 @@ var BaseAPI = /** @class */ (function () {
122
151
  this.basePath = basePath;
123
152
  this.axios = axios;
124
153
  this.permissions = [];
125
- this.loadTokenData();
126
154
  if (configuration) {
127
155
  this.configuration = configuration;
128
156
  this.basePath = configuration.basePath || this.basePath;
129
- this.configuration.accessToken = this.tokenData.accessToken ? "Bearer ".concat(this.tokenData.accessToken) : '';
130
157
  }
131
158
  else {
132
- var _a = this.tokenData, accessToken = _a.accessToken, username = _a.username;
133
159
  this.configuration = new configuration_1.Configuration({
134
160
  basePath: this.basePath,
135
- accessToken: accessToken ? "Bearer ".concat(accessToken) : '',
136
- username: username,
137
161
  });
138
162
  }
139
163
  this.attachInterceptor(axios);
140
164
  }
141
- BaseAPI.prototype.selectEnvironment = function (env) {
142
- this.selectBasePath(env);
165
+ BaseAPI.prototype.initialize = function (env) {
166
+ if (env === void 0) { env = Environment.Production; }
167
+ return __awaiter(this, void 0, void 0, function () {
168
+ return __generator(this, function (_a) {
169
+ switch (_a.label) {
170
+ case 0:
171
+ this.configuration.basePath = env;
172
+ return [4 /*yield*/, this.loadCredentials()];
173
+ case 1:
174
+ _a.sent();
175
+ if (!this.username) return [3 /*break*/, 3];
176
+ return [4 /*yield*/, this.authorize(this.username, this.password)];
177
+ case 2:
178
+ _a.sent();
179
+ this.password = null; // to avoid keeping password loaded in memory.
180
+ _a.label = 3;
181
+ case 3: return [2 /*return*/];
182
+ }
183
+ });
184
+ });
185
+ };
186
+ BaseAPI.prototype.loadCredentials = function () {
187
+ return __awaiter(this, void 0, void 0, function () {
188
+ var error_1;
189
+ return __generator(this, function (_a) {
190
+ switch (_a.label) {
191
+ case 0:
192
+ _a.trys.push([0, 2, , 3]);
193
+ return [4 /*yield*/, this.readConfigFile()];
194
+ case 1:
195
+ _a.sent();
196
+ return [3 /*break*/, 3];
197
+ case 2:
198
+ error_1 = _a.sent();
199
+ console.warn("No credentials file found. Check that ".concat(filePath, " exists."));
200
+ return [3 /*break*/, 3];
201
+ case 3:
202
+ this.readEnvVariables();
203
+ if (!this.username) {
204
+ console.info("No credentials found in credentials file or environment variables. Either provide some or use \n authorize() function.");
205
+ }
206
+ return [2 /*return*/];
207
+ }
208
+ });
209
+ });
210
+ };
211
+ BaseAPI.prototype.readConfigFile = function () {
212
+ return __awaiter(this, void 0, void 0, function () {
213
+ var file, lines;
214
+ var _this = this;
215
+ return __generator(this, function (_a) {
216
+ switch (_a.label) {
217
+ case 0: return [4 /*yield*/, fs.promises.readFile(filePath, 'utf-8')];
218
+ case 1:
219
+ file = _a.sent();
220
+ lines = file.split(os.EOL)
221
+ .filter(Boolean);
222
+ lines.forEach(function (line) {
223
+ if (line.startsWith(KEY_USERNAME)) {
224
+ _this.username = line.length > KEY_USERNAME.length + 1 ? line.substring(KEY_USERNAME.length + 1) : '';
225
+ }
226
+ else if (line.startsWith(KEY_PASSWORD)) {
227
+ _this.password = line.length > KEY_PASSWORD.length + 1 ? line.substring(KEY_PASSWORD.length + 1) : '';
228
+ }
229
+ });
230
+ return [2 /*return*/];
231
+ }
232
+ });
233
+ });
234
+ };
235
+ BaseAPI.prototype.readEnvVariables = function () {
236
+ if (process.env.EMIL_USERNAME) {
237
+ this.username = process.env.EMIL_USERNAME;
238
+ this.password = process.env.EMIL_PASSWORD || '';
239
+ return true;
240
+ }
241
+ return false;
143
242
  };
144
- BaseAPI.prototype.selectBasePath = function (path) {
145
- this.configuration.basePath = path;
243
+ BaseAPI.prototype.selectEnvironment = function (env) {
244
+ this.configuration.basePath = env;
146
245
  };
147
246
  BaseAPI.prototype.getPermissions = function () {
148
247
  return this.permissions;
149
248
  };
150
249
  BaseAPI.prototype.authorize = function (username, password) {
151
250
  return __awaiter(this, void 0, void 0, function () {
152
- var options, response, _a, accessToken, permissions;
251
+ var options, response, _a, accessToken, permissions, refreshToken;
153
252
  return __generator(this, function (_b) {
154
253
  switch (_b.label) {
155
254
  case 0:
@@ -169,10 +268,9 @@ var BaseAPI = /** @class */ (function () {
169
268
  _a = response.data, accessToken = _a.accessToken, permissions = _a.permissions;
170
269
  this.configuration.username = username;
171
270
  this.configuration.accessToken = "Bearer ".concat(accessToken);
172
- this.tokenData.username = username;
173
- this.tokenData.accessToken = accessToken;
174
271
  this.permissions = permissions;
175
- this.storeTokenData(__assign({}, this.tokenData));
272
+ refreshToken = this.extractRefreshToken(response);
273
+ this.configuration.refreshToken = refreshToken;
176
274
  return [2 /*return*/];
177
275
  }
178
276
  });
@@ -180,12 +278,12 @@ var BaseAPI = /** @class */ (function () {
180
278
  };
181
279
  BaseAPI.prototype.refreshTokenInternal = function () {
182
280
  return __awaiter(this, void 0, void 0, function () {
183
- var username, options, response;
184
- return __generator(this, function (_a) {
185
- switch (_a.label) {
281
+ var _a, username, refreshToken, options, response;
282
+ return __generator(this, function (_b) {
283
+ switch (_b.label) {
186
284
  case 0:
187
- username = this.configuration.username;
188
- if (!username) {
285
+ _a = this.configuration, username = _a.username, refreshToken = _a.refreshToken;
286
+ if (!username || !refreshToken) {
189
287
  throw new Error('Failed to refresh token.');
190
288
  }
191
289
  options = {
@@ -193,33 +291,28 @@ var BaseAPI = /** @class */ (function () {
193
291
  url: "".concat(this.configuration.basePath, "/authservice/v1/refresh-token"),
194
292
  headers: {
195
293
  'Content-Type': 'application/json',
294
+ Cookie: refreshToken,
196
295
  },
197
296
  data: { username: username },
198
297
  withCredentials: true,
199
298
  };
200
299
  return [4 /*yield*/, axios_1.default.request(options)];
201
300
  case 1:
202
- response = _a.sent();
301
+ response = _b.sent();
203
302
  return [2 /*return*/, response.data];
204
303
  }
205
304
  });
206
305
  });
207
306
  };
208
- BaseAPI.prototype.storeTokenData = function (tokenData) {
209
- if (typeof window !== 'undefined') {
210
- (0, common_1.defaultStorage)().set(TOKEN_DATA, tokenData);
307
+ BaseAPI.prototype.extractRefreshToken = function (response) {
308
+ if (response.headers && response.headers['set-cookie']
309
+ && response.headers['set-cookie'].length > 0) {
310
+ return "".concat(response.headers['set-cookie'][0].split(';')[0], ";");
211
311
  }
312
+ return '';
212
313
  };
213
- BaseAPI.prototype.loadTokenData = function () {
214
- if (typeof window !== 'undefined') {
215
- this.tokenData = (0, common_1.defaultStorage)().get(TOKEN_DATA) || {};
216
- }
217
- else {
218
- this.tokenData = {};
219
- }
220
- };
221
- BaseAPI.prototype.cleanTokenData = function () {
222
- this.storeTokenData(null);
314
+ BaseAPI.prototype.getConfiguration = function () {
315
+ return this.configuration;
223
316
  };
224
317
  BaseAPI.prototype.attachInterceptor = function (axios) {
225
318
  var _this = this;
@@ -231,9 +324,8 @@ var BaseAPI = /** @class */ (function () {
231
324
  switch (_c.label) {
232
325
  case 0:
233
326
  originalConfig = err.config;
234
- if (!(err.response && !(err.response instanceof XMLHttpRequest))) return [3 /*break*/, 5];
235
- if (!((err.response.status === 401 || err.response.status === 403)
236
- && !originalConfig._retry)) return [3 /*break*/, 4];
327
+ if (!err.response) return [3 /*break*/, 5];
328
+ if (!(err.response.status === 401 && !originalConfig._retry)) return [3 /*break*/, 4];
237
329
  originalConfig._retry = true;
238
330
  _c.label = 1;
239
331
  case 1:
@@ -243,21 +335,23 @@ var BaseAPI = /** @class */ (function () {
243
335
  _a = _c.sent(), tokenString = _a.accessToken, permissions = _a.permissions;
244
336
  accessToken = "Bearer ".concat(tokenString);
245
337
  this.permissions = permissions;
246
- delete originalConfig.headers['Authorization'];
247
- originalConfig.headers['Authorization'] = accessToken;
338
+ originalConfig.headers['Authorization'] = "Bearer ".concat(accessToken);
248
339
  this.configuration.accessToken = accessToken;
249
- this.tokenData.accessToken = tokenString;
250
- this.storeTokenData(this.tokenData);
251
- return [2 /*return*/, axios(originalConfig)];
340
+ return [2 /*return*/, axios.request(originalConfig)];
252
341
  case 3:
253
342
  _error_1 = _c.sent();
254
343
  if (_error_1.response && _error_1.response.data) {
255
344
  return [2 /*return*/, Promise.reject(_error_1.response.data)];
256
345
  }
257
346
  return [2 /*return*/, Promise.reject(_error_1)];
258
- case 4: return [3 /*break*/, 9];
347
+ case 4:
348
+ if (err.response.status === 403 && err.response.data) {
349
+ return [2 /*return*/, Promise.reject(err.response.data)];
350
+ }
351
+ return [3 /*break*/, 9];
259
352
  case 5:
260
353
  if (!(err.message === NETWORK_ERROR_MESSAGE
354
+ && err.isAxiosError
261
355
  && originalConfig.headers.hasOwnProperty('Authorization')
262
356
  && _retry_count < 4)) return [3 /*break*/, 9];
263
357
  _retry_count++;
@@ -272,8 +366,6 @@ var BaseAPI = /** @class */ (function () {
272
366
  _retry = true;
273
367
  originalConfig.headers['Authorization'] = accessToken;
274
368
  this.configuration.accessToken = accessToken;
275
- this.tokenData.accessToken = tokenString;
276
- this.storeTokenData(this.tokenData);
277
369
  return [2 /*return*/, axios.request(__assign({}, originalConfig))];
278
370
  case 8:
279
371
  _error_2 = _c.sent();
package/dist/common.d.ts CHANGED
@@ -12,6 +12,7 @@
12
12
  import { Configuration } from "./configuration";
13
13
  import { RequestArgs } from "./base";
14
14
  import { AxiosInstance, AxiosResponse } from 'axios';
15
+ import { URL } from 'url';
15
16
  /**
16
17
  *
17
18
  * @export
package/dist/common.js CHANGED
@@ -62,6 +62,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
62
62
  Object.defineProperty(exports, "__esModule", { value: true });
63
63
  exports.defaultStorage = exports.LocalStorage = exports.createRequestFunction = exports.toPathString = exports.serializeDataIfNeeded = exports.setSearchParams = exports.setOAuthToObject = exports.setBearerAuthToObject = exports.setBasicAuthToObject = exports.setApiKeyToObject = exports.assertParamExists = exports.DUMMY_BASE_URL = void 0;
64
64
  var base_1 = require("./base");
65
+ var url_1 = require("url");
65
66
  /**
66
67
  *
67
68
  * @export
@@ -187,7 +188,7 @@ var setSearchParams = function (url) {
187
188
  for (var _i = 1; _i < arguments.length; _i++) {
188
189
  objects[_i - 1] = arguments[_i];
189
190
  }
190
- var searchParams = new URLSearchParams(url.search);
191
+ var searchParams = new url_1.URLSearchParams(url.search);
191
192
  for (var _a = 0, objects_1 = objects; _a < objects_1.length; _a++) {
192
193
  var object = objects_1[_a];
193
194
  for (var key in object) {
@@ -68,6 +68,13 @@ export declare class Configuration {
68
68
  * @type {new () => FormData}
69
69
  */
70
70
  formDataCtor?: new () => any;
71
+ /**
72
+ * parameter for automatically refreshing access token for oauth2 security
73
+ *
74
+ * @type {string}
75
+ * @memberof Configuration
76
+ */
77
+ refreshToken?: string;
71
78
  constructor(param?: ConfigurationParameters);
72
79
  /**
73
80
  * Check if the given MIME is a JSON MIME.
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import { PartnerTypeCustomSchemaDto } from './partner-type-custom-schema-dto';
12
13
  /**
13
14
  *
14
15
  * @export
@@ -29,10 +30,10 @@ export interface CreatePartnerTypeRequestDto {
29
30
  'slug': CreatePartnerTypeRequestDtoSlugEnum;
30
31
  /**
31
32
  * The partner type schema array of object based on json schema.
32
- * @type {Array<string>}
33
+ * @type {Array<PartnerTypeCustomSchemaDto>}
33
34
  * @memberof CreatePartnerTypeRequestDto
34
35
  */
35
- 'schemas': Array<string>;
36
+ 'schemas': Array<PartnerTypeCustomSchemaDto>;
36
37
  }
37
38
  export declare const CreatePartnerTypeRequestDtoSlugEnum: {
38
39
  readonly Person: "person";
@@ -17,7 +17,7 @@ import { PartnerTypeClass } from './partner-type-class';
17
17
  */
18
18
  export interface CreatePartnerTypeResponseClass {
19
19
  /**
20
- * The partner type response.
20
+ * The partnerType response.
21
21
  * @type {PartnerTypeClass}
22
22
  * @memberof CreatePartnerTypeResponseClass
23
23
  */
@@ -32,5 +32,5 @@ export interface CreateTagRequestDto {
32
32
  * @type {string}
33
33
  * @memberof CreateTagRequestDto
34
34
  */
35
- 'description': string;
35
+ 'description'?: string;
36
36
  }
@@ -17,7 +17,7 @@ import { PartnerTypeClass } from './partner-type-class';
17
17
  */
18
18
  export interface GetPartnerTypeResponseClass {
19
19
  /**
20
- * The partner type response.
20
+ * The partnerType response.
21
21
  * @type {PartnerTypeClass}
22
22
  * @memberof GetPartnerTypeResponseClass
23
23
  */
@@ -17,9 +17,9 @@ import { PartnerClass } from './partner-class';
17
17
  */
18
18
  export interface GetPartnerVersionResponseClass {
19
19
  /**
20
- * The partner response.
21
- * @type {PartnerClass}
20
+ * The list of partners.
21
+ * @type {Array<PartnerClass>}
22
22
  * @memberof GetPartnerVersionResponseClass
23
23
  */
24
- 'partnerVersion': PartnerClass;
24
+ 'partnerVersion': Array<PartnerClass>;
25
25
  }
@@ -25,6 +25,7 @@ export * from './partner-class';
25
25
  export * from './partner-relation-class';
26
26
  export * from './partner-relation-type-class';
27
27
  export * from './partner-type-class';
28
+ export * from './partner-type-custom-schema-dto';
28
29
  export * from './tag-class';
29
30
  export * from './tag-partner-request-dto-rest';
30
31
  export * from './update-partner-relation-request-dto-rest';
@@ -41,6 +41,7 @@ __exportStar(require("./partner-class"), exports);
41
41
  __exportStar(require("./partner-relation-class"), exports);
42
42
  __exportStar(require("./partner-relation-type-class"), exports);
43
43
  __exportStar(require("./partner-type-class"), exports);
44
+ __exportStar(require("./partner-type-custom-schema-dto"), exports);
44
45
  __exportStar(require("./tag-class"), exports);
45
46
  __exportStar(require("./tag-partner-request-dto-rest"), exports);
46
47
  __exportStar(require("./update-partner-relation-request-dto-rest"), exports);
@@ -23,7 +23,7 @@ export interface ListPartnerRelationClass {
23
23
  */
24
24
  'items': Array<PartnerRelationClass>;
25
25
  /**
26
- * Next page token.
26
+ * Next page token
27
27
  * @type {string}
28
28
  * @memberof ListPartnerRelationClass
29
29
  */
@@ -23,7 +23,7 @@ export interface ListPartnerRelationTypesClass {
23
23
  */
24
24
  'items': Array<PartnerRelationTypeClass>;
25
25
  /**
26
- * Next page token.
26
+ * Next page token
27
27
  * @type {string}
28
28
  * @memberof ListPartnerRelationTypesClass
29
29
  */
@@ -17,7 +17,7 @@ import { PartnerTypeClass } from './partner-type-class';
17
17
  */
18
18
  export interface ListPartnerTypesResponseClass {
19
19
  /**
20
- * The list of partner typess.
20
+ * The list of partnerTypes.
21
21
  * @type {Array<PartnerTypeClass>}
22
22
  * @memberof ListPartnerTypesResponseClass
23
23
  */
@@ -17,15 +17,9 @@ import { PartnerClass } from './partner-class';
17
17
  */
18
18
  export interface ListPartnerVersionsResponseClass {
19
19
  /**
20
- * The list of partnerss.
20
+ * The list of Partnerss.
21
21
  * @type {Array<PartnerClass>}
22
22
  * @memberof ListPartnerVersionsResponseClass
23
23
  */
24
24
  'items': Array<PartnerClass>;
25
- /**
26
- * Next page token.
27
- * @type {string}
28
- * @memberof ListPartnerVersionsResponseClass
29
- */
30
- 'nextPageToken': string;
31
25
  }
@@ -17,7 +17,7 @@ import { PartnerClass } from './partner-class';
17
17
  */
18
18
  export interface ListPartnersResponseClass {
19
19
  /**
20
- * The list of partnerss.
20
+ * The list of Partnerss.
21
21
  * @type {Array<PartnerClass>}
22
22
  * @memberof ListPartnersResponseClass
23
23
  */
@@ -64,6 +64,12 @@ export interface PartnerClass {
64
64
  * @memberof PartnerClass
65
65
  */
66
66
  'updatedAt': string;
67
+ /**
68
+ * Last user who updated the entity
69
+ * @type {string}
70
+ * @memberof PartnerClass
71
+ */
72
+ 'updatedBy': string;
67
73
  /**
68
74
  * The version number of the partner
69
75
  * @type {number}
@@ -76,16 +82,4 @@ export interface PartnerClass {
76
82
  * @memberof PartnerClass
77
83
  */
78
84
  'tags': Array<string>;
79
- /**
80
- * Identifier of the user who created the record.
81
- * @type {string}
82
- * @memberof PartnerClass
83
- */
84
- 'createdBy': string;
85
- /**
86
- * Identifier of the user who last updated the record.
87
- * @type {string}
88
- * @memberof PartnerClass
89
- */
90
- 'updatedBy': string;
91
85
  }
@@ -69,16 +69,4 @@ export interface PartnerRelationClass {
69
69
  * @memberof PartnerRelationClass
70
70
  */
71
71
  'updatedAt': string;
72
- /**
73
- * Identifier of the user who created the record.
74
- * @type {string}
75
- * @memberof PartnerRelationClass
76
- */
77
- 'createdBy': string;
78
- /**
79
- * Identifier of the user who last updated the record.
80
- * @type {string}
81
- * @memberof PartnerRelationClass
82
- */
83
- 'updatedBy': string;
84
72
  }
@@ -63,16 +63,4 @@ export interface PartnerRelationTypeClass {
63
63
  * @memberof PartnerRelationTypeClass
64
64
  */
65
65
  'updatedAt': string;
66
- /**
67
- * Identifier of the user who created the record.
68
- * @type {string}
69
- * @memberof PartnerRelationTypeClass
70
- */
71
- 'createdBy': string;
72
- /**
73
- * Identifier of the user who last updated the record.
74
- * @type {string}
75
- * @memberof PartnerRelationTypeClass
76
- */
77
- 'updatedBy': string;
78
66
  }
@@ -63,18 +63,6 @@ export interface PartnerTypeClass {
63
63
  * @memberof PartnerTypeClass
64
64
  */
65
65
  'updatedAt': string;
66
- /**
67
- * Identifier of the user who created the record.
68
- * @type {string}
69
- * @memberof PartnerTypeClass
70
- */
71
- 'createdBy': string;
72
- /**
73
- * Identifier of the user who last updated the record.
74
- * @type {string}
75
- * @memberof PartnerTypeClass
76
- */
77
- 'updatedBy': string;
78
66
  }
79
67
  export declare const PartnerTypeClassSlugEnum: {
80
68
  readonly Person: "person";
@@ -0,0 +1,102 @@
1
+ /**
2
+ * EMIL PartnerService
3
+ * The EMIL PartnerService API description
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ * Contact: kontakt@emil.de
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface PartnerTypeCustomSchemaDto
16
+ */
17
+ export interface PartnerTypeCustomSchemaDto {
18
+ /**
19
+ * The name of the schema property - should be camelCase.
20
+ * @type {string}
21
+ * @memberof PartnerTypeCustomSchemaDto
22
+ */
23
+ 'name': string;
24
+ /**
25
+ * The type of the schema property.
26
+ * @type {string}
27
+ * @memberof PartnerTypeCustomSchemaDto
28
+ */
29
+ 'type': string;
30
+ /**
31
+ * A boolean value to state if the property is required or not.
32
+ * @type {boolean}
33
+ * @memberof PartnerTypeCustomSchemaDto
34
+ */
35
+ 'isRequired': boolean;
36
+ /**
37
+ * The label of the schema property as it will be displayed in the UI. If no label is provided, the name will be used in its place.
38
+ * @type {string}
39
+ * @memberof PartnerTypeCustomSchemaDto
40
+ */
41
+ 'label'?: string;
42
+ /**
43
+ * Minimum value of the property value. Applicable only if the property is a number type.
44
+ * @type {number}
45
+ * @memberof PartnerTypeCustomSchemaDto
46
+ */
47
+ 'minimum'?: number;
48
+ /**
49
+ * Maxium value of the property value. Applicable only if the property is a number type.
50
+ * @type {number}
51
+ * @memberof PartnerTypeCustomSchemaDto
52
+ */
53
+ 'maximum'?: number;
54
+ /**
55
+ * Minimum character length of the property value. Applicable only if the property is a string type.
56
+ * @type {number}
57
+ * @memberof PartnerTypeCustomSchemaDto
58
+ */
59
+ 'minLength'?: number;
60
+ /**
61
+ * Maximum character length of the property value. Applicable only if the property is a string type.
62
+ * @type {number}
63
+ * @memberof PartnerTypeCustomSchemaDto
64
+ */
65
+ 'maxLength'?: number;
66
+ /**
67
+ * Possible options to select
68
+ * @type {object}
69
+ * @memberof PartnerTypeCustomSchemaDto
70
+ */
71
+ 'options'?: object;
72
+ /**
73
+ * The minimum number of items allowed for array fields.
74
+ * @type {number}
75
+ * @memberof PartnerTypeCustomSchemaDto
76
+ */
77
+ 'minItems'?: number;
78
+ /**
79
+ * The maximum number of items allowed for array fields.
80
+ * @type {number}
81
+ * @memberof PartnerTypeCustomSchemaDto
82
+ */
83
+ 'maxItems'?: number;
84
+ /**
85
+ * Defines the structure of items for array fields.
86
+ * @type {PartnerTypeCustomSchemaDto}
87
+ * @memberof PartnerTypeCustomSchemaDto
88
+ */
89
+ 'items'?: PartnerTypeCustomSchemaDto;
90
+ /**
91
+ * Defines the properties for object fields.
92
+ * @type {object}
93
+ * @memberof PartnerTypeCustomSchemaDto
94
+ */
95
+ 'properties'?: object;
96
+ /**
97
+ * Defines the regex expression for string field.
98
+ * @type {string}
99
+ * @memberof PartnerTypeCustomSchemaDto
100
+ */
101
+ 'regexExpression'?: string;
102
+ }