@valtimo/document 4.15.2-next-main.14 → 4.15.2-next-main.15

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.
@@ -82,8 +82,11 @@
82
82
  };
83
83
  return this.http.delete(this.valtimoEndpointUri + "process-document/definition", options);
84
84
  };
85
- DocumentService.prototype.getAuditLog = function (documentId) {
86
- return this.http.get(this.valtimoEndpointUri + "process-document/instance/document/" + documentId + "/audit");
85
+ DocumentService.prototype.getAuditLog = function (documentId, page) {
86
+ if (page === void 0) { page = 0; }
87
+ var params = new i1.HttpParams();
88
+ params = params.set('page', page.toString());
89
+ return this.http.get(this.valtimoEndpointUri + "process-document/instance/document/" + documentId + "/audit", { params: params });
87
90
  };
88
91
  DocumentService.prototype.assignResource = function (documentId, resourceId) {
89
92
  return this.http.post(this.valtimoEndpointUri + "document/" + documentId + "/resource/" + resourceId, {});
@@ -99,6 +102,9 @@
99
102
  DocumentService.prototype.removeDocumentDefinition = function (name) {
100
103
  return this.http.delete(this.valtimoEndpointUri + "document-definition/" + name);
101
104
  };
105
+ DocumentService.prototype.sendMessage = function (documentId, request) {
106
+ return this.http.post(this.valtimoEndpointUri + "document/" + documentId + "/message", request);
107
+ };
102
108
  return DocumentService;
103
109
  }());
104
110
  DocumentService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DocumentService_Factory() { return new DocumentService(i0.ɵɵinject(i1.HttpClient), i0.ɵɵinject(i2.ConfigService)); }, token: DocumentService, providedIn: "root" });
@@ -1 +1 @@
1
- {"version":3,"file":"valtimo-document.umd.js","sources":["../../../../projects/valtimo/document/src/lib/document.service.ts","../../../../projects/valtimo/document/src/lib/document.module.ts","../../../../projects/valtimo/document/src/lib/document-search-request.ts","../../../../projects/valtimo/document/src/public_api.ts","../../../../projects/valtimo/document/src/valtimo-document.ts"],"sourcesContent":["/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Injectable} from '@angular/core';\nimport {HttpClient, HttpHeaders} from '@angular/common/http';\nimport {Observable} from 'rxjs';\nimport {\n AuditRecord,\n Document,\n DocumentDefinition,\n DocumentDefinitions,\n DocumentResult,\n Documents,\n ModifyDocumentAndCompleteTaskRequestImpl,\n ModifyDocumentAndCompleteTaskResult,\n ModifyDocumentAndStartProcessRequestImpl,\n ModifyDocumentAndStartProcessResult,\n NewDocumentAndStartProcessRequestImpl,\n NewDocumentAndStartProcessResult,\n Page,\n ProcessDocumentDefinition,\n ProcessDocumentDefinitionRequest,\n ProcessDocumentInstance,\n DocumentDefinitionCreateRequest,\n UndeployDocumentDefinitionResult\n} from '@valtimo/contract';\nimport {DocumentSearchRequest} from './document-search-request';\nimport {ConfigService} from '@valtimo/config';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class DocumentService {\n private valtimoEndpointUri: string;\n\n constructor(private http: HttpClient, configService: ConfigService) {\n this.valtimoEndpointUri = configService.config.valtimoApi.endpointUri;\n }\n\n // Document-calls\n public getAllDefinitions(): Observable<DocumentDefinitions> {\n return this.http.get<DocumentDefinitions>(`${this.valtimoEndpointUri}document-definition`);\n }\n\n queryDefinitions(params?: any): Observable<Page<DocumentDefinition>> {\n return this.http.get<Page<DocumentDefinition>>(`${this.valtimoEndpointUri}document-definition`, {params: params});\n }\n\n getDocumentDefinition(documentDefinitionName: string): Observable<DocumentDefinition> {\n return this.http.get<DocumentDefinition>(`${this.valtimoEndpointUri}document-definition/${documentDefinitionName}`);\n }\n\n getDocuments(documentSearchRequest: DocumentSearchRequest): Observable<Documents> {\n return this.http.post<Documents>(`${this.valtimoEndpointUri}document-search`,\n documentSearchRequest.asHttpBody(), {params: documentSearchRequest.asHttpParams()});\n }\n\n getDocument(documentId: string): Observable<Document> {\n return this.http.get<Document>(`${this.valtimoEndpointUri}document/${documentId}`);\n }\n\n modifyDocument(document: any): Observable<DocumentResult> {\n return this.http.put<DocumentResult>(`${this.valtimoEndpointUri}document`, document);\n }\n\n // ProcessDocument-calls\n getProcessDocumentDefinitions(): Observable<ProcessDocumentDefinition> {\n return this.http.get<ProcessDocumentDefinition>(`${this.valtimoEndpointUri}process-document/definition`);\n }\n\n findProcessDocumentDefinitions(documentDefinitionName: string): Observable<ProcessDocumentDefinition[]> {\n return this.http.get<ProcessDocumentDefinition[]>(\n `${this.valtimoEndpointUri}process-document/definition/document/${documentDefinitionName}`\n );\n }\n\n findProcessDocumentInstances(documentId: string): Observable<ProcessDocumentInstance[]> {\n return this.http.get<ProcessDocumentInstance[]>(`${this.valtimoEndpointUri}process-document/instance/document/${documentId}`);\n }\n\n newDocumentAndStartProcess(request: NewDocumentAndStartProcessRequestImpl): Observable<NewDocumentAndStartProcessResult> {\n return this.http.post<NewDocumentAndStartProcessResult>(\n `${this.valtimoEndpointUri}process-document/operation/new-document-and-start-process`,\n request\n );\n }\n\n modifyDocumentAndCompleteTask(request: ModifyDocumentAndCompleteTaskRequestImpl): Observable<ModifyDocumentAndCompleteTaskResult> {\n return this.http.post<ModifyDocumentAndCompleteTaskResult>(\n `${this.valtimoEndpointUri}process-document/operation/modify-document-and-complete-task`,\n request\n );\n }\n\n modifyDocumentAndStartProcess(request: ModifyDocumentAndStartProcessRequestImpl): Observable<ModifyDocumentAndStartProcessResult> {\n return this.http.post<ModifyDocumentAndStartProcessResult>(\n `${this.valtimoEndpointUri}process-document/operation/modify-document-and-start-process`,\n request\n );\n }\n\n createProcessDocumentDefinition(request: ProcessDocumentDefinitionRequest): Observable<ProcessDocumentDefinition> {\n return this.http.post<ProcessDocumentDefinition>(`${this.valtimoEndpointUri}process-document/definition`, request);\n }\n\n createDocumentDefinition(documentDefinitionCreateRequest: DocumentDefinitionCreateRequest): Observable<void> {\n const options = {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json'\n })\n };\n return this.http.post<void>(`${this.valtimoEndpointUri}document-definition`, documentDefinitionCreateRequest, options);\n }\n\n deleteProcessDocumentDefinition(request: ProcessDocumentDefinitionRequest): Observable<any> {\n const options = {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json'\n }),\n body: request\n };\n return this.http.delete(`${this.valtimoEndpointUri}process-document/definition`, options);\n }\n\n getAuditLog(documentId: string): Observable<Page<AuditRecord>> {\n return this.http.get<Page<AuditRecord>>(`${this.valtimoEndpointUri}process-document/instance/document/${documentId}/audit`);\n }\n\n assignResource(documentId: string, resourceId: string): Observable<void> {\n return this.http.post<void>(`${this.valtimoEndpointUri}document/${documentId}/resource/${resourceId}`, {});\n }\n\n removeResource(documentId: string, resourceId: string): Observable<void> {\n const options = {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json'\n })\n };\n return this.http.delete<void>(`${this.valtimoEndpointUri}document/${documentId}/resource/${resourceId}`, options);\n }\n\n removeDocumentDefinition(name: string): Observable<UndeployDocumentDefinitionResult> {\n return this.http.delete<UndeployDocumentDefinitionResult>(`${this.valtimoEndpointUri}document-definition/${name}`);\n }\n\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\n\n@NgModule()\nexport class DocumentModule {\n\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {HttpParams} from '@angular/common/http';\nimport {SortState} from '@valtimo/contract';\n\nexport interface DocumentSearchRequest {\n definitionName: string;\n page: number;\n size: number;\n sequence?: number;\n createdBy?: string;\n globalSearchFilter?: string;\n sort?: SortState;\n searchCriteria?: Array<{path: string; value: string}>;\n\n asHttpBody(): DocumentSearchRequestHttpBody;\n asHttpParams(): HttpParams;\n setPage(page: number): void;\n getSortString(sort: SortState): string;\n}\n\nexport class DocumentSearchRequestHttpBody {\n documentDefinitionName?: string;\n sequence?: number;\n createdBy?: string;\n globalSearchFilter?: string;\n otherFilters?: Array<{path: string; value: string}>;\n}\n\nexport class DocumentSearchRequestImpl implements DocumentSearchRequest {\n definitionName: string;\n page: number;\n size: number;\n sequence?: number;\n createdBy?: string;\n globalSearchFilter?: string;\n sort?: SortState;\n otherFilters?: Array<{path: string; value: string}>;\n\n constructor(\n definitionName: string,\n page: number,\n size: number,\n sequence?: number,\n createdBy?: string,\n globalSearchFilter?: string,\n sort?: SortState,\n otherFilters?: Array<{path: string; value: string}>\n ) {\n this.definitionName = definitionName;\n this.page = page;\n this.size = size;\n this.sequence = sequence;\n this.createdBy = createdBy;\n this.globalSearchFilter = globalSearchFilter;\n this.sort = sort;\n this.otherFilters = otherFilters;\n }\n\n asHttpBody(): DocumentSearchRequestHttpBody {\n const httpBody = new DocumentSearchRequestHttpBody();\n\n httpBody.documentDefinitionName = this.definitionName;\n\n if (this.sequence) {\n httpBody.sequence = this.sequence;\n }\n if (this.createdBy) {\n httpBody.createdBy = this.createdBy;\n }\n if (this.globalSearchFilter) {\n httpBody.globalSearchFilter = this.globalSearchFilter;\n }\n if (this.otherFilters) {\n httpBody.otherFilters = this.otherFilters;\n }\n\n return httpBody;\n }\n\n asHttpParams(): HttpParams {\n let params = new HttpParams()\n .set('definitionName', this.definitionName)\n .set('page', this.page.toString())\n .set('size', this.size.toString());\n if (this.sort) {\n params = params.set('sort', this.getSortString(this.sort));\n }\n return params;\n }\n\n setPage(page: number): void {\n this.page = page;\n }\n\n getSortString(sort: SortState): string {\n return `${sort.state.name},${sort.state.direction}`;\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Public API Surface of document\n */\nexport * from './lib/document.service';\nexport * from './lib/document.module';\nexport * from './lib/document-search-request';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["HttpHeaders","Injectable","HttpClient","ConfigService","NgModule","HttpParams"],"mappings":";;;;;;IAAA;;;;;;;;;;;;;;;;QAgDE,yBAAoB,IAAgB,EAAE,aAA4B;YAA9C,SAAI,GAAJ,IAAI,CAAY;YAClC,IAAI,CAAC,kBAAkB,GAAG,aAAa,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC;SACvE;;QAGM,2CAAiB,GAAjB;YACL,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAyB,IAAI,CAAC,kBAAkB,wBAAqB,CAAC,CAAC;SAC5F;QAED,0CAAgB,GAAhB,UAAiB,MAAY;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAA8B,IAAI,CAAC,kBAAkB,wBAAqB,EAAE,EAAC,M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document/src/lib/document.service.ts","../../../../projects/valtimo/document/src/lib/document.module.ts","../../../../projects/valtimo/document/src/lib/document-search-request.ts","../../../../projects/valtimo/document/src/public_api.ts","../../../../projects/valtimo/document/src/valtimo-document.ts"],"sourcesContent":["/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Injectable} from '@angular/core';\nimport {HttpClient, HttpHeaders, HttpParams} from '@angular/common/http';\nimport {Observable} from 'rxjs';\nimport {\n AuditRecord,\n Document,\n DocumentDefinition,\n DocumentDefinitions,\n DocumentResult,\n Documents,\n ModifyDocumentAndCompleteTaskRequestImpl,\n ModifyDocumentAndCompleteTaskResult,\n ModifyDocumentAndStartProcessRequestImpl,\n ModifyDocumentAndStartProcessResult,\n NewDocumentAndStartProcessRequestImpl,\n NewDocumentAndStartProcessResult,\n Page,\n ProcessDocumentDefinition,\n ProcessDocumentDefinitionRequest,\n ProcessDocumentInstance,\n DocumentDefinitionCreateRequest,\n UndeployDocumentDefinitionResult,\n DocumentSendMessageRequest\n} from '@valtimo/contract';\nimport {DocumentSearchRequest} from './document-search-request';\nimport {ConfigService} from '@valtimo/config';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class DocumentService {\n private valtimoEndpointUri: string;\n\n constructor(private http: HttpClient, configService: ConfigService) {\n this.valtimoEndpointUri = configService.config.valtimoApi.endpointUri;\n }\n\n // Document-calls\n public getAllDefinitions(): Observable<DocumentDefinitions> {\n return this.http.get<DocumentDefinitions>(`${this.valtimoEndpointUri}document-definition`);\n }\n\n queryDefinitions(params?: any): Observable<Page<DocumentDefinition>> {\n return this.http.get<Page<DocumentDefinition>>(`${this.valtimoEndpointUri}document-definition`, {params: params});\n }\n\n getDocumentDefinition(documentDefinitionName: string): Observable<DocumentDefinition> {\n return this.http.get<DocumentDefinition>(`${this.valtimoEndpointUri}document-definition/${documentDefinitionName}`);\n }\n\n getDocuments(documentSearchRequest: DocumentSearchRequest): Observable<Documents> {\n return this.http.post<Documents>(`${this.valtimoEndpointUri}document-search`,\n documentSearchRequest.asHttpBody(), {params: documentSearchRequest.asHttpParams()});\n }\n\n getDocument(documentId: string): Observable<Document> {\n return this.http.get<Document>(`${this.valtimoEndpointUri}document/${documentId}`);\n }\n\n modifyDocument(document: any): Observable<DocumentResult> {\n return this.http.put<DocumentResult>(`${this.valtimoEndpointUri}document`, document);\n }\n\n // ProcessDocument-calls\n getProcessDocumentDefinitions(): Observable<ProcessDocumentDefinition> {\n return this.http.get<ProcessDocumentDefinition>(`${this.valtimoEndpointUri}process-document/definition`);\n }\n\n findProcessDocumentDefinitions(documentDefinitionName: string): Observable<ProcessDocumentDefinition[]> {\n return this.http.get<ProcessDocumentDefinition[]>(\n `${this.valtimoEndpointUri}process-document/definition/document/${documentDefinitionName}`\n );\n }\n\n findProcessDocumentInstances(documentId: string): Observable<ProcessDocumentInstance[]> {\n return this.http.get<ProcessDocumentInstance[]>(`${this.valtimoEndpointUri}process-document/instance/document/${documentId}`);\n }\n\n newDocumentAndStartProcess(request: NewDocumentAndStartProcessRequestImpl): Observable<NewDocumentAndStartProcessResult> {\n return this.http.post<NewDocumentAndStartProcessResult>(\n `${this.valtimoEndpointUri}process-document/operation/new-document-and-start-process`,\n request\n );\n }\n\n modifyDocumentAndCompleteTask(request: ModifyDocumentAndCompleteTaskRequestImpl): Observable<ModifyDocumentAndCompleteTaskResult> {\n return this.http.post<ModifyDocumentAndCompleteTaskResult>(\n `${this.valtimoEndpointUri}process-document/operation/modify-document-and-complete-task`,\n request\n );\n }\n\n modifyDocumentAndStartProcess(request: ModifyDocumentAndStartProcessRequestImpl): Observable<ModifyDocumentAndStartProcessResult> {\n return this.http.post<ModifyDocumentAndStartProcessResult>(\n `${this.valtimoEndpointUri}process-document/operation/modify-document-and-start-process`,\n request\n );\n }\n\n createProcessDocumentDefinition(request: ProcessDocumentDefinitionRequest): Observable<ProcessDocumentDefinition> {\n return this.http.post<ProcessDocumentDefinition>(`${this.valtimoEndpointUri}process-document/definition`, request);\n }\n\n createDocumentDefinition(documentDefinitionCreateRequest: DocumentDefinitionCreateRequest): Observable<void> {\n const options = {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json'\n })\n };\n return this.http.post<void>(`${this.valtimoEndpointUri}document-definition`, documentDefinitionCreateRequest, options);\n }\n\n deleteProcessDocumentDefinition(request: ProcessDocumentDefinitionRequest): Observable<any> {\n const options = {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json'\n }),\n body: request\n };\n return this.http.delete(`${this.valtimoEndpointUri}process-document/definition`, options);\n }\n\n getAuditLog(documentId: string, page: number = 0): Observable<Page<AuditRecord>> {\n let params = new HttpParams();\n params = params.set('page', page.toString());\n return this.http.get<Page<AuditRecord>>(`${this.valtimoEndpointUri}process-document/instance/document/${documentId}/audit`,\n {params}\n );\n }\n\n assignResource(documentId: string, resourceId: string): Observable<void> {\n return this.http.post<void>(`${this.valtimoEndpointUri}document/${documentId}/resource/${resourceId}`, {});\n }\n\n removeResource(documentId: string, resourceId: string): Observable<void> {\n const options = {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json'\n })\n };\n return this.http.delete<void>(`${this.valtimoEndpointUri}document/${documentId}/resource/${resourceId}`, options);\n }\n\n removeDocumentDefinition(name: string): Observable<UndeployDocumentDefinitionResult> {\n return this.http.delete<UndeployDocumentDefinitionResult>(`${this.valtimoEndpointUri}document-definition/${name}`);\n }\n\n sendMessage(documentId: string, request: DocumentSendMessageRequest): Observable<any> {\n return this.http.post(`${this.valtimoEndpointUri}document/${documentId}/message`, request);\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\n\n@NgModule()\nexport class DocumentModule {\n\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {HttpParams} from '@angular/common/http';\nimport {SortState} from '@valtimo/contract';\n\nexport interface DocumentSearchRequest {\n definitionName: string;\n page: number;\n size: number;\n sequence?: number;\n createdBy?: string;\n globalSearchFilter?: string;\n sort?: SortState;\n searchCriteria?: Array<{path: string; value: string}>;\n\n asHttpBody(): DocumentSearchRequestHttpBody;\n asHttpParams(): HttpParams;\n setPage(page: number): void;\n getSortString(sort: SortState): string;\n}\n\nexport class DocumentSearchRequestHttpBody {\n documentDefinitionName?: string;\n sequence?: number;\n createdBy?: string;\n globalSearchFilter?: string;\n otherFilters?: Array<{path: string; value: string}>;\n}\n\nexport class DocumentSearchRequestImpl implements DocumentSearchRequest {\n definitionName: string;\n page: number;\n size: number;\n sequence?: number;\n createdBy?: string;\n globalSearchFilter?: string;\n sort?: SortState;\n otherFilters?: Array<{path: string; value: string}>;\n\n constructor(\n definitionName: string,\n page: number,\n size: number,\n sequence?: number,\n createdBy?: string,\n globalSearchFilter?: string,\n sort?: SortState,\n otherFilters?: Array<{path: string; value: string}>\n ) {\n this.definitionName = definitionName;\n this.page = page;\n this.size = size;\n this.sequence = sequence;\n this.createdBy = createdBy;\n this.globalSearchFilter = globalSearchFilter;\n this.sort = sort;\n this.otherFilters = otherFilters;\n }\n\n asHttpBody(): DocumentSearchRequestHttpBody {\n const httpBody = new DocumentSearchRequestHttpBody();\n\n httpBody.documentDefinitionName = this.definitionName;\n\n if (this.sequence) {\n httpBody.sequence = this.sequence;\n }\n if (this.createdBy) {\n httpBody.createdBy = this.createdBy;\n }\n if (this.globalSearchFilter) {\n httpBody.globalSearchFilter = this.globalSearchFilter;\n }\n if (this.otherFilters) {\n httpBody.otherFilters = this.otherFilters;\n }\n\n return httpBody;\n }\n\n asHttpParams(): HttpParams {\n let params = new HttpParams()\n .set('definitionName', this.definitionName)\n .set('page', this.page.toString())\n .set('size', this.size.toString());\n if (this.sort) {\n params = params.set('sort', this.getSortString(this.sort));\n }\n return params;\n }\n\n setPage(page: number): void {\n this.page = page;\n }\n\n getSortString(sort: SortState): string {\n return `${sort.state.name},${sort.state.direction}`;\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Public API Surface of document\n */\nexport * from './lib/document.service';\nexport * from './lib/document.module';\nexport * from './lib/document-search-request';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["HttpHeaders","HttpParams","Injectable","HttpClient","ConfigService","NgModule"],"mappings":";;;;;;IAAA;;;;;;;;;;;;;;;;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DAAY,GAAZ;YACE,IAAI,MAAM,GAAG,IAAIJ,aAAU,EAAE;iBAC1B,GAAG,CAAC,gBAAgB,EAAE,IAAI,CAAC,cAAc,CAAC;iBAC1C,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;iBACjC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;YACrC,IAAI,IAAI,CAAC,IAAI,EAAE;gBACb,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;aAC5D;YACD,OAAO,MAAM,CAAC;SACf;QAED,2CAAO,GAAP,UAAQ,IAAY;YAClB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;SAClB;QAED,iDAAa,GAAb,UAAc,IAAe;YAC3B,OAAU,IAAI,CAAC,KAAK,CAAC,IAAI,SAAI,IAAI,CAAC,KAAK,CAAC,SAAW,CAAC;SACrD;wCACF;KAAA;;IChHD;;;;;;;;;;;;;;;;ICAA;;;;;;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common/http"),require("@valtimo/config")):"function"==typeof define&&define.amd?define("@valtimo/document",["exports","@angular/core","@angular/common/http","@valtimo/config"],e):e(((t=t||self).valtimo=t.valtimo||{},t.valtimo.document={}),t.ng.core,t.ng.common.http,t.config)}(this,(function(t,e,o,n){"use strict";var i=function(){function t(t,e){this.http=t,this.valtimoEndpointUri=e.config.valtimoApi.endpointUri}return t.prototype.getAllDefinitions=function(){return this.http.get(this.valtimoEndpointUri+"document-definition")},t.prototype.queryDefinitions=function(t){return this.http.get(this.valtimoEndpointUri+"document-definition",{params:t})},t.prototype.getDocumentDefinition=function(t){return this.http.get(this.valtimoEndpointUri+"document-definition/"+t)},t.prototype.getDocuments=function(t){return this.http.post(this.valtimoEndpointUri+"document-search",t.asHttpBody(),{params:t.asHttpParams()})},t.prototype.getDocument=function(t){return this.http.get(this.valtimoEndpointUri+"document/"+t)},t.prototype.modifyDocument=function(t){return this.http.put(this.valtimoEndpointUri+"document",t)},t.prototype.getProcessDocumentDefinitions=function(){return this.http.get(this.valtimoEndpointUri+"process-document/definition")},t.prototype.findProcessDocumentDefinitions=function(t){return this.http.get(this.valtimoEndpointUri+"process-document/definition/document/"+t)},t.prototype.findProcessDocumentInstances=function(t){return this.http.get(this.valtimoEndpointUri+"process-document/instance/document/"+t)},t.prototype.newDocumentAndStartProcess=function(t){return this.http.post(this.valtimoEndpointUri+"process-document/operation/new-document-and-start-process",t)},t.prototype.modifyDocumentAndCompleteTask=function(t){return this.http.post(this.valtimoEndpointUri+"process-document/operation/modify-document-and-complete-task",t)},t.prototype.modifyDocumentAndStartProcess=function(t){return this.http.post(this.valtimoEndpointUri+"process-document/operation/modify-document-and-start-process",t)},t.prototype.createProcessDocumentDefinition=function(t){return this.http.post(this.valtimoEndpointUri+"process-document/definition",t)},t.prototype.createDocumentDefinition=function(t){var e={headers:new o.HttpHeaders({"Content-Type":"application/json"})};return this.http.post(this.valtimoEndpointUri+"document-definition",t,e)},t.prototype.deleteProcessDocumentDefinition=function(t){var e={headers:new o.HttpHeaders({"Content-Type":"application/json"}),body:t};return this.http.delete(this.valtimoEndpointUri+"process-document/definition",e)},t.prototype.getAuditLog=function(t){return this.http.get(this.valtimoEndpointUri+"process-document/instance/document/"+t+"/audit")},t.prototype.assignResource=function(t,e){return this.http.post(this.valtimoEndpointUri+"document/"+t+"/resource/"+e,{})},t.prototype.removeResource=function(t,e){var n={headers:new o.HttpHeaders({"Content-Type":"application/json"})};return this.http.delete(this.valtimoEndpointUri+"document/"+t+"/resource/"+e,n)},t.prototype.removeDocumentDefinition=function(t){return this.http.delete(this.valtimoEndpointUri+"document-definition/"+t)},t}();i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(o.HttpClient),e.ɵɵinject(n.ConfigService))},token:i,providedIn:"root"}),i.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],i.ctorParameters=function(){return[{type:o.HttpClient},{type:n.ConfigService}]};var r=function(){};r.decorators=[{type:e.NgModule}];var s=function(){},p=function(){function t(t,e,o,n,i,r,s,p){this.definitionName=t,this.page=e,this.size=o,this.sequence=n,this.createdBy=i,this.globalSearchFilter=r,this.sort=s,this.otherFilters=p}return t.prototype.asHttpBody=function(){var t=new s;return t.documentDefinitionName=this.definitionName,this.sequence&&(t.sequence=this.sequence),this.createdBy&&(t.createdBy=this.createdBy),this.globalSearchFilter&&(t.globalSearchFilter=this.globalSearchFilter),this.otherFilters&&(t.otherFilters=this.otherFilters),t},t.prototype.asHttpParams=function(){var t=(new o.HttpParams).set("definitionName",this.definitionName).set("page",this.page.toString()).set("size",this.size.toString());return this.sort&&(t=t.set("sort",this.getSortString(this.sort))),t},t.prototype.setPage=function(t){this.page=t},t.prototype.getSortString=function(t){return t.state.name+","+t.state.direction},t}();t.DocumentModule=r,t.DocumentSearchRequestHttpBody=s,t.DocumentSearchRequestImpl=p,t.DocumentService=i,Object.defineProperty(t,"__esModule",{value:!0})}));
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common/http"),require("@valtimo/config")):"function"==typeof define&&define.amd?define("@valtimo/document",["exports","@angular/core","@angular/common/http","@valtimo/config"],e):e(((t=t||self).valtimo=t.valtimo||{},t.valtimo.document={}),t.ng.core,t.ng.common.http,t.config)}(this,(function(t,e,o,n){"use strict";var i=function(){function t(t,e){this.http=t,this.valtimoEndpointUri=e.config.valtimoApi.endpointUri}return t.prototype.getAllDefinitions=function(){return this.http.get(this.valtimoEndpointUri+"document-definition")},t.prototype.queryDefinitions=function(t){return this.http.get(this.valtimoEndpointUri+"document-definition",{params:t})},t.prototype.getDocumentDefinition=function(t){return this.http.get(this.valtimoEndpointUri+"document-definition/"+t)},t.prototype.getDocuments=function(t){return this.http.post(this.valtimoEndpointUri+"document-search",t.asHttpBody(),{params:t.asHttpParams()})},t.prototype.getDocument=function(t){return this.http.get(this.valtimoEndpointUri+"document/"+t)},t.prototype.modifyDocument=function(t){return this.http.put(this.valtimoEndpointUri+"document",t)},t.prototype.getProcessDocumentDefinitions=function(){return this.http.get(this.valtimoEndpointUri+"process-document/definition")},t.prototype.findProcessDocumentDefinitions=function(t){return this.http.get(this.valtimoEndpointUri+"process-document/definition/document/"+t)},t.prototype.findProcessDocumentInstances=function(t){return this.http.get(this.valtimoEndpointUri+"process-document/instance/document/"+t)},t.prototype.newDocumentAndStartProcess=function(t){return this.http.post(this.valtimoEndpointUri+"process-document/operation/new-document-and-start-process",t)},t.prototype.modifyDocumentAndCompleteTask=function(t){return this.http.post(this.valtimoEndpointUri+"process-document/operation/modify-document-and-complete-task",t)},t.prototype.modifyDocumentAndStartProcess=function(t){return this.http.post(this.valtimoEndpointUri+"process-document/operation/modify-document-and-start-process",t)},t.prototype.createProcessDocumentDefinition=function(t){return this.http.post(this.valtimoEndpointUri+"process-document/definition",t)},t.prototype.createDocumentDefinition=function(t){var e={headers:new o.HttpHeaders({"Content-Type":"application/json"})};return this.http.post(this.valtimoEndpointUri+"document-definition",t,e)},t.prototype.deleteProcessDocumentDefinition=function(t){var e={headers:new o.HttpHeaders({"Content-Type":"application/json"}),body:t};return this.http.delete(this.valtimoEndpointUri+"process-document/definition",e)},t.prototype.getAuditLog=function(t,e){void 0===e&&(e=0);var n=new o.HttpParams;return n=n.set("page",e.toString()),this.http.get(this.valtimoEndpointUri+"process-document/instance/document/"+t+"/audit",{params:n})},t.prototype.assignResource=function(t,e){return this.http.post(this.valtimoEndpointUri+"document/"+t+"/resource/"+e,{})},t.prototype.removeResource=function(t,e){var n={headers:new o.HttpHeaders({"Content-Type":"application/json"})};return this.http.delete(this.valtimoEndpointUri+"document/"+t+"/resource/"+e,n)},t.prototype.removeDocumentDefinition=function(t){return this.http.delete(this.valtimoEndpointUri+"document-definition/"+t)},t.prototype.sendMessage=function(t,e){return this.http.post(this.valtimoEndpointUri+"document/"+t+"/message",e)},t}();i.ɵprov=e.ɵɵdefineInjectable({factory:function(){return new i(e.ɵɵinject(o.HttpClient),e.ɵɵinject(n.ConfigService))},token:i,providedIn:"root"}),i.decorators=[{type:e.Injectable,args:[{providedIn:"root"}]}],i.ctorParameters=function(){return[{type:o.HttpClient},{type:n.ConfigService}]};var r=function(){};r.decorators=[{type:e.NgModule}];var s=function(){},p=function(){function t(t,e,o,n,i,r,s,p){this.definitionName=t,this.page=e,this.size=o,this.sequence=n,this.createdBy=i,this.globalSearchFilter=r,this.sort=s,this.otherFilters=p}return t.prototype.asHttpBody=function(){var t=new s;return t.documentDefinitionName=this.definitionName,this.sequence&&(t.sequence=this.sequence),this.createdBy&&(t.createdBy=this.createdBy),this.globalSearchFilter&&(t.globalSearchFilter=this.globalSearchFilter),this.otherFilters&&(t.otherFilters=this.otherFilters),t},t.prototype.asHttpParams=function(){var t=(new o.HttpParams).set("definitionName",this.definitionName).set("page",this.page.toString()).set("size",this.size.toString());return this.sort&&(t=t.set("sort",this.getSortString(this.sort))),t},t.prototype.setPage=function(t){this.page=t},t.prototype.getSortString=function(t){return t.state.name+","+t.state.direction},t}();t.DocumentModule=r,t.DocumentSearchRequestHttpBody=s,t.DocumentSearchRequestImpl=p,t.DocumentService=i,Object.defineProperty(t,"__esModule",{value:!0})}));
2
2
  //# sourceMappingURL=valtimo-document.umd.min.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../projects/valtimo/document/src/lib/document.service.ts","../../../../projects/valtimo/document/src/lib/document.module.ts","../../../../projects/valtimo/document/src/lib/document-search-request.ts"],"names":["DocumentService","http","configService","this","valtimoEndpointUri","config","valtimoApi","endpointUri","prototype","getAllDefinitions","get","queryDefinitions","params","getDocumentDefinition","documentDefinitionName","getDocuments","documentSearchRequest","post","asHttpBody","asHttpParams","getDocument","documentId","modifyDocument","document","put","getProcessDocumentDefinitions","findProcessDocumentDefinitions","findProcessDocumentInstances","newDocumentAndStartProcess","request","modifyDocumentAndCompleteTask","modifyDocumentAndStartProcess","createProcessDocumentDefinition","createDocumentDefinition","documentDefinitionCreateRequest","options","headers","HttpHeaders","Content-Type","deleteProcessDocumentDefinition","body","delete","getAuditLog","assignResource","resourceId","removeResource","removeDocumentDefinition","name","Injectable","args","providedIn","HttpClient","ConfigService","NgModule","DocumentSearchRequestImpl","definitionName","page","size","sequence","createdBy","globalSearchFilter","sort","otherFilters","httpBody","DocumentSearchRequestHttpBody","HttpParams","set","toString","getSortString","setPage","state","direction"],"mappings":"ocAgDE,SAAAA,EAAoBC,EAAkBC,GAAlBC,KAAAF,KAAAA,EAClBE,KAAKC,mBAAqBF,EAAcG,OAAOC,WAAWC,mBAIrDP,EAAAQ,UAAAC,kBAAA,WACL,OAAON,KAAKF,KAAKS,IAA4BP,KAAKC,mBAAkB,wBAGtEJ,EAAAQ,UAAAG,iBAAA,SAAiBC,GACf,OAAOT,KAAKF,KAAKS,IAAiCP,KAAKC,mBAAkB,sBAAuB,CAACQ,OAAQA,KAG3GZ,EAAAQ,UAAAK,sBAAA,SAAsBC,GACpB,OAAOX,KAAKF,KAAKS,IAA2BP,KAAKC,mBAAkB,uBAAuBU,IAG5Fd,EAAAQ,UAAAO,aAAA,SAAaC,GACX,OAAOb,KAAKF,KAAKgB,KAAmBd,KAAKC,mBAAkB,kBACzDY,EAAsBE,aAAc,CAACN,OAAQI,EAAsBG,kBAGvEnB,EAAAQ,UAAAY,YAAA,SAAYC,GACV,OAAOlB,KAAKF,KAAKS,IAAiBP,KAAKC,mBAAkB,YAAYiB,IAGvErB,EAAAQ,UAAAc,eAAA,SAAeC,GACb,OAAOpB,KAAKF,KAAKuB,IAAuBrB,KAAKC,mBAAkB,WAAYmB,IAI7EvB,EAAAQ,UAAAiB,8BAAA,WACE,OAAOtB,KAAKF,KAAKS,IAAkCP,KAAKC,mBAAkB,gCAG5EJ,EAAAQ,UA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,QAE/CjD,GAGT0C,EAAA9C,UAAA6D,QAAA,SAAQb,GACNrD,KAAKqD,KAAOA,GAGdF,EAAA9C,UAAA4D,cAAA,SAAcP,GACZ,OAAUA,EAAKS,MAAMvB,KAAI,IAAIc,EAAKS,MAAMC","sourcesContent":["/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Injectable} from '@angular/core';\nimport {HttpClient, HttpHeaders} from '@angular/common/http';\nimport {Observable} from 'rxjs';\nimport {\n AuditRecord,\n Document,\n DocumentDefinition,\n DocumentDefinitions,\n DocumentResult,\n Documents,\n ModifyDocumentAndCompleteTaskRequestImpl,\n ModifyDocumentAndCompleteTaskResult,\n ModifyDocumentAndStartProcessRequestImpl,\n ModifyDocumentAndStartProcessResult,\n NewDocumentAndStartProcessRequestImpl,\n NewDocumentAndStartProcessResult,\n Page,\n ProcessDocumentDefinition,\n ProcessDocumentDefinitionRequest,\n ProcessDocumentInstance,\n DocumentDefinitionCreateRequest,\n UndeployDocumentDefinitionResult\n} from '@valtimo/contract';\nimport {DocumentSearchRequest} from './document-search-request';\nimport {ConfigService} from '@valtimo/config';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class DocumentService {\n private valtimoEndpointUri: string;\n\n constructor(private http: HttpClient, configService: ConfigService) {\n this.valtimoEndpointUri = configService.config.valtimoApi.endpointUri;\n }\n\n // Document-calls\n public getAllDefinitions(): Observable<DocumentDefinitions> {\n return this.http.get<DocumentDefinitions>(`${this.valtimoEndpointUri}document-definition`);\n }\n\n queryDefinitions(params?: any): Observable<Page<DocumentDefinition>> {\n return this.http.get<Page<DocumentDefinition>>(`${this.valtimoEndpointUri}document-definition`, {params: params});\n }\n\n getDocumentDefinition(documentDefinitionName: string): Observable<DocumentDefinition> {\n return this.http.get<DocumentDefinition>(`${this.valtimoEndpointUri}document-definition/${documentDefinitionName}`);\n }\n\n getDocuments(documentSearchRequest: DocumentSearchRequest): Observable<Documents> {\n return this.http.post<Documents>(`${this.valtimoEndpointUri}document-search`,\n documentSearchRequest.asHttpBody(), {params: documentSearchRequest.asHttpParams()});\n }\n\n getDocument(documentId: string): Observable<Document> {\n return this.http.get<Document>(`${this.valtimoEndpointUri}document/${documentId}`);\n }\n\n modifyDocument(document: any): Observable<DocumentResult> {\n return this.http.put<DocumentResult>(`${this.valtimoEndpointUri}document`, document);\n }\n\n // ProcessDocument-calls\n getProcessDocumentDefinitions(): Observable<ProcessDocumentDefinition> {\n return this.http.get<ProcessDocumentDefinition>(`${this.valtimoEndpointUri}process-document/definition`);\n }\n\n findProcessDocumentDefinitions(documentDefinitionName: string): Observable<ProcessDocumentDefinition[]> {\n return this.http.get<ProcessDocumentDefinition[]>(\n `${this.valtimoEndpointUri}process-document/definition/document/${documentDefinitionName}`\n );\n }\n\n findProcessDocumentInstances(documentId: string): Observable<ProcessDocumentInstance[]> {\n return this.http.get<ProcessDocumentInstance[]>(`${this.valtimoEndpointUri}process-document/instance/document/${documentId}`);\n }\n\n newDocumentAndStartProcess(request: NewDocumentAndStartProcessRequestImpl): Observable<NewDocumentAndStartProcessResult> {\n return this.http.post<NewDocumentAndStartProcessResult>(\n `${this.valtimoEndpointUri}process-document/operation/new-document-and-start-process`,\n request\n );\n }\n\n modifyDocumentAndCompleteTask(request: ModifyDocumentAndCompleteTaskRequestImpl): Observable<ModifyDocumentAndCompleteTaskResult> {\n return this.http.post<ModifyDocumentAndCompleteTaskResult>(\n `${this.valtimoEndpointUri}process-document/operation/modify-document-and-complete-task`,\n request\n );\n }\n\n modifyDocumentAndStartProcess(request: ModifyDocumentAndStartProcessRequestImpl): Observable<ModifyDocumentAndStartProcessResult> {\n return this.http.post<ModifyDocumentAndStartProcessResult>(\n `${this.valtimoEndpointUri}process-document/operation/modify-document-and-start-process`,\n request\n );\n }\n\n createProcessDocumentDefinition(request: ProcessDocumentDefinitionRequest): Observable<ProcessDocumentDefinition> {\n return this.http.post<ProcessDocumentDefinition>(`${this.valtimoEndpointUri}process-document/definition`, request);\n }\n\n createDocumentDefinition(documentDefinitionCreateRequest: DocumentDefinitionCreateRequest): Observable<void> {\n const options = {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json'\n })\n };\n return this.http.post<void>(`${this.valtimoEndpointUri}document-definition`, documentDefinitionCreateRequest, options);\n }\n\n deleteProcessDocumentDefinition(request: ProcessDocumentDefinitionRequest): Observable<any> {\n const options = {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json'\n }),\n body: request\n };\n return this.http.delete(`${this.valtimoEndpointUri}process-document/definition`, options);\n }\n\n getAuditLog(documentId: string): Observable<Page<AuditRecord>> {\n return this.http.get<Page<AuditRecord>>(`${this.valtimoEndpointUri}process-document/instance/document/${documentId}/audit`);\n }\n\n assignResource(documentId: string, resourceId: string): Observable<void> {\n return this.http.post<void>(`${this.valtimoEndpointUri}document/${documentId}/resource/${resourceId}`, {});\n }\n\n removeResource(documentId: string, resourceId: string): Observable<void> {\n const options = {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json'\n })\n };\n return this.http.delete<void>(`${this.valtimoEndpointUri}document/${documentId}/resource/${resourceId}`, options);\n }\n\n removeDocumentDefinition(name: string): Observable<UndeployDocumentDefinitionResult> {\n return this.http.delete<UndeployDocumentDefinitionResult>(`${this.valtimoEndpointUri}document-definition/${name}`);\n }\n\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\n\n@NgModule()\nexport class DocumentModule {\n\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {HttpParams} from '@angular/common/http';\nimport {SortState} from '@valtimo/contract';\n\nexport interface DocumentSearchRequest {\n definitionName: string;\n page: number;\n size: number;\n sequence?: number;\n createdBy?: string;\n globalSearchFilter?: string;\n sort?: SortState;\n searchCriteria?: Array<{path: string; value: string}>;\n\n asHttpBody(): DocumentSearchRequestHttpBody;\n asHttpParams(): HttpParams;\n setPage(page: number): void;\n getSortString(sort: SortState): string;\n}\n\nexport class DocumentSearchRequestHttpBody {\n documentDefinitionName?: string;\n sequence?: number;\n createdBy?: string;\n globalSearchFilter?: string;\n otherFilters?: Array<{path: string; value: string}>;\n}\n\nexport class DocumentSearchRequestImpl implements DocumentSearchRequest {\n definitionName: string;\n page: number;\n size: number;\n sequence?: number;\n createdBy?: string;\n globalSearchFilter?: string;\n sort?: SortState;\n otherFilters?: Array<{path: string; value: string}>;\n\n constructor(\n definitionName: string,\n page: number,\n size: number,\n sequence?: number,\n createdBy?: string,\n globalSearchFilter?: string,\n sort?: SortState,\n otherFilters?: Array<{path: string; value: string}>\n ) {\n this.definitionName = definitionName;\n this.page = page;\n this.size = size;\n this.sequence = sequence;\n this.createdBy = createdBy;\n this.globalSearchFilter = globalSearchFilter;\n this.sort = sort;\n this.otherFilters = otherFilters;\n }\n\n asHttpBody(): DocumentSearchRequestHttpBody {\n const httpBody = new DocumentSearchRequestHttpBody();\n\n httpBody.documentDefinitionName = this.definitionName;\n\n if (this.sequence) {\n httpBody.sequence = this.sequence;\n }\n if (this.createdBy) {\n httpBody.createdBy = this.createdBy;\n }\n if (this.globalSearchFilter) {\n httpBody.globalSearchFilter = this.globalSearchFilter;\n }\n if (this.otherFilters) {\n httpBody.otherFilters = this.otherFilters;\n }\n\n return httpBody;\n }\n\n asHttpParams(): HttpParams {\n let params = new HttpParams()\n .set('definitionName', this.definitionName)\n .set('page', this.page.toString())\n .set('size', this.size.toString());\n if (this.sort) {\n params = params.set('sort', this.getSortString(this.sort));\n }\n return params;\n }\n\n setPage(page: number): void {\n this.page = page;\n }\n\n getSortString(sort: SortState): string {\n return `${sort.state.name},${sort.state.direction}`;\n }\n}\n"]}
1
+ {"version":3,"sources":["../../../../projects/valtimo/document/src/lib/document.service.ts","../../../../projects/valtimo/document/src/lib/document.module.ts","../../../../projects/valtimo/document/src/lib/document-search-request.ts"],"names":["DocumentService","http","configService","this","valtimoEndpointUri","config","valtimoApi","endpointUri","prototype","getAllDefinitions","get","queryDefinitions","params","getDocumentDefinition","documentDefinitionName","getDocuments","documentSearchRequest","post","asHttpBody","asHttpParams","getDocument","documentId","modifyDocument","document","put","getProcessDocumentDefinitions","findProcessDocumentDefinitions","findProcessDocumentInstances","newDocumentAndStartProcess","request","modifyDocumentAndCompleteTask","modifyDocumentAndStartProcess","createProcessDocumentDefinition","createDocumentDefinition","documentDefinitionCreateRequest","options","headers","HttpHeaders","Content-Type","deleteProcessDocumentDefinition","body","delete","getAuditLog","page","HttpParams","set","toString","assignResource","resourceId","removeResource","removeDocumentDefinition","name","sendMessage","Injectable","args","providedIn","HttpClient","ConfigService","NgModule","DocumentSearchRequestImpl","definitionName","size","sequence","createdBy","globalSearchFilter","sort","otherFilters","httpBody","DocumentSearchRequestHttpBody","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,UAAA6D,cAAA,SAAcJ,GACZ,OAAUA,EAAKM,MAAMpB,KAAI,IAAIc,EAAKM,MAAMC","sourcesContent":["/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Injectable} from '@angular/core';\nimport {HttpClient, HttpHeaders, HttpParams} from '@angular/common/http';\nimport {Observable} from 'rxjs';\nimport {\n AuditRecord,\n Document,\n DocumentDefinition,\n DocumentDefinitions,\n DocumentResult,\n Documents,\n ModifyDocumentAndCompleteTaskRequestImpl,\n ModifyDocumentAndCompleteTaskResult,\n ModifyDocumentAndStartProcessRequestImpl,\n ModifyDocumentAndStartProcessResult,\n NewDocumentAndStartProcessRequestImpl,\n NewDocumentAndStartProcessResult,\n Page,\n ProcessDocumentDefinition,\n ProcessDocumentDefinitionRequest,\n ProcessDocumentInstance,\n DocumentDefinitionCreateRequest,\n UndeployDocumentDefinitionResult,\n DocumentSendMessageRequest\n} from '@valtimo/contract';\nimport {DocumentSearchRequest} from './document-search-request';\nimport {ConfigService} from '@valtimo/config';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class DocumentService {\n private valtimoEndpointUri: string;\n\n constructor(private http: HttpClient, configService: ConfigService) {\n this.valtimoEndpointUri = configService.config.valtimoApi.endpointUri;\n }\n\n // Document-calls\n public getAllDefinitions(): Observable<DocumentDefinitions> {\n return this.http.get<DocumentDefinitions>(`${this.valtimoEndpointUri}document-definition`);\n }\n\n queryDefinitions(params?: any): Observable<Page<DocumentDefinition>> {\n return this.http.get<Page<DocumentDefinition>>(`${this.valtimoEndpointUri}document-definition`, {params: params});\n }\n\n getDocumentDefinition(documentDefinitionName: string): Observable<DocumentDefinition> {\n return this.http.get<DocumentDefinition>(`${this.valtimoEndpointUri}document-definition/${documentDefinitionName}`);\n }\n\n getDocuments(documentSearchRequest: DocumentSearchRequest): Observable<Documents> {\n return this.http.post<Documents>(`${this.valtimoEndpointUri}document-search`,\n documentSearchRequest.asHttpBody(), {params: documentSearchRequest.asHttpParams()});\n }\n\n getDocument(documentId: string): Observable<Document> {\n return this.http.get<Document>(`${this.valtimoEndpointUri}document/${documentId}`);\n }\n\n modifyDocument(document: any): Observable<DocumentResult> {\n return this.http.put<DocumentResult>(`${this.valtimoEndpointUri}document`, document);\n }\n\n // ProcessDocument-calls\n getProcessDocumentDefinitions(): Observable<ProcessDocumentDefinition> {\n return this.http.get<ProcessDocumentDefinition>(`${this.valtimoEndpointUri}process-document/definition`);\n }\n\n findProcessDocumentDefinitions(documentDefinitionName: string): Observable<ProcessDocumentDefinition[]> {\n return this.http.get<ProcessDocumentDefinition[]>(\n `${this.valtimoEndpointUri}process-document/definition/document/${documentDefinitionName}`\n );\n }\n\n findProcessDocumentInstances(documentId: string): Observable<ProcessDocumentInstance[]> {\n return this.http.get<ProcessDocumentInstance[]>(`${this.valtimoEndpointUri}process-document/instance/document/${documentId}`);\n }\n\n newDocumentAndStartProcess(request: NewDocumentAndStartProcessRequestImpl): Observable<NewDocumentAndStartProcessResult> {\n return this.http.post<NewDocumentAndStartProcessResult>(\n `${this.valtimoEndpointUri}process-document/operation/new-document-and-start-process`,\n request\n );\n }\n\n modifyDocumentAndCompleteTask(request: ModifyDocumentAndCompleteTaskRequestImpl): Observable<ModifyDocumentAndCompleteTaskResult> {\n return this.http.post<ModifyDocumentAndCompleteTaskResult>(\n `${this.valtimoEndpointUri}process-document/operation/modify-document-and-complete-task`,\n request\n );\n }\n\n modifyDocumentAndStartProcess(request: ModifyDocumentAndStartProcessRequestImpl): Observable<ModifyDocumentAndStartProcessResult> {\n return this.http.post<ModifyDocumentAndStartProcessResult>(\n `${this.valtimoEndpointUri}process-document/operation/modify-document-and-start-process`,\n request\n );\n }\n\n createProcessDocumentDefinition(request: ProcessDocumentDefinitionRequest): Observable<ProcessDocumentDefinition> {\n return this.http.post<ProcessDocumentDefinition>(`${this.valtimoEndpointUri}process-document/definition`, request);\n }\n\n createDocumentDefinition(documentDefinitionCreateRequest: DocumentDefinitionCreateRequest): Observable<void> {\n const options = {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json'\n })\n };\n return this.http.post<void>(`${this.valtimoEndpointUri}document-definition`, documentDefinitionCreateRequest, options);\n }\n\n deleteProcessDocumentDefinition(request: ProcessDocumentDefinitionRequest): Observable<any> {\n const options = {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json'\n }),\n body: request\n };\n return this.http.delete(`${this.valtimoEndpointUri}process-document/definition`, options);\n }\n\n getAuditLog(documentId: string, page: number = 0): Observable<Page<AuditRecord>> {\n let params = new HttpParams();\n params = params.set('page', page.toString());\n return this.http.get<Page<AuditRecord>>(`${this.valtimoEndpointUri}process-document/instance/document/${documentId}/audit`,\n {params}\n );\n }\n\n assignResource(documentId: string, resourceId: string): Observable<void> {\n return this.http.post<void>(`${this.valtimoEndpointUri}document/${documentId}/resource/${resourceId}`, {});\n }\n\n removeResource(documentId: string, resourceId: string): Observable<void> {\n const options = {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json'\n })\n };\n return this.http.delete<void>(`${this.valtimoEndpointUri}document/${documentId}/resource/${resourceId}`, options);\n }\n\n removeDocumentDefinition(name: string): Observable<UndeployDocumentDefinitionResult> {\n return this.http.delete<UndeployDocumentDefinitionResult>(`${this.valtimoEndpointUri}document-definition/${name}`);\n }\n\n sendMessage(documentId: string, request: DocumentSendMessageRequest): Observable<any> {\n return this.http.post(`${this.valtimoEndpointUri}document/${documentId}/message`, request);\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\n\n@NgModule()\nexport class DocumentModule {\n\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {HttpParams} from '@angular/common/http';\nimport {SortState} from '@valtimo/contract';\n\nexport interface DocumentSearchRequest {\n definitionName: string;\n page: number;\n size: number;\n sequence?: number;\n createdBy?: string;\n globalSearchFilter?: string;\n sort?: SortState;\n searchCriteria?: Array<{path: string; value: string}>;\n\n asHttpBody(): DocumentSearchRequestHttpBody;\n asHttpParams(): HttpParams;\n setPage(page: number): void;\n getSortString(sort: SortState): string;\n}\n\nexport class DocumentSearchRequestHttpBody {\n documentDefinitionName?: string;\n sequence?: number;\n createdBy?: string;\n globalSearchFilter?: string;\n otherFilters?: Array<{path: string; value: string}>;\n}\n\nexport class DocumentSearchRequestImpl implements DocumentSearchRequest {\n definitionName: string;\n page: number;\n size: number;\n sequence?: number;\n createdBy?: string;\n globalSearchFilter?: string;\n sort?: SortState;\n otherFilters?: Array<{path: string; value: string}>;\n\n constructor(\n definitionName: string,\n page: number,\n size: number,\n sequence?: number,\n createdBy?: string,\n globalSearchFilter?: string,\n sort?: SortState,\n otherFilters?: Array<{path: string; value: string}>\n ) {\n this.definitionName = definitionName;\n this.page = page;\n this.size = size;\n this.sequence = sequence;\n this.createdBy = createdBy;\n this.globalSearchFilter = globalSearchFilter;\n this.sort = sort;\n this.otherFilters = otherFilters;\n }\n\n asHttpBody(): DocumentSearchRequestHttpBody {\n const httpBody = new DocumentSearchRequestHttpBody();\n\n httpBody.documentDefinitionName = this.definitionName;\n\n if (this.sequence) {\n httpBody.sequence = this.sequence;\n }\n if (this.createdBy) {\n httpBody.createdBy = this.createdBy;\n }\n if (this.globalSearchFilter) {\n httpBody.globalSearchFilter = this.globalSearchFilter;\n }\n if (this.otherFilters) {\n httpBody.otherFilters = this.otherFilters;\n }\n\n return httpBody;\n }\n\n asHttpParams(): HttpParams {\n let params = new HttpParams()\n .set('definitionName', this.definitionName)\n .set('page', this.page.toString())\n .set('size', this.size.toString());\n if (this.sort) {\n params = params.set('sort', this.getSortString(this.sort));\n }\n return params;\n }\n\n setPage(page: number): void {\n this.page = page;\n }\n\n getSortString(sort: SortState): string {\n return `${sort.state.name},${sort.state.direction}`;\n }\n}\n"]}
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import { Injectable } from '@angular/core';
17
- import { HttpClient, HttpHeaders } from '@angular/common/http';
17
+ import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
18
18
  import { ConfigService } from '@valtimo/config';
19
19
  import * as i0 from "@angular/core";
20
20
  import * as i1 from "@angular/common/http";
@@ -82,8 +82,10 @@ export class DocumentService {
82
82
  };
83
83
  return this.http.delete(`${this.valtimoEndpointUri}process-document/definition`, options);
84
84
  }
85
- getAuditLog(documentId) {
86
- return this.http.get(`${this.valtimoEndpointUri}process-document/instance/document/${documentId}/audit`);
85
+ getAuditLog(documentId, page = 0) {
86
+ let params = new HttpParams();
87
+ params = params.set('page', page.toString());
88
+ return this.http.get(`${this.valtimoEndpointUri}process-document/instance/document/${documentId}/audit`, { params });
87
89
  }
88
90
  assignResource(documentId, resourceId) {
89
91
  return this.http.post(`${this.valtimoEndpointUri}document/${documentId}/resource/${resourceId}`, {});
@@ -99,6 +101,9 @@ export class DocumentService {
99
101
  removeDocumentDefinition(name) {
100
102
  return this.http.delete(`${this.valtimoEndpointUri}document-definition/${name}`);
101
103
  }
104
+ sendMessage(documentId, request) {
105
+ return this.http.post(`${this.valtimoEndpointUri}document/${documentId}/message`, request);
106
+ }
102
107
  }
103
108
  DocumentService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DocumentService_Factory() { return new DocumentService(i0.ɵɵinject(i1.HttpClient), i0.ɵɵinject(i2.ConfigService)); }, token: DocumentService, providedIn: "root" });
104
109
  DocumentService.decorators = [
@@ -110,4 +115,4 @@ DocumentService.ctorParameters = () => [
110
115
  { type: HttpClient },
111
116
  { type: ConfigService }
112
117
  ];
113
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZG9jdW1lbnQuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3ZhbHRpbW8vZG9jdW1lbnQvc3JjL2xpYi9kb2N1bWVudC5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7OztHQWNHO0FBRUgsT0FBTyxFQUFDLFVBQVUsRUFBQyxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLEVBQUMsVUFBVSxFQUFFLFdBQVcsRUFBQyxNQUFNLHNCQUFzQixDQUFDO0FBdUI3RCxPQUFPLEVBQUMsYUFBYSxFQUFDLE1BQU0saUJBQWlCLENBQUM7Ozs7QUFLOUMsTUFBTSxPQUFPLGVBQWU7SUFHMUIsWUFBb0IsSUFBZ0IsRUFBRSxhQUE0QjtRQUE5QyxTQUFJLEdBQUosSUFBSSxDQUFZO1FBQ2xDLElBQUksQ0FBQyxrQkFBa0IsR0FBRyxhQUFhLENBQUMsTUFBTSxDQUFDLFVBQV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k7XG4gIH1cbn1cbiJdfQ==
@@ -1,5 +1,5 @@
1
1
  import { ɵɵdefineInjectable, ɵɵinject, Injectable, NgModule } from '@angular/core';
2
- import { HttpHeaders, HttpClient, HttpParams } from '@angular/common/http';
2
+ import { HttpHeaders, HttpParams, HttpClient } from '@angular/common/http';
3
3
  import { ConfigService } from '@valtimo/config';
4
4
 
5
5
  /*
@@ -80,8 +80,10 @@ class DocumentService {
80
80
  };
81
81
  return this.http.delete(`${this.valtimoEndpointUri}process-document/definition`, options);
82
82
  }
83
- getAuditLog(documentId) {
84
- return this.http.get(`${this.valtimoEndpointUri}process-document/instance/document/${documentId}/audit`);
83
+ getAuditLog(documentId, page = 0) {
84
+ let params = new HttpParams();
85
+ params = params.set('page', page.toString());
86
+ return this.http.get(`${this.valtimoEndpointUri}process-document/instance/document/${documentId}/audit`, { params });
85
87
  }
86
88
  assignResource(documentId, resourceId) {
87
89
  return this.http.post(`${this.valtimoEndpointUri}document/${documentId}/resource/${resourceId}`, {});
@@ -97,6 +99,9 @@ class DocumentService {
97
99
  removeDocumentDefinition(name) {
98
100
  return this.http.delete(`${this.valtimoEndpointUri}document-definition/${name}`);
99
101
  }
102
+ sendMessage(documentId, request) {
103
+ return this.http.post(`${this.valtimoEndpointUri}document/${documentId}/message`, request);
104
+ }
100
105
  }
101
106
  DocumentService.ɵprov = ɵɵdefineInjectable({ factory: function DocumentService_Factory() { return new DocumentService(ɵɵinject(HttpClient), ɵɵinject(ConfigService)); }, token: DocumentService, providedIn: "root" });
102
107
  DocumentService.decorators = [
@@ -1 +1 @@
1
- {"version":3,"file":"valtimo-document.js","sources":["../../../../projects/valtimo/document/src/lib/document.service.ts","../../../../projects/valtimo/document/src/lib/document.module.ts","../../../../projects/valtimo/document/src/lib/document-search-request.ts","../../../../projects/valtimo/document/src/public_api.ts","../../../../projects/valtimo/document/src/valtimo-document.ts"],"sourcesContent":["/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Injectable} from '@angular/core';\nimport {HttpClient, HttpHeaders} from '@angular/common/http';\nimport {Observable} from 'rxjs';\nimport {\n AuditRecord,\n Document,\n DocumentDefinition,\n DocumentDefinitions,\n DocumentResult,\n Documents,\n ModifyDocumentAndCompleteTaskRequestImpl,\n ModifyDocumentAndCompleteTaskResult,\n ModifyDocumentAndStartProcessRequestImpl,\n ModifyDocumentAndStartProcessResult,\n NewDocumentAndStartProcessRequestImpl,\n NewDocumentAndStartProcessResult,\n Page,\n ProcessDocumentDefinition,\n ProcessDocumentDefinitionRequest,\n ProcessDocumentInstance,\n DocumentDefinitionCreateRequest,\n UndeployDocumentDefinitionResult\n} from '@valtimo/contract';\nimport {DocumentSearchRequest} from './document-search-request';\nimport {ConfigService} from '@valtimo/config';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class DocumentService {\n private valtimoEndpointUri: string;\n\n constructor(private http: HttpClient, configService: ConfigService) {\n this.valtimoEndpointUri = configService.config.valtimoApi.endpointUri;\n }\n\n // Document-calls\n public getAllDefinitions(): Observable<DocumentDefinitions> {\n return this.http.get<DocumentDefinitions>(`${this.valtimoEndpointUri}document-definition`);\n }\n\n queryDefinitions(params?: any): Observable<Page<DocumentDefinition>> {\n return this.http.get<Page<DocumentDefinition>>(`${this.valtimoEndpointUri}document-definition`, {params: params});\n }\n\n getDocumentDefinition(documentDefinitionName: string): Observable<DocumentDefinition> {\n return this.http.get<DocumentDefinition>(`${this.valtimoEndpointUri}document-definition/${documentDefinitionName}`);\n }\n\n getDocuments(documentSearchRequest: DocumentSearchRequest): Observable<Documents> {\n return this.http.post<Documents>(`${this.valtimoEndpointUri}document-search`,\n documentSearchRequest.asHttpBody(), {params: documentSearchRequest.asHttpParams()});\n }\n\n getDocument(documentId: string): Observable<Document> {\n return this.http.get<Document>(`${this.valtimoEndpointUri}document/${documentId}`);\n }\n\n modifyDocument(document: any): Observable<DocumentResult> {\n return this.http.put<DocumentResult>(`${this.valtimoEndpointUri}document`, document);\n }\n\n // ProcessDocument-calls\n getProcessDocumentDefinitions(): Observable<ProcessDocumentDefinition> {\n return this.http.get<ProcessDocumentDefinition>(`${this.valtimoEndpointUri}process-document/definition`);\n }\n\n findProcessDocumentDefinitions(documentDefinitionName: string): Observable<ProcessDocumentDefinition[]> {\n return this.http.get<ProcessDocumentDefinition[]>(\n `${this.valtimoEndpointUri}process-document/definition/document/${documentDefinitionName}`\n );\n }\n\n findProcessDocumentInstances(documentId: string): Observable<ProcessDocumentInstance[]> {\n return this.http.get<ProcessDocumentInstance[]>(`${this.valtimoEndpointUri}process-document/instance/document/${documentId}`);\n }\n\n newDocumentAndStartProcess(request: NewDocumentAndStartProcessRequestImpl): Observable<NewDocumentAndStartProcessResult> {\n return this.http.post<NewDocumentAndStartProcessResult>(\n `${this.valtimoEndpointUri}process-document/operation/new-document-and-start-process`,\n request\n );\n }\n\n modifyDocumentAndCompleteTask(request: ModifyDocumentAndCompleteTaskRequestImpl): Observable<ModifyDocumentAndCompleteTaskResult> {\n return this.http.post<ModifyDocumentAndCompleteTaskResult>(\n `${this.valtimoEndpointUri}process-document/operation/modify-document-and-complete-task`,\n request\n );\n }\n\n modifyDocumentAndStartProcess(request: ModifyDocumentAndStartProcessRequestImpl): Observable<ModifyDocumentAndStartProcessResult> {\n return this.http.post<ModifyDocumentAndStartProcessResult>(\n `${this.valtimoEndpointUri}process-document/operation/modify-document-and-start-process`,\n request\n );\n }\n\n createProcessDocumentDefinition(request: ProcessDocumentDefinitionRequest): Observable<ProcessDocumentDefinition> {\n return this.http.post<ProcessDocumentDefinition>(`${this.valtimoEndpointUri}process-document/definition`, request);\n }\n\n createDocumentDefinition(documentDefinitionCreateRequest: DocumentDefinitionCreateRequest): Observable<void> {\n const options = {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json'\n })\n };\n return this.http.post<void>(`${this.valtimoEndpointUri}document-definition`, documentDefinitionCreateRequest, options);\n }\n\n deleteProcessDocumentDefinition(request: ProcessDocumentDefinitionRequest): Observable<any> {\n const options = {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json'\n }),\n body: request\n };\n return this.http.delete(`${this.valtimoEndpointUri}process-document/definition`, options);\n }\n\n getAuditLog(documentId: string): Observable<Page<AuditRecord>> {\n return this.http.get<Page<AuditRecord>>(`${this.valtimoEndpointUri}process-document/instance/document/${documentId}/audit`);\n }\n\n assignResource(documentId: string, resourceId: string): Observable<void> {\n return this.http.post<void>(`${this.valtimoEndpointUri}document/${documentId}/resource/${resourceId}`, {});\n }\n\n removeResource(documentId: string, resourceId: string): Observable<void> {\n const options = {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json'\n })\n };\n return this.http.delete<void>(`${this.valtimoEndpointUri}document/${documentId}/resource/${resourceId}`, options);\n }\n\n removeDocumentDefinition(name: string): Observable<UndeployDocumentDefinitionResult> {\n return this.http.delete<UndeployDocumentDefinitionResult>(`${this.valtimoEndpointUri}document-definition/${name}`);\n }\n\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\n\n@NgModule()\nexport class DocumentModule {\n\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {HttpParams} from '@angular/common/http';\nimport {SortState} from '@valtimo/contract';\n\nexport interface DocumentSearchRequest {\n definitionName: string;\n page: number;\n size: number;\n sequence?: number;\n createdBy?: string;\n globalSearchFilter?: string;\n sort?: SortState;\n searchCriteria?: Array<{path: string; value: string}>;\n\n asHttpBody(): DocumentSearchRequestHttpBody;\n asHttpParams(): HttpParams;\n setPage(page: number): void;\n getSortString(sort: SortState): string;\n}\n\nexport class DocumentSearchRequestHttpBody {\n documentDefinitionName?: string;\n sequence?: number;\n createdBy?: string;\n globalSearchFilter?: string;\n otherFilters?: Array<{path: string; value: string}>;\n}\n\nexport class DocumentSearchRequestImpl implements DocumentSearchRequest {\n definitionName: string;\n page: number;\n size: number;\n sequence?: number;\n createdBy?: string;\n globalSearchFilter?: string;\n sort?: SortState;\n otherFilters?: Array<{path: string; value: string}>;\n\n constructor(\n definitionName: string,\n page: number,\n size: number,\n sequence?: number,\n createdBy?: string,\n globalSearchFilter?: string,\n sort?: SortState,\n otherFilters?: Array<{path: string; value: string}>\n ) {\n this.definitionName = definitionName;\n this.page = page;\n this.size = size;\n this.sequence = sequence;\n this.createdBy = createdBy;\n this.globalSearchFilter = globalSearchFilter;\n this.sort = sort;\n this.otherFilters = otherFilters;\n }\n\n asHttpBody(): DocumentSearchRequestHttpBody {\n const httpBody = new DocumentSearchRequestHttpBody();\n\n httpBody.documentDefinitionName = this.definitionName;\n\n if (this.sequence) {\n httpBody.sequence = this.sequence;\n }\n if (this.createdBy) {\n httpBody.createdBy = this.createdBy;\n }\n if (this.globalSearchFilter) {\n httpBody.globalSearchFilter = this.globalSearchFilter;\n }\n if (this.otherFilters) {\n httpBody.otherFilters = this.otherFilters;\n }\n\n return httpBody;\n }\n\n asHttpParams(): HttpParams {\n let params = new HttpParams()\n .set('definitionName', this.definitionName)\n .set('page', this.page.toString())\n .set('size', this.size.toString());\n if (this.sort) {\n params = params.set('sort', this.getSortString(this.sort));\n }\n return params;\n }\n\n setPage(page: number): void {\n this.page = page;\n }\n\n getSortString(sort: SortState): string {\n return `${sort.state.name},${sort.state.direction}`;\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Public API Surface of document\n */\nexport * from './lib/document.service';\nexport * from './lib/document.module';\nexport * from './lib/document-search-request';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;;MA6Ca,eAAe;IAG1B,YAAoB,IAAgB,EAAE,aAA4B;QAA9C,SAAI,GAAJ,IAAI,CAAY;QAClC,IAAI,CAAC,kBAAkB,GAAG,aAAa,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC;KACvE;;IAGM,iBAAiB;QACtB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAsB,GAAG,IAAI,CAAC,kBAAkB,qBAAqB,CAAC,CAAC;KAC5F;IAED,gBAAgB,CAAC,MAAY;QAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAA2B,GAAG,IAAI,CAAC,kBAAkB,qBAAqB,EAAE,EAAC,MAAM,EAAE,MAAM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I,CAAC,QAAQ,EAAE;YACjB,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;SACnC;QACD,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,QAAQ,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC;SACrC;QACD,IAAI,IAAI,CAAC,kBAAkB,EAAE;YAC3B,QAAQ,CAAC,kBAAkB,GAAG,IAAI,CAAC,kBAAkB,CAAC;SACvD;QACD,IAAI,IAAI,CAAC,YAAY,EAAE;YACrB,QAAQ,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;SAC3C;QAED,OAAO,QAAQ,CAAC;KACjB;IAED,YAAY;QACV,IAAI,MAAM,GAAG,IAAI,UAAU,EAAE;aAC1B,GAAG,CAAC,gBAAgB,EAAE,IAAI,CAAC,cAAc,CAAC;aAC1C,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;aACjC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;QACrC,IAAI,IAAI,CAAC,IAAI,EAAE;YACb,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;SAC5D;QACD,OAAO,MAAM,CAAC;KACf;IAED,OAAO,CAAC,IAAY;QAClB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;KAClB;IAED,aAAa,CAAC,IAAe;QAC3B,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC;KACrD;;;AC/GH;;;;;;;;;;;;;;;;ACAA;;;;;;"}
1
+ {"version":3,"file":"valtimo-document.js","sources":["../../../../projects/valtimo/document/src/lib/document.service.ts","../../../../projects/valtimo/document/src/lib/document.module.ts","../../../../projects/valtimo/document/src/lib/document-search-request.ts","../../../../projects/valtimo/document/src/public_api.ts","../../../../projects/valtimo/document/src/valtimo-document.ts"],"sourcesContent":["/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Injectable} from '@angular/core';\nimport {HttpClient, HttpHeaders, HttpParams} from '@angular/common/http';\nimport {Observable} from 'rxjs';\nimport {\n AuditRecord,\n Document,\n DocumentDefinition,\n DocumentDefinitions,\n DocumentResult,\n Documents,\n ModifyDocumentAndCompleteTaskRequestImpl,\n ModifyDocumentAndCompleteTaskResult,\n ModifyDocumentAndStartProcessRequestImpl,\n ModifyDocumentAndStartProcessResult,\n NewDocumentAndStartProcessRequestImpl,\n NewDocumentAndStartProcessResult,\n Page,\n ProcessDocumentDefinition,\n ProcessDocumentDefinitionRequest,\n ProcessDocumentInstance,\n DocumentDefinitionCreateRequest,\n UndeployDocumentDefinitionResult,\n DocumentSendMessageRequest\n} from '@valtimo/contract';\nimport {DocumentSearchRequest} from './document-search-request';\nimport {ConfigService} from '@valtimo/config';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class DocumentService {\n private valtimoEndpointUri: string;\n\n constructor(private http: HttpClient, configService: ConfigService) {\n this.valtimoEndpointUri = configService.config.valtimoApi.endpointUri;\n }\n\n // Document-calls\n public getAllDefinitions(): Observable<DocumentDefinitions> {\n return this.http.get<DocumentDefinitions>(`${this.valtimoEndpointUri}document-definition`);\n }\n\n queryDefinitions(params?: any): Observable<Page<DocumentDefinition>> {\n return this.http.get<Page<DocumentDefinition>>(`${this.valtimoEndpointUri}document-definition`, {params: params});\n }\n\n getDocumentDefinition(documentDefinitionName: string): Observable<DocumentDefinition> {\n return this.http.get<DocumentDefinition>(`${this.valtimoEndpointUri}document-definition/${documentDefinitionName}`);\n }\n\n getDocuments(documentSearchRequest: DocumentSearchRequest): Observable<Documents> {\n return this.http.post<Documents>(`${this.valtimoEndpointUri}document-search`,\n documentSearchRequest.asHttpBody(), {params: documentSearchRequest.asHttpParams()});\n }\n\n getDocument(documentId: string): Observable<Document> {\n return this.http.get<Document>(`${this.valtimoEndpointUri}document/${documentId}`);\n }\n\n modifyDocument(document: any): Observable<DocumentResult> {\n return this.http.put<DocumentResult>(`${this.valtimoEndpointUri}document`, document);\n }\n\n // ProcessDocument-calls\n getProcessDocumentDefinitions(): Observable<ProcessDocumentDefinition> {\n return this.http.get<ProcessDocumentDefinition>(`${this.valtimoEndpointUri}process-document/definition`);\n }\n\n findProcessDocumentDefinitions(documentDefinitionName: string): Observable<ProcessDocumentDefinition[]> {\n return this.http.get<ProcessDocumentDefinition[]>(\n `${this.valtimoEndpointUri}process-document/definition/document/${documentDefinitionName}`\n );\n }\n\n findProcessDocumentInstances(documentId: string): Observable<ProcessDocumentInstance[]> {\n return this.http.get<ProcessDocumentInstance[]>(`${this.valtimoEndpointUri}process-document/instance/document/${documentId}`);\n }\n\n newDocumentAndStartProcess(request: NewDocumentAndStartProcessRequestImpl): Observable<NewDocumentAndStartProcessResult> {\n return this.http.post<NewDocumentAndStartProcessResult>(\n `${this.valtimoEndpointUri}process-document/operation/new-document-and-start-process`,\n request\n );\n }\n\n modifyDocumentAndCompleteTask(request: ModifyDocumentAndCompleteTaskRequestImpl): Observable<ModifyDocumentAndCompleteTaskResult> {\n return this.http.post<ModifyDocumentAndCompleteTaskResult>(\n `${this.valtimoEndpointUri}process-document/operation/modify-document-and-complete-task`,\n request\n );\n }\n\n modifyDocumentAndStartProcess(request: ModifyDocumentAndStartProcessRequestImpl): Observable<ModifyDocumentAndStartProcessResult> {\n return this.http.post<ModifyDocumentAndStartProcessResult>(\n `${this.valtimoEndpointUri}process-document/operation/modify-document-and-start-process`,\n request\n );\n }\n\n createProcessDocumentDefinition(request: ProcessDocumentDefinitionRequest): Observable<ProcessDocumentDefinition> {\n return this.http.post<ProcessDocumentDefinition>(`${this.valtimoEndpointUri}process-document/definition`, request);\n }\n\n createDocumentDefinition(documentDefinitionCreateRequest: DocumentDefinitionCreateRequest): Observable<void> {\n const options = {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json'\n })\n };\n return this.http.post<void>(`${this.valtimoEndpointUri}document-definition`, documentDefinitionCreateRequest, options);\n }\n\n deleteProcessDocumentDefinition(request: ProcessDocumentDefinitionRequest): Observable<any> {\n const options = {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json'\n }),\n body: request\n };\n return this.http.delete(`${this.valtimoEndpointUri}process-document/definition`, options);\n }\n\n getAuditLog(documentId: string, page: number = 0): Observable<Page<AuditRecord>> {\n let params = new HttpParams();\n params = params.set('page', page.toString());\n return this.http.get<Page<AuditRecord>>(`${this.valtimoEndpointUri}process-document/instance/document/${documentId}/audit`,\n {params}\n );\n }\n\n assignResource(documentId: string, resourceId: string): Observable<void> {\n return this.http.post<void>(`${this.valtimoEndpointUri}document/${documentId}/resource/${resourceId}`, {});\n }\n\n removeResource(documentId: string, resourceId: string): Observable<void> {\n const options = {\n headers: new HttpHeaders({\n 'Content-Type': 'application/json'\n })\n };\n return this.http.delete<void>(`${this.valtimoEndpointUri}document/${documentId}/resource/${resourceId}`, options);\n }\n\n removeDocumentDefinition(name: string): Observable<UndeployDocumentDefinitionResult> {\n return this.http.delete<UndeployDocumentDefinitionResult>(`${this.valtimoEndpointUri}document-definition/${name}`);\n }\n\n sendMessage(documentId: string, request: DocumentSendMessageRequest): Observable<any> {\n return this.http.post(`${this.valtimoEndpointUri}document/${documentId}/message`, request);\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\n\n@NgModule()\nexport class DocumentModule {\n\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {HttpParams} from '@angular/common/http';\nimport {SortState} from '@valtimo/contract';\n\nexport interface DocumentSearchRequest {\n definitionName: string;\n page: number;\n size: number;\n sequence?: number;\n createdBy?: string;\n globalSearchFilter?: string;\n sort?: SortState;\n searchCriteria?: Array<{path: string; value: string}>;\n\n asHttpBody(): DocumentSearchRequestHttpBody;\n asHttpParams(): HttpParams;\n setPage(page: number): void;\n getSortString(sort: SortState): string;\n}\n\nexport class DocumentSearchRequestHttpBody {\n documentDefinitionName?: string;\n sequence?: number;\n createdBy?: string;\n globalSearchFilter?: string;\n otherFilters?: Array<{path: string; value: string}>;\n}\n\nexport class DocumentSearchRequestImpl implements DocumentSearchRequest {\n definitionName: string;\n page: number;\n size: number;\n sequence?: number;\n createdBy?: string;\n globalSearchFilter?: string;\n sort?: SortState;\n otherFilters?: Array<{path: string; value: string}>;\n\n constructor(\n definitionName: string,\n page: number,\n size: number,\n sequence?: number,\n createdBy?: string,\n globalSearchFilter?: string,\n sort?: SortState,\n otherFilters?: Array<{path: string; value: string}>\n ) {\n this.definitionName = definitionName;\n this.page = page;\n this.size = size;\n this.sequence = sequence;\n this.createdBy = createdBy;\n this.globalSearchFilter = globalSearchFilter;\n this.sort = sort;\n this.otherFilters = otherFilters;\n }\n\n asHttpBody(): DocumentSearchRequestHttpBody {\n const httpBody = new DocumentSearchRequestHttpBody();\n\n httpBody.documentDefinitionName = this.definitionName;\n\n if (this.sequence) {\n httpBody.sequence = this.sequence;\n }\n if (this.createdBy) {\n httpBody.createdBy = this.createdBy;\n }\n if (this.globalSearchFilter) {\n httpBody.globalSearchFilter = this.globalSearchFilter;\n }\n if (this.otherFilters) {\n httpBody.otherFilters = this.otherFilters;\n }\n\n return httpBody;\n }\n\n asHttpParams(): HttpParams {\n let params = new HttpParams()\n .set('definitionName', this.definitionName)\n .set('page', this.page.toString())\n .set('size', this.size.toString());\n if (this.sort) {\n params = params.set('sort', this.getSortString(this.sort));\n }\n return params;\n }\n\n setPage(page: number): void {\n this.page = page;\n }\n\n getSortString(sort: SortState): string {\n return `${sort.state.name},${sort.state.direction}`;\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Public API Surface of document\n */\nexport * from './lib/document.service';\nexport * from './lib/document.module';\nexport * from './lib/document-search-request';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;;MA8Ca,eAAe;IAG1B,YAAoB,IAAgB,EAAE,aAA4B;QAA9C,SAAI,GAAJ,IAAI,CAAY;QAClC,IAAI,CAAC,kBAAkB,GAAG,aAAa,CAAC,MAA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AAC;aACjC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;QACrC,IAAI,IAAI,CAAC,IAAI,EAAE;YACb,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;SAC5D;QACD,OAAO,MAAM,CAAC;KACf;IAED,OAAO,CAAC,IAAY;QAClB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;KAClB;IAED,aAAa,CAAC,IAAe;QAC3B,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,CAAC;KACrD;;;AC/GH;;;;;;;;;;;;;;;;ACAA;;;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { HttpClient } from '@angular/common/http';
2
2
  import { Observable } from 'rxjs';
3
- import { AuditRecord, Document, DocumentDefinition, DocumentDefinitions, DocumentResult, Documents, ModifyDocumentAndCompleteTaskRequestImpl, ModifyDocumentAndCompleteTaskResult, ModifyDocumentAndStartProcessRequestImpl, ModifyDocumentAndStartProcessResult, NewDocumentAndStartProcessRequestImpl, NewDocumentAndStartProcessResult, Page, ProcessDocumentDefinition, ProcessDocumentDefinitionRequest, ProcessDocumentInstance, DocumentDefinitionCreateRequest, UndeployDocumentDefinitionResult } from '@valtimo/contract';
3
+ import { AuditRecord, Document, DocumentDefinition, DocumentDefinitions, DocumentResult, Documents, ModifyDocumentAndCompleteTaskRequestImpl, ModifyDocumentAndCompleteTaskResult, ModifyDocumentAndStartProcessRequestImpl, ModifyDocumentAndStartProcessResult, NewDocumentAndStartProcessRequestImpl, NewDocumentAndStartProcessResult, Page, ProcessDocumentDefinition, ProcessDocumentDefinitionRequest, ProcessDocumentInstance, DocumentDefinitionCreateRequest, UndeployDocumentDefinitionResult, DocumentSendMessageRequest } from '@valtimo/contract';
4
4
  import { DocumentSearchRequest } from './document-search-request';
5
5
  import { ConfigService } from '@valtimo/config';
6
6
  export declare class DocumentService {
@@ -22,8 +22,9 @@ export declare class DocumentService {
22
22
  createProcessDocumentDefinition(request: ProcessDocumentDefinitionRequest): Observable<ProcessDocumentDefinition>;
23
23
  createDocumentDefinition(documentDefinitionCreateRequest: DocumentDefinitionCreateRequest): Observable<void>;
24
24
  deleteProcessDocumentDefinition(request: ProcessDocumentDefinitionRequest): Observable<any>;
25
- getAuditLog(documentId: string): Observable<Page<AuditRecord>>;
25
+ getAuditLog(documentId: string, page?: number): Observable<Page<AuditRecord>>;
26
26
  assignResource(documentId: string, resourceId: string): Observable<void>;
27
27
  removeResource(documentId: string, resourceId: string): Observable<void>;
28
28
  removeDocumentDefinition(name: string): Observable<UndeployDocumentDefinitionResult>;
29
+ sendMessage(documentId: string, request: DocumentSendMessageRequest): Observable<any>;
29
30
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@valtimo/document",
3
3
  "license": "EUPL-1.2",
4
- "version": "4.15.2-next-main.14",
4
+ "version": "4.15.2-next-main.15",
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^10.0.11",
7
7
  "@angular/core": "^10.0.11"
@@ -1 +1 @@
1
- {"__symbolic":"module","version":4,"metadata":{"DocumentService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":42,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient","line":48,"character":28},{"__symbolic":"reference","module":"@valtimo/config","name":"ConfigService","line":48,"character":55}]}],"getAllDefinitions":[{"__symbolic":"method"}],"queryDefinitions":[{"__symbolic":"method"}],"getDocumentDefinition":[{"__symbolic":"method"}],"getDocuments":[{"__symbolic":"method"}],"getDocument":[{"__symbolic":"method"}],"modifyDocument":[{"__symbolic":"method"}],"getProcessDocumentDefinitions":[{"__symbolic":"method"}],"findProcessDocumentDefinitions":[{"__symbolic":"method"}],"findProcessDocumentInstances":[{"__symbolic":"method"}],"newDocumentAndStartProcess":[{"__symbolic":"method"}],"modifyDocumentAndCompleteTask":[{"__symbolic":"method"}],"modifyDocumentAndStartProcess":[{"__symbolic":"method"}],"createProcessDocumentDefinition":[{"__symbolic":"method"}],"createDocumentDefinition":[{"__symbolic":"method"}],"deleteProcessDocumentDefinition":[{"__symbolic":"method"}],"getAuditLog":[{"__symbolic":"method"}],"assignResource":[{"__symbolic":"method"}],"removeResource":[{"__symbolic":"method"}],"removeDocumentDefinition":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"DocumentModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":18,"character":1}}],"members":{}},"DocumentSearchRequest":{"__symbolic":"interface"},"DocumentSearchRequestHttpBody":{"__symbolic":"class","members":{}},"DocumentSearchRequestImpl":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"@valtimo/contract","name":"SortState","line":60,"character":11},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"error","message":"Expression form not supported","line":61,"character":25,"module":"./lib/document-search-request"}]}]}],"asHttpBody":[{"__symbolic":"method"}],"asHttpParams":[{"__symbolic":"method"}],"setPage":[{"__symbolic":"method"}],"getSortString":[{"__symbolic":"method"}]}}},"origins":{"DocumentService":"./lib/document.service","DocumentModule":"./lib/document.module","DocumentSearchRequest":"./lib/document-search-request","DocumentSearchRequestHttpBody":"./lib/document-search-request","DocumentSearchRequestImpl":"./lib/document-search-request"},"importAs":"@valtimo/document"}
1
+ {"__symbolic":"module","version":4,"metadata":{"DocumentService":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":43,"character":1},"arguments":[{"providedIn":"root"}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient","line":49,"character":28},{"__symbolic":"reference","module":"@valtimo/config","name":"ConfigService","line":49,"character":55}]}],"getAllDefinitions":[{"__symbolic":"method"}],"queryDefinitions":[{"__symbolic":"method"}],"getDocumentDefinition":[{"__symbolic":"method"}],"getDocuments":[{"__symbolic":"method"}],"getDocument":[{"__symbolic":"method"}],"modifyDocument":[{"__symbolic":"method"}],"getProcessDocumentDefinitions":[{"__symbolic":"method"}],"findProcessDocumentDefinitions":[{"__symbolic":"method"}],"findProcessDocumentInstances":[{"__symbolic":"method"}],"newDocumentAndStartProcess":[{"__symbolic":"method"}],"modifyDocumentAndCompleteTask":[{"__symbolic":"method"}],"modifyDocumentAndStartProcess":[{"__symbolic":"method"}],"createProcessDocumentDefinition":[{"__symbolic":"method"}],"createDocumentDefinition":[{"__symbolic":"method"}],"deleteProcessDocumentDefinition":[{"__symbolic":"method"}],"getAuditLog":[{"__symbolic":"method"}],"assignResource":[{"__symbolic":"method"}],"removeResource":[{"__symbolic":"method"}],"removeDocumentDefinition":[{"__symbolic":"method"}],"sendMessage":[{"__symbolic":"method"}]},"statics":{"ɵprov":{}}},"DocumentModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":18,"character":1}}],"members":{}},"DocumentSearchRequest":{"__symbolic":"interface"},"DocumentSearchRequestHttpBody":{"__symbolic":"class","members":{}},"DocumentSearchRequestImpl":{"__symbolic":"class","members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"number"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","name":"string"},{"__symbolic":"reference","module":"@valtimo/contract","name":"SortState","line":60,"character":11},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"error","message":"Expression form not supported","line":61,"character":25,"module":"./lib/document-search-request"}]}]}],"asHttpBody":[{"__symbolic":"method"}],"asHttpParams":[{"__symbolic":"method"}],"setPage":[{"__symbolic":"method"}],"getSortString":[{"__symbolic":"method"}]}}},"origins":{"DocumentService":"./lib/document.service","DocumentModule":"./lib/document.module","DocumentSearchRequest":"./lib/document-search-request","DocumentSearchRequestHttpBody":"./lib/document-search-request","DocumentSearchRequestImpl":"./lib/document-search-request"},"importAs":"@valtimo/document"}