@go-avro/avro-js 0.0.4-beta.35 → 0.0.4-beta.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -123,6 +123,16 @@ declare module '../client/QueryClient' {
|
|
|
123
123
|
}, total: number, onProgress?: (fraction: number) => void): UseQueryResult<Group[], StandardError>;
|
|
124
124
|
useGetPlans(code: string): UseQueryResult<Plan[], StandardError>;
|
|
125
125
|
useGetCompanies(options?: {}): UseQueryResult<Company[], StandardError>;
|
|
126
|
+
generatePDFFromBackend({ billId }: {
|
|
127
|
+
billId: string;
|
|
128
|
+
}): Promise<Blob>;
|
|
129
|
+
sendBillingEmail(options: {
|
|
130
|
+
billId: string;
|
|
131
|
+
subject?: string;
|
|
132
|
+
recipients?: string[][];
|
|
133
|
+
}): Promise<{
|
|
134
|
+
msg: string;
|
|
135
|
+
}>;
|
|
126
136
|
useGetProposal(proposal_id: string): UseQueryResult<any, StandardError>;
|
|
127
137
|
useGetAnalytics(): UseQueryResult<any, StandardError>;
|
|
128
138
|
useFinanceAnalytics({ periods, cumulative }: {
|
|
@@ -612,4 +622,9 @@ export declare class AvroQueryClient {
|
|
|
612
622
|
offset?: number;
|
|
613
623
|
}, cancelToken?: CancelToken, headers?: Record<string, string>): Promise<any>;
|
|
614
624
|
sendEmail(emailId: string, formData: FormData, progressUpdateCallback?: (loaded: number, total: number) => void): Promise<void>;
|
|
625
|
+
sendBillEmail(billId: string, body?: {
|
|
626
|
+
subject?: string;
|
|
627
|
+
recipients?: string[][];
|
|
628
|
+
base_url?: string;
|
|
629
|
+
}): Promise<void>;
|
|
615
630
|
}
|
|
@@ -516,4 +516,12 @@ export class AvroQueryClient {
|
|
|
516
516
|
throw new StandardError(500, `Failed to send email: ${error}`);
|
|
517
517
|
}
|
|
518
518
|
}
|
|
519
|
+
sendBillEmail(billId, body = {}) {
|
|
520
|
+
try {
|
|
521
|
+
return this.post(`/bill/${billId}/email`, JSON.stringify(body), undefined, { 'Content-Type': 'application/json' });
|
|
522
|
+
}
|
|
523
|
+
catch (error) {
|
|
524
|
+
throw new StandardError(500, `Failed to send bill email: ${error}`);
|
|
525
|
+
}
|
|
526
|
+
}
|
|
519
527
|
}
|
|
@@ -165,3 +165,12 @@ AvroQueryClient.prototype.useSyncBillToIntuit = function () {
|
|
|
165
165
|
},
|
|
166
166
|
});
|
|
167
167
|
};
|
|
168
|
+
AvroQueryClient.prototype.generatePDFFromBackend = function ({ billId }) {
|
|
169
|
+
return this.get(`/company/${this.companyId}/bill/${billId}/pdf`).then((response) => {
|
|
170
|
+
return response;
|
|
171
|
+
});
|
|
172
|
+
};
|
|
173
|
+
AvroQueryClient.prototype.sendBillingEmail = async function ({ subject, billId, recipients, }) {
|
|
174
|
+
const rsp = await this.post(`/bill/${billId}/email`, JSON.stringify({ recipients, subject }), undefined, { "Content-Type": "application/json" });
|
|
175
|
+
return { msg: rsp.msg };
|
|
176
|
+
};
|
package/dist/types/api/Task.d.ts
CHANGED