{"version":3,"sources":["webpack:///./node_modules/@abaco/activities-module/src/modules/activities-module/api/PrintApi.ts"],"names":["PrintApi","http","treatmentAPi","this","rootPath","pk_cuaa","campaign","actionId","print_id","isAction","printForm","url","post","res","data","printLogId","get","records","activityId"],"mappings":"uMAGqBA,G,+BAKjB,WAAYC,EAAkBC,GAAoB,uBAC9CC,KAAKF,KAAOA,EACZE,KAAKC,SAAWF,E,2GAGpB,WAAkBG,EAAiBC,EAAkBC,EAAkBC,EAAkBC,EAAmBC,GAA5G,gGACUC,EAAMF,EAAW,GAAH,OAAMN,KAAKC,SAAX,8BAAyCC,EAAzC,YAAoDC,EAApD,oBAAwEC,EAAxE,mBAA2FC,GAA3F,UAA2GL,KAAKC,SAAhH,8BAA8IC,EAA9I,YAAyJC,EAAzJ,uBAAgLC,EAAhL,mBAAmMC,GAD3N,SAEsBL,KAAKF,KAAKW,KAAKD,EAAKD,GAF1C,cAEUG,EAFV,yBAGWA,EAAIC,MAHf,gD,oJAMA,WAAgBC,GAAhB,uGACsBZ,KAAKF,KAAKe,IAAV,UAAiBb,KAAKC,SAAtB,qDAA2EW,IADjG,cACUF,EADV,yBAEWA,EAAIC,MAFf,gD,iJAKA,WAAuBT,EAAiBC,EAAkBC,GAA1D,uGACsBJ,KAAKF,KAAKe,IAAV,UAAiBb,KAAKC,SAAtB,8BAAoDC,EAApD,YAA+DC,EAA/D,oBAAmFC,EAAnF,4BADtB,cACUM,EADV,yBAEWA,EAAIC,KAAKG,SAFpB,gD,6JAKA,WAA+BZ,EAAiBC,EAAkBY,GAAlE,uGACsBf,KAAKF,KAAKe,IAAV,UAAiBb,KAAKC,SAAtB,8BAAoDC,EAApD,YAA+DC,EAA/D,uBAAsFY,EAAtF,4BADtB,cACUL,EADV,yBAEWA,EAAIC,KAAKG,SAFpB,gD","file":"js/chunk-2d225fc7.f52ce6d1.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 rootPath: string;\n\n constructor(http: HTTPClient, treatmentAPi: string) {\n this.http = http;\n this.rootPath = treatmentAPi\n }\n\n async insertPrint(pk_cuaa: number, campaign: number, actionId: number, print_id: string, isAction: boolean, printForm: PrintTypeForm): Promise {\n const url = isAction ? `${this.rootPath}/v1/plots/subjects/${pk_cuaa}/${campaign}/actions/${actionId}/prints/${print_id}` : `${this.rootPath}/v1/plots/subjects/${pk_cuaa}/${campaign}/activities/${actionId}/prints/${print_id}`;\n const res = await this.http.post(url, printForm);\n return res.data;\n }\n\n async getPrints(printLogId: number): Promise {\n const res = await this.http.get(`${this.rootPath}/v1/services/print/scheduled_print/queued/${printLogId}`);\n return res.data;\n }\n\n async getPrintableDocs(pk_cuaa: number, campaign: number, actionId: number): Promise {\n const res = await this.http.get(`${this.rootPath}/v1/plots/subjects/${pk_cuaa}/${campaign}/actions/${actionId}/dictionary_print_types`);\n return res.data.records;\n }\n\n async getActivityPrintableDocs(pk_cuaa: number, campaign: number, activityId: number): Promise {\n const res = await this.http.get(`${this.rootPath}/v1/plots/subjects/${pk_cuaa}/${campaign}/activities/${activityId}/dictionary_print_types`);\n return res.data.records;\n }\n\n}\n"],"sourceRoot":""}