{"version":3,"sources":["webpack:///./node_modules/@abaco/treatment-register-module/src/modules/treatment-register-module/api/PrintApi.ts"],"names":["PrintApi","http","treatmentAPi","this","printTypeId","printForm","post","res","data","printLogId","get","brgId","subject","printableTemplates"],"mappings":"uMAGqBA,G,+BAKjB,WAAYC,EAAkBC,GAAoB,uBAC9CC,KAAKF,KAAOA,EACZE,KAAKD,aAAeA,E,2GAGxB,WAAkBE,EAAqBC,GAAvC,uGACsBF,KAAKF,KAAKK,KAAV,yEAAiFF,GAAeC,GADtH,cACUE,EADV,yBAEWA,EAAIC,MAFf,gD,iJAKA,WAAqBC,GAArB,uGACsBN,KAAKF,KAAKS,IAAV,gFAAuFD,IAD7G,cACUF,EADV,yBAEWA,EAAIC,MAFf,gD,iJAKA,WAAuBG,EAAeC,GAAtC,uGACsBT,KAAKF,KAAKS,IAAV,UAAiBP,KAAKD,aAAtB,wBAAkDS,EAAlD,+BAA8EC,IADpG,cACUL,EADV,yBAEWA,EAAIC,KAAKK,oBAFpB,gD","file":"js/chunk-2d216428.2eaf88b5.js","sourcesContent":["import { PrintableDocumentType, PrintLogResponse, PrintResponse, PrintTypeForm } from '../models/Prints';\nimport { HTTPClient } from '@abaco/web-common/src/HTTP';\n\nexport default class PrintApi {\n\n private http: HTTPClient;\n private treatmentAPi: string;\n\n constructor(http: HTTPClient, treatmentAPi: string) {\n this.http = http;\n this.treatmentAPi = treatmentAPi\n }\n\n async insertPrint(printTypeId: string, printForm: PrintTypeForm): Promise {\n const res = await this.http.post(`/sitiagri-rest-api/api_basic/v1/services/print/scheduled_print/${printTypeId}`, printForm);\n return res.data;\n }\n\n async getDraftPrints(printLogId: number): Promise {\n const res = await this.http.get(`/sitiagri-rest-api/api_basic/v1/services/print/scheduled_print/queued/${printLogId}`);\n return res.data;\n }\n\n async getPrintableDocs(brgId: number, subject: number): Promise {\n const res = await this.http.get(`${this.treatmentAPi}/v1/brgTypes/${brgId}/printableDocuments/${subject}`);\n return res.data.printableTemplates;\n }\n\n}\n"],"sourceRoot":""}