@go-avro/avro-js 0.0.10-beta.3 → 0.0.10

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.
@@ -302,6 +302,11 @@ declare module '../client/QueryClient' {
302
302
  eventId: string;
303
303
  updates: Partial<_Event>;
304
304
  }>>;
305
+ useImportBillsFromIntuit(): ReturnType<typeof useMutation<{
306
+ msg: string;
307
+ imported: number;
308
+ skipped: number;
309
+ }, StandardError, void>>;
305
310
  useSyncBillToIntuit(): ReturnType<typeof useMutation<{
306
311
  msg: string;
307
312
  }, StandardError, {
@@ -175,6 +175,20 @@ AvroQueryClient.prototype.useSyncBillToIntuit = function () {
175
175
  },
176
176
  });
177
177
  };
178
+ AvroQueryClient.prototype.useImportBillsFromIntuit = function () {
179
+ const queryClient = this.getQueryClient();
180
+ return useMutation({
181
+ mutationFn: async () => {
182
+ return this.post({
183
+ path: `/company/${this.companyId}/intuit/import`,
184
+ });
185
+ },
186
+ onSettled: () => {
187
+ queryClient.invalidateQueries({ queryKey: ['bills', this.companyId] });
188
+ queryClient.invalidateQueries({ queryKey: ['company', 'current'] });
189
+ },
190
+ });
191
+ };
178
192
  AvroQueryClient.prototype.generatePDFFromBackend = function ({ billId }) {
179
193
  return this.get({ path: `/company/${this.companyId}/bill/${billId}/pdf` }).then((response) => {
180
194
  return response;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@go-avro/avro-js",
3
- "version": "0.0.10-beta.3",
3
+ "version": "0.0.10",
4
4
  "description": "JS client for Avro backend integration.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",