10 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			10 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
import{a as i,r as a,e as n,Z as c,h as d,bp as y,bG as o,bH as p,ba as u,bb as m}from"./bundle.dc1ed9be.js";/**
 | 
						|
 * Invoice Ninja (https://invoiceninja.com).
 | 
						|
 *
 | 
						|
 * @link https://github.com/invoiceninja/invoiceninja source repository
 | 
						|
 *
 | 
						|
 * @copyright Copyright (c) 2022. Invoice Ninja LLC (https://invoiceninja.com)
 | 
						|
 *
 | 
						|
 * @license https://www.elastic.co/licensing/elastic-license
 | 
						|
 */function f(e){return i(["/api/v1/payments",e],()=>a("GET",n("/api/v1/payments/:id?include=client,invoices,paymentables,:include",{id:e.id,include:e.include||""})).then(t=>t.data.data),{enabled:e.enabled??!0,staleTime:1/0})}function v(e){return i(["/api/v1/payments",e],()=>a("GET",n("/api/v1/payments?filter=:filter&per_page=:per_page&status=:status&page=:page&match_transactions=:match_transactions&include=:include",{per_page:e.perPage??"100",page:e.currentPage??"1",status:e.status??"active",filter:e.filter??"",match_transactions:e.matchTransactions??!1,include:e.include||""})).then(t=>t.data.data),{enabled:e.enabled??!0,staleTime:1/0})}function h(){const e=c();return i(d("/api/v1/payments/create"),()=>a("GET",n("/api/v1/payments/create")),{staleTime:1/0,enabled:e("create_payment")})}function g(){const e=y(),t=o(p);return(r,s)=>{u.processing(),a("POST",n("/api/v1/payments/bulk"),{action:s,ids:r}).then(()=>{const l=s==="email"?"emaile":s;u.success(`${l}d_payment`),t&&e.invalidateQueries([t]),m(["payments"])})}}export{g as a,f as b,v as c,h as u};
 |