{"version":3,"sources":["webpack:///./src/web-api/audit-service.ts"],"names":["AuditService","_ServiceWithSession","_inherits","_super","_createSuper","session","_classCallCheck","call","key","value","category","action","label","successful","auditLogId","auditRecordId","outcome","Category","Action","Label","Value","Successful","Timestamp","Date","toUTCString","this","serviceRequest","method","endpoint","data","isCognitoJson","headers","getValidationHeaders","ServiceWithSession"],"mappings":"s3DACoD,IAI/BA,EAAY,SAAAC,I,qRAAAC,CAAAF,EAAAC,GAAA,I,MAAAE,EAAAC,EAAAJ,GAChC,SAAAA,EAAYK,GAAsB,O,4FAAAC,CAAA,KAAAN,GAAAG,EAAAI,KAAA,KAC3BF,GAmBN,O,EAlBAL,G,EAAA,EAAAQ,IAAA,+BAAAC,MAED,SAA6BC,EAAkBC,EAAgBC,EAAeH,EAAeI,EAAqBC,EAAoBC,GACrI,IAAMC,EAA2C,CAChDC,SAAUP,EACVQ,OAAQP,EACRQ,MAAOP,EACPQ,MAAOX,EACPY,WAAYR,EACZS,WAAW,IAAIC,MAAOC,eAEvB,OAAOC,KAAKC,eAAe,CAC1BC,OAAQ,OACRC,SAAU,iBAAmBd,EAAa,WAAaC,EAAgB,yBACvEc,KAAMb,EACNc,eAAe,EACfC,QAASN,KAAKO,8B,8EAEfhC,EArB+B,C,OAASiC","file":"184.beb682653ed061e4115e.js","sourcesContent":["\r\nimport { ServiceWithSession } from './base-service';\r\nimport type { FormSession } from './form-session';\r\nimport type { GoogleAnalyticsOutcome } from '@cognitoforms/types/server-types/forms/model/google-analytics-outcome';\r\n\r\nexport default class AuditService extends ServiceWithSession {\r\n\tconstructor(session: FormSession) {\r\n\t\tsuper(session);\r\n\t}\r\n\r\n\trecordGoogleAnalyticsOutcome(category: string, action: string, label: string, value: number, successful: boolean, auditLogId: string, auditRecordId: string) {\r\n\t\tconst outcome: Partial = {\r\n\t\t\tCategory: category,\r\n\t\t\tAction: action,\r\n\t\t\tLabel: label,\r\n\t\t\tValue: value,\r\n\t\t\tSuccessful: successful,\r\n\t\t\tTimestamp: new Date().toUTCString()\r\n\t\t};\r\n\t\treturn this.serviceRequest({\r\n\t\t\tmethod: 'POST',\r\n\t\t\tendpoint: 'svc/audit-log/' + auditLogId + '/record/' + auditRecordId + '/google-analytics-goal',\r\n\t\t\tdata: outcome,\r\n\t\t\tisCognitoJson: true,\r\n\t\t\theaders: this.getValidationHeaders()\r\n\t\t});\r\n\t}\r\n}"],"sourceRoot":""}