{"version":3,"sources":["webpack:///./node_modules/@abaco/timesheet-module/src/modules/timesheet-module/api/PrintApi.ts"],"names":["PrintApi","http","treatmentAPi","this","printTypeId","printForm","post","res","data","printLogId","get","brgId","printableTemplates"],"mappings":"yMAGqBA,G,+BAIjB,WAAYC,EAAkBC,GAAoB,uBAC9CC,KAAKF,KAAOA,EACZE,KAAKD,aAAeA,E,2GAGxB,WAAkBE,EAAqBC,GAAvC,uGACsBF,KAAKF,KAAKK,KAAV,yEACoDF,GAClEC,GAHR,cACUE,EADV,yBAKWA,EAAIC,MALf,gD,iJAQA,WAAqBC,GAArB,uGACsBN,KAAKF,KAAKS,IAAV,gFAC2DD,IAFjF,cACUF,EADV,yBAIWA,EAAIC,MAJf,gD,iJAOA,WAAuBG,GAAvB,uGACsBR,KAAKF,KAAKS,IAAV,UAAiBP,KAAKD,aAAtB,wBAAkDS,EAAlD,wBADtB,cACUJ,EADV,yBAEWA,EAAIC,KAAKI,oBAFpB,gD","file":"js/chunk-2d0aa7c5.66e7d2f5.js","sourcesContent":["import { PrintableDocumentType, PrintLogResponse, PrintResponse, PrintTypeForm } from \"../models/Prints\";\nimport { HTTPClient } from \"@abaco/web-common/src/HTTP\";\n\nexport default class PrintApi {\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(\n `/sitiagri-rest-api/api_basic/v1/services/print/scheduled_print/${printTypeId}`,\n printForm\n );\n return res.data;\n }\n\n async getDraftPrints(printLogId: number): Promise {\n const res = await this.http.get(\n `/sitiagri-rest-api/api_basic/v1/services/print/scheduled_print/queued/${printLogId}`\n );\n return res.data;\n }\n\n async getPrintableDocs(brgId: number): Promise {\n const res = await this.http.get(`${this.treatmentAPi}/v1/brgTypes/${brgId}/printableDocuments`);\n return res.data.printableTemplates;\n }\n}\n// \"params\":[{\"param_name\":\"SUBJECT_ID\",\"param_val\":529769},{\"param_name\":\"BRG_ID\",\"param_val\":2002},{\"param_name\":\"USER_ID\",\"param_val\":\"ADMIN\"},{\"param_name\":\"CAMPAIGN\",\"param_val\":2023}]}\n\n// https://devs4f.fe.abacogroup.eu/sitiagri-rest-api/api_basic/v1/services/print/scheduled_print/BRG_PRINT_TIMESHEET\n"],"sourceRoot":""}