@icure/api 8.8.0 → 8.8.2

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 (100) hide show
  1. package/icc-api/api/IccAccesslogApi.d.ts +48 -0
  2. package/icc-api/api/IccAccesslogApi.js +100 -0
  3. package/icc-api/api/IccAccesslogApi.js.map +1 -1
  4. package/icc-api/api/IccAgendaApi.d.ts +25 -0
  5. package/icc-api/api/IccAgendaApi.js +49 -0
  6. package/icc-api/api/IccAgendaApi.js.map +1 -1
  7. package/icc-api/api/IccCalendarItemApi.d.ts +25 -0
  8. package/icc-api/api/IccCalendarItemApi.js +49 -0
  9. package/icc-api/api/IccCalendarItemApi.js.map +1 -1
  10. package/icc-api/api/IccCalendarItemTypeApi.d.ts +25 -0
  11. package/icc-api/api/IccCalendarItemTypeApi.js +49 -0
  12. package/icc-api/api/IccCalendarItemTypeApi.js.map +1 -1
  13. package/icc-api/api/IccCodeApi.d.ts +25 -0
  14. package/icc-api/api/IccCodeApi.js +49 -0
  15. package/icc-api/api/IccCodeApi.js.map +1 -1
  16. package/icc-api/api/IccContactApi.d.ts +48 -0
  17. package/icc-api/api/IccContactApi.js +100 -0
  18. package/icc-api/api/IccContactApi.js.map +1 -1
  19. package/icc-api/api/IccDeviceApi.d.ts +48 -0
  20. package/icc-api/api/IccDeviceApi.js +100 -0
  21. package/icc-api/api/IccDeviceApi.js.map +1 -1
  22. package/icc-api/api/IccDocumentApi.d.ts +48 -0
  23. package/icc-api/api/IccDocumentApi.js +100 -0
  24. package/icc-api/api/IccDocumentApi.js.map +1 -1
  25. package/icc-api/api/IccFormApi.d.ts +48 -0
  26. package/icc-api/api/IccFormApi.js +101 -4
  27. package/icc-api/api/IccFormApi.js.map +1 -1
  28. package/icc-api/api/IccHcpartyApi.d.ts +48 -0
  29. package/icc-api/api/IccHcpartyApi.js +100 -0
  30. package/icc-api/api/IccHcpartyApi.js.map +1 -1
  31. package/icc-api/api/IccHelementApi.d.ts +48 -0
  32. package/icc-api/api/IccHelementApi.js +100 -0
  33. package/icc-api/api/IccHelementApi.js.map +1 -1
  34. package/icc-api/api/IccInsuranceApi.d.ts +50 -2
  35. package/icc-api/api/IccInsuranceApi.js +100 -0
  36. package/icc-api/api/IccInsuranceApi.js.map +1 -1
  37. package/icc-api/api/IccInvoiceApi.d.ts +48 -0
  38. package/icc-api/api/IccInvoiceApi.js +100 -0
  39. package/icc-api/api/IccInvoiceApi.js.map +1 -1
  40. package/icc-api/api/IccMessageApi.d.ts +48 -0
  41. package/icc-api/api/IccMessageApi.js +100 -0
  42. package/icc-api/api/IccMessageApi.js.map +1 -1
  43. package/icc-api/api/IccPatientApi.d.ts +48 -0
  44. package/icc-api/api/IccPatientApi.js +100 -0
  45. package/icc-api/api/IccPatientApi.js.map +1 -1
  46. package/icc-api/api/IccPlaceApi.d.ts +25 -0
  47. package/icc-api/api/IccPlaceApi.js +49 -0
  48. package/icc-api/api/IccPlaceApi.js.map +1 -1
  49. package/icc-api/api/IccReceiptApi.d.ts +25 -0
  50. package/icc-api/api/IccReceiptApi.js +49 -0
  51. package/icc-api/api/IccReceiptApi.js.map +1 -1
  52. package/icc-api/api/IccTopicApi.d.ts +48 -0
  53. package/icc-api/api/IccTopicApi.js +100 -0
  54. package/icc-api/api/IccTopicApi.js.map +1 -1
  55. package/icc-api/api/IccUserApi.d.ts +25 -0
  56. package/icc-api/api/IccUserApi.js +49 -0
  57. package/icc-api/api/IccUserApi.js.map +1 -1
  58. package/icc-api/model/ConflictResolutionRequest.d.ts +18 -0
  59. package/icc-api/model/ConflictResolutionRequest.js +17 -0
  60. package/icc-api/model/ConflictResolutionRequest.js.map +1 -0
  61. package/icc-api/model/ConflictResolutionResult.d.ts +22 -0
  62. package/icc-api/model/ConflictResolutionResult.js +24 -0
  63. package/icc-api/model/ConflictResolutionResult.js.map +1 -0
  64. package/icc-api/model/models.d.ts +2 -0
  65. package/icc-api/model/models.js +2 -0
  66. package/icc-api/model/models.js.map +1 -1
  67. package/icc-x-api/icc-accesslog-x-api.d.ts +31 -0
  68. package/icc-x-api/icc-accesslog-x-api.js +57 -0
  69. package/icc-x-api/icc-accesslog-x-api.js.map +1 -1
  70. package/icc-x-api/icc-calendar-item-x-api.d.ts +15 -0
  71. package/icc-x-api/icc-calendar-item-x-api.js +28 -0
  72. package/icc-x-api/icc-calendar-item-x-api.js.map +1 -1
  73. package/icc-x-api/icc-contact-x-api.d.ts +31 -0
  74. package/icc-x-api/icc-contact-x-api.js +60 -1
  75. package/icc-x-api/icc-contact-x-api.js.map +1 -1
  76. package/icc-x-api/icc-document-x-api.d.ts +31 -0
  77. package/icc-x-api/icc-document-x-api.js +64 -0
  78. package/icc-x-api/icc-document-x-api.js.map +1 -1
  79. package/icc-x-api/icc-form-x-api.d.ts +31 -0
  80. package/icc-x-api/icc-form-x-api.js +58 -0
  81. package/icc-x-api/icc-form-x-api.js.map +1 -1
  82. package/icc-x-api/icc-helement-x-api.d.ts +31 -0
  83. package/icc-x-api/icc-helement-x-api.js +57 -0
  84. package/icc-x-api/icc-helement-x-api.js.map +1 -1
  85. package/icc-x-api/icc-invoice-x-api.d.ts +31 -0
  86. package/icc-x-api/icc-invoice-x-api.js +58 -0
  87. package/icc-x-api/icc-invoice-x-api.js.map +1 -1
  88. package/icc-x-api/icc-message-x-api.d.ts +31 -0
  89. package/icc-x-api/icc-message-x-api.js +64 -0
  90. package/icc-x-api/icc-message-x-api.js.map +1 -1
  91. package/icc-x-api/icc-patient-x-api.d.ts +31 -0
  92. package/icc-x-api/icc-patient-x-api.js +57 -0
  93. package/icc-x-api/icc-patient-x-api.js.map +1 -1
  94. package/icc-x-api/icc-topic-x-api.d.ts +31 -0
  95. package/icc-x-api/icc-topic-x-api.js +58 -0
  96. package/icc-x-api/icc-topic-x-api.js.map +1 -1
  97. package/icc-x-api/utils/formatting-util.d.ts +10 -4
  98. package/icc-x-api/utils/formatting-util.js +47 -6
  99. package/icc-x-api/utils/formatting-util.js.map +1 -1
  100. package/package.json +1 -1
@@ -30,6 +30,7 @@ const IccRestApiPath_1 = require("./IccRestApiPath");
30
30
  const EntityBulkShareResult_1 = require("../model/requests/EntityBulkShareResult");
31
31
  const MinimalEntityBulkShareResult_1 = require("../model/requests/MinimalEntityBulkShareResult");
32
32
  const PaginatedListCalendarItem_1 = require("../model/PaginatedListCalendarItem");
33
+ const ConflictResolutionResult_1 = require("../model/ConflictResolutionResult");
33
34
  class IccCalendarItemApi {
34
35
  get headers() {
35
36
  return Promise.resolve(this._headers);
@@ -347,6 +348,54 @@ class IccCalendarItemApi {
347
348
  .catch((err) => this.handleError(err));
348
349
  });
349
350
  }
351
+ /**
352
+ * Retrieves the ids of all the calendar items that currently have conflicting revisions and therefore need to
353
+ * be resolved.
354
+ * @summary List the ids of the calendar items that have conflicts.
355
+ * @return the ids of the calendar items with unresolved conflicts.
356
+ */
357
+ getConflictingEntitiesIds() {
358
+ return __awaiter(this, void 0, void 0, function* () {
359
+ const _url = this.host + `/calendarItem/conflicts` + '?ts=' + new Date().getTime();
360
+ let headers = yield this.headers;
361
+ return XHR_1.XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
362
+ .then((doc) => doc.body)
363
+ .catch((err) => this.handleError(err));
364
+ });
365
+ }
366
+ /**
367
+ * Retrieves all the conflicting revisions of the calendar item with the given id (the current revision is not
368
+ * included). The returned entities are still encrypted.
369
+ * @summary Get the conflicting revisions of a calendar item.
370
+ * @param entityId the id of the calendar item to retrieve the conflicts for.
371
+ * @return the conflicting revisions of the calendar item.
372
+ */
373
+ getConflictsForEntity(entityId) {
374
+ return __awaiter(this, void 0, void 0, function* () {
375
+ const _url = this.host + `/calendarItem/conflicts/${encodeURIComponent(String(entityId))}` + '?ts=' + new Date().getTime();
376
+ let headers = yield this.headers;
377
+ return XHR_1.XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
378
+ .then((doc) => doc.body.map((it) => new CalendarItem_1.CalendarItem(it)))
379
+ .catch((err) => this.handleError(err));
380
+ });
381
+ }
382
+ /**
383
+ * Resolves a conflict by declaring which revision of the calendar item should be kept as winner and which
384
+ * conflicting revisions should be purged. The provided document must already be encrypted.
385
+ * @summary Declare the winning revision of a conflicting calendar item.
386
+ * @param body the {@link ConflictResolutionRequest} carrying the winning revision and the conflicts to purge.
387
+ * @return the {@link ConflictResolutionResult} with the saved winner and the conflicts that are still unresolved.
388
+ */
389
+ declareConflictWinner(body) {
390
+ return __awaiter(this, void 0, void 0, function* () {
391
+ const _url = this.host + `/calendarItem/conflicts/winner` + '?ts=' + new Date().getTime();
392
+ let headers = yield this.headers;
393
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
394
+ return XHR_1.XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
395
+ .then((doc) => new ConflictResolutionResult_1.ConflictResolutionResult(doc.body, (x) => new CalendarItem_1.CalendarItem(x)))
396
+ .catch((err) => this.handleError(err));
397
+ });
398
+ }
350
399
  }
351
400
  exports.IccCalendarItemApi = IccCalendarItemApi;
352
401
  //# sourceMappingURL=IccCalendarItemApi.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IccCalendarItemApi.js","sourceRoot":"","sources":["../../../icc-api/api/IccCalendarItemApi.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;GAUG;AACH,+BAA2B;AAC3B,wDAAoD;AACpD,0DAAsD;AAEtD,kDAA8C;AAC9C,wFAA8G;AAC9G,qDAAiD;AAEjD,mFAA+E;AAC/E,iGAA6F;AAE7F,kFAA8E;AAE9E,MAAa,kBAAkB;IAM7B,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,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,EAAE,kBAAkB,CAAC,CAAC,CAAA;YAC1I,MAAM,IAAI,GAAG,IAAI,qBAAS,CAAC,EAAE,GAAG,EAAE,WAAW,EAAE,CAAC,CAAA;YAChD,OAAO,SAAG,CAAC,WAAW,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,sBAAsB,CAAC,cAAc,EAAE,CAAC;iBACzH,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAE,GAAG,CAAC,IAAoB,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;iBACpF,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAA;QAC1C,CAAC;KAAA;CACF;AA/VD,gDA+VC","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 { CalendarItem } from '../model/CalendarItem'\nimport { DocIdentifier } from '../model/DocIdentifier'\nimport { IcureStub } from '../model/IcureStub'\nimport { ListOfIds } from '../model/ListOfIds'\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 { BulkShareOrUpdateMetadataParams } from '../model/requests/BulkShareOrUpdateMetadataParams'\nimport { PaginatedListCalendarItem } from '../model/PaginatedListCalendarItem'\n\nexport class IccCalendarItemApi {\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 *\n * @summary Creates a calendarItem\n * @param body\n */\n async createCalendarItem(body?: CalendarItem): Promise<CalendarItem> {\n const _url = this.host + `/calendarItem` + '?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 CalendarItem(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Deletes a calendarItem by id.\n *\n * @summary Deletes an calendarItem\n * @param calendarItemId the id of calendarItem to delete.\n * @return a Promise that will resolve in the DocIdentifier of the deleted calendarItem.\n */\n async deleteCalendarItem(calendarItemId: string): Promise<DocIdentifier> {\n return XHR.sendCommand(\n 'DELETE',\n this.host + `/calendarItem/${encodeURIComponent(calendarItemId)}` + '?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 * @summary Deletes a batch of calendarItems by id.\n *\n * @summary Deletes calendarItems\n * @param body a ListOfIds containing the ids of the calendarItems to delete.\n * @return a Promise that will resolve in an array of DocIdentifiers of the successfully deleted calendarItems.\n */\n async deleteCalendarItems(body?: 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 + `/calendarItem/delete/batch` + '?ts=' + new Date().getTime(),\n headers,\n body,\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 * @deprecated use {@link findCalendarItemIdsByDataOwnerPatientStartTime} instead.\n * @summary Find CalendarItems by hcparty and patient\n * @param body\n * @param hcPartyId\n */\n async findCalendarItemsByHCPartyPatientForeignKeysUsingPost(hcPartyId: string, body?: Array<string>): Promise<Array<CalendarItem>> {\n const _url =\n this.host +\n `/calendarItem/byHcPartySecretForeignKeys` +\n '?ts=' +\n new Date().getTime() +\n (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '')\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 CalendarItem(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @deprecated use {@link findCalendarItemIdsByDataOwnerPatientStartTime} instead.\n * @summary Find CalendarItems by hcparty and patient\n * @param hcPartyId\n * @param secretFKeys\n */\n async findCalendarItemsByHCPartyPatientForeignKeys(hcPartyId: string, secretFKeys: string): Promise<Array<CalendarItem>> {\n let _body = null\n\n const _url =\n this.host +\n `/calendarItem/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 CalendarItem(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @deprecated use {@link findCalendarItemsByRecurrenceIdWithPagination} instead.\n *\n * @summary Find CalendarItems by recurrenceId\n * @param recurrenceId\n */\n async findCalendarItemsByRecurrenceId(recurrenceId: string): Promise<Array<CalendarItem>> {\n const _url = this.host + `/calendarItem/byRecurrenceId?ts=${new Date().getTime()}&recurrenceId=${encodeURIComponent(recurrenceId)}&limit=1000000`\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new PaginatedListCalendarItem(doc.body as JSON).rows ?? [])\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Find CalendarItems by recurrenceId\n * @param recurrenceId the recurrence id.\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 PaginatedListAccessLog.\n */\n async findCalendarItemsByRecurrenceIdWithPagination(\n recurrenceId: string,\n startKey?: string,\n startDocumentId?: string,\n limit?: number\n ): Promise<PaginatedListCalendarItem> {\n const _url =\n this.host +\n `/calendarItem/byRecurrenceId?ts=${new Date().getTime()}&recurrenceId=${encodeURIComponent(recurrenceId)}` +\n (!!startKey ? `&startKey=${encodeURIComponent(startKey)}` : '') +\n (!!startDocumentId ? `&startDocumentId=${encodeURIComponent(startDocumentId)}` : '') +\n (!!limit ? `&limit=${limit}` : '')\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new PaginatedListCalendarItem(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Gets a calendarItem\n * @param calendarItemId\n */\n async getCalendarItem(calendarItemId: string): Promise<CalendarItem> {\n let _body = null\n\n const _url = this.host + `/calendarItem/${encodeURIComponent(String(calendarItemId))}` + '?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 CalendarItem(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @deprecated use {@link getCalendarItemsWithPagination} instead\n *\n * @summary Gets all calendarItems\n */\n async getCalendarItems(): Promise<Array<CalendarItem>> {\n const _url = this.host + `/calendarItem?ts=${new Date().getTime()}$limit=1000000`\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new PaginatedListCalendarItem(doc.body as JSON).rows ?? [])\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary gets all Calendar Items with pagination.\n *\n * @param startDocumentId the startDocumentId provided by the previous page or null if it's the first page.\n * @param limit the size of the page\n * @return a promise that will resolve in a PaginatedListCalendarItem.\n */\n async getCalendarItemsWithPagination(startDocumentId?: string, limit?: number): Promise<PaginatedListCalendarItem> {\n const _url =\n this.host +\n `/calendarItem` +\n '?ts=' +\n new Date().getTime() +\n (!!startDocumentId ? `&startDocumentId=${encodeURIComponent(startDocumentId)}` : '') +\n (!!limit ? `&limit=${limit}` : '')\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new PaginatedListCalendarItem(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Get CalendarItems by Period and HcPartyId\n * @param startDate\n * @param endDate\n * @param hcPartyId\n */\n async getCalendarItemsByPeriodAndHcPartyId(startDate: number, endDate: number, hcPartyId: string): Promise<Array<CalendarItem>> {\n let _body = null\n\n const _url =\n this.host +\n `/calendarItem/byPeriodAndHcPartyId` +\n '?ts=' +\n new Date().getTime() +\n (startDate ? '&startDate=' + encodeURIComponent(String(startDate)) : '') +\n (endDate ? '&endDate=' + encodeURIComponent(String(endDate)) : '') +\n (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '')\n let headers = await this.headers\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 CalendarItem(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Get calendarItems by id\n * @param body\n */\n async getCalendarItemsWithIds(body?: ListOfIds): Promise<Array<CalendarItem>> {\n const _url = this.host + `/calendarItem/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, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new CalendarItem(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Get CalendarItems by Period and AgendaId\n * @param startDate\n * @param endDate\n * @param agendaId\n */\n async getCalendarsByPeriodAndAgendaId(startDate: number, endDate: number, agendaId: string): Promise<Array<CalendarItem>> {\n let _body = null\n\n const _url =\n this.host +\n `/calendarItem/byPeriodAndAgendaId` +\n '?ts=' +\n new Date().getTime() +\n (startDate ? '&startDate=' + encodeURIComponent(String(startDate)) : '') +\n (endDate ? '&endDate=' + encodeURIComponent(String(endDate)) : '') +\n (agendaId ? '&agendaId=' + encodeURIComponent(String(agendaId)) : '')\n let headers = await this.headers\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 CalendarItem(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Modifies an calendarItem\n * @param body\n */\n async modifyCalendarItem(body?: CalendarItem): Promise<CalendarItem> {\n const _url = this.host + `/calendarItem` + '?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 CalendarItem(doc.body as JSON))\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 bulkShareCalendarItems(request: BulkShareOrUpdateMetadataParams): Promise<EntityBulkShareResult<CalendarItem>[]> {\n const _url = this.host + '/calendarItem/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<CalendarItem>(x, CalendarItem)))\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 bulkShareCalendarItemsMinimal(request: BulkShareOrUpdateMetadataParams): Promise<MinimalEntityBulkShareResult[]> {\n const _url = this.host + '/calendarItem/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 /**\n * @summary List CalendarItem ids by data owner and a set of secret foreign key. The ids will be sorted by CalendarItem startTime, 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 calendar item ids since the beginning of time will be returned.\n * @param endDate a timestamp in epoch milliseconds. If undefined, all the calendar item ids until the end of time will be returned.\n * @param descending whether to return the ids ordered in ascending or descending order by CalendarItem startTime\n * @return a promise that will resolve in an Array of CalendarItem ids.\n */\n async findCalendarItemIdsByDataOwnerPatientStartTime(\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 `/calendarItem/byDataOwnerPatientStartTime?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, body, 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"]}
1
+ {"version":3,"file":"IccCalendarItemApi.js","sourceRoot":"","sources":["../../../icc-api/api/IccCalendarItemApi.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;GAUG;AACH,+BAA2B;AAC3B,wDAAoD;AACpD,0DAAsD;AAEtD,kDAA8C;AAC9C,wFAA8G;AAC9G,qDAAiD;AAEjD,mFAA+E;AAC/E,iGAA6F;AAE7F,kFAA8E;AAE9E,gFAA4E;AAE5E,MAAa,kBAAkB;IAM7B,IAAI,OAAO;QACT,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;IACvC,CAAC;IAED,YACE,IAAY,EACZ,OAAY,EACZ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AAC,cAAc,EAAE,CAAC;iBACzH,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,mDAAwB,CAAe,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,2BAAY,CAAC,CAAC,CAAC,CAAC,CAAC;iBAC/F,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAA;QAC1C,CAAC;KAAA;CACF;AA5YD,gDA4YC","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 { CalendarItem } from '../model/CalendarItem'\nimport { DocIdentifier } from '../model/DocIdentifier'\nimport { IcureStub } from '../model/IcureStub'\nimport { ListOfIds } from '../model/ListOfIds'\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 { BulkShareOrUpdateMetadataParams } from '../model/requests/BulkShareOrUpdateMetadataParams'\nimport { PaginatedListCalendarItem } from '../model/PaginatedListCalendarItem'\nimport { ConflictResolutionRequest } from '../model/ConflictResolutionRequest'\nimport { ConflictResolutionResult } from '../model/ConflictResolutionResult'\n\nexport class IccCalendarItemApi {\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 *\n * @summary Creates a calendarItem\n * @param body\n */\n async createCalendarItem(body?: CalendarItem): Promise<CalendarItem> {\n const _url = this.host + `/calendarItem` + '?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 CalendarItem(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Deletes a calendarItem by id.\n *\n * @summary Deletes an calendarItem\n * @param calendarItemId the id of calendarItem to delete.\n * @return a Promise that will resolve in the DocIdentifier of the deleted calendarItem.\n */\n async deleteCalendarItem(calendarItemId: string): Promise<DocIdentifier> {\n return XHR.sendCommand(\n 'DELETE',\n this.host + `/calendarItem/${encodeURIComponent(calendarItemId)}` + '?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 * @summary Deletes a batch of calendarItems by id.\n *\n * @summary Deletes calendarItems\n * @param body a ListOfIds containing the ids of the calendarItems to delete.\n * @return a Promise that will resolve in an array of DocIdentifiers of the successfully deleted calendarItems.\n */\n async deleteCalendarItems(body?: 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 + `/calendarItem/delete/batch` + '?ts=' + new Date().getTime(),\n headers,\n body,\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 * @deprecated use {@link findCalendarItemIdsByDataOwnerPatientStartTime} instead.\n * @summary Find CalendarItems by hcparty and patient\n * @param body\n * @param hcPartyId\n */\n async findCalendarItemsByHCPartyPatientForeignKeysUsingPost(hcPartyId: string, body?: Array<string>): Promise<Array<CalendarItem>> {\n const _url =\n this.host +\n `/calendarItem/byHcPartySecretForeignKeys` +\n '?ts=' +\n new Date().getTime() +\n (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '')\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 CalendarItem(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @deprecated use {@link findCalendarItemIdsByDataOwnerPatientStartTime} instead.\n * @summary Find CalendarItems by hcparty and patient\n * @param hcPartyId\n * @param secretFKeys\n */\n async findCalendarItemsByHCPartyPatientForeignKeys(hcPartyId: string, secretFKeys: string): Promise<Array<CalendarItem>> {\n let _body = null\n\n const _url =\n this.host +\n `/calendarItem/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 CalendarItem(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @deprecated use {@link findCalendarItemsByRecurrenceIdWithPagination} instead.\n *\n * @summary Find CalendarItems by recurrenceId\n * @param recurrenceId\n */\n async findCalendarItemsByRecurrenceId(recurrenceId: string): Promise<Array<CalendarItem>> {\n const _url = this.host + `/calendarItem/byRecurrenceId?ts=${new Date().getTime()}&recurrenceId=${encodeURIComponent(recurrenceId)}&limit=1000000`\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new PaginatedListCalendarItem(doc.body as JSON).rows ?? [])\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Find CalendarItems by recurrenceId\n * @param recurrenceId the recurrence id.\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 PaginatedListAccessLog.\n */\n async findCalendarItemsByRecurrenceIdWithPagination(\n recurrenceId: string,\n startKey?: string,\n startDocumentId?: string,\n limit?: number\n ): Promise<PaginatedListCalendarItem> {\n const _url =\n this.host +\n `/calendarItem/byRecurrenceId?ts=${new Date().getTime()}&recurrenceId=${encodeURIComponent(recurrenceId)}` +\n (!!startKey ? `&startKey=${encodeURIComponent(startKey)}` : '') +\n (!!startDocumentId ? `&startDocumentId=${encodeURIComponent(startDocumentId)}` : '') +\n (!!limit ? `&limit=${limit}` : '')\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new PaginatedListCalendarItem(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Gets a calendarItem\n * @param calendarItemId\n */\n async getCalendarItem(calendarItemId: string): Promise<CalendarItem> {\n let _body = null\n\n const _url = this.host + `/calendarItem/${encodeURIComponent(String(calendarItemId))}` + '?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 CalendarItem(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @deprecated use {@link getCalendarItemsWithPagination} instead\n *\n * @summary Gets all calendarItems\n */\n async getCalendarItems(): Promise<Array<CalendarItem>> {\n const _url = this.host + `/calendarItem?ts=${new Date().getTime()}$limit=1000000`\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new PaginatedListCalendarItem(doc.body as JSON).rows ?? [])\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary gets all Calendar Items with pagination.\n *\n * @param startDocumentId the startDocumentId provided by the previous page or null if it's the first page.\n * @param limit the size of the page\n * @return a promise that will resolve in a PaginatedListCalendarItem.\n */\n async getCalendarItemsWithPagination(startDocumentId?: string, limit?: number): Promise<PaginatedListCalendarItem> {\n const _url =\n this.host +\n `/calendarItem` +\n '?ts=' +\n new Date().getTime() +\n (!!startDocumentId ? `&startDocumentId=${encodeURIComponent(startDocumentId)}` : '') +\n (!!limit ? `&limit=${limit}` : '')\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new PaginatedListCalendarItem(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Get CalendarItems by Period and HcPartyId\n * @param startDate\n * @param endDate\n * @param hcPartyId\n */\n async getCalendarItemsByPeriodAndHcPartyId(startDate: number, endDate: number, hcPartyId: string): Promise<Array<CalendarItem>> {\n let _body = null\n\n const _url =\n this.host +\n `/calendarItem/byPeriodAndHcPartyId` +\n '?ts=' +\n new Date().getTime() +\n (startDate ? '&startDate=' + encodeURIComponent(String(startDate)) : '') +\n (endDate ? '&endDate=' + encodeURIComponent(String(endDate)) : '') +\n (hcPartyId ? '&hcPartyId=' + encodeURIComponent(String(hcPartyId)) : '')\n let headers = await this.headers\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 CalendarItem(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Get calendarItems by id\n * @param body\n */\n async getCalendarItemsWithIds(body?: ListOfIds): Promise<Array<CalendarItem>> {\n const _url = this.host + `/calendarItem/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, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new CalendarItem(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Get CalendarItems by Period and AgendaId\n * @param startDate\n * @param endDate\n * @param agendaId\n */\n async getCalendarsByPeriodAndAgendaId(startDate: number, endDate: number, agendaId: string): Promise<Array<CalendarItem>> {\n let _body = null\n\n const _url =\n this.host +\n `/calendarItem/byPeriodAndAgendaId` +\n '?ts=' +\n new Date().getTime() +\n (startDate ? '&startDate=' + encodeURIComponent(String(startDate)) : '') +\n (endDate ? '&endDate=' + encodeURIComponent(String(endDate)) : '') +\n (agendaId ? '&agendaId=' + encodeURIComponent(String(agendaId)) : '')\n let headers = await this.headers\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 CalendarItem(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Modifies an calendarItem\n * @param body\n */\n async modifyCalendarItem(body?: CalendarItem): Promise<CalendarItem> {\n const _url = this.host + `/calendarItem` + '?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 CalendarItem(doc.body as JSON))\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 bulkShareCalendarItems(request: BulkShareOrUpdateMetadataParams): Promise<EntityBulkShareResult<CalendarItem>[]> {\n const _url = this.host + '/calendarItem/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<CalendarItem>(x, CalendarItem)))\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 bulkShareCalendarItemsMinimal(request: BulkShareOrUpdateMetadataParams): Promise<MinimalEntityBulkShareResult[]> {\n const _url = this.host + '/calendarItem/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 /**\n * @summary List CalendarItem ids by data owner and a set of secret foreign key. The ids will be sorted by CalendarItem startTime, 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 calendar item ids since the beginning of time will be returned.\n * @param endDate a timestamp in epoch milliseconds. If undefined, all the calendar item ids until the end of time will be returned.\n * @param descending whether to return the ids ordered in ascending or descending order by CalendarItem startTime\n * @return a promise that will resolve in an Array of CalendarItem ids.\n */\n async findCalendarItemIdsByDataOwnerPatientStartTime(\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 `/calendarItem/byDataOwnerPatientStartTime?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, body, 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 * Retrieves the ids of all the calendar items that currently have conflicting revisions and therefore need to\n * be resolved.\n * @summary List the ids of the calendar items that have conflicts.\n * @return the ids of the calendar items with unresolved conflicts.\n */\n async getConflictingEntitiesIds(): Promise<Array<string>> {\n const _url = this.host + `/calendarItem/conflicts` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => doc.body as Array<string>)\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Retrieves all the conflicting revisions of the calendar item with the given id (the current revision is not\n * included). The returned entities are still encrypted.\n * @summary Get the conflicting revisions of a calendar item.\n * @param entityId the id of the calendar item to retrieve the conflicts for.\n * @return the conflicting revisions of the calendar item.\n */\n async getConflictsForEntity(entityId: string): Promise<Array<CalendarItem>> {\n const _url = this.host + `/calendarItem/conflicts/${encodeURIComponent(String(entityId))}` + '?ts=' + new Date().getTime()\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new CalendarItem(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Resolves a conflict by declaring which revision of the calendar item should be kept as winner and which\n * conflicting revisions should be purged. The provided document must already be encrypted.\n * @summary Declare the winning revision of a conflicting calendar item.\n * @param body the {@link ConflictResolutionRequest} carrying the winning revision and the conflicts to purge.\n * @return the {@link ConflictResolutionResult} with the saved winner and the conflicts that are still unresolved.\n */\n async declareConflictWinner(body: ConflictResolutionRequest<CalendarItem>): Promise<ConflictResolutionResult<CalendarItem>> {\n const _url = this.host + `/calendarItem/conflicts/winner` + '?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 ConflictResolutionResult<CalendarItem>(doc.body, (x) => new CalendarItem(x)))\n .catch((err) => this.handleError(err))\n }\n}\n"]}
@@ -15,6 +15,8 @@ import { DocIdentifier } from '../model/DocIdentifier';
15
15
  import { AuthenticationProvider } from '../../icc-x-api/auth/AuthenticationProvider';
16
16
  import { ListOfIds } from '../model/ListOfIds';
17
17
  import { PaginatedListCalendarItemType } from '../model/PaginatedListCalendarItemType';
18
+ import { ConflictResolutionRequest } from '../model/ConflictResolutionRequest';
19
+ import { ConflictResolutionResult } from '../model/ConflictResolutionResult';
18
20
  export declare class IccCalendarItemTypeApi {
19
21
  host: string;
20
22
  headers: Array<XHR.Header>;
@@ -73,4 +75,27 @@ export declare class IccCalendarItemTypeApi {
73
75
  * @param body
74
76
  */
75
77
  modifyCalendarItemType(body?: CalendarItemType): Promise<CalendarItemType>;
78
+ /**
79
+ * Retrieves the ids of all the calendar item types that currently have conflicting revisions and therefore need to
80
+ * be resolved.
81
+ * @summary List the ids of the calendar item types that have conflicts.
82
+ * @return the ids of the calendar item types with unresolved conflicts.
83
+ */
84
+ getConflictingEntitiesIds(): Promise<Array<string>>;
85
+ /**
86
+ * Retrieves all the conflicting revisions of the calendar item type with the given id (the current revision is not
87
+ * included). The returned entities are still encrypted.
88
+ * @summary Get the conflicting revisions of a calendar item type.
89
+ * @param entityId the id of the calendar item type to retrieve the conflicts for.
90
+ * @return the conflicting revisions of the calendar item type.
91
+ */
92
+ getConflictsForEntity(entityId: string): Promise<Array<CalendarItemType>>;
93
+ /**
94
+ * Resolves a conflict by declaring which revision of the calendar item type should be kept as winner and which
95
+ * conflicting revisions should be purged. The provided document must already be encrypted.
96
+ * @summary Declare the winning revision of a conflicting calendar item type.
97
+ * @param body the {@link ConflictResolutionRequest} carrying the winning revision and the conflicts to purge.
98
+ * @return the {@link ConflictResolutionResult} with the saved winner and the conflicts that are still unresolved.
99
+ */
100
+ declareConflictWinner(body: ConflictResolutionRequest<CalendarItemType>): Promise<ConflictResolutionResult<CalendarItemType>>;
76
101
  }
@@ -27,6 +27,7 @@ const DocIdentifier_1 = require("../model/DocIdentifier");
27
27
  const AuthenticationProvider_1 = require("../../icc-x-api/auth/AuthenticationProvider");
28
28
  const IccRestApiPath_1 = require("./IccRestApiPath");
29
29
  const PaginatedListCalendarItemType_1 = require("../model/PaginatedListCalendarItemType");
30
+ const ConflictResolutionResult_1 = require("../model/ConflictResolutionResult");
30
31
  class IccCalendarItemTypeApi {
31
32
  constructor(host, headers, authenticationProvider, fetchImpl) {
32
33
  this.host = (0, IccRestApiPath_1.iccRestApiPath)(host);
@@ -162,6 +163,54 @@ class IccCalendarItemTypeApi {
162
163
  .catch((err) => this.handleError(err));
163
164
  });
164
165
  }
166
+ /**
167
+ * Retrieves the ids of all the calendar item types that currently have conflicting revisions and therefore need to
168
+ * be resolved.
169
+ * @summary List the ids of the calendar item types that have conflicts.
170
+ * @return the ids of the calendar item types with unresolved conflicts.
171
+ */
172
+ getConflictingEntitiesIds() {
173
+ return __awaiter(this, void 0, void 0, function* () {
174
+ const _url = this.host + `/calendarItemType/conflicts` + '?ts=' + new Date().getTime();
175
+ let headers = this.headers;
176
+ return XHR_1.XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
177
+ .then((doc) => doc.body)
178
+ .catch((err) => this.handleError(err));
179
+ });
180
+ }
181
+ /**
182
+ * Retrieves all the conflicting revisions of the calendar item type with the given id (the current revision is not
183
+ * included). The returned entities are still encrypted.
184
+ * @summary Get the conflicting revisions of a calendar item type.
185
+ * @param entityId the id of the calendar item type to retrieve the conflicts for.
186
+ * @return the conflicting revisions of the calendar item type.
187
+ */
188
+ getConflictsForEntity(entityId) {
189
+ return __awaiter(this, void 0, void 0, function* () {
190
+ const _url = this.host + `/calendarItemType/conflicts/${encodeURIComponent(String(entityId))}` + '?ts=' + new Date().getTime();
191
+ let headers = this.headers;
192
+ return XHR_1.XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
193
+ .then((doc) => doc.body.map((it) => new CalendarItemType_1.CalendarItemType(it)))
194
+ .catch((err) => this.handleError(err));
195
+ });
196
+ }
197
+ /**
198
+ * Resolves a conflict by declaring which revision of the calendar item type should be kept as winner and which
199
+ * conflicting revisions should be purged. The provided document must already be encrypted.
200
+ * @summary Declare the winning revision of a conflicting calendar item type.
201
+ * @param body the {@link ConflictResolutionRequest} carrying the winning revision and the conflicts to purge.
202
+ * @return the {@link ConflictResolutionResult} with the saved winner and the conflicts that are still unresolved.
203
+ */
204
+ declareConflictWinner(body) {
205
+ return __awaiter(this, void 0, void 0, function* () {
206
+ const _url = this.host + `/calendarItemType/conflicts/winner` + '?ts=' + new Date().getTime();
207
+ let headers = this.headers;
208
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
209
+ return XHR_1.XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
210
+ .then((doc) => new ConflictResolutionResult_1.ConflictResolutionResult(doc.body, (x) => new CalendarItemType_1.CalendarItemType(x)))
211
+ .catch((err) => this.handleError(err));
212
+ });
213
+ }
165
214
  }
166
215
  exports.IccCalendarItemTypeApi = IccCalendarItemTypeApi;
167
216
  //# sourceMappingURL=IccCalendarItemTypeApi.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"IccCalendarItemTypeApi.js","sourceRoot":"","sources":["../../../icc-api/api/IccCalendarItemTypeApi.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;GAUG;AACH,+BAA2B;AAC3B,gEAA4D;AAC5D,0DAAsD;AACtD,wFAA8G;AAC9G,qDAAiD;AAEjD,0FAAsF;AAEtF,MAAa,sBAAsB;IAMjC,YACE,IAAY,EACZ,OAAY,EACZ,sBAA+C,EAC/C,SAAyE;QAEzE,IAAI,CAAC,IAAI,GAAG,IAAA,+BAAc,EAAC,IAAI,CAAC,CAAA;QAChC,IAAI,CAAC,OAAO,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;QAC7E,IAAI,CAAC,sBAAsB,GAAG,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,IAAI,iDAAwB,EAAE,CAAA;QAChH,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;IAC5B,CAAC;IAED,UAAU,CAAC,CAAoB;QAC7B,IAAI,CAAC,OAAO,GAAG,CAAC,CAAA;IAClB,CAAC;IAED,WAAW,CAAC,CAAe;QACzB,MAAM,CAAC,CAAA;IACT,CAAC;IAED;;;;OAIG;IACG,sBAAsB,CAAC,IAAuB;;YAClD,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,GAAG,mBAAmB,GAAG,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAA;YAC5E,I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,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAA;QAC1C,CAAC;KAAA;IAED;;;;OAIG;IACG,sBAAsB,CAAC,IAAuB;;YAClD,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,GAAG,mBAAmB,GAAG,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAA;YAC5E,IAAI,OAAO,GAAG,IAAI,CAAC,OAAO,CAAA;YAC1B,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,IAAI,EAAE,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,sBAAsB,CAAC,cAAc,EAAE,CAAC;iBACxH,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,mCAAgB,CAAC,GAAG,CAAC,IAAY,CAAC,CAAC;iBACrD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAA;QAC1C,CAAC;KAAA;CACF;AA1JD,wDA0JC","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 { CalendarItemType } from '../model/CalendarItemType'\nimport { DocIdentifier } from '../model/DocIdentifier'\nimport { AuthenticationProvider, NoAuthenticationProvider } from '../../icc-x-api/auth/AuthenticationProvider'\nimport { iccRestApiPath } from './IccRestApiPath'\nimport { ListOfIds } from '../model/ListOfIds'\nimport { PaginatedListCalendarItemType } from '../model/PaginatedListCalendarItemType'\n\nexport class IccCalendarItemTypeApi {\n host: string\n headers: Array<XHR.Header>\n authenticationProvider: AuthenticationProvider\n fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>\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 *\n * @summary Creates a calendarItemType\n * @param body\n */\n async createCalendarItemType(body?: CalendarItemType): Promise<CalendarItemType> {\n const _url = this.host + `/calendarItemType` + '?ts=' + new Date().getTime()\n let headers = 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 CalendarItemType(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Deletes a batch of calendarItemTypes.\n *\n * @param calendarItemTypeIds a ListOfIds containing the ids of the calendarItemTypes to delete.\n * @return a Promise that will resolve in an array of DocIdentifiers of the successfully deleted calendarItemTypes.\n */\n async deleteCalendarItemTypes(calendarItemTypeIds: ListOfIds): Promise<Array<DocIdentifier>> {\n return XHR.sendCommand(\n 'POST',\n this.host + `/calendarItemType/delete/batch` + '?ts=' + new Date().getTime(),\n this.headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json')),\n calendarItemTypeIds,\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 *\n * @summary Gets an calendarItemType\n * @param calendarItemTypeId\n */\n async getCalendarItemType(calendarItemTypeId: string): Promise<CalendarItemType> {\n let _body = null\n\n const _url = this.host + `/calendarItemType/${encodeURIComponent(String(calendarItemTypeId))}` + '?ts=' + new Date().getTime()\n let headers = this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new CalendarItemType(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @deprecated use {@link getCalendarItemTypesWithPagination} instead.\n * @summary Gets all calendarItemTypes\n */\n async getCalendarItemTypes(): Promise<Array<CalendarItemType>> {\n const _url = this.host + `/calendarItemType?ts=${new Date().getTime()}&limit=1000000`\n let headers = this.headers\n return XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new PaginatedListCalendarItemType(doc.body as JSON).rows ?? [])\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Gets all calendarItemTypes with pagination.\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 PaginatedListCalendarItemType.\n */\n async getCalendarItemTypesWithPagination(startDocumentId?: string, limit?: number): Promise<PaginatedListCalendarItemType> {\n const _url =\n this.host +\n `/calendarItemType?ts=${new Date().getTime()}` +\n (!!startDocumentId ? `&startDocumentId=${encodeURIComponent(startDocumentId)}` : '') +\n (!!limit ? `&limit=${limit}` : '')\n let headers = this.headers\n return XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new PaginatedListCalendarItemType(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @deprecated use {@link getCalendarItemTypesIncludeDeletedWithPagination} instead.\n * @summary Gets all calendarItemTypes include deleted\n */\n async getCalendarItemTypesIncludeDeleted(): Promise<Array<CalendarItemType>> {\n const _url = this.host + `/calendarItemType/includeDeleted?ts=${new Date().getTime()}&limit=1000000`\n let headers = this.headers\n return XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new PaginatedListCalendarItemType(doc.body as JSON).rows ?? [])\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Gets all calendarItemTypes including deleted entities with pagination.\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 PaginatedListCalendarItemType.\n */\n async getCalendarItemTypesIncludeDeletedWithPagination(\n startKey?: string,\n startDocumentId?: string,\n limit?: number\n ): Promise<PaginatedListCalendarItemType> {\n const _url =\n this.host +\n `/calendarItemType/includeDeleted?ts=${new Date().getTime()}` +\n (!!startKey ? `&startKey=${encodeURIComponent(startKey)}` : '') +\n (!!startDocumentId ? `&startDocumentId=${encodeURIComponent(startDocumentId)}` : '') +\n (!!limit ? `&limit=${limit}` : '')\n let headers = this.headers\n return XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new PaginatedListCalendarItemType(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Modifies an calendarItemType\n * @param body\n */\n async modifyCalendarItemType(body?: CalendarItemType): Promise<CalendarItemType> {\n const _url = this.host + `/calendarItemType` + '?ts=' + new Date().getTime()\n let headers = 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 CalendarItemType(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n}\n"]}
1
+ {"version":3,"file":"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AAE,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,sBAAsB,CAAC,cAAc,EAAE,CAAC;iBACzH,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,mDAAwB,CAAmB,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,mCAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;iBACvG,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAA;QAC1C,CAAC;KAAA;CACF;AAvMD,wDAuMC","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 { CalendarItemType } from '../model/CalendarItemType'\nimport { DocIdentifier } from '../model/DocIdentifier'\nimport { AuthenticationProvider, NoAuthenticationProvider } from '../../icc-x-api/auth/AuthenticationProvider'\nimport { iccRestApiPath } from './IccRestApiPath'\nimport { ListOfIds } from '../model/ListOfIds'\nimport { PaginatedListCalendarItemType } from '../model/PaginatedListCalendarItemType'\nimport { ConflictResolutionRequest } from '../model/ConflictResolutionRequest'\nimport { ConflictResolutionResult } from '../model/ConflictResolutionResult'\n\nexport class IccCalendarItemTypeApi {\n host: string\n headers: Array<XHR.Header>\n authenticationProvider: AuthenticationProvider\n fetchImpl?: (input: RequestInfo, init?: RequestInit) => Promise<Response>\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 *\n * @summary Creates a calendarItemType\n * @param body\n */\n async createCalendarItemType(body?: CalendarItemType): Promise<CalendarItemType> {\n const _url = this.host + `/calendarItemType` + '?ts=' + new Date().getTime()\n let headers = 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 CalendarItemType(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Deletes a batch of calendarItemTypes.\n *\n * @param calendarItemTypeIds a ListOfIds containing the ids of the calendarItemTypes to delete.\n * @return a Promise that will resolve in an array of DocIdentifiers of the successfully deleted calendarItemTypes.\n */\n async deleteCalendarItemTypes(calendarItemTypeIds: ListOfIds): Promise<Array<DocIdentifier>> {\n return XHR.sendCommand(\n 'POST',\n this.host + `/calendarItemType/delete/batch` + '?ts=' + new Date().getTime(),\n this.headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json')),\n calendarItemTypeIds,\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 *\n * @summary Gets an calendarItemType\n * @param calendarItemTypeId\n */\n async getCalendarItemType(calendarItemTypeId: string): Promise<CalendarItemType> {\n let _body = null\n\n const _url = this.host + `/calendarItemType/${encodeURIComponent(String(calendarItemTypeId))}` + '?ts=' + new Date().getTime()\n let headers = this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new CalendarItemType(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @deprecated use {@link getCalendarItemTypesWithPagination} instead.\n * @summary Gets all calendarItemTypes\n */\n async getCalendarItemTypes(): Promise<Array<CalendarItemType>> {\n const _url = this.host + `/calendarItemType?ts=${new Date().getTime()}&limit=1000000`\n let headers = this.headers\n return XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new PaginatedListCalendarItemType(doc.body as JSON).rows ?? [])\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Gets all calendarItemTypes with pagination.\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 PaginatedListCalendarItemType.\n */\n async getCalendarItemTypesWithPagination(startDocumentId?: string, limit?: number): Promise<PaginatedListCalendarItemType> {\n const _url =\n this.host +\n `/calendarItemType?ts=${new Date().getTime()}` +\n (!!startDocumentId ? `&startDocumentId=${encodeURIComponent(startDocumentId)}` : '') +\n (!!limit ? `&limit=${limit}` : '')\n let headers = this.headers\n return XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new PaginatedListCalendarItemType(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @deprecated use {@link getCalendarItemTypesIncludeDeletedWithPagination} instead.\n * @summary Gets all calendarItemTypes include deleted\n */\n async getCalendarItemTypesIncludeDeleted(): Promise<Array<CalendarItemType>> {\n const _url = this.host + `/calendarItemType/includeDeleted?ts=${new Date().getTime()}&limit=1000000`\n let headers = this.headers\n return XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new PaginatedListCalendarItemType(doc.body as JSON).rows ?? [])\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Gets all calendarItemTypes including deleted entities with pagination.\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 PaginatedListCalendarItemType.\n */\n async getCalendarItemTypesIncludeDeletedWithPagination(\n startKey?: string,\n startDocumentId?: string,\n limit?: number\n ): Promise<PaginatedListCalendarItemType> {\n const _url =\n this.host +\n `/calendarItemType/includeDeleted?ts=${new Date().getTime()}` +\n (!!startKey ? `&startKey=${encodeURIComponent(startKey)}` : '') +\n (!!startDocumentId ? `&startDocumentId=${encodeURIComponent(startDocumentId)}` : '') +\n (!!limit ? `&limit=${limit}` : '')\n let headers = this.headers\n return XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new PaginatedListCalendarItemType(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Modifies an calendarItemType\n * @param body\n */\n async modifyCalendarItemType(body?: CalendarItemType): Promise<CalendarItemType> {\n const _url = this.host + `/calendarItemType` + '?ts=' + new Date().getTime()\n let headers = 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 CalendarItemType(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Retrieves the ids of all the calendar item types that currently have conflicting revisions and therefore need to\n * be resolved.\n * @summary List the ids of the calendar item types that have conflicts.\n * @return the ids of the calendar item types with unresolved conflicts.\n */\n async getConflictingEntitiesIds(): Promise<Array<string>> {\n const _url = this.host + `/calendarItemType/conflicts` + '?ts=' + new Date().getTime()\n let headers = this.headers\n return XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => doc.body as Array<string>)\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Retrieves all the conflicting revisions of the calendar item type with the given id (the current revision is not\n * included). The returned entities are still encrypted.\n * @summary Get the conflicting revisions of a calendar item type.\n * @param entityId the id of the calendar item type to retrieve the conflicts for.\n * @return the conflicting revisions of the calendar item type.\n */\n async getConflictsForEntity(entityId: string): Promise<Array<CalendarItemType>> {\n const _url = this.host + `/calendarItemType/conflicts/${encodeURIComponent(String(entityId))}` + '?ts=' + new Date().getTime()\n let headers = this.headers\n return XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => (doc.body as Array<JSON>).map((it) => new CalendarItemType(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * Resolves a conflict by declaring which revision of the calendar item type should be kept as winner and which\n * conflicting revisions should be purged. The provided document must already be encrypted.\n * @summary Declare the winning revision of a conflicting calendar item type.\n * @param body the {@link ConflictResolutionRequest} carrying the winning revision and the conflicts to purge.\n * @return the {@link ConflictResolutionResult} with the saved winner and the conflicts that are still unresolved.\n */\n async declareConflictWinner(body: ConflictResolutionRequest<CalendarItemType>): Promise<ConflictResolutionResult<CalendarItemType>> {\n const _url = this.host + `/calendarItemType/conflicts/winner` + '?ts=' + new Date().getTime()\n let headers = 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 ConflictResolutionResult<CalendarItemType>(doc.body, (x) => new CalendarItemType(x)))\n .catch((err) => this.handleError(err))\n }\n}\n"]}
@@ -17,6 +17,8 @@ import { PaginatedListCode } from '../model/PaginatedListCode';
17
17
  import { Unit } from '../model/Unit';
18
18
  import { AuthenticationProvider } from '../../icc-x-api/auth/AuthenticationProvider';
19
19
  import { TimingInfo } from '../model/TimingInfo';
20
+ import { ConflictResolutionRequest } from '../model/ConflictResolutionRequest';
21
+ import { ConflictResolutionResult } from '../model/ConflictResolutionResult';
20
22
  export declare class IccCodeApi {
21
23
  host: string;
22
24
  headers: Array<XHR.Header>;
@@ -172,4 +174,27 @@ export declare class IccCodeApi {
172
174
  */
173
175
  matchCodesByInGroup(groupId: string, body?: AbstractFilterCode, collectTiming?: false): Promise<Array<string>>;
174
176
  matchCodesByInGroup(groupId: string, body?: AbstractFilterCode, collectTiming?: true): Promise<Array<string> & TimingInfo>;
177
+ /**
178
+ * Retrieves the ids of all the codes that currently have conflicting revisions and therefore need to
179
+ * be resolved.
180
+ * @summary List the ids of the codes that have conflicts.
181
+ * @return the ids of the codes with unresolved conflicts.
182
+ */
183
+ getConflictingEntitiesIds(): Promise<Array<string>>;
184
+ /**
185
+ * Retrieves all the conflicting revisions of the code with the given id (the current revision is not
186
+ * included). The returned entities are still encrypted.
187
+ * @summary Get the conflicting revisions of a code.
188
+ * @param entityId the id of the code to retrieve the conflicts for.
189
+ * @return the conflicting revisions of the code.
190
+ */
191
+ getConflictsForEntity(entityId: string): Promise<Array<Code>>;
192
+ /**
193
+ * Resolves a conflict by declaring which revision of the code should be kept as winner and which
194
+ * conflicting revisions should be purged. The provided document must already be encrypted.
195
+ * @summary Declare the winning revision of a conflicting code.
196
+ * @param body the {@link ConflictResolutionRequest} carrying the winning revision and the conflicts to purge.
197
+ * @return the {@link ConflictResolutionResult} with the saved winner and the conflicts that are still unresolved.
198
+ */
199
+ declareConflictWinner(body: ConflictResolutionRequest<Code>): Promise<ConflictResolutionResult<Code>>;
175
200
  }
@@ -28,6 +28,7 @@ const Unit_1 = require("../model/Unit");
28
28
  const AuthenticationProvider_1 = require("../../icc-x-api/auth/AuthenticationProvider");
29
29
  const IccRestApiPath_1 = require("./IccRestApiPath");
30
30
  const ListOfIds_1 = require("../model/ListOfIds");
31
+ const ConflictResolutionResult_1 = require("../model/ConflictResolutionResult");
31
32
  class IccCodeApi {
32
33
  constructor(host, headers, authenticationProvider, fetchImpl) {
33
34
  this.host = (0, IccRestApiPath_1.iccRestApiPath)(host);
@@ -383,6 +384,54 @@ class IccCodeApi {
383
384
  .catch((err) => this.handleError(err));
384
385
  });
385
386
  }
387
+ /**
388
+ * Retrieves the ids of all the codes that currently have conflicting revisions and therefore need to
389
+ * be resolved.
390
+ * @summary List the ids of the codes that have conflicts.
391
+ * @return the ids of the codes with unresolved conflicts.
392
+ */
393
+ getConflictingEntitiesIds() {
394
+ return __awaiter(this, void 0, void 0, function* () {
395
+ const _url = this.host + `/code/conflicts` + '?ts=' + new Date().getTime();
396
+ let headers = this.headers;
397
+ return XHR_1.XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
398
+ .then((doc) => doc.body)
399
+ .catch((err) => this.handleError(err));
400
+ });
401
+ }
402
+ /**
403
+ * Retrieves all the conflicting revisions of the code with the given id (the current revision is not
404
+ * included). The returned entities are still encrypted.
405
+ * @summary Get the conflicting revisions of a code.
406
+ * @param entityId the id of the code to retrieve the conflicts for.
407
+ * @return the conflicting revisions of the code.
408
+ */
409
+ getConflictsForEntity(entityId) {
410
+ return __awaiter(this, void 0, void 0, function* () {
411
+ const _url = this.host + `/code/conflicts/${encodeURIComponent(String(entityId))}` + '?ts=' + new Date().getTime();
412
+ let headers = this.headers;
413
+ return XHR_1.XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
414
+ .then((doc) => doc.body.map((it) => new Code_1.Code(it)))
415
+ .catch((err) => this.handleError(err));
416
+ });
417
+ }
418
+ /**
419
+ * Resolves a conflict by declaring which revision of the code should be kept as winner and which
420
+ * conflicting revisions should be purged. The provided document must already be encrypted.
421
+ * @summary Declare the winning revision of a conflicting code.
422
+ * @param body the {@link ConflictResolutionRequest} carrying the winning revision and the conflicts to purge.
423
+ * @return the {@link ConflictResolutionResult} with the saved winner and the conflicts that are still unresolved.
424
+ */
425
+ declareConflictWinner(body) {
426
+ return __awaiter(this, void 0, void 0, function* () {
427
+ const _url = this.host + `/code/conflicts/winner` + '?ts=' + new Date().getTime();
428
+ let headers = this.headers;
429
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
430
+ return XHR_1.XHR.sendCommand('POST', _url, headers, body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
431
+ .then((doc) => new ConflictResolutionResult_1.ConflictResolutionResult(doc.body, (x) => new Code_1.Code(x)))
432
+ .catch((err) => this.handleError(err));
433
+ });
434
+ }
386
435
  }
387
436
  exports.IccCodeApi = IccCodeApi;
388
437
  //# sourceMappingURL=IccCodeApi.js.map