@emilgroup/tenant-sdk 1.0.0 → 1.1.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.
package/README.md CHANGED
@@ -17,11 +17,11 @@ Although this package can be used in both TypeScript and JavaScript, it is inten
17
17
  Navigate to the folder of your consuming project and run one of the following commands:
18
18
 
19
19
  ```
20
- npm install @emilgroup/tenant-sdk@1.0.0 --save
20
+ npm install @emilgroup/tenant-sdk@1.1.0 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/tenant-sdk@1.0.0
24
+ yarn add @emilgroup/tenant-sdk@1.1.0
25
25
  ```
26
26
 
27
27
  And then you can import `UsersApi`.
@@ -145,6 +145,57 @@ export const OrganizationsApiAxiosParamCreator = function (configuration?: Confi
145
145
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
146
146
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
147
147
 
148
+ return {
149
+ url: toPathString(localVarUrlObj),
150
+ options: localVarRequestOptions,
151
+ };
152
+ },
153
+ /**
154
+ * Update organization data
155
+ * @summary Update the Organization
156
+ * @param {string} code
157
+ * @param {object} body
158
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
159
+ * @param {*} [options] Override http request option.
160
+ * @throws {RequiredError}
161
+ */
162
+ updateOrganization: async (code: string, body: object, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
163
+ // verify required parameter 'code' is not null or undefined
164
+ assertParamExists('updateOrganization', 'code', code)
165
+ // verify required parameter 'body' is not null or undefined
166
+ assertParamExists('updateOrganization', 'body', body)
167
+ const localVarPath = `/tenantservice/v1/organizations/{code}`
168
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
169
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
170
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
171
+ let baseOptions;
172
+ let baseAccessToken;
173
+ if (configuration) {
174
+ baseOptions = configuration.baseOptions;
175
+ baseAccessToken = configuration.accessToken;
176
+ }
177
+
178
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
179
+ const localVarHeaderParameter = {} as any;
180
+ const localVarQueryParameter = {} as any;
181
+
182
+ // authentication bearer required
183
+ // http bearer authentication required
184
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
185
+
186
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
187
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
188
+ }
189
+
190
+
191
+
192
+ localVarHeaderParameter['Content-Type'] = 'application/json';
193
+
194
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
195
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
196
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
197
+ localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration)
198
+
148
199
  return {
149
200
  url: toPathString(localVarUrlObj),
150
201
  options: localVarRequestOptions,
@@ -189,6 +240,19 @@ export const OrganizationsApiFp = function(configuration?: Configuration) {
189
240
  const localVarAxiosArgs = await localVarAxiosParamCreator.listOrganizations(authorization, pageSize, pageToken, filter, search, order, expand, options);
190
241
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
191
242
  },
243
+ /**
244
+ * Update organization data
245
+ * @summary Update the Organization
246
+ * @param {string} code
247
+ * @param {object} body
248
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
249
+ * @param {*} [options] Override http request option.
250
+ * @throws {RequiredError}
251
+ */
252
+ async updateOrganization(code: string, body: object, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
253
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateOrganization(code, body, authorization, options);
254
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
255
+ },
192
256
  }
193
257
  };
194
258
 
@@ -226,6 +290,18 @@ export const OrganizationsApiFactory = function (configuration?: Configuration,
226
290
  listOrganizations(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options?: any): AxiosPromise<ListOrganizationsResponseClass> {
227
291
  return localVarFp.listOrganizations(authorization, pageSize, pageToken, filter, search, order, expand, options).then((request) => request(axios, basePath));
228
292
  },
293
+ /**
294
+ * Update organization data
295
+ * @summary Update the Organization
296
+ * @param {string} code
297
+ * @param {object} body
298
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
299
+ * @param {*} [options] Override http request option.
300
+ * @throws {RequiredError}
301
+ */
302
+ updateOrganization(code: string, body: object, authorization?: string, options?: any): AxiosPromise<object> {
303
+ return localVarFp.updateOrganization(code, body, authorization, options).then((request) => request(axios, basePath));
304
+ },
229
305
  };
230
306
  };
231
307
 
@@ -306,6 +382,34 @@ export interface OrganizationsApiListOrganizationsRequest {
306
382
  readonly expand?: any
307
383
  }
308
384
 
385
+ /**
386
+ * Request parameters for updateOrganization operation in OrganizationsApi.
387
+ * @export
388
+ * @interface OrganizationsApiUpdateOrganizationRequest
389
+ */
390
+ export interface OrganizationsApiUpdateOrganizationRequest {
391
+ /**
392
+ *
393
+ * @type {string}
394
+ * @memberof OrganizationsApiUpdateOrganization
395
+ */
396
+ readonly code: string
397
+
398
+ /**
399
+ *
400
+ * @type {object}
401
+ * @memberof OrganizationsApiUpdateOrganization
402
+ */
403
+ readonly body: object
404
+
405
+ /**
406
+ * Bearer Token: provided by the login endpoint under the name accessToken.
407
+ * @type {string}
408
+ * @memberof OrganizationsApiUpdateOrganization
409
+ */
410
+ readonly authorization?: string
411
+ }
412
+
309
413
  /**
310
414
  * OrganizationsApi - object-oriented interface
311
415
  * @export
@@ -336,4 +440,16 @@ export class OrganizationsApi extends BaseAPI {
336
440
  public listOrganizations(requestParameters: OrganizationsApiListOrganizationsRequest = {}, options?: AxiosRequestConfig) {
337
441
  return OrganizationsApiFp(this.configuration).listOrganizations(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
338
442
  }
443
+
444
+ /**
445
+ * Update organization data
446
+ * @summary Update the Organization
447
+ * @param {OrganizationsApiUpdateOrganizationRequest} requestParameters Request parameters.
448
+ * @param {*} [options] Override http request option.
449
+ * @throws {RequiredError}
450
+ * @memberof OrganizationsApi
451
+ */
452
+ public updateOrganization(requestParameters: OrganizationsApiUpdateOrganizationRequest, options?: AxiosRequestConfig) {
453
+ return OrganizationsApiFp(this.configuration).updateOrganization(requestParameters.code, requestParameters.body, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
454
+ }
339
455
  }
@@ -42,6 +42,16 @@ export declare const OrganizationsApiAxiosParamCreator: (configuration?: Configu
42
42
  * @throws {RequiredError}
43
43
  */
44
44
  listOrganizations: (authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options?: AxiosRequestConfig) => Promise<RequestArgs>;
45
+ /**
46
+ * Update organization data
47
+ * @summary Update the Organization
48
+ * @param {string} code
49
+ * @param {object} body
50
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
51
+ * @param {*} [options] Override http request option.
52
+ * @throws {RequiredError}
53
+ */
54
+ updateOrganization: (code: string, body: object, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
45
55
  };
46
56
  /**
47
57
  * OrganizationsApi - functional programming interface
@@ -71,6 +81,16 @@ export declare const OrganizationsApiFp: (configuration?: Configuration) => {
71
81
  * @throws {RequiredError}
72
82
  */
73
83
  listOrganizations(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListOrganizationsResponseClass>>;
84
+ /**
85
+ * Update organization data
86
+ * @summary Update the Organization
87
+ * @param {string} code
88
+ * @param {object} body
89
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
90
+ * @param {*} [options] Override http request option.
91
+ * @throws {RequiredError}
92
+ */
93
+ updateOrganization(code: string, body: object, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>>;
74
94
  };
75
95
  /**
76
96
  * OrganizationsApi - factory interface
@@ -100,6 +120,16 @@ export declare const OrganizationsApiFactory: (configuration?: Configuration, ba
100
120
  * @throws {RequiredError}
101
121
  */
102
122
  listOrganizations(authorization?: string, pageSize?: any, pageToken?: any, filter?: any, search?: any, order?: any, expand?: any, options?: any): AxiosPromise<ListOrganizationsResponseClass>;
123
+ /**
124
+ * Update organization data
125
+ * @summary Update the Organization
126
+ * @param {string} code
127
+ * @param {object} body
128
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
129
+ * @param {*} [options] Override http request option.
130
+ * @throws {RequiredError}
131
+ */
132
+ updateOrganization(code: string, body: object, authorization?: string, options?: any): AxiosPromise<object>;
103
133
  };
104
134
  /**
105
135
  * Request parameters for getOrganization operation in OrganizationsApi.
@@ -169,6 +199,31 @@ export interface OrganizationsApiListOrganizationsRequest {
169
199
  */
170
200
  readonly expand?: any;
171
201
  }
202
+ /**
203
+ * Request parameters for updateOrganization operation in OrganizationsApi.
204
+ * @export
205
+ * @interface OrganizationsApiUpdateOrganizationRequest
206
+ */
207
+ export interface OrganizationsApiUpdateOrganizationRequest {
208
+ /**
209
+ *
210
+ * @type {string}
211
+ * @memberof OrganizationsApiUpdateOrganization
212
+ */
213
+ readonly code: string;
214
+ /**
215
+ *
216
+ * @type {object}
217
+ * @memberof OrganizationsApiUpdateOrganization
218
+ */
219
+ readonly body: object;
220
+ /**
221
+ * Bearer Token: provided by the login endpoint under the name accessToken.
222
+ * @type {string}
223
+ * @memberof OrganizationsApiUpdateOrganization
224
+ */
225
+ readonly authorization?: string;
226
+ }
172
227
  /**
173
228
  * OrganizationsApi - object-oriented interface
174
229
  * @export
@@ -194,4 +249,13 @@ export declare class OrganizationsApi extends BaseAPI {
194
249
  * @memberof OrganizationsApi
195
250
  */
196
251
  listOrganizations(requestParameters?: OrganizationsApiListOrganizationsRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<ListOrganizationsResponseClass, any>>;
252
+ /**
253
+ * Update organization data
254
+ * @summary Update the Organization
255
+ * @param {OrganizationsApiUpdateOrganizationRequest} requestParameters Request parameters.
256
+ * @param {*} [options] Override http request option.
257
+ * @throws {RequiredError}
258
+ * @memberof OrganizationsApi
259
+ */
260
+ updateOrganization(requestParameters: OrganizationsApiUpdateOrganizationRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<object, any>>;
197
261
  }
@@ -212,6 +212,59 @@ var OrganizationsApiAxiosParamCreator = function (configuration) {
212
212
  });
213
213
  });
214
214
  },
215
+ /**
216
+ * Update organization data
217
+ * @summary Update the Organization
218
+ * @param {string} code
219
+ * @param {object} body
220
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
221
+ * @param {*} [options] Override http request option.
222
+ * @throws {RequiredError}
223
+ */
224
+ updateOrganization: function (code, body, authorization, options) {
225
+ if (options === void 0) { options = {}; }
226
+ return __awaiter(_this, void 0, void 0, function () {
227
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
228
+ return __generator(this, function (_a) {
229
+ switch (_a.label) {
230
+ case 0:
231
+ // verify required parameter 'code' is not null or undefined
232
+ (0, common_1.assertParamExists)('updateOrganization', 'code', code);
233
+ // verify required parameter 'body' is not null or undefined
234
+ (0, common_1.assertParamExists)('updateOrganization', 'body', body);
235
+ localVarPath = "/tenantservice/v1/organizations/{code}"
236
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
237
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
238
+ if (configuration) {
239
+ baseOptions = configuration.baseOptions;
240
+ baseAccessToken = configuration.accessToken;
241
+ }
242
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
243
+ localVarHeaderParameter = {};
244
+ localVarQueryParameter = {};
245
+ // authentication bearer required
246
+ // http bearer authentication required
247
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
248
+ case 1:
249
+ // authentication bearer required
250
+ // http bearer authentication required
251
+ _a.sent();
252
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
253
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
254
+ }
255
+ localVarHeaderParameter['Content-Type'] = 'application/json';
256
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
257
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
258
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
259
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
260
+ return [2 /*return*/, {
261
+ url: (0, common_1.toPathString)(localVarUrlObj),
262
+ options: localVarRequestOptions,
263
+ }];
264
+ }
265
+ });
266
+ });
267
+ },
215
268
  };
216
269
  };
217
270
  exports.OrganizationsApiAxiosParamCreator = OrganizationsApiAxiosParamCreator;
@@ -269,6 +322,28 @@ var OrganizationsApiFp = function (configuration) {
269
322
  });
270
323
  });
271
324
  },
325
+ /**
326
+ * Update organization data
327
+ * @summary Update the Organization
328
+ * @param {string} code
329
+ * @param {object} body
330
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
331
+ * @param {*} [options] Override http request option.
332
+ * @throws {RequiredError}
333
+ */
334
+ updateOrganization: function (code, body, authorization, options) {
335
+ return __awaiter(this, void 0, void 0, function () {
336
+ var localVarAxiosArgs;
337
+ return __generator(this, function (_a) {
338
+ switch (_a.label) {
339
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateOrganization(code, body, authorization, options)];
340
+ case 1:
341
+ localVarAxiosArgs = _a.sent();
342
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
343
+ }
344
+ });
345
+ });
346
+ },
272
347
  };
273
348
  };
274
349
  exports.OrganizationsApiFp = OrganizationsApiFp;
@@ -306,6 +381,18 @@ var OrganizationsApiFactory = function (configuration, basePath, axios) {
306
381
  listOrganizations: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
307
382
  return localVarFp.listOrganizations(authorization, pageSize, pageToken, filter, search, order, expand, options).then(function (request) { return request(axios, basePath); });
308
383
  },
384
+ /**
385
+ * Update organization data
386
+ * @summary Update the Organization
387
+ * @param {string} code
388
+ * @param {object} body
389
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
390
+ * @param {*} [options] Override http request option.
391
+ * @throws {RequiredError}
392
+ */
393
+ updateOrganization: function (code, body, authorization, options) {
394
+ return localVarFp.updateOrganization(code, body, authorization, options).then(function (request) { return request(axios, basePath); });
395
+ },
309
396
  };
310
397
  };
311
398
  exports.OrganizationsApiFactory = OrganizationsApiFactory;
@@ -345,6 +432,18 @@ var OrganizationsApi = /** @class */ (function (_super) {
345
432
  if (requestParameters === void 0) { requestParameters = {}; }
346
433
  return (0, exports.OrganizationsApiFp)(this.configuration).listOrganizations(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
347
434
  };
435
+ /**
436
+ * Update organization data
437
+ * @summary Update the Organization
438
+ * @param {OrganizationsApiUpdateOrganizationRequest} requestParameters Request parameters.
439
+ * @param {*} [options] Override http request option.
440
+ * @throws {RequiredError}
441
+ * @memberof OrganizationsApi
442
+ */
443
+ OrganizationsApi.prototype.updateOrganization = function (requestParameters, options) {
444
+ var _this = this;
445
+ return (0, exports.OrganizationsApiFp)(this.configuration).updateOrganization(requestParameters.code, requestParameters.body, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
446
+ };
348
447
  return OrganizationsApi;
349
448
  }(base_1.BaseAPI));
350
449
  exports.OrganizationsApi = OrganizationsApi;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emilgroup/tenant-sdk",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "OpenAPI client for @emilgroup/tenant-sdk",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [