@icure/api 8.0.20 → 8.0.21

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 (119) hide show
  1. package/icc-api/api/IccAccesslogApi.d.ts +11 -0
  2. package/icc-api/api/IccAccesslogApi.js +29 -0
  3. package/icc-api/api/IccAccesslogApi.js.map +1 -1
  4. package/icc-api/api/IccAgendaApi.d.ts +10 -0
  5. package/icc-api/api/IccAgendaApi.js +30 -6
  6. package/icc-api/api/IccAgendaApi.js.map +1 -1
  7. package/icc-api/api/IccArticleApi.d.ts +10 -0
  8. package/icc-api/api/IccArticleApi.js +26 -4
  9. package/icc-api/api/IccArticleApi.js.map +1 -1
  10. package/icc-api/api/IccCalendarItemApi.d.ts +22 -1
  11. package/icc-api/api/IccCalendarItemApi.js +52 -12
  12. package/icc-api/api/IccCalendarItemApi.js.map +1 -1
  13. package/icc-api/api/IccCalendarItemTypeApi.d.ts +18 -2
  14. package/icc-api/api/IccCalendarItemTypeApi.js +47 -10
  15. package/icc-api/api/IccCalendarItemTypeApi.js.map +1 -1
  16. package/icc-api/api/IccClassificationApi.d.ts +12 -1
  17. package/icc-api/api/IccClassificationApi.js +26 -1
  18. package/icc-api/api/IccClassificationApi.js.map +1 -1
  19. package/icc-api/api/IccClassificationTemplateApi.d.ts +12 -2
  20. package/icc-api/api/IccClassificationTemplateApi.js +26 -2
  21. package/icc-api/api/IccClassificationTemplateApi.js.map +1 -1
  22. package/icc-api/api/IccCodeApi.d.ts +1 -1
  23. package/icc-api/api/IccCodeApi.js +18 -6
  24. package/icc-api/api/IccCodeApi.js.map +1 -1
  25. package/icc-api/api/IccContactApi.d.ts +10 -0
  26. package/icc-api/api/IccContactApi.js +24 -0
  27. package/icc-api/api/IccContactApi.js.map +1 -1
  28. package/icc-api/api/IccDoctemplateApi.d.ts +10 -1
  29. package/icc-api/api/IccDoctemplateApi.js +25 -4
  30. package/icc-api/api/IccDoctemplateApi.js.map +1 -1
  31. package/icc-api/api/IccDocumentApi.d.ts +13 -2
  32. package/icc-api/api/IccDocumentApi.js +27 -2
  33. package/icc-api/api/IccDocumentApi.js.map +1 -1
  34. package/icc-api/api/IccFormApi.d.ts +12 -1
  35. package/icc-api/api/IccFormApi.js +27 -1
  36. package/icc-api/api/IccFormApi.js.map +1 -1
  37. package/icc-api/api/IccHcpartyApi.d.ts +3 -1
  38. package/icc-api/api/IccHcpartyApi.js +31 -24
  39. package/icc-api/api/IccHcpartyApi.js.map +1 -1
  40. package/icc-api/api/IccHelementApi.d.ts +13 -4
  41. package/icc-api/api/IccHelementApi.js +28 -4
  42. package/icc-api/api/IccHelementApi.js.map +1 -1
  43. package/icc-api/api/IccInvoiceApi.d.ts +11 -1
  44. package/icc-api/api/IccInvoiceApi.js +26 -1
  45. package/icc-api/api/IccInvoiceApi.js.map +1 -1
  46. package/icc-api/api/IccKeywordApi.d.ts +10 -2
  47. package/icc-api/api/IccKeywordApi.js +24 -6
  48. package/icc-api/api/IccKeywordApi.js.map +1 -1
  49. package/icc-api/api/IccMedicallocationApi.d.ts +10 -2
  50. package/icc-api/api/IccMedicallocationApi.js +25 -7
  51. package/icc-api/api/IccMedicallocationApi.js.map +1 -1
  52. package/icc-api/api/IccMessageApi.d.ts +10 -2
  53. package/icc-api/api/IccMessageApi.js +23 -2
  54. package/icc-api/api/IccMessageApi.js.map +1 -1
  55. package/icc-api/api/IccPatientApi.d.ts +2 -1
  56. package/icc-api/api/IccPatientApi.js +10 -9
  57. package/icc-api/api/IccPatientApi.js.map +1 -1
  58. package/icc-api/api/IccPlaceApi.d.ts +9 -1
  59. package/icc-api/api/IccPlaceApi.js +24 -6
  60. package/icc-api/api/IccPlaceApi.js.map +1 -1
  61. package/icc-api/model/PaginatedListAgenda.d.ts +9 -0
  62. package/icc-api/model/PaginatedListAgenda.js +10 -0
  63. package/icc-api/model/PaginatedListAgenda.js.map +1 -0
  64. package/icc-api/model/PaginatedListArticle.d.ts +9 -0
  65. package/icc-api/model/PaginatedListArticle.js +10 -0
  66. package/icc-api/model/PaginatedListArticle.js.map +1 -0
  67. package/icc-api/model/PaginatedListCalendarItem.d.ts +9 -0
  68. package/icc-api/model/PaginatedListCalendarItem.js +10 -0
  69. package/icc-api/model/PaginatedListCalendarItem.js.map +1 -0
  70. package/icc-api/model/PaginatedListCalendarItemType.d.ts +9 -0
  71. package/icc-api/model/PaginatedListCalendarItemType.js +10 -0
  72. package/icc-api/model/PaginatedListCalendarItemType.js.map +1 -0
  73. package/icc-api/model/PaginatedListDocumentTemplate.d.ts +9 -0
  74. package/icc-api/model/PaginatedListDocumentTemplate.js +10 -0
  75. package/icc-api/model/PaginatedListDocumentTemplate.js.map +1 -0
  76. package/icc-api/model/PaginatedListKeyword.d.ts +9 -0
  77. package/icc-api/model/PaginatedListKeyword.js +10 -0
  78. package/icc-api/model/PaginatedListKeyword.js.map +1 -0
  79. package/icc-api/model/PaginatedListPlace.d.ts +9 -0
  80. package/icc-api/model/PaginatedListPlace.js +10 -0
  81. package/icc-api/model/PaginatedListPlace.js.map +1 -0
  82. package/icc-x-api/icc-accesslog-x-api.d.ts +1 -0
  83. package/icc-x-api/icc-accesslog-x-api.js +14 -0
  84. package/icc-x-api/icc-accesslog-x-api.js.map +1 -1
  85. package/icc-x-api/icc-calendar-item-x-api.d.ts +13 -0
  86. package/icc-x-api/icc-calendar-item-x-api.js +59 -1
  87. package/icc-x-api/icc-calendar-item-x-api.js.map +1 -1
  88. package/icc-x-api/icc-classification-x-api.js.map +1 -1
  89. package/icc-x-api/icc-contact-x-api.d.ts +1 -0
  90. package/icc-x-api/icc-contact-x-api.js +15 -0
  91. package/icc-x-api/icc-contact-x-api.js.map +1 -1
  92. package/icc-x-api/icc-helement-x-api.d.ts +2 -0
  93. package/icc-x-api/icc-helement-x-api.js +18 -0
  94. package/icc-x-api/icc-helement-x-api.js.map +1 -1
  95. package/icc-x-api/icc-patient-x-api.d.ts +2 -2
  96. package/icc-x-api/icc-patient-x-api.js +3 -3
  97. package/icc-x-api/icc-patient-x-api.js.map +1 -1
  98. package/package.json +1 -1
  99. package/test/icc-api/api/IccAgendaApi.d.ts +1 -0
  100. package/test/icc-api/api/IccAgendaApi.js +64 -0
  101. package/test/icc-api/api/IccAgendaApi.js.map +1 -0
  102. package/test/icc-api/api/IccArticleApi.d.ts +1 -0
  103. package/test/icc-api/api/IccArticleApi.js +64 -0
  104. package/test/icc-api/api/IccArticleApi.js.map +1 -0
  105. package/test/icc-api/api/IccCalendarItemApi.d.ts +1 -0
  106. package/test/icc-api/api/IccCalendarItemApi.js +67 -0
  107. package/test/icc-api/api/IccCalendarItemApi.js.map +1 -0
  108. package/test/icc-api/api/IccCalendarItemTypeApi.d.ts +1 -0
  109. package/test/icc-api/api/IccCalendarItemTypeApi.js +96 -0
  110. package/test/icc-api/api/IccCalendarItemTypeApi.js.map +1 -0
  111. package/test/icc-api/api/IccKeywordApi.d.ts +1 -0
  112. package/test/icc-api/api/IccKeywordApi.js +64 -0
  113. package/test/icc-api/api/IccKeywordApi.js.map +1 -0
  114. package/test/icc-api/api/IccMedicalLocationApi.d.ts +1 -0
  115. package/test/icc-api/api/IccMedicalLocationApi.js +64 -0
  116. package/test/icc-api/api/IccMedicalLocationApi.js.map +1 -0
  117. package/test/icc-api/api/IccPlaceApi.d.ts +1 -0
  118. package/test/icc-api/api/IccPlaceApi.js +64 -0
  119. package/test/icc-api/api/IccPlaceApi.js.map +1 -0
@@ -52,6 +52,17 @@ export declare class IccAccesslogApi {
52
52
  * @param hcPartyId
53
53
  */
54
54
  findAccessLogsByHCPartyPatientForeignKeysUsingPost(hcPartyId: string, body?: Array<string>): Promise<Array<AccessLog>>;
55
+ /**
56
+ * @summary List access logs found by Healthcare Party id and secret foreign key element id with pagination.
57
+ *
58
+ * @param hcPartyId the healthcare party id.
59
+ * @param secretFKey the secret foreign key.
60
+ * @param startKey the startKey provided by the previous page or undefined for the first page.
61
+ * @param startDocumentId the startDocumentId provided by the previous page or undefined for the first page.
62
+ * @param limit the number of elements that the page should contain.
63
+ * @return a promise that will resolve in a PaginatedListAccessLog.
64
+ */
65
+ findAccessLogsByHCPartyPatientForeignKey(hcPartyId: string, secretFKey: string, startKey?: string, startDocumentId?: string, limit?: number): Promise<PaginatedListAccessLog>;
55
66
  /**
56
67
  *
57
68
  * @summary List access logs found by Healthcare Party and secret foreign keyelementIds.
@@ -105,6 +105,35 @@ class IccAccesslogApi {
105
105
  .catch((err) => this.handleError(err));
106
106
  });
107
107
  }
108
+ /**
109
+ * @summary List access logs found by Healthcare Party id and secret foreign key element id with pagination.
110
+ *
111
+ * @param hcPartyId the healthcare party id.
112
+ * @param secretFKey the secret foreign key.
113
+ * @param startKey the startKey provided by the previous page or undefined for the first page.
114
+ * @param startDocumentId the startDocumentId provided by the previous page or undefined for the first page.
115
+ * @param limit the number of elements that the page should contain.
116
+ * @return a promise that will resolve in a PaginatedListAccessLog.
117
+ */
118
+ findAccessLogsByHCPartyPatientForeignKey(hcPartyId, secretFKey, startKey, startDocumentId, limit) {
119
+ return __awaiter(this, void 0, void 0, function* () {
120
+ const _url = this.host +
121
+ `/accesslog/byHcPartySecretForeignKey` +
122
+ '?ts=' +
123
+ new Date().getTime() +
124
+ '&hcPartyId=' +
125
+ encodeURIComponent(hcPartyId) +
126
+ `&secretFKey=${encodeURIComponent(secretFKey)}` +
127
+ (!!startKey ? `&startKey=${encodeURIComponent(startKey)}` : '') +
128
+ (!!startDocumentId ? `&startDocumentId=${encodeURIComponent(startDocumentId)}` : '') +
129
+ (!!limit ? `&limit=${limit}` : '');
130
+ let headers = yield this.headers;
131
+ headers = headers.filter((h) => h.header !== 'Content-Type').concat(new XHR_1.XHR.Header('Content-Type', 'application/json'));
132
+ return XHR_1.XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
133
+ .then((doc) => new PaginatedListAccessLog_1.PaginatedListAccessLog(doc.body))
134
+ .catch((err) => this.handleError(err));
135
+ });
136
+ }
108
137
  /**
109
138
  *
110
139
  * @summary List access logs found by Healthcare Party and secret foreign keyelementIds.
@@ -1 +1 @@
1
- {"version":3,"file":"IccAccesslogApi.js","sourceRoot":"","sources":["../../../icc-api/api/IccAccesslogApi.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;GAUG;AACH,+BAA2B;AAC3B,kDAA8C;AAC9C,0DAAsD;AACtD,4EAAwE;AACxE,wFAA8G;AAC9G,qDAAiD;AAEjD,mFAA+E;AAI/E,MAAa,eAAe;IAM1B,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,SAAS,CAAA;IAC5B,CAAC;IAED,UAAU,CAAC,CAAoB;QAC7B,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAA;IACnB,CAAC;IAED,WAAW,CAAC,CAAe;QACzB,MAAM,CAAC,CAAA;IACT,CAAC;IAED;;;;OAIG;IACG,eAAe,CAAC,IAAgB;;YACpC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,GAAG,YAAY,GAAG,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAA;YACrE,IAAI,OAAO,GAAG,MAAM,IA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C,GAAG,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAA;YAC9F,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,6CAAqB,CAAY,CAAC,EAAE,qBAAS,CAAC,CAAC,CAAC;iBACvG,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAA;QAC1C,CAAC;KAAA;CACF;AAvRD,0CAuRC","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 { AccessLog } from '../model/AccessLog'\nimport { DocIdentifier } from '../model/DocIdentifier'\nimport { PaginatedListAccessLog } from '../model/PaginatedListAccessLog'\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 { ListOfIds } from '../model/ListOfIds'\nimport { BulkShareOrUpdateMetadataParams } from '../model/requests/BulkShareOrUpdateMetadataParams'\n\nexport class IccAccesslogApi {\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 Create an access log\n * @param body\n */\n async createAccessLog(body?: AccessLog): Promise<AccessLog> {\n const _url = this.host + `/accesslog` + '?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 AccessLog(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Deletes a batch of access logs.\n *\n * @param accessLogIds a ListOfIds containing the ids of the access logs to delete.\n * @return a Promise that will resolve in an array of DocIdentifiers of the successfully deleted access logs.\n */\n async deleteAccessLogs(accessLogIds: ListOfIds): Promise<Array<DocIdentifier>> {\n const headers = await this.headers\n return XHR.sendCommand(\n 'POST',\n this.host + `/accesslog/delete/batch` + '?ts=' + new Date().getTime(),\n headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json')),\n accessLogIds,\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 access log by id.\n *\n * @param accessLogId the id of the access log.\n */\n async deleteAccessLog(accessLogId: string): Promise<DocIdentifier> {\n return XHR.sendCommand(\n 'DELETE',\n this.host + `/accesslog/${encodeURIComponent(accessLogId)}` + '?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 *\n * @summary List access logs found by Healthcare Party and secret foreign keyelementIds.\n * @param body\n * @param hcPartyId\n */\n async findAccessLogsByHCPartyPatientForeignKeysUsingPost(hcPartyId: string, body?: Array<string>): Promise<Array<AccessLog>> {\n const _url =\n this.host +\n `/accesslog/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 AccessLog(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary List access logs found by Healthcare Party and secret foreign keyelementIds.\n * @param hcPartyId\n * @param secretFKeys\n */\n async findAccessLogsByHCPartyPatientForeignKeys(hcPartyId: string, secretFKeys: string): Promise<Array<AccessLog>> {\n let _body = null\n\n const _url =\n this.host +\n `/accesslog/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 AccessLog(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Get paginated list of Access Logs\n * @param userId A User ID\n * @param accessType The type of access (COMPUTER or USER)\n * @param startDate The start search epoch\n * @param startKey The start key for pagination\n * @param startDocumentId A patient document ID\n * @param limit Number of rows\n * @param descending Descending order\n */\n async findByUserAfterDate(\n userId: string,\n accessType?: string,\n startDate?: number,\n startKey?: string,\n startDocumentId?: string,\n limit?: number,\n descending?: boolean\n ): Promise<PaginatedListAccessLog> {\n let _body = null\n\n const _url =\n this.host +\n `/accesslog/byUser` +\n '?ts=' +\n new Date().getTime() +\n (userId ? '&userId=' + encodeURIComponent(String(userId)) : '') +\n (accessType ? '&accessType=' + encodeURIComponent(String(accessType)) : '') +\n (startDate ? '&startDate=' + encodeURIComponent(String(startDate)) : '') +\n (startKey ? '&startKey=' + encodeURIComponent(String(startKey)) : '') +\n (startDocumentId ? '&startDocumentId=' + encodeURIComponent(String(startDocumentId)) : '') +\n (limit ? '&limit=' + encodeURIComponent(String(limit)) : '') +\n (descending ? '&descending=' + encodeURIComponent(String(descending)) : '')\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new PaginatedListAccessLog(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Get an access log\n * @param accessLogId\n */\n async getAccessLog(accessLogId: string): Promise<AccessLog> {\n let _body = null\n\n const _url = this.host + `/accesslog/${encodeURIComponent(String(accessLogId))}` + '?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 AccessLog(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Get paginated list of Access Logs\n * @param fromEpoch\n * @param toEpoch\n * @param startKey\n * @param startDocumentId\n * @param limit\n * @param descending\n */\n async listAccessLogs(\n fromEpoch?: number,\n toEpoch?: number,\n startKey?: number,\n startDocumentId?: string,\n limit?: number,\n descending?: boolean\n ): Promise<PaginatedListAccessLog> {\n let _body = null\n\n const _url =\n this.host +\n `/accesslog` +\n '?ts=' +\n new Date().getTime() +\n (fromEpoch ? '&fromEpoch=' + encodeURIComponent(String(fromEpoch)) : '') +\n (toEpoch ? '&toEpoch=' + encodeURIComponent(String(toEpoch)) : '') +\n (startKey ? '&startKey=' + encodeURIComponent(String(startKey)) : '') +\n (startDocumentId ? '&startDocumentId=' + encodeURIComponent(String(startDocumentId)) : '') +\n (limit ? '&limit=' + encodeURIComponent(String(limit)) : '') +\n (descending ? '&descending=' + encodeURIComponent(String(descending)) : '')\n let headers = this.headers\n return XHR.sendCommand('GET', _url, await headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new PaginatedListAccessLog(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Get paginated list of Access Logs for a group\n * @param groupId\n * @param fromEpoch\n * @param toEpoch\n * @param startKey\n * @param startDocumentId\n * @param limit\n */\n async listAccessLogsInGroup(\n groupId: string,\n fromEpoch?: number,\n toEpoch?: number,\n startKey?: number,\n startDocumentId?: string,\n limit?: number\n ): Promise<PaginatedListAccessLog> {\n let _body = null\n\n const _url =\n this.host +\n `/accesslog/inGroup/${encodeURIComponent(String(groupId))}` +\n '?ts=' +\n new Date().getTime() +\n (fromEpoch ? '&fromEpoch=' + encodeURIComponent(String(fromEpoch)) : '') +\n (toEpoch ? '&toEpoch=' + encodeURIComponent(String(toEpoch)) : '') +\n (startKey ? '&startKey=' + encodeURIComponent(String(startKey)) : '') +\n (startDocumentId ? '&startDocumentId=' + encodeURIComponent(String(startDocumentId)) : '') +\n (limit ? '&limit=' + encodeURIComponent(String(limit)) : '')\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new PaginatedListAccessLog(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Modifies an access log\n * @param body\n */\n async modifyAccessLog(body?: AccessLog): Promise<AccessLog> {\n const _url = this.host + `/accesslog` + '?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 AccessLog(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 bulkShareAccessLogs(request: BulkShareOrUpdateMetadataParams): Promise<EntityBulkShareResult<AccessLog>[]> {\n const _url = this.host + '/accesslog/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<AccessLog>(x, AccessLog)))\n .catch((err) => this.handleError(err))\n }\n}\n"]}
1
+ {"version":3,"file":"IccAccesslogApi.js","sourceRoot":"","sources":["../../../icc-api/api/IccAccesslogApi.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;GAUG;AACH,+BAA2B;AAC3B,kDAA8C;AAC9C,0DAAsD;AACtD,4EAAwE;AACxE,wFAA8G;AAC9G,qDAAiD;AAEjD,mFAA+E;AAI/E,MAAa,eAAe;IAM1B,IAAI,OAAO;QACT,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;IACvC,CAAC;IAED,YACE,IAAY,EAC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E,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,6CAAqB,CAAY,CAAC,EAAE,qBAAS,CAAC,CAAC,CAAC;iBACvG,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAA;QAC1C,CAAC;KAAA;CACF;AA1TD,0CA0TC","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 { AccessLog } from '../model/AccessLog'\nimport { DocIdentifier } from '../model/DocIdentifier'\nimport { PaginatedListAccessLog } from '../model/PaginatedListAccessLog'\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 { ListOfIds } from '../model/ListOfIds'\nimport { BulkShareOrUpdateMetadataParams } from '../model/requests/BulkShareOrUpdateMetadataParams'\n\nexport class IccAccesslogApi {\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 Create an access log\n * @param body\n */\n async createAccessLog(body?: AccessLog): Promise<AccessLog> {\n const _url = this.host + `/accesslog` + '?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 AccessLog(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Deletes a batch of access logs.\n *\n * @param accessLogIds a ListOfIds containing the ids of the access logs to delete.\n * @return a Promise that will resolve in an array of DocIdentifiers of the successfully deleted access logs.\n */\n async deleteAccessLogs(accessLogIds: ListOfIds): Promise<Array<DocIdentifier>> {\n const headers = await this.headers\n return XHR.sendCommand(\n 'POST',\n this.host + `/accesslog/delete/batch` + '?ts=' + new Date().getTime(),\n headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json')),\n accessLogIds,\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 access log by id.\n *\n * @param accessLogId the id of the access log.\n */\n async deleteAccessLog(accessLogId: string): Promise<DocIdentifier> {\n return XHR.sendCommand(\n 'DELETE',\n this.host + `/accesslog/${encodeURIComponent(accessLogId)}` + '?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 *\n * @summary List access logs found by Healthcare Party and secret foreign keyelementIds.\n * @param body\n * @param hcPartyId\n */\n async findAccessLogsByHCPartyPatientForeignKeysUsingPost(hcPartyId: string, body?: Array<string>): Promise<Array<AccessLog>> {\n const _url =\n this.host +\n `/accesslog/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 AccessLog(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary List access logs found by Healthcare Party id and secret foreign key element id with pagination.\n *\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 PaginatedListAccessLog.\n */\n async findAccessLogsByHCPartyPatientForeignKey(\n hcPartyId: string,\n secretFKey: string,\n startKey?: string,\n startDocumentId?: string,\n limit?: number\n ): Promise<PaginatedListAccessLog> {\n const _url =\n this.host +\n `/accesslog/byHcPartySecretForeignKey` +\n '?ts=' +\n new Date().getTime() +\n '&hcPartyId=' +\n encodeURIComponent(hcPartyId) +\n `&secretFKey=${encodeURIComponent(secretFKey)}` +\n (!!startKey ? `&startKey=${encodeURIComponent(startKey)}` : '') +\n (!!startDocumentId ? `&startDocumentId=${encodeURIComponent(startDocumentId)}` : '') +\n (!!limit ? `&limit=${limit}` : '')\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('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new PaginatedListAccessLog(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary List access logs found by Healthcare Party and secret foreign keyelementIds.\n * @param hcPartyId\n * @param secretFKeys\n */\n async findAccessLogsByHCPartyPatientForeignKeys(hcPartyId: string, secretFKeys: string): Promise<Array<AccessLog>> {\n let _body = null\n\n const _url =\n this.host +\n `/accesslog/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 AccessLog(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Get paginated list of Access Logs\n * @param userId A User ID\n * @param accessType The type of access (COMPUTER or USER)\n * @param startDate The start search epoch\n * @param startKey The start key for pagination\n * @param startDocumentId A patient document ID\n * @param limit Number of rows\n * @param descending Descending order\n */\n async findByUserAfterDate(\n userId: string,\n accessType?: string,\n startDate?: number,\n startKey?: string,\n startDocumentId?: string,\n limit?: number,\n descending?: boolean\n ): Promise<PaginatedListAccessLog> {\n let _body = null\n\n const _url =\n this.host +\n `/accesslog/byUser` +\n '?ts=' +\n new Date().getTime() +\n (userId ? '&userId=' + encodeURIComponent(String(userId)) : '') +\n (accessType ? '&accessType=' + encodeURIComponent(String(accessType)) : '') +\n (startDate ? '&startDate=' + encodeURIComponent(String(startDate)) : '') +\n (startKey ? '&startKey=' + encodeURIComponent(String(startKey)) : '') +\n (startDocumentId ? '&startDocumentId=' + encodeURIComponent(String(startDocumentId)) : '') +\n (limit ? '&limit=' + encodeURIComponent(String(limit)) : '') +\n (descending ? '&descending=' + encodeURIComponent(String(descending)) : '')\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new PaginatedListAccessLog(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Get an access log\n * @param accessLogId\n */\n async getAccessLog(accessLogId: string): Promise<AccessLog> {\n let _body = null\n\n const _url = this.host + `/accesslog/${encodeURIComponent(String(accessLogId))}` + '?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 AccessLog(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Get paginated list of Access Logs\n * @param fromEpoch\n * @param toEpoch\n * @param startKey\n * @param startDocumentId\n * @param limit\n * @param descending\n */\n async listAccessLogs(\n fromEpoch?: number,\n toEpoch?: number,\n startKey?: number,\n startDocumentId?: string,\n limit?: number,\n descending?: boolean\n ): Promise<PaginatedListAccessLog> {\n let _body = null\n\n const _url =\n this.host +\n `/accesslog` +\n '?ts=' +\n new Date().getTime() +\n (fromEpoch ? '&fromEpoch=' + encodeURIComponent(String(fromEpoch)) : '') +\n (toEpoch ? '&toEpoch=' + encodeURIComponent(String(toEpoch)) : '') +\n (startKey ? '&startKey=' + encodeURIComponent(String(startKey)) : '') +\n (startDocumentId ? '&startDocumentId=' + encodeURIComponent(String(startDocumentId)) : '') +\n (limit ? '&limit=' + encodeURIComponent(String(limit)) : '') +\n (descending ? '&descending=' + encodeURIComponent(String(descending)) : '')\n let headers = this.headers\n return XHR.sendCommand('GET', _url, await headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new PaginatedListAccessLog(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Get paginated list of Access Logs for a group\n * @param groupId\n * @param fromEpoch\n * @param toEpoch\n * @param startKey\n * @param startDocumentId\n * @param limit\n */\n async listAccessLogsInGroup(\n groupId: string,\n fromEpoch?: number,\n toEpoch?: number,\n startKey?: number,\n startDocumentId?: string,\n limit?: number\n ): Promise<PaginatedListAccessLog> {\n let _body = null\n\n const _url =\n this.host +\n `/accesslog/inGroup/${encodeURIComponent(String(groupId))}` +\n '?ts=' +\n new Date().getTime() +\n (fromEpoch ? '&fromEpoch=' + encodeURIComponent(String(fromEpoch)) : '') +\n (toEpoch ? '&toEpoch=' + encodeURIComponent(String(toEpoch)) : '') +\n (startKey ? '&startKey=' + encodeURIComponent(String(startKey)) : '') +\n (startDocumentId ? '&startDocumentId=' + encodeURIComponent(String(startDocumentId)) : '') +\n (limit ? '&limit=' + encodeURIComponent(String(limit)) : '')\n let headers = await this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new PaginatedListAccessLog(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Modifies an access log\n * @param body\n */\n async modifyAccessLog(body?: AccessLog): Promise<AccessLog> {\n const _url = this.host + `/accesslog` + '?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 AccessLog(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 bulkShareAccessLogs(request: BulkShareOrUpdateMetadataParams): Promise<EntityBulkShareResult<AccessLog>[]> {\n const _url = this.host + '/accesslog/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<AccessLog>(x, AccessLog)))\n .catch((err) => this.handleError(err))\n }\n}\n"]}
@@ -14,6 +14,7 @@ import { Agenda } from '../model/Agenda';
14
14
  import { DocIdentifier } from '../model/DocIdentifier';
15
15
  import { AuthenticationProvider } from '../../icc-x-api/auth/AuthenticationProvider';
16
16
  import { ListOfIds } from '../model/ListOfIds';
17
+ import { PaginatedListAgenda } from '../model/PaginatedListAgenda';
17
18
  export declare class IccAgendaApi {
18
19
  host: string;
19
20
  headers: Array<XHR.Header>;
@@ -49,10 +50,19 @@ export declare class IccAgendaApi {
49
50
  */
50
51
  getAgenda(agendaId: string): Promise<Agenda>;
51
52
  /**
53
+ * @deprecated use {@link getAgendasWithPagination} instead.
52
54
  *
53
55
  * @summary Gets all agendas
54
56
  */
55
57
  getAgendas(): Promise<Array<Agenda>>;
58
+ /**
59
+ * @summary gets all agendas with pagination.
60
+ *
61
+ * @param startDocumentId the startDocumentId provided by the previous page or null if it's the first page.
62
+ * @param limit the size of the page
63
+ * @return a promise that will resolve in a PaginatedListAgenda.
64
+ */
65
+ getAgendasWithPagination(startDocumentId?: string, limit?: number): Promise<PaginatedListAgenda>;
56
66
  /**
57
67
  *
58
68
  * @summary Gets all agendas for user
@@ -26,6 +26,7 @@ const Agenda_1 = require("../model/Agenda");
26
26
  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
+ const PaginatedListAgenda_1 = require("../model/PaginatedListAgenda");
29
30
  class IccAgendaApi {
30
31
  constructor(host, headers, authenticationProvider, fetchImpl) {
31
32
  this.host = (0, IccRestApiPath_1.iccRestApiPath)(host);
@@ -95,16 +96,39 @@ class IccAgendaApi {
95
96
  .catch((err) => this.handleError(err));
96
97
  }
97
98
  /**
99
+ * @deprecated use {@link getAgendasWithPagination} instead.
98
100
  *
99
101
  * @summary Gets all agendas
100
102
  */
101
103
  getAgendas() {
102
- let _body = null;
103
- const _url = this.host + `/agenda` + '?ts=' + new Date().getTime();
104
- let headers = this.headers;
105
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
106
- .then((doc) => doc.body.map((it) => new Agenda_1.Agenda(it)))
107
- .catch((err) => this.handleError(err));
104
+ return __awaiter(this, void 0, void 0, function* () {
105
+ const _url = this.host + `/agenda` + '?ts=' + new Date().getTime() + '&limit=1000000';
106
+ let headers = this.headers;
107
+ return XHR_1.XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
108
+ .then((doc) => { var _a; return (_a = new PaginatedListAgenda_1.PaginatedListAgenda(doc.body).rows) !== null && _a !== void 0 ? _a : []; })
109
+ .catch((err) => this.handleError(err));
110
+ });
111
+ }
112
+ /**
113
+ * @summary gets all agendas with pagination.
114
+ *
115
+ * @param startDocumentId the startDocumentId provided by the previous page or null if it's the first page.
116
+ * @param limit the size of the page
117
+ * @return a promise that will resolve in a PaginatedListAgenda.
118
+ */
119
+ getAgendasWithPagination(startDocumentId, limit) {
120
+ return __awaiter(this, void 0, void 0, function* () {
121
+ const _url = this.host +
122
+ `/agenda` +
123
+ '?ts=' +
124
+ new Date().getTime() +
125
+ (!!startDocumentId ? `&startDocumentId=${encodeURIComponent(startDocumentId)}` : '') +
126
+ (!!limit ? `&limit=${limit}` : '');
127
+ let headers = this.headers;
128
+ return XHR_1.XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
129
+ .then((doc) => new PaginatedListAgenda_1.PaginatedListAgenda(doc.body))
130
+ .catch((err) => this.handleError(err));
131
+ });
108
132
  }
109
133
  /**
110
134
  *
@@ -1 +1 @@
1
- {"version":3,"file":"IccAgendaApi.js","sourceRoot":"","sources":["../../../icc-api/api/IccAgendaApi.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;GAUG;AACH,+BA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AAC,WAAW,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,sBAAsB,CAAC,cAAc,EAAE,CAAC;aACzH,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,eAAM,CAAC,GAAG,CAAC,IAAY,CAAC,CAAC;aAC3C,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAA;IAC1C,CAAC;CACF;AA7JD,oCA6JC","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 { Agenda } from '../model/Agenda'\nimport { DocIdentifier } from '../model/DocIdentifier'\nimport { AuthenticationProvider, NoAuthenticationProvider } from '../../icc-x-api/auth/AuthenticationProvider'\nimport { iccRestApiPath } from './IccRestApiPath'\nimport { ListOfIds } from '../model/ListOfIds'\n\nexport class IccAgendaApi {\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 agenda\n * @param body\n */\n async createAgenda(body?: Agenda): Promise<Agenda> {\n const _url = this.host + `/agenda` + '?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 Agenda(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Delete a batch of agendas by id.\n *\n * @param agendaIds a ListOfIds containing the ids of the agendas to delete.\n * @return a Promise that will resolve in an array of DocIdentifiers of the successfully deleted agendas.\n */\n async deleteAgendas(agendaIds: ListOfIds): Promise<Array<DocIdentifier>> {\n const headers = 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 + `/agenda/delete/batch` + '?ts=' + new Date().getTime(),\n headers,\n agendaIds,\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 agenda by id.\n *\n * @param agendaId the id of the agenda to delete.\n * @return a Promise that will resolve in the DocIdentifier of the deleted agenda.\n */\n async deleteAgenda(agendaId: string): Promise<DocIdentifier> {\n return XHR.sendCommand(\n 'DELETE',\n this.host + `/agenda/${encodeURIComponent(agendaId)}` + '?ts=' + new Date().getTime(),\n 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 *\n * @summary Gets an agenda\n * @param agendaId\n */\n getAgenda(agendaId: string): Promise<Agenda> {\n let _body = null\n\n const _url = this.host + `/agenda/${encodeURIComponent(String(agendaId))}` + '?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 Agenda(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Gets all agendas\n */\n getAgendas(): Promise<Array<Agenda>> {\n let _body = null\n\n const _url = this.host + `/agenda` + '?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) => (doc.body as Array<JSON>).map((it) => new Agenda(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Gets all agendas for user\n * @param userId\n */\n getAgendasForUser(userId: string): Promise<Agenda> {\n let _body = null\n\n const _url = this.host + `/agenda/byUser` + '?ts=' + new Date().getTime() + (userId ? '&userId=' + encodeURIComponent(String(userId)) : '')\n let headers = this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Agenda(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Gets readable agendas for user\n * @param userId\n */\n getReadableAgendasForUser(userId: string): Promise<Array<Agenda>> {\n let _body = null\n\n const _url =\n this.host + `/agenda/readableForUser` + '?ts=' + new Date().getTime() + (userId ? '&userId=' + encodeURIComponent(String(userId)) : '')\n let headers = 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 Agenda(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Modifies an agenda\n * @param body\n */\n modifyAgenda(body?: Agenda): Promise<Agenda> {\n let _body = null\n _body = body\n\n const _url = this.host + `/agenda` + '?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 Agenda(doc.body as JSON))\n .catch((err) => this.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AAG,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAA;IAC1C,CAAC;CACF;AAjLD,oCAiLC","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 { Agenda } from '../model/Agenda'\nimport { DocIdentifier } from '../model/DocIdentifier'\nimport { AuthenticationProvider, NoAuthenticationProvider } from '../../icc-x-api/auth/AuthenticationProvider'\nimport { iccRestApiPath } from './IccRestApiPath'\nimport { ListOfIds } from '../model/ListOfIds'\nimport { PaginatedListAgenda } from '../model/PaginatedListAgenda'\n\nexport class IccAgendaApi {\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 agenda\n * @param body\n */\n async createAgenda(body?: Agenda): Promise<Agenda> {\n const _url = this.host + `/agenda` + '?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 Agenda(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Delete a batch of agendas by id.\n *\n * @param agendaIds a ListOfIds containing the ids of the agendas to delete.\n * @return a Promise that will resolve in an array of DocIdentifiers of the successfully deleted agendas.\n */\n async deleteAgendas(agendaIds: ListOfIds): Promise<Array<DocIdentifier>> {\n const headers = 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 + `/agenda/delete/batch` + '?ts=' + new Date().getTime(),\n headers,\n agendaIds,\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 agenda by id.\n *\n * @param agendaId the id of the agenda to delete.\n * @return a Promise that will resolve in the DocIdentifier of the deleted agenda.\n */\n async deleteAgenda(agendaId: string): Promise<DocIdentifier> {\n return XHR.sendCommand(\n 'DELETE',\n this.host + `/agenda/${encodeURIComponent(agendaId)}` + '?ts=' + new Date().getTime(),\n 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 *\n * @summary Gets an agenda\n * @param agendaId\n */\n getAgenda(agendaId: string): Promise<Agenda> {\n let _body = null\n\n const _url = this.host + `/agenda/${encodeURIComponent(String(agendaId))}` + '?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 Agenda(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @deprecated use {@link getAgendasWithPagination} instead.\n *\n * @summary Gets all agendas\n */\n async getAgendas(): Promise<Array<Agenda>> {\n const _url = this.host + `/agenda` + '?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 PaginatedListAgenda(doc.body as JSON).rows ?? [])\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary gets all agendas 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 PaginatedListAgenda.\n */\n async getAgendasWithPagination(startDocumentId?: string, limit?: number): Promise<PaginatedListAgenda> {\n const _url =\n this.host +\n `/agenda` +\n '?ts=' +\n 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 PaginatedListAgenda(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Gets all agendas for user\n * @param userId\n */\n getAgendasForUser(userId: string): Promise<Agenda> {\n let _body = null\n\n const _url = this.host + `/agenda/byUser` + '?ts=' + new Date().getTime() + (userId ? '&userId=' + encodeURIComponent(String(userId)) : '')\n let headers = this.headers\n return XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())\n .then((doc) => new Agenda(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Gets readable agendas for user\n * @param userId\n */\n getReadableAgendasForUser(userId: string): Promise<Array<Agenda>> {\n let _body = null\n\n const _url =\n this.host + `/agenda/readableForUser` + '?ts=' + new Date().getTime() + (userId ? '&userId=' + encodeURIComponent(String(userId)) : '')\n let headers = 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 Agenda(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Modifies an agenda\n * @param body\n */\n modifyAgenda(body?: Agenda): Promise<Agenda> {\n let _body = null\n _body = body\n\n const _url = this.host + `/agenda` + '?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 Agenda(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n}\n"]}
@@ -14,6 +14,7 @@ import { Article } from '../model/Article';
14
14
  import { DocIdentifier } from '../model/DocIdentifier';
15
15
  import { AuthenticationProvider } from '../../icc-x-api/auth/AuthenticationProvider';
16
16
  import { ListOfIds } from '../model/ListOfIds';
17
+ import { PaginatedListArticle } from '../model/PaginatedListArticle';
17
18
  export declare class IccArticleApi {
18
19
  host: string;
19
20
  headers: Array<XHR.Header>;
@@ -49,10 +50,19 @@ export declare class IccArticleApi {
49
50
  */
50
51
  getArticle(articleId: string): Promise<Article>;
51
52
  /**
53
+ * @deprecated use {@link getArticlesWithPagination} instead.
52
54
  *
53
55
  * @summary Gets all articles
54
56
  */
55
57
  getArticles(): Promise<Array<Article>>;
58
+ /**
59
+ * @summary gets all articles with pagination.
60
+ *
61
+ * @param startDocumentId the startDocumentId provided by the previous page or null if it's the first page.
62
+ * @param limit the size of the page
63
+ * @return a promise that will resolve in a PaginatedListArticle.
64
+ */
65
+ getArticlesWithPagination(startDocumentId?: string, limit?: number): Promise<PaginatedListArticle>;
56
66
  /**
57
67
  *
58
68
  * @summary Modifies an article
@@ -26,6 +26,7 @@ const Article_1 = require("../model/Article");
26
26
  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
+ const PaginatedListArticle_1 = require("../model/PaginatedListArticle");
29
30
  class IccArticleApi {
30
31
  constructor(host, headers, authenticationProvider, fetchImpl) {
31
32
  this.host = (0, IccRestApiPath_1.iccRestApiPath)(host);
@@ -94,16 +95,37 @@ class IccArticleApi {
94
95
  });
95
96
  }
96
97
  /**
98
+ * @deprecated use {@link getArticlesWithPagination} instead.
97
99
  *
98
100
  * @summary Gets all articles
99
101
  */
100
102
  getArticles() {
101
103
  return __awaiter(this, void 0, void 0, function* () {
102
- let _body = null;
103
- const _url = this.host + `/article` + '?ts=' + new Date().getTime();
104
+ const _url = this.host + `/article` + '?ts=' + new Date().getTime() + '&limit=1000000';
104
105
  let headers = this.headers;
105
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
106
- .then((doc) => doc.body.map((it) => new Article_1.Article(it)))
106
+ return XHR_1.XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
107
+ .then((doc) => { var _a; return (_a = new PaginatedListArticle_1.PaginatedListArticle(doc.body).rows) !== null && _a !== void 0 ? _a : []; })
108
+ .catch((err) => this.handleError(err));
109
+ });
110
+ }
111
+ /**
112
+ * @summary gets all articles with pagination.
113
+ *
114
+ * @param startDocumentId the startDocumentId provided by the previous page or null if it's the first page.
115
+ * @param limit the size of the page
116
+ * @return a promise that will resolve in a PaginatedListArticle.
117
+ */
118
+ getArticlesWithPagination(startDocumentId, limit) {
119
+ return __awaiter(this, void 0, void 0, function* () {
120
+ const _url = this.host +
121
+ `/article` +
122
+ '?ts=' +
123
+ new Date().getTime() +
124
+ (!!startDocumentId ? `&startDocumentId=${encodeURIComponent(startDocumentId)}` : '') +
125
+ (!!limit ? `&limit=${limit}` : '');
126
+ let headers = this.headers;
127
+ return XHR_1.XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
128
+ .then((doc) => new PaginatedListArticle_1.PaginatedListArticle(doc.body))
107
129
  .catch((err) => this.handleError(err));
108
130
  });
109
131
  }
@@ -1 +1 @@
1
- {"version":3,"file":"IccArticleApi.js","sourceRoot":"","sources":["../../../icc-api/api/IccArticleAp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,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAA;IAC1C,CAAC;CACF;AA7HD,sCA6HC","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 { Article } from '../model/Article'\nimport { DocIdentifier } from '../model/DocIdentifier'\nimport { AuthenticationProvider, NoAuthenticationProvider } from '../../icc-x-api/auth/AuthenticationProvider'\nimport { iccRestApiPath } from './IccRestApiPath'\nimport { ListOfIds } from '../model/ListOfIds'\n\nexport class IccArticleApi {\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 article\n * @param body\n */\n createArticle(body?: Article): Promise<Article> {\n const _url = this.host + `/article` + '?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 Article(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Deletes a batch of articles by id.\n *\n * @param articleIds a ListOfIds containing the ids of the articles to delete.\n * @return a Promise that will resolve in an array of DocIdentifiers of the successfully delete articles.\n */\n async deleteArticles(articleIds: ListOfIds): Promise<Array<DocIdentifier>> {\n return XHR.sendCommand(\n 'POST',\n this.host + `/article/delete/batch` + '?ts=' + new Date().getTime(),\n this.headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json')),\n articleIds,\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 article by id.\n *\n * @param articleId the id of the article to delete.\n * @return a Promise that will resolve in the DocIdentifier of the deleted article.\n */\n async deleteArticle(articleId: string): Promise<DocIdentifier> {\n return XHR.sendCommand(\n 'DELETE',\n this.host + `/article/${encodeURIComponent(articleId)}` + '?ts=' + new Date().getTime(),\n 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 *\n * @summary Gets an article\n * @param articleId\n */\n async getArticle(articleId: string): Promise<Article> {\n let _body = null\n\n const _url = this.host + `/article/${encodeURIComponent(String(articleId))}` + '?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 Article(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Gets all articles\n */\n async getArticles(): Promise<Array<Article>> {\n let _body = null\n\n const _url = this.host + `/article` + '?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) => (doc.body as Array<JSON>).map((it) => new Article(it)))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Modifies an article\n * @param body\n */\n modifyArticle(body?: Article): Promise<Article> {\n let _body = null\n _body = body\n\n const _url = this.host + `/article` + '?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 Article(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n}\n"]}
1
+ {"version":3,"file":"IccArticleApi.js","sourceRoot":"","sources":["../../../icc-api/api/IccArticleApi.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;GAUG;AACH,+BAA2B;AAC3B,8CAA0C;AAC1C,0DAAsD;AACtD,wFAA8G;AAC9G,qDAAiD;AAEjD,wEAAoE;AAEpE,MAAa,aAAa;IAMxB,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;IACH,aAAa,CAAC,IAAc;QAC1B,MAAM,IAAI,GAAG,IAAI,CAAC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C1C,CAAC;CACF;AAjJD,sCAiJC","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 { Article } from '../model/Article'\nimport { DocIdentifier } from '../model/DocIdentifier'\nimport { AuthenticationProvider, NoAuthenticationProvider } from '../../icc-x-api/auth/AuthenticationProvider'\nimport { iccRestApiPath } from './IccRestApiPath'\nimport { ListOfIds } from '../model/ListOfIds'\nimport { PaginatedListArticle } from '../model/PaginatedListArticle'\n\nexport class IccArticleApi {\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 article\n * @param body\n */\n createArticle(body?: Article): Promise<Article> {\n const _url = this.host + `/article` + '?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 Article(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary Deletes a batch of articles by id.\n *\n * @param articleIds a ListOfIds containing the ids of the articles to delete.\n * @return a Promise that will resolve in an array of DocIdentifiers of the successfully delete articles.\n */\n async deleteArticles(articleIds: ListOfIds): Promise<Array<DocIdentifier>> {\n return XHR.sendCommand(\n 'POST',\n this.host + `/article/delete/batch` + '?ts=' + new Date().getTime(),\n this.headers.filter((h) => h.header !== 'Content-Type').concat(new XHR.Header('Content-Type', 'application/json')),\n articleIds,\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 article by id.\n *\n * @param articleId the id of the article to delete.\n * @return a Promise that will resolve in the DocIdentifier of the deleted article.\n */\n async deleteArticle(articleId: string): Promise<DocIdentifier> {\n return XHR.sendCommand(\n 'DELETE',\n this.host + `/article/${encodeURIComponent(articleId)}` + '?ts=' + new Date().getTime(),\n 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 *\n * @summary Gets an article\n * @param articleId\n */\n async getArticle(articleId: string): Promise<Article> {\n let _body = null\n\n const _url = this.host + `/article/${encodeURIComponent(String(articleId))}` + '?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 Article(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @deprecated use {@link getArticlesWithPagination} instead.\n *\n * @summary Gets all articles\n */\n async getArticles(): Promise<Array<Article>> {\n const _url = this.host + `/article` + '?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 PaginatedListArticle(doc.body as JSON).rows ?? [])\n .catch((err) => this.handleError(err))\n }\n\n /**\n * @summary gets all articles 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 PaginatedListArticle.\n */\n async getArticlesWithPagination(startDocumentId?: string, limit?: number): Promise<PaginatedListArticle> {\n const _url =\n this.host +\n `/article` +\n '?ts=' +\n 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 PaginatedListArticle(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n\n /**\n *\n * @summary Modifies an article\n * @param body\n */\n modifyArticle(body?: Article): Promise<Article> {\n let _body = null\n _body = body\n\n const _url = this.host + `/article` + '?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 Article(doc.body as JSON))\n .catch((err) => this.handleError(err))\n }\n}\n"]}
@@ -18,6 +18,7 @@ import { AuthenticationProvider } from '../../icc-x-api/auth/AuthenticationProvi
18
18
  import { EntityBulkShareResult } from '../model/requests/EntityBulkShareResult';
19
19
  import { MinimalEntityBulkShareResult } from '../model/requests/MinimalEntityBulkShareResult';
20
20
  import { BulkShareOrUpdateMetadataParams } from '../model/requests/BulkShareOrUpdateMetadataParams';
21
+ import { PaginatedListCalendarItem } from '../model/PaginatedListCalendarItem';
21
22
  export declare class IccCalendarItemApi {
22
23
  host: string;
23
24
  _headers: Array<XHR.Header>;
@@ -64,6 +65,7 @@ export declare class IccCalendarItemApi {
64
65
  */
65
66
  findCalendarItemsByHCPartyPatientForeignKeys(hcPartyId: string, secretFKeys: string): Promise<Array<CalendarItem>>;
66
67
  /**
68
+ * @deprecated use {@link findCalendarItemsByRecurrenceIdWithPagination} instead.
67
69
  *
68
70
  * @summary Find CalendarItems by recurrenceId
69
71
  * @param recurrenceId
@@ -71,15 +73,34 @@ export declare class IccCalendarItemApi {
71
73
  findCalendarItemsByRecurrenceId(recurrenceId: string): Promise<Array<CalendarItem>>;
72
74
  /**
73
75
  *
74
- * @summary Gets an calendarItem
76
+ * @summary Find CalendarItems by recurrenceId
77
+ * @param recurrenceId the recurrence id.
78
+ * @param startKey the startKey provided by the previous page or undefined for the first page.
79
+ * @param startDocumentId the startDocumentId provided by the previous page or undefined for the first page.
80
+ * @param limit the number of elements that the page should contain.
81
+ * @return a promise that will resolve in a PaginatedListAccessLog.
82
+ */
83
+ findCalendarItemsByRecurrenceIdWithPagination(recurrenceId: string, startKey?: string, startDocumentId?: string, limit?: number): Promise<PaginatedListCalendarItem>;
84
+ /**
85
+ *
86
+ * @summary Gets a calendarItem
75
87
  * @param calendarItemId
76
88
  */
77
89
  getCalendarItem(calendarItemId: string): Promise<CalendarItem>;
78
90
  /**
91
+ * @deprecated use {@link getCalendarItemsWithPagination} instead
79
92
  *
80
93
  * @summary Gets all calendarItems
81
94
  */
82
95
  getCalendarItems(): Promise<Array<CalendarItem>>;
96
+ /**
97
+ * @summary gets all Calendar Items with pagination.
98
+ *
99
+ * @param startDocumentId the startDocumentId provided by the previous page or null if it's the first page.
100
+ * @param limit the size of the page
101
+ * @return a promise that will resolve in a PaginatedListCalendarItem.
102
+ */
103
+ getCalendarItemsWithPagination(startDocumentId?: string, limit?: number): Promise<PaginatedListCalendarItem>;
83
104
  /**
84
105
  *
85
106
  * @summary Get CalendarItems by Period and HcPartyId
@@ -28,6 +28,7 @@ const AuthenticationProvider_1 = require("../../icc-x-api/auth/AuthenticationPro
28
28
  const IccRestApiPath_1 = require("./IccRestApiPath");
29
29
  const EntityBulkShareResult_1 = require("../model/requests/EntityBulkShareResult");
30
30
  const MinimalEntityBulkShareResult_1 = require("../model/requests/MinimalEntityBulkShareResult");
31
+ const PaginatedListCalendarItem_1 = require("../model/PaginatedListCalendarItem");
31
32
  class IccCalendarItemApi {
32
33
  get headers() {
33
34
  return Promise.resolve(this._headers);
@@ -132,27 +133,45 @@ class IccCalendarItemApi {
132
133
  });
133
134
  }
134
135
  /**
136
+ * @deprecated use {@link findCalendarItemsByRecurrenceIdWithPagination} instead.
135
137
  *
136
138
  * @summary Find CalendarItems by recurrenceId
137
139
  * @param recurrenceId
138
140
  */
139
141
  findCalendarItemsByRecurrenceId(recurrenceId) {
140
142
  return __awaiter(this, void 0, void 0, function* () {
141
- let _body = null;
143
+ const _url = this.host + `/calendarItem/byRecurrenceId?ts=${new Date().getTime()}&recurrenceId=${encodeURIComponent(recurrenceId)}&limit=1000000`;
144
+ let headers = yield this.headers;
145
+ return XHR_1.XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
146
+ .then((doc) => { var _a; return (_a = new PaginatedListCalendarItem_1.PaginatedListCalendarItem(doc.body).rows) !== null && _a !== void 0 ? _a : []; })
147
+ .catch((err) => this.handleError(err));
148
+ });
149
+ }
150
+ /**
151
+ *
152
+ * @summary Find CalendarItems by recurrenceId
153
+ * @param recurrenceId the recurrence id.
154
+ * @param startKey the startKey provided by the previous page or undefined for the first page.
155
+ * @param startDocumentId the startDocumentId provided by the previous page or undefined for the first page.
156
+ * @param limit the number of elements that the page should contain.
157
+ * @return a promise that will resolve in a PaginatedListAccessLog.
158
+ */
159
+ findCalendarItemsByRecurrenceIdWithPagination(recurrenceId, startKey, startDocumentId, limit) {
160
+ return __awaiter(this, void 0, void 0, function* () {
142
161
  const _url = this.host +
143
- `/calendarItem/byRecurrenceId` +
144
- '?ts=' +
145
- new Date().getTime() +
146
- (recurrenceId ? '&recurrenceId=' + encodeURIComponent(String(recurrenceId)) : '');
162
+ `/calendarItem/byRecurrenceId?ts=${new Date().getTime()}&recurrenceId=${encodeURIComponent(recurrenceId)}` +
163
+ (!!startKey ? `&startKey=${encodeURIComponent(startKey)}` : '') +
164
+ (!!startDocumentId ? `&startDocumentId=${encodeURIComponent(startDocumentId)}` : '') +
165
+ (!!limit ? `&limit=${limit}` : '');
147
166
  let headers = yield this.headers;
148
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
149
- .then((doc) => doc.body.map((it) => new CalendarItem_1.CalendarItem(it)))
167
+ return XHR_1.XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
168
+ .then((doc) => new PaginatedListCalendarItem_1.PaginatedListCalendarItem(doc.body))
150
169
  .catch((err) => this.handleError(err));
151
170
  });
152
171
  }
153
172
  /**
154
173
  *
155
- * @summary Gets an calendarItem
174
+ * @summary Gets a calendarItem
156
175
  * @param calendarItemId
157
176
  */
158
177
  getCalendarItem(calendarItemId) {
@@ -166,16 +185,37 @@ class IccCalendarItemApi {
166
185
  });
167
186
  }
168
187
  /**
188
+ * @deprecated use {@link getCalendarItemsWithPagination} instead
169
189
  *
170
190
  * @summary Gets all calendarItems
171
191
  */
172
192
  getCalendarItems() {
173
193
  return __awaiter(this, void 0, void 0, function* () {
174
- let _body = null;
175
- const _url = this.host + `/calendarItem` + '?ts=' + new Date().getTime();
194
+ const _url = this.host + `/calendarItem?ts=${new Date().getTime()}$limit=1000000`;
176
195
  let headers = yield this.headers;
177
- return XHR_1.XHR.sendCommand('GET', _url, headers, _body, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
178
- .then((doc) => doc.body.map((it) => new CalendarItem_1.CalendarItem(it)))
196
+ return XHR_1.XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
197
+ .then((doc) => { var _a; return (_a = new PaginatedListCalendarItem_1.PaginatedListCalendarItem(doc.body).rows) !== null && _a !== void 0 ? _a : []; })
198
+ .catch((err) => this.handleError(err));
199
+ });
200
+ }
201
+ /**
202
+ * @summary gets all Calendar Items with pagination.
203
+ *
204
+ * @param startDocumentId the startDocumentId provided by the previous page or null if it's the first page.
205
+ * @param limit the size of the page
206
+ * @return a promise that will resolve in a PaginatedListCalendarItem.
207
+ */
208
+ getCalendarItemsWithPagination(startDocumentId, limit) {
209
+ return __awaiter(this, void 0, void 0, function* () {
210
+ const _url = this.host +
211
+ `/calendarItem` +
212
+ '?ts=' +
213
+ new Date().getTime() +
214
+ (!!startDocumentId ? `&startDocumentId=${encodeURIComponent(startDocumentId)}` : '') +
215
+ (!!limit ? `&limit=${limit}` : '');
216
+ let headers = yield this.headers;
217
+ return XHR_1.XHR.sendCommand('GET', _url, headers, null, this.fetchImpl, undefined, this.authenticationProvider.getAuthService())
218
+ .then((doc) => new PaginatedListCalendarItem_1.PaginatedListCalendarItem(doc.body))
179
219
  .catch((err) => this.handleError(err));
180
220
  });
181
221
  }