@icure/api 8.0.29 → 8.0.30

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 (42) hide show
  1. package/icc-api/api/IccAccesslogApi.d.ts +14 -9
  2. package/icc-api/api/IccAccesslogApi.js +33 -22
  3. package/icc-api/api/IccAccesslogApi.js.map +1 -1
  4. package/icc-api/api/IccCalendarItemApi.d.ts +12 -0
  5. package/icc-api/api/IccCalendarItemApi.js +28 -0
  6. package/icc-api/api/IccCalendarItemApi.js.map +1 -1
  7. package/icc-api/api/IccClassificationApi.d.ts +12 -12
  8. package/icc-api/api/IccClassificationApi.js +25 -23
  9. package/icc-api/api/IccClassificationApi.js.map +1 -1
  10. package/icc-api/api/IccContactApi.d.ts +13 -11
  11. package/icc-api/api/IccContactApi.js +29 -25
  12. package/icc-api/api/IccContactApi.js.map +1 -1
  13. package/icc-api/api/IccDocumentApi.d.ts +2 -2
  14. package/icc-api/api/IccDocumentApi.js +10 -9
  15. package/icc-api/api/IccDocumentApi.js.map +1 -1
  16. package/icc-api/api/IccFormApi.d.ts +11 -10
  17. package/icc-api/api/IccFormApi.js +21 -19
  18. package/icc-api/api/IccFormApi.js.map +1 -1
  19. package/icc-api/api/IccHelementApi.d.ts +11 -9
  20. package/icc-api/api/IccHelementApi.js +21 -18
  21. package/icc-api/api/IccHelementApi.js.map +1 -1
  22. package/icc-api/api/IccInvoiceApi.d.ts +11 -9
  23. package/icc-api/api/IccInvoiceApi.js +21 -18
  24. package/icc-api/api/IccInvoiceApi.js.map +1 -1
  25. package/icc-api/api/IccMessageApi.d.ts +15 -9
  26. package/icc-api/api/IccMessageApi.js +35 -17
  27. package/icc-api/api/IccMessageApi.js.map +1 -1
  28. package/icc-x-api/icc-accesslog-x-api.d.ts +3 -2
  29. package/icc-x-api/icc-accesslog-x-api.js +8 -14
  30. package/icc-x-api/icc-accesslog-x-api.js.map +1 -1
  31. package/icc-x-api/icc-contact-x-api.d.ts +0 -1
  32. package/icc-x-api/icc-contact-x-api.js +0 -15
  33. package/icc-x-api/icc-contact-x-api.js.map +1 -1
  34. package/icc-x-api/icc-document-x-api.js +1 -1
  35. package/icc-x-api/icc-document-x-api.js.map +1 -1
  36. package/icc-x-api/icc-form-x-api.js.map +1 -1
  37. package/icc-x-api/icc-helement-x-api.d.ts +0 -2
  38. package/icc-x-api/icc-helement-x-api.js +0 -18
  39. package/icc-x-api/icc-helement-x-api.js.map +1 -1
  40. package/icc-x-api/icc-invoice-x-api.js.map +1 -1
  41. package/icc-x-api/icc-message-x-api.js.map +1 -1
  42. package/package.json +1 -1
@@ -29,7 +29,7 @@ const AuthenticationProvider_1 = require("../../icc-x-api/auth/AuthenticationPro
29
29
  const IccRestApiPath_1 = require("./IccRestApiPath");
30
30
  const EntityBulkShareResult_1 = require("../model/requests/EntityBulkShareResult");
31
31
  const MinimalEntityBulkShareResult_1 = require("../model/requests/MinimalEntityBulkShareResult");
32
- const PaginatedListClassification_1 = require("../model/PaginatedListClassification");
32
+ const ListOfIds_1 = require("../model/ListOfIds");
33
33
  class IccClassificationApi {
34
34
  get headers() {
35
35
  return Promise.resolve(this._headers);
@@ -110,26 +110,29 @@ class IccClassificationApi {
110
110
  });
111
111
  }
112
112
  /**
113
- * @summary List classifications found By Healthcare Party and a single secret foreign key with pagination.
114
- * @param hcPartyId the healthcare party id.
115
- * @param secretFKey the secret foreign key.
116
- * @param startKey the startKey provided by the previous page or undefined for the first page.
117
- * @param startDocumentId the startDocumentId provided by the previous page or undefined for the first page.
118
- * @param limit the number of elements that the page should contain.
119
- * @return a promise that will resolve in a PaginatedListClassification.
113
+ * @summary List Classification ids by data owner and a set of secret foreign key. The ids will be sorted by Classification created, in ascending or descending
114
+ * order according to the specified parameter value.
115
+ *
116
+ * @param dataOwnerId the data owner id.
117
+ * @param secretFKeys an array of secret foreign keys.
118
+ * @param startDate a timestamp in epoch milliseconds. If undefined, all the classification ids since the beginning of time will be returned.
119
+ * @param endDate a timestamp in epoch milliseconds. If undefined, all the classification ids until the end of time will be returned.
120
+ * @param descending whether to return the ids ordered in ascending or descending order by Classification created
121
+ * @return a promise that will resolve in an Array of Classification ids.
120
122
  */
121
- findClassificationsByHCPartyPatientForeignKey(hcPartyId, secretFKey, startKey, startDocumentId, limit) {
123
+ findClassificationIdsByDataOwnerPatientCreated(dataOwnerId, secretFKeys, startDate, endDate, descending) {
122
124
  return __awaiter(this, void 0, void 0, function* () {
123
125
  const _url = this.host +
124
- `/classification/byHcPartySecretForeignKey?ts=${new Date().getTime()}` +
125
- `&hcPartyId=${encodeURIComponent(hcPartyId)}` +
126
- `&secretFKey=${encodeURIComponent(secretFKey)}` +
127
- (!!startKey ? `&startKey=${encodeURIComponent(startKey)}` : '') +
128
- (!!startDocumentId ? `&startDocumentId=${encodeURIComponent(startDocumentId)}` : '') +
129
- (!!limit ? `&limit=${limit}` : '');
130
- const headers = yield this.headers;
131
- return XHR_1.XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
132
- .then((doc) => new PaginatedListClassification_1.PaginatedListClassification(doc.body))
126
+ `/classification/byDataOwnerPatientCreated?ts=${new Date().getTime()}` +
127
+ '&dataOwnerId=' +
128
+ encodeURIComponent(dataOwnerId) +
129
+ (!!startDate ? `&startDate=${encodeURIComponent(startDate)}` : '') +
130
+ (!!endDate ? `&endDate=${encodeURIComponent(endDate)}` : '') +
131
+ (!!descending ? `&descending=${descending}` : '');
132
+ const headers = (yield this.headers).filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
133
+ const body = new ListOfIds_1.ListOfIds({ ids: secretFKeys });
134
+ return XHR_1.XHR.sendCommand('POST', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
135
+ .then((doc) => doc.body.map((it) => JSON.parse(JSON.stringify(it))))
133
136
  .catch((err) => this.handleError(err));
134
137
  });
135
138
  }
@@ -149,16 +152,15 @@ class IccClassificationApi {
149
152
  });
150
153
  }
151
154
  /**
152
- * Ids are seperated by a coma
153
- * @summary Get a list of classifications
155
+ * @summary Get a list of classifications by their ids.
154
156
  * @param ids
155
157
  */
156
158
  getClassificationByHcPartyId(ids) {
157
159
  return __awaiter(this, void 0, void 0, function* () {
158
- let _body = null;
159
- const _url = this.host + `/classification/byIds/${encodeURIComponent(String(ids))}` + '?ts=' + new Date().getTime();
160
+ const _url = this.host + `/classification/byIds` + '?ts=' + new Date().getTime();
160
161
  let headers = yield this.headers;
161
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
162
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
163
+ return XHR_1.XHR.sendCommand('POST', _url, headers, ids, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
162
164
  .then((doc) => doc.body.map((it) => new Classification_1.Classification(it)))
163
165
  .catch((err) => this.handleError(err));
164
166
  });
@@ -1 +1 @@
1
- {"version":3,"file":"IccClassificationApi.js","sourceRoot":"","sources":["../../../icc-api/api/IccClassificationApi.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;GAUG;AACH,+BAA2B;AAC3B,4DAAwD;AAExD,0DAAsD;AACtD,kDAA8C;AAC9C,wFAA8G;AAC9G,qDAAiD;AAEjD,mFAA+E;AAC/E,iGAA6F;AAG7F,sFAAkF;AAElF,MAAa,oBAAoB;IAM/B,IAAI,OAAO;QACT,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;IACvC,CAAC;IAED,YACE,IAAY,EACZ,OAAY,EACZ,sBAA+C,EAC/C,SAAyE;QAEzE,IAAI,CAAC,IAAI,GAAG,IAAA,+BAAc,EAAC,IAAI,CAAC,CAAA;QAChC,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE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E,CAAC,CAAC,CAAC,MAAM,KAAK,cAAc,CAAC,CAAC,MAAM,CAAC,IAAI,SAAG,CAAC,MAAM,CAAC,cAAc,EAAE,kBAAkB,CAAC,CAAC,CAAA;YACvH,OAAO,SAAG,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,sBAAsB,CAAC,cAAc,EAAE,CAAC;iBAC3H,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAE,GAAG,CAAC,IAAoB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,2DAA4B,CAAC,CAAC,CAAC,CAAC,CAAC;iBACxF,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAA;QAC1C,CAAC;KAAA;CACF;AAlPD,oDAkPC","sourcesContent":["/**\n * iCure Data Stack API Documentation\n * The iCure Data Stack Application API is the native interface to iCure. This version is obsolete, please use v2.\n *\n * OpenAPI spec version: v1\n *\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n * Do not edit the class manually.\n */\nimport { XHR } from './XHR'\nimport { Classification } from '../model/Classification'\nimport { Delegation } from '../model/Delegation'\nimport { DocIdentifier } from '../model/DocIdentifier'\nimport { IcureStub } from '../model/IcureStub'\nimport { AuthenticationProvider, NoAuthenticationProvider } from '../../icc-x-api/auth/AuthenticationProvider'\nimport { iccRestApiPath } from './IccRestApiPath'\nimport { EntityShareOrMetadataUpdateRequest } from '../model/requests/EntityShareOrMetadataUpdateRequest'\nimport { EntityBulkShareResult } from '../model/requests/EntityBulkShareResult'\nimport { MinimalEntityBulkShareResult } from '../model/requests/MinimalEntityBulkShareResult'\nimport { ListOfIds } from '../model/ListOfIds'\nimport { BulkShareOrUpdateMetadataParams } from '../model/requests/BulkShareOrUpdateMetadataParams'\nimport { PaginatedListClassification } from '../model/PaginatedListClassification'\n\nexport class IccClassificationApi {\n host: string\n _headers: Array<XHR.Header>\n authenticationProvider: AuthenticationProvider\n fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>\n\n get headers(): Promise<Array<XHR.Header>> {\n return Promise.resolve(this._headers)\n }\n\n constructor(\n host: string,\n headers: any,\n authenticationProvider?: AuthenticationProvider,\n fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>\n ) {\n this.host = iccRestApiPath(host)\n this._headers = Object.keys(headers).map((k) => new XHR.Header(k, headers[k]))\n this.authenticationProvider = !!authenticationProvider ? authenticationProvider : new NoAuthenticationProvider()\n this.fetchImpl = fetchImpl\n }\n\n setHeaders(h: Array<XHR.Header>) {\n this._headers = h\n }\n\n handleError(e: XHR.XHRError): never {\n throw e\n }\n\n /**\n * Returns an instance of created classification Template.\n * @summary Create a classification with the current user\n * @param body\n */\n async createClassification(body?: Classification): Promise<Classification> {\n const _url = this.host + `/classification` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Classification(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Deletes a batch of classifications.\n *\n * @param classificationIds a ListOfIds containing the ids of the classification to delete.\n * @return a Promise that will resolve in an array of DocIdentifiers of the successfully deleted classifications.\n */\n async deleteClassifications(classificationIds: ListOfIds): Promise<Array<DocIdentifier>> {\n const headers = (await this.headers).filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand(\n 'POST',\n this.host + `/classification/delete/batch` + '?ts=' + new Date().getTime(),\n headers,\n classificationIds,\n this.fetchImpl,\n undefined,\n this.authenticationProvider.getAuthService()\n )\n .then((doc) => (doc.body as Array<JSON>).map((it) => new DocIdentifier(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Deletes a single classification by id.\n *\n * @param classificationId the id of the classification to delete.\n * @return a Promise that will resolve in the DocIdentifier of the deleted classification.\n */\n async deleteClassification(classificationId: string): Promise<DocIdentifier> {\n return XHR.sendCommand(\n 'DELETE',\n this.host + `/classification/${encodeURIComponent(classificationId)}` + '?ts=' + new Date().getTime(),\n await this.headers,\n null,\n this.fetchImpl,\n undefined,\n this.authenticationProvider.getAuthService()\n )\n .then((doc) => new DocIdentifier(doc.body))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Keys have to be delimited by comma\n * @summary List classification Templates found By Healthcare Party and secret foreign keyelementIds.\n * @param hcPartyId\n * @param secretFKeys\n */\n async findClassificationsByHCPartyPatientForeignKeys(hcPartyId: string, secretFKeys: string): Promise<Array<Classification>> {\n let _body = null\n\n const _url =\n this.host +\n `/classification/byHcPartySecretForeignKeys` +\n '?ts=' +\n new Date().getTime() +\n (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '') +\n (secretFKeys ? '&secretFKeys=' + encodeURIComponent(String(secretFKeys)) : '')\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Classification(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary List classifications found By Healthcare Party and a single secret foreign key with pagination.\n * @param hcPartyId the healthcare party id.\n * @param secretFKey the secret foreign key.\n * @param startKey the startKey provided by the previous page or undefined for the first page.\n * @param startDocumentId the startDocumentId provided by the previous page or undefined for the first page.\n * @param limit the number of elements that the page should contain.\n * @return a promise that will resolve in a PaginatedListClassification.\n */\n async findClassificationsByHCPartyPatientForeignKey(\n hcPartyId: string,\n secretFKey: string,\n startKey?: string,\n startDocumentId?: string,\n limit?: number\n ): Promise<PaginatedListClassification> {\n const _url =\n this.host +\n `/classification/byHcPartySecretForeignKey?ts=${new Date().getTime()}` +\n `&hcPartyId=${encodeURIComponent(hcPartyId)}` +\n `&secretFKey=${encodeURIComponent(secretFKey)}` +\n (!!startKey ? `&startKey=${encodeURIComponent(startKey)}` : '') +\n (!!startDocumentId ? `&startDocumentId=${encodeURIComponent(startDocumentId)}` : '') +\n (!!limit ? `&limit=${limit}` : '')\n const headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new PaginatedListClassification(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Get a classification Template\n * @param classificationId\n */\n async getClassification(classificationId: string): Promise<Classification> {\n let _body = null\n\n const _url = this.host + `/classification/${encodeURIComponent(String(classificationId))}` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Classification(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Ids are seperated by a coma\n * @summary Get a list of classifications\n * @param ids\n */\n async getClassificationByHcPartyId(ids: string): Promise<Array<Classification>> {\n let _body = null\n\n const _url = this.host + `/classification/byIds/${encodeURIComponent(String(ids))}` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Classification(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns the modified classification Template.\n * @summary Modify a classification Template\n * @param body\n */\n async modifyClassification(body?: Classification): Promise<Classification> {\n let _body = null\n _body = body\n\n const _url = this.host + `/classification` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Classification(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * It delegates a classification to a healthcare party (By current healthcare party). Returns the element with new delegations.\n * @summary Delegates a classification to a healthcare party\n * @param body\n * @param classificationId\n */\n async newClassificationDelegations(classificationId: string, body?: Array<Delegation>): Promise<Classification> {\n let _body = null\n _body = body\n\n const _url = this.host + `/classification/${encodeURIComponent(String(classificationId))}/delegate` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Classification(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Keys must be delimited by coma\n * @summary Update delegations in classification\n * @param body\n */\n async setClassificationsDelegations(body?: Array<IcureStub>): Promise<Array<IcureStub>> {\n let _body = null\n _body = body\n\n const _url = this.host + `/classification/delegations` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new IcureStub(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @internal this method is for internal use only and may be changed without notice\n */\n async bulkShareClassifications(request: BulkShareOrUpdateMetadataParams): Promise<EntityBulkShareResult<Classification>[]> {\n const _url = this.host + '/classification/bulkSharedMetadataUpdate' + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, request, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((x) => new EntityBulkShareResult<Classification>(x, Classification)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @internal this method is for internal use only and may be changed without notice\n */\n async bulkShareClassificationsMinimal(request: BulkShareOrUpdateMetadataParams): Promise<MinimalEntityBulkShareResult[]> {\n const _url = this.host + '/classification/bulkSharedMetadataUpdateMinimal' + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, request, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((x) => new MinimalEntityBulkShareResult(x)))\n .catch((err) => this.handleError(err))\n }\n}\n"]}
1
+ {"version":3,"file":"IccClassificationApi.js","sourceRoot":"","sources":["../../../icc-api/api/IccClassificationApi.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;GAUG;AACH,+BAA2B;AAC3B,4DAAwD;AAExD,0DAAsD;AACtD,kDAA8C;AAC9C,wFAA8G;AAC9G,qDAAiD;AAEjD,mFAA+E;AAC/E,iGAA6F;AAC7F,kDAA8C;AAI9C,MAAa,oBAAoB;IAM/B,IAAI,OAAO;QACT,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;IACvC,CAAC;IAED,YACE,IAAY,EACZ,OAAY,EACZ,sBAA+C,EAC/C,SAAyE;QAEzE,IAAI,CAAC,IAAI,GAAG,IAAA,+BAAc,EAAC,IAAI,CAAC,CAAA;QAChC,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,SAAG,CAAC,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;QAC9E,IAAI,CAAC,sBAAsB,GAAG,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,IAAI,iDAAwB,EAAE,CAAA;QAChH,IAAI,CAAC,SAAS,GAAG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AAM,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAA;YAC1G,IAAI,OAAO,GAAG,MAAM,IAAI,CAAC,OAAO,CAAA;YAChC,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,cAAc,CAAC,CAAC,MAAM,CAAC,IAAI,SAAG,CAAC,MAAM,CAAC,cAAc,EAAE,kBAAkB,CAAC,CAAC,CAAA;YACvH,OAAO,SAAG,CAAC,WAAW,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,sBAAsB,CAAC,cAAc,EAAE,CAAC;iBAC3H,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAE,GAAG,CAAC,IAAoB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,2DAA4B,CAAC,CAAC,CAAC,CAAC,CAAC;iBACxF,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAA;QAC1C,CAAC;KAAA;CACF;AAnPD,oDAmPC","sourcesContent":["/**\n * iCure Data Stack API Documentation\n * The iCure Data Stack Application API is the native interface to iCure. This version is obsolete, please use v2.\n *\n * OpenAPI spec version: v1\n *\n *\n * NOTE: This class is auto generated by the swagger code generator program.\n * https://github.com/swagger-api/swagger-codegen.git\n * Do not edit the class manually.\n */\nimport { XHR } from './XHR'\nimport { Classification } from '../model/Classification'\nimport { Delegation } from '../model/Delegation'\nimport { DocIdentifier } from '../model/DocIdentifier'\nimport { IcureStub } from '../model/IcureStub'\nimport { AuthenticationProvider, NoAuthenticationProvider } from '../../icc-x-api/auth/AuthenticationProvider'\nimport { iccRestApiPath } from './IccRestApiPath'\nimport { EntityShareOrMetadataUpdateRequest } from '../model/requests/EntityShareOrMetadataUpdateRequest'\nimport { EntityBulkShareResult } from '../model/requests/EntityBulkShareResult'\nimport { MinimalEntityBulkShareResult } from '../model/requests/MinimalEntityBulkShareResult'\nimport { ListOfIds } from '../model/ListOfIds'\nimport { BulkShareOrUpdateMetadataParams } from '../model/requests/BulkShareOrUpdateMetadataParams'\nimport { PaginatedListClassification } from '../model/PaginatedListClassification'\n\nexport class IccClassificationApi {\n host: string\n _headers: Array<XHR.Header>\n authenticationProvider: AuthenticationProvider\n fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>\n\n get headers(): Promise<Array<XHR.Header>> {\n return Promise.resolve(this._headers)\n }\n\n constructor(\n host: string,\n headers: any,\n authenticationProvider?: AuthenticationProvider,\n fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>\n ) {\n this.host = iccRestApiPath(host)\n this._headers = Object.keys(headers).map((k) => new XHR.Header(k, headers[k]))\n this.authenticationProvider = !!authenticationProvider ? authenticationProvider : new NoAuthenticationProvider()\n this.fetchImpl = fetchImpl\n }\n\n setHeaders(h: Array<XHR.Header>) {\n this._headers = h\n }\n\n handleError(e: XHR.XHRError): never {\n throw e\n }\n\n /**\n * Returns an instance of created classification Template.\n * @summary Create a classification with the current user\n * @param body\n */\n async createClassification(body?: Classification): Promise<Classification> {\n const _url = this.host + `/classification` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Classification(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Deletes a batch of classifications.\n *\n * @param classificationIds a ListOfIds containing the ids of the classification to delete.\n * @return a Promise that will resolve in an array of DocIdentifiers of the successfully deleted classifications.\n */\n async deleteClassifications(classificationIds: ListOfIds): Promise<Array<DocIdentifier>> {\n const headers = (await this.headers).filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand(\n 'POST',\n this.host + `/classification/delete/batch` + '?ts=' + new Date().getTime(),\n headers,\n classificationIds,\n this.fetchImpl,\n undefined,\n this.authenticationProvider.getAuthService()\n )\n .then((doc) => (doc.body as Array<JSON>).map((it) => new DocIdentifier(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Deletes a single classification by id.\n *\n * @param classificationId the id of the classification to delete.\n * @return a Promise that will resolve in the DocIdentifier of the deleted classification.\n */\n async deleteClassification(classificationId: string): Promise<DocIdentifier> {\n return XHR.sendCommand(\n 'DELETE',\n this.host + `/classification/${encodeURIComponent(classificationId)}` + '?ts=' + new Date().getTime(),\n await this.headers,\n null,\n this.fetchImpl,\n undefined,\n this.authenticationProvider.getAuthService()\n )\n .then((doc) => new DocIdentifier(doc.body))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Keys have to be delimited by comma\n * @summary List classification Templates found By Healthcare Party and secret foreign keyelementIds.\n * @param hcPartyId\n * @param secretFKeys\n */\n async findClassificationsByHCPartyPatientForeignKeys(hcPartyId: string, secretFKeys: string): Promise<Array<Classification>> {\n let _body = null\n\n const _url =\n this.host +\n `/classification/byHcPartySecretForeignKeys` +\n '?ts=' +\n new Date().getTime() +\n (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '') +\n (secretFKeys ? '&secretFKeys=' + encodeURIComponent(String(secretFKeys)) : '')\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Classification(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary List Classification ids by data owner and a set of secret foreign key. The ids will be sorted by Classification created, in ascending or descending\n * order according to the specified parameter value.\n *\n * @param dataOwnerId the data owner id.\n * @param secretFKeys an array of secret foreign keys.\n * @param startDate a timestamp in epoch milliseconds. If undefined, all the classification ids since the beginning of time will be returned.\n * @param endDate a timestamp in epoch milliseconds. If undefined, all the classification ids until the end of time will be returned.\n * @param descending whether to return the ids ordered in ascending or descending order by Classification created\n * @return a promise that will resolve in an Array of Classification ids.\n */\n async findClassificationIdsByDataOwnerPatientCreated(\n dataOwnerId: string,\n secretFKeys: string[],\n startDate?: number,\n endDate?: number,\n descending?: boolean\n ): Promise<string[]> {\n const _url =\n this.host +\n `/classification/byDataOwnerPatientCreated?ts=${new Date().getTime()}` +\n '&dataOwnerId=' +\n encodeURIComponent(dataOwnerId) +\n (!!startDate ? `&startDate=${encodeURIComponent(startDate)}` : '') +\n (!!endDate ? `&endDate=${encodeURIComponent(endDate)}` : '') +\n (!!descending ? `&descending=${descending}` : '')\n const headers = (await this.headers).filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n const body = new ListOfIds({ ids: secretFKeys })\n return XHR.sendCommand('POST', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => JSON.parse(JSON.stringify(it))))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Get a classification Template\n * @param classificationId\n */\n async getClassification(classificationId: string): Promise<Classification> {\n let _body = null\n\n const _url = this.host + `/classification/${encodeURIComponent(String(classificationId))}` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Classification(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Get a list of classifications by their ids.\n * @param ids\n */\n async getClassificationByHcPartyId(ids: ListOfIds): Promise<Array<Classification>> {\n const _url = this.host + `/classification/byIds` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, ids, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new Classification(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Returns the modified classification Template.\n * @summary Modify a classification Template\n * @param body\n */\n async modifyClassification(body?: Classification): Promise<Classification> {\n let _body = null\n _body = body\n\n const _url = this.host + `/classification` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Classification(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * It delegates a classification to a healthcare party (By current healthcare party). Returns the element with new delegations.\n * @summary Delegates a classification to a healthcare party\n * @param body\n * @param classificationId\n */\n async newClassificationDelegations(classificationId: string, body?: Array<Delegation>): Promise<Classification> {\n let _body = null\n _body = body\n\n const _url = this.host + `/classification/${encodeURIComponent(String(classificationId))}/delegate` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Classification(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Keys must be delimited by coma\n * @summary Update delegations in classification\n * @param body\n */\n async setClassificationsDelegations(body?: Array<IcureStub>): Promise<Array<IcureStub>> {\n let _body = null\n _body = body\n\n const _url = this.host + `/classification/delegations` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('POST', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new IcureStub(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @internal this method is for internal use only and may be changed without notice\n */\n async bulkShareClassifications(request: BulkShareOrUpdateMetadataParams): Promise<EntityBulkShareResult<Classification>[]> {\n const _url = this.host + '/classification/bulkSharedMetadataUpdate' + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, request, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((x) => new EntityBulkShareResult<Classification>(x, Classification)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @internal this method is for internal use only and may be changed without notice\n */\n async bulkShareClassificationsMinimal(request: BulkShareOrUpdateMetadataParams): Promise<MinimalEntityBulkShareResult[]> {\n const _url = this.host + '/classification/bulkSharedMetadataUpdateMinimal' + '?ts=' + new Date().getTime()\n let headers = await this.headers\n headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json'))\n return XHR.sendCommand('PUT', _url, headers, request, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((x) => new MinimalEntityBulkShareResult(x)))\n .catch((err) => this.handleError(err))\n }\n}\n"]}
@@ -136,16 +136,6 @@ export declare class IccContactApi {
136
136
  * @param hcPartyId
137
137
  */
138
138
  findContactsByHCPartyPatientForeignKeys(hcPartyId: string, body?: ListOfIds): Promise<Array<Contact>>;
139
- /**
140
- * @summary Get a list of contacts found by Healthcare Party and a patient foreign key with pagination.
141
- * @param hcPartyId the id of the healthcare party.
142
- * @param patientForeignKey the secret foreign key,
143
- * @param startKey the startKey provided by the previous page or undefined for the first page.
144
- * @param startDocumentId the startDocumentId provided by the previous page or undefined for the first page.
145
- * @param limit the number of elements that the page should contain.
146
- * @return a promise that will resolve in a PaginatedListContact.
147
- */
148
- findContactsByHCPartyPatientForeignKey(hcPartyId: string, patientForeignKey: string, startKey?: string, startDocumentId?: string, limit?: number): Promise<PaginatedListContact>;
149
139
  /**
150
140
  * Keys must be delimited by coma
151
141
  * @summary List contacts found By Healthcare Party and secret foreign keys.
@@ -258,11 +248,23 @@ export declare class IccContactApi {
258
248
  */
259
249
  newContactDelegations(contactId: string, body?: Delegation): Promise<Contact>;
260
250
  /**
261
- * Keys must be delimited by coma
251
+ * Keys must be delimited by comma
262
252
  * @summary Update delegations in healthElements.
263
253
  * @param body
264
254
  */
265
255
  setContactsDelegations(body?: Array<IcureStub>): Promise<Array<Contact>>;
256
+ /**
257
+ * @summary List Contact ids by data owner and a set of secret foreign key. The ids will be sorted by Contact openingDate, in ascending or descending
258
+ * order according to the specified parameter value.
259
+ *
260
+ * @param dataOwnerId the data owner id.
261
+ * @param secretFKeys an array of secret foreign keys.
262
+ * @param startDate a timestamp in epoch milliseconds. If undefined, all the contact ids since the beginning of time will be returned.
263
+ * @param endDate a timestamp in epoch milliseconds. If undefined, all the contact ids until the end of time will be returned.
264
+ * @param descending whether to return the ids ordered in ascending or descending order by Contact openingDate
265
+ * @return a promise that will resolve in an Array of Contact ids.
266
+ */
267
+ findContactIdsByDataOwnerPatientOpeningDate(dataOwnerId: string, secretFKeys: string[], startDate?: number, endDate?: number, descending?: boolean): Promise<string[]>;
266
268
  /**
267
269
  * @internal this method is for internal use only and may be changed without notice
268
270
  */
@@ -27,6 +27,7 @@ const Content_1 = require("../model/Content");
27
27
  const DocIdentifier_1 = require("../model/DocIdentifier");
28
28
  const IcureStub_1 = require("../model/IcureStub");
29
29
  const LabelledOccurence_1 = require("../model/LabelledOccurence");
30
+ const ListOfIds_1 = require("../model/ListOfIds");
30
31
  const PaginatedListContact_1 = require("../model/PaginatedListContact");
31
32
  const PaginatedListService_1 = require("../model/PaginatedListService");
32
33
  const Service_1 = require("../model/Service");
@@ -328,30 +329,6 @@ class IccContactApi {
328
329
  .catch((err) => this.handleError(err));
329
330
  });
330
331
  }
331
- /**
332
- * @summary Get a list of contacts found by Healthcare Party and a patient foreign key with pagination.
333
- * @param hcPartyId the id of the healthcare party.
334
- * @param patientForeignKey the secret foreign key,
335
- * @param startKey the startKey provided by the previous page or undefined for the first page.
336
- * @param startDocumentId the startDocumentId provided by the previous page or undefined for the first page.
337
- * @param limit the number of elements that the page should contain.
338
- * @return a promise that will resolve in a PaginatedListContact.
339
- */
340
- findContactsByHCPartyPatientForeignKey(hcPartyId, patientForeignKey, startKey, startDocumentId, limit) {
341
- return __awaiter(this, void 0, void 0, function* () {
342
- const _url = this.host +
343
- `/contact/byHcPartyPatientForeignKey?ts=${new Date().getTime()}` +
344
- `&hcPartyId=${encodeURIComponent(hcPartyId)}` +
345
- `&patientForeignKey=${encodeURIComponent(patientForeignKey)}` +
346
- (!!startKey ? `&startKey=${encodeURIComponent(startKey)}` : '') +
347
- (!!startDocumentId ? `&startDocumentId=${encodeURIComponent(startDocumentId)}` : '') +
348
- (!!limit ? `&limit=${limit}` : '');
349
- const headers = yield this.headers;
350
- return XHR_1.XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
351
- .then((doc) => new PaginatedListContact_1.PaginatedListContact(doc.body))
352
- .catch((err) => this.handleError(err));
353
- });
354
- }
355
332
  /**
356
333
  * Keys must be delimited by coma
357
334
  * @summary List contacts found By Healthcare Party and secret foreign keys.
@@ -663,7 +640,7 @@ class IccContactApi {
663
640
  });
664
641
  }
665
642
  /**
666
- * Keys must be delimited by coma
643
+ * Keys must be delimited by comma
667
644
  * @summary Update delegations in healthElements.
668
645
  * @param body
669
646
  */
@@ -679,6 +656,33 @@ class IccContactApi {
679
656
  .catch((err) => this.handleError(err));
680
657
  });
681
658
  }
659
+ /**
660
+ * @summary List Contact ids by data owner and a set of secret foreign key. The ids will be sorted by Contact openingDate, in ascending or descending
661
+ * order according to the specified parameter value.
662
+ *
663
+ * @param dataOwnerId the data owner id.
664
+ * @param secretFKeys an array of secret foreign keys.
665
+ * @param startDate a timestamp in epoch milliseconds. If undefined, all the contact ids since the beginning of time will be returned.
666
+ * @param endDate a timestamp in epoch milliseconds. If undefined, all the contact ids until the end of time will be returned.
667
+ * @param descending whether to return the ids ordered in ascending or descending order by Contact openingDate
668
+ * @return a promise that will resolve in an Array of Contact ids.
669
+ */
670
+ findContactIdsByDataOwnerPatientOpeningDate(dataOwnerId, secretFKeys, startDate, endDate, descending) {
671
+ return __awaiter(this, void 0, void 0, function* () {
672
+ const _url = this.host +
673
+ `/contact/byDataOwnerPatientOpeningDate?ts=${new Date().getTime()}` +
674
+ '&dataOwnerId=' +
675
+ encodeURIComponent(dataOwnerId) +
676
+ (!!startDate ? `&startDate=${encodeURIComponent(startDate)}` : '') +
677
+ (!!endDate ? `&endDate=${encodeURIComponent(endDate)}` : '') +
678
+ (!!descending ? `&descending=${descending}` : '');
679
+ const headers = (yield this.headers).filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
680
+ const body = new ListOfIds_1.ListOfIds({ ids: secretFKeys });
681
+ return XHR_1.XHR.sendCommand('POST', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
682
+ .then((doc) => doc.body.map((it) => JSON.parse(JSON.stringify(it))))
683
+ .catch((err) => this.handleError(err));
684
+ });
685
+ }
682
686
  /**
683
687
  * @internal this method is for internal use only and may be changed without notice
684
688
  */