{ "version": 3, "sources": ["src/app/seller/documentacao/documentacao.service.ts"], "sourcesContent": ["import { Injectable } from '@angular/core';\r\nimport { EMPTY } from 'rxjs';\r\n\r\nimport { AccountService } from 'app/account/account.service';\r\nimport { BaseService } from 'app/_services/base.service';\r\nimport { SettingsService } from 'app/_services/settings.service';\r\nimport { environment } from '../../../environments/environment';\r\n\r\ndeclare const isEmpty: any;\r\n\r\n@Injectable({ providedIn: 'root' })\r\nexport class SellerDocumentacaoService extends BaseService {\r\n private _apiSellerUrl: string = `${environment.apiSeller}`;\r\n private _domain: string = '/customers';\r\n\r\n\r\n constructor(private accountService: AccountService, private config: SettingsService) {\r\n super();\r\n }\r\n\r\n public getAll() {\r\n if (isEmpty(this.usuarioLogado)) {\r\n this.accountService.logout();\r\n return EMPTY;\r\n }\r\n\r\n return this.config.executeGet({ baseUrl: this._apiSellerUrl, url: this._domain });\r\n }\r\n\r\n public getDocumentation(buyerHoldingId: number) {\r\n return this.config.executeGet({ baseUrl: this._apiSellerUrl, url: `${this._domain}/${buyerHoldingId}/documentation` });\r\n }\r\n\r\n public updateBuyersLimit(buyerCompanyId: number, subscriptionStatus: number, limit: number) {\r\n const body = { subscriptionStatus, limit };\r\n return this.config.executePut({ baseUrl: this._apiSellerUrl, url: `${this._domain}/${buyerCompanyId}/update-limit`, body });\r\n }\r\n}\r\n"], "mappings": "wFAWA,IAAaA,GAA0B,IAAA,CAAjC,MAAOA,UAAkCC,CAAW,CAKlCC,eAAwCC,OAJpDC,cAAwB,GAAGC,EAAYC,SAAS,GAChDC,QAAkB,aAG1BC,YAAoBN,EAAwCC,EAAuB,CAC/E,MAAK,EADW,KAAAD,eAAAA,EAAwC,KAAAC,OAAAA,CAE5D,CAEOM,QAAM,CACT,OAAIC,QAAQ,KAAKC,aAAa,GAC1B,KAAKT,eAAeU,OAAM,EACnBC,GAGJ,KAAKV,OAAOW,WAAW,CAAEC,QAAS,KAAKX,cAAeY,IAAK,KAAKT,OAAO,CAAE,CACpF,CAEOU,iBAAiBC,EAAsB,CAC1C,OAAO,KAAKf,OAAOW,WAAW,CAAEC,QAAS,KAAKX,cAAeY,IAAK,GAAG,KAAKT,OAAO,IAAIW,CAAc,gBAAgB,CAAE,CACzH,CAEOC,kBAAkBC,EAAwBC,EAA4BC,EAAa,CACtF,IAAMC,EAAO,CAAEF,mBAAAA,EAAoBC,MAAAA,CAAK,EACxC,OAAO,KAAKnB,OAAOqB,WAAW,CAAET,QAAS,KAAKX,cAAeY,IAAK,GAAG,KAAKT,OAAO,IAAIa,CAAc,gBAAiBG,KAAAA,CAAI,CAAE,CAC9H,4CAzBSvB,GAAyByB,EAAAC,CAAA,EAAAD,EAAAE,CAAA,CAAA,CAAA,6BAAzB3B,EAAyB4B,QAAzB5B,EAAyB6B,UAAAC,WADZ,MAAM,CAAA,SACnB9B,CAA0B,GAAA", "names": ["SellerDocumentacaoService", "BaseService", "accountService", "config", "_apiSellerUrl", "environment", "apiSeller", "_domain", "constructor", "getAll", "isEmpty", "usuarioLogado", "logout", "EMPTY", "executeGet", "baseUrl", "url", "getDocumentation", "buyerHoldingId", "updateBuyersLimit", "buyerCompanyId", "subscriptionStatus", "limit", "body", "executePut", "\u0275\u0275inject", "AccountService", "SettingsService", "factory", "\u0275fac", "providedIn"] }