ch-api-client-typescript2 4.7.3 → 4.7.4

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/lib/api.js CHANGED
@@ -15964,6 +15964,92 @@ exports.NotificationsApi = NotificationsApi;
15964
15964
  var PatientsApiAxiosParamCreator = function (configuration) {
15965
15965
  var _this = this;
15966
15966
  return {
15967
+ /**
15968
+ *
15969
+ * @summary Delete PatientAffiliation
15970
+ * @param {string} hospitalId
15971
+ * @param {*} [options] Override http request option.
15972
+ * @throws {RequiredError}
15973
+ */
15974
+ apiV2PatientsAffiliationsHospitalIdDelete: function (hospitalId, options) {
15975
+ if (options === void 0) { options = {}; }
15976
+ return __awaiter(_this, void 0, void 0, function () {
15977
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
15978
+ return __generator(this, function (_a) {
15979
+ switch (_a.label) {
15980
+ case 0:
15981
+ // verify required parameter 'hospitalId' is not null or undefined
15982
+ (0, common_1.assertParamExists)('apiV2PatientsAffiliationsHospitalIdDelete', 'hospitalId', hospitalId);
15983
+ localVarPath = "/api/v2/patients/affiliations/{hospitalId}"
15984
+ .replace("{".concat("hospitalId", "}"), encodeURIComponent(String(hospitalId)));
15985
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
15986
+ if (configuration) {
15987
+ baseOptions = configuration.baseOptions;
15988
+ }
15989
+ localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
15990
+ localVarHeaderParameter = {};
15991
+ localVarQueryParameter = {};
15992
+ // authentication oauth2 required
15993
+ // oauth required
15994
+ return [4 /*yield*/, (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["CloudHospital_api", "IdentityServerApi"], configuration)];
15995
+ case 1:
15996
+ // authentication oauth2 required
15997
+ // oauth required
15998
+ _a.sent();
15999
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
16000
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
16001
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
16002
+ return [2 /*return*/, {
16003
+ url: (0, common_1.toPathString)(localVarUrlObj),
16004
+ options: localVarRequestOptions,
16005
+ }];
16006
+ }
16007
+ });
16008
+ });
16009
+ },
16010
+ /**
16011
+ *
16012
+ * @summary Create PatientAffiliation
16013
+ * @param {string} hospitalId
16014
+ * @param {*} [options] Override http request option.
16015
+ * @throws {RequiredError}
16016
+ */
16017
+ apiV2PatientsAffiliationsHospitalIdPost: function (hospitalId, options) {
16018
+ if (options === void 0) { options = {}; }
16019
+ return __awaiter(_this, void 0, void 0, function () {
16020
+ var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
16021
+ return __generator(this, function (_a) {
16022
+ switch (_a.label) {
16023
+ case 0:
16024
+ // verify required parameter 'hospitalId' is not null or undefined
16025
+ (0, common_1.assertParamExists)('apiV2PatientsAffiliationsHospitalIdPost', 'hospitalId', hospitalId);
16026
+ localVarPath = "/api/v2/patients/affiliations/{hospitalId}"
16027
+ .replace("{".concat("hospitalId", "}"), encodeURIComponent(String(hospitalId)));
16028
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
16029
+ if (configuration) {
16030
+ baseOptions = configuration.baseOptions;
16031
+ }
16032
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
16033
+ localVarHeaderParameter = {};
16034
+ localVarQueryParameter = {};
16035
+ // authentication oauth2 required
16036
+ // oauth required
16037
+ return [4 /*yield*/, (0, common_1.setOAuthToObject)(localVarHeaderParameter, "oauth2", ["CloudHospital_api", "IdentityServerApi"], configuration)];
16038
+ case 1:
16039
+ // authentication oauth2 required
16040
+ // oauth required
16041
+ _a.sent();
16042
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
16043
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
16044
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
16045
+ return [2 /*return*/, {
16046
+ url: (0, common_1.toPathString)(localVarUrlObj),
16047
+ options: localVarRequestOptions,
16048
+ }];
16049
+ }
16050
+ });
16051
+ });
16052
+ },
15967
16053
  /**
15968
16054
  *
15969
16055
  * @summary Delete Patient.
@@ -16148,6 +16234,46 @@ exports.PatientsApiAxiosParamCreator = PatientsApiAxiosParamCreator;
16148
16234
  var PatientsApiFp = function (configuration) {
16149
16235
  var localVarAxiosParamCreator = (0, exports.PatientsApiAxiosParamCreator)(configuration);
16150
16236
  return {
16237
+ /**
16238
+ *
16239
+ * @summary Delete PatientAffiliation
16240
+ * @param {string} hospitalId
16241
+ * @param {*} [options] Override http request option.
16242
+ * @throws {RequiredError}
16243
+ */
16244
+ apiV2PatientsAffiliationsHospitalIdDelete: function (hospitalId, options) {
16245
+ return __awaiter(this, void 0, void 0, function () {
16246
+ var localVarAxiosArgs;
16247
+ return __generator(this, function (_a) {
16248
+ switch (_a.label) {
16249
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.apiV2PatientsAffiliationsHospitalIdDelete(hospitalId, options)];
16250
+ case 1:
16251
+ localVarAxiosArgs = _a.sent();
16252
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
16253
+ }
16254
+ });
16255
+ });
16256
+ },
16257
+ /**
16258
+ *
16259
+ * @summary Create PatientAffiliation
16260
+ * @param {string} hospitalId
16261
+ * @param {*} [options] Override http request option.
16262
+ * @throws {RequiredError}
16263
+ */
16264
+ apiV2PatientsAffiliationsHospitalIdPost: function (hospitalId, options) {
16265
+ return __awaiter(this, void 0, void 0, function () {
16266
+ var localVarAxiosArgs;
16267
+ return __generator(this, function (_a) {
16268
+ switch (_a.label) {
16269
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.apiV2PatientsAffiliationsHospitalIdPost(hospitalId, options)];
16270
+ case 1:
16271
+ localVarAxiosArgs = _a.sent();
16272
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
16273
+ }
16274
+ });
16275
+ });
16276
+ },
16151
16277
  /**
16152
16278
  *
16153
16279
  * @summary Delete Patient.
@@ -16239,6 +16365,26 @@ exports.PatientsApiFp = PatientsApiFp;
16239
16365
  var PatientsApiFactory = function (configuration, basePath, axios) {
16240
16366
  var localVarFp = (0, exports.PatientsApiFp)(configuration);
16241
16367
  return {
16368
+ /**
16369
+ *
16370
+ * @summary Delete PatientAffiliation
16371
+ * @param {string} hospitalId
16372
+ * @param {*} [options] Override http request option.
16373
+ * @throws {RequiredError}
16374
+ */
16375
+ apiV2PatientsAffiliationsHospitalIdDelete: function (hospitalId, options) {
16376
+ return localVarFp.apiV2PatientsAffiliationsHospitalIdDelete(hospitalId, options).then(function (request) { return request(axios, basePath); });
16377
+ },
16378
+ /**
16379
+ *
16380
+ * @summary Create PatientAffiliation
16381
+ * @param {string} hospitalId
16382
+ * @param {*} [options] Override http request option.
16383
+ * @throws {RequiredError}
16384
+ */
16385
+ apiV2PatientsAffiliationsHospitalIdPost: function (hospitalId, options) {
16386
+ return localVarFp.apiV2PatientsAffiliationsHospitalIdPost(hospitalId, options).then(function (request) { return request(axios, basePath); });
16387
+ },
16242
16388
  /**
16243
16389
  *
16244
16390
  * @summary Delete Patient.
@@ -16294,6 +16440,30 @@ var PatientsApi = /** @class */ (function (_super) {
16294
16440
  function PatientsApi() {
16295
16441
  return _super !== null && _super.apply(this, arguments) || this;
16296
16442
  }
16443
+ /**
16444
+ *
16445
+ * @summary Delete PatientAffiliation
16446
+ * @param {string} hospitalId
16447
+ * @param {*} [options] Override http request option.
16448
+ * @throws {RequiredError}
16449
+ * @memberof PatientsApi
16450
+ */
16451
+ PatientsApi.prototype.apiV2PatientsAffiliationsHospitalIdDelete = function (hospitalId, options) {
16452
+ var _this = this;
16453
+ return (0, exports.PatientsApiFp)(this.configuration).apiV2PatientsAffiliationsHospitalIdDelete(hospitalId, options).then(function (request) { return request(_this.axios, _this.basePath); });
16454
+ };
16455
+ /**
16456
+ *
16457
+ * @summary Create PatientAffiliation
16458
+ * @param {string} hospitalId
16459
+ * @param {*} [options] Override http request option.
16460
+ * @throws {RequiredError}
16461
+ * @memberof PatientsApi
16462
+ */
16463
+ PatientsApi.prototype.apiV2PatientsAffiliationsHospitalIdPost = function (hospitalId, options) {
16464
+ var _this = this;
16465
+ return (0, exports.PatientsApiFp)(this.configuration).apiV2PatientsAffiliationsHospitalIdPost(hospitalId, options).then(function (request) { return request(_this.axios, _this.basePath); });
16466
+ };
16297
16467
  /**
16298
16468
  *
16299
16469
  * @summary Delete Patient.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ch-api-client-typescript2",
3
- "version": "4.7.3",
3
+ "version": "4.7.4",
4
4
  "description": "Openapi generated typescript-axios client for CloudHospital",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/src/api.ts CHANGED
@@ -3294,6 +3294,12 @@ export interface CreatePatientCommand {
3294
3294
  * @memberof CreatePatientCommand
3295
3295
  */
3296
3296
  'timeZone'?: string | null;
3297
+ /**
3298
+ *
3299
+ * @type {string}
3300
+ * @memberof CreatePatientCommand
3301
+ */
3302
+ 'hospitalId'?: string;
3297
3303
  }
3298
3304
  /**
3299
3305
  *
@@ -8246,6 +8252,12 @@ export interface PatientModel {
8246
8252
  * @memberof PatientModel
8247
8253
  */
8248
8254
  'membership'?: MembershipModel;
8255
+ /**
8256
+ *
8257
+ * @type {Array<string>}
8258
+ * @memberof PatientModel
8259
+ */
8260
+ 'patientAffiliations'?: Array<string> | null;
8249
8261
  }
8250
8262
  /**
8251
8263
  *
@@ -25484,6 +25496,82 @@ export class NotificationsApi extends BaseAPI {
25484
25496
  */
25485
25497
  export const PatientsApiAxiosParamCreator = function (configuration?: Configuration) {
25486
25498
  return {
25499
+ /**
25500
+ *
25501
+ * @summary Delete PatientAffiliation
25502
+ * @param {string} hospitalId
25503
+ * @param {*} [options] Override http request option.
25504
+ * @throws {RequiredError}
25505
+ */
25506
+ apiV2PatientsAffiliationsHospitalIdDelete: async (hospitalId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
25507
+ // verify required parameter 'hospitalId' is not null or undefined
25508
+ assertParamExists('apiV2PatientsAffiliationsHospitalIdDelete', 'hospitalId', hospitalId)
25509
+ const localVarPath = `/api/v2/patients/affiliations/{hospitalId}`
25510
+ .replace(`{${"hospitalId"}}`, encodeURIComponent(String(hospitalId)));
25511
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
25512
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
25513
+ let baseOptions;
25514
+ if (configuration) {
25515
+ baseOptions = configuration.baseOptions;
25516
+ }
25517
+
25518
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
25519
+ const localVarHeaderParameter = {} as any;
25520
+ const localVarQueryParameter = {} as any;
25521
+
25522
+ // authentication oauth2 required
25523
+ // oauth required
25524
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["CloudHospital_api", "IdentityServerApi"], configuration)
25525
+
25526
+
25527
+
25528
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
25529
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
25530
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
25531
+
25532
+ return {
25533
+ url: toPathString(localVarUrlObj),
25534
+ options: localVarRequestOptions,
25535
+ };
25536
+ },
25537
+ /**
25538
+ *
25539
+ * @summary Create PatientAffiliation
25540
+ * @param {string} hospitalId
25541
+ * @param {*} [options] Override http request option.
25542
+ * @throws {RequiredError}
25543
+ */
25544
+ apiV2PatientsAffiliationsHospitalIdPost: async (hospitalId: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
25545
+ // verify required parameter 'hospitalId' is not null or undefined
25546
+ assertParamExists('apiV2PatientsAffiliationsHospitalIdPost', 'hospitalId', hospitalId)
25547
+ const localVarPath = `/api/v2/patients/affiliations/{hospitalId}`
25548
+ .replace(`{${"hospitalId"}}`, encodeURIComponent(String(hospitalId)));
25549
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
25550
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
25551
+ let baseOptions;
25552
+ if (configuration) {
25553
+ baseOptions = configuration.baseOptions;
25554
+ }
25555
+
25556
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
25557
+ const localVarHeaderParameter = {} as any;
25558
+ const localVarQueryParameter = {} as any;
25559
+
25560
+ // authentication oauth2 required
25561
+ // oauth required
25562
+ await setOAuthToObject(localVarHeaderParameter, "oauth2", ["CloudHospital_api", "IdentityServerApi"], configuration)
25563
+
25564
+
25565
+
25566
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
25567
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
25568
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
25569
+
25570
+ return {
25571
+ url: toPathString(localVarUrlObj),
25572
+ options: localVarRequestOptions,
25573
+ };
25574
+ },
25487
25575
  /**
25488
25576
  *
25489
25577
  * @summary Delete Patient.
@@ -25650,6 +25738,28 @@ export const PatientsApiAxiosParamCreator = function (configuration?: Configurat
25650
25738
  export const PatientsApiFp = function(configuration?: Configuration) {
25651
25739
  const localVarAxiosParamCreator = PatientsApiAxiosParamCreator(configuration)
25652
25740
  return {
25741
+ /**
25742
+ *
25743
+ * @summary Delete PatientAffiliation
25744
+ * @param {string} hospitalId
25745
+ * @param {*} [options] Override http request option.
25746
+ * @throws {RequiredError}
25747
+ */
25748
+ async apiV2PatientsAffiliationsHospitalIdDelete(hospitalId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<boolean>> {
25749
+ const localVarAxiosArgs = await localVarAxiosParamCreator.apiV2PatientsAffiliationsHospitalIdDelete(hospitalId, options);
25750
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
25751
+ },
25752
+ /**
25753
+ *
25754
+ * @summary Create PatientAffiliation
25755
+ * @param {string} hospitalId
25756
+ * @param {*} [options] Override http request option.
25757
+ * @throws {RequiredError}
25758
+ */
25759
+ async apiV2PatientsAffiliationsHospitalIdPost(hospitalId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<boolean>> {
25760
+ const localVarAxiosArgs = await localVarAxiosParamCreator.apiV2PatientsAffiliationsHospitalIdPost(hospitalId, options);
25761
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
25762
+ },
25653
25763
  /**
25654
25764
  *
25655
25765
  * @summary Delete Patient.
@@ -25705,6 +25815,26 @@ export const PatientsApiFp = function(configuration?: Configuration) {
25705
25815
  export const PatientsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
25706
25816
  const localVarFp = PatientsApiFp(configuration)
25707
25817
  return {
25818
+ /**
25819
+ *
25820
+ * @summary Delete PatientAffiliation
25821
+ * @param {string} hospitalId
25822
+ * @param {*} [options] Override http request option.
25823
+ * @throws {RequiredError}
25824
+ */
25825
+ apiV2PatientsAffiliationsHospitalIdDelete(hospitalId: string, options?: any): AxiosPromise<boolean> {
25826
+ return localVarFp.apiV2PatientsAffiliationsHospitalIdDelete(hospitalId, options).then((request) => request(axios, basePath));
25827
+ },
25828
+ /**
25829
+ *
25830
+ * @summary Create PatientAffiliation
25831
+ * @param {string} hospitalId
25832
+ * @param {*} [options] Override http request option.
25833
+ * @throws {RequiredError}
25834
+ */
25835
+ apiV2PatientsAffiliationsHospitalIdPost(hospitalId: string, options?: any): AxiosPromise<boolean> {
25836
+ return localVarFp.apiV2PatientsAffiliationsHospitalIdPost(hospitalId, options).then((request) => request(axios, basePath));
25837
+ },
25708
25838
  /**
25709
25839
  *
25710
25840
  * @summary Delete Patient.
@@ -25756,6 +25886,30 @@ export const PatientsApiFactory = function (configuration?: Configuration, baseP
25756
25886
  * @extends {BaseAPI}
25757
25887
  */
25758
25888
  export class PatientsApi extends BaseAPI {
25889
+ /**
25890
+ *
25891
+ * @summary Delete PatientAffiliation
25892
+ * @param {string} hospitalId
25893
+ * @param {*} [options] Override http request option.
25894
+ * @throws {RequiredError}
25895
+ * @memberof PatientsApi
25896
+ */
25897
+ public apiV2PatientsAffiliationsHospitalIdDelete(hospitalId: string, options?: AxiosRequestConfig) {
25898
+ return PatientsApiFp(this.configuration).apiV2PatientsAffiliationsHospitalIdDelete(hospitalId, options).then((request) => request(this.axios, this.basePath));
25899
+ }
25900
+
25901
+ /**
25902
+ *
25903
+ * @summary Create PatientAffiliation
25904
+ * @param {string} hospitalId
25905
+ * @param {*} [options] Override http request option.
25906
+ * @throws {RequiredError}
25907
+ * @memberof PatientsApi
25908
+ */
25909
+ public apiV2PatientsAffiliationsHospitalIdPost(hospitalId: string, options?: AxiosRequestConfig) {
25910
+ return PatientsApiFp(this.configuration).apiV2PatientsAffiliationsHospitalIdPost(hospitalId, options).then((request) => request(this.axios, this.basePath));
25911
+ }
25912
+
25759
25913
  /**
25760
25914
  *
25761
25915
  * @summary Delete Patient.