@go-avro/avro-js 0.0.87 → 0.0.89
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.
- package/dist/client/hooks/bills.js +3 -0
- package/dist/types/api/Bill.d.ts +2 -0
- package/dist/types/api/LineItem.d.ts +0 -3
- package/dist/types/api/Prepayment.d.ts +2 -0
- package/dist/types/api/ProcessingFeeLineItem.d.ts +2 -6
- package/dist/types/api/Refund.d.ts +13 -0
- package/dist/types/api/Refund.js +1 -0
- package/dist/types/api/ServiceMonth.d.ts +3 -0
- package/dist/types/api/_Event.d.ts +3 -0
- package/dist/types/api.d.ts +1 -0
- package/dist/types/api.js +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
|
@@ -82,6 +82,7 @@ AvroQueryClient.prototype.useCreateBill = function () {
|
|
|
82
82
|
entityKey: 'bills',
|
|
83
83
|
id: result.id,
|
|
84
84
|
fetchPath: `/bill/${result.id}`,
|
|
85
|
+
construct: (d) => new Bill(d),
|
|
85
86
|
});
|
|
86
87
|
},
|
|
87
88
|
onError: (_err, _variables, context) => {
|
|
@@ -131,6 +132,7 @@ AvroQueryClient.prototype.useUpdateBill = function () {
|
|
|
131
132
|
entityKey: 'bills',
|
|
132
133
|
id: billId,
|
|
133
134
|
fetchPath: `/bill/${billId}`,
|
|
135
|
+
construct: (d) => new Bill(d),
|
|
134
136
|
});
|
|
135
137
|
},
|
|
136
138
|
onError: (err, variables, context) => {
|
|
@@ -162,6 +164,7 @@ AvroQueryClient.prototype.useUpdateBillLineItemStatus = function () {
|
|
|
162
164
|
entityKey: 'bills',
|
|
163
165
|
id: billId,
|
|
164
166
|
fetchPath: `/bill/${billId}`,
|
|
167
|
+
construct: (d) => new Bill(d),
|
|
165
168
|
});
|
|
166
169
|
// Item paid state also lives on the underlying events,
|
|
167
170
|
// service months and prepayments
|
package/dist/types/api/Bill.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { BillUser } from '../../types/api/BillUser';
|
|
|
3
3
|
import { CustomLineItem } from '../../types/api/CustomLineItem';
|
|
4
4
|
import { LineItem } from '../../types/api/LineItem';
|
|
5
5
|
import { PaymentType } from '../../types/api/PaymentType';
|
|
6
|
+
import { Refund } from '../../types/api/Refund';
|
|
6
7
|
import { ProcessingFeeLineItem } from '../../types/api/ProcessingFeeLineItem';
|
|
7
8
|
export type BillLineItem = CustomLineItem | ProcessingFeeLineItem;
|
|
8
9
|
export declare const BillStatus: {
|
|
@@ -30,6 +31,7 @@ declare module '../../types/api/Bill' {
|
|
|
30
31
|
intent_created_at: number;
|
|
31
32
|
intent_last_created_at: number;
|
|
32
33
|
payments: BillPayment[];
|
|
34
|
+
refunds: Refund[];
|
|
33
35
|
line_items: LineItem[];
|
|
34
36
|
prepayments: string[];
|
|
35
37
|
months: string[];
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { LineItem } from '../../types/api/LineItem';
|
|
2
|
-
import { PaymentType } from '../../types/api/PaymentType';
|
|
3
2
|
/**
|
|
4
3
|
* A read-only line item populated by the backend when the bill has
|
|
5
4
|
* `pass_on_fees` enabled. Represents the Stripe + Avro processing fees being
|
|
@@ -10,12 +9,9 @@ import { PaymentType } from '../../types/api/PaymentType';
|
|
|
10
9
|
* changes at checkout, and reconciled to the actual collected fees on
|
|
11
10
|
* `payment_intent.succeeded`).
|
|
12
11
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* this value so the merchant knows whether the persisted figure is the card
|
|
16
|
-
* estimate, the ACH estimate, or the actual reconciled amount.
|
|
12
|
+
* The method assumption behind the persisted `cost` is exposed by the
|
|
13
|
+
* payment-context endpoint, not on bill line items.
|
|
17
14
|
*/
|
|
18
15
|
export interface ProcessingFeeLineItem extends LineItem {
|
|
19
16
|
line_item_type: 'PROCESSING_FEE';
|
|
20
|
-
payment_method_assumption: PaymentType | null;
|
|
21
17
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A refund issued against a bill's payment, serialized on the bill
|
|
3
|
+
* payload so invoice surfaces can show refunded amounts without an
|
|
4
|
+
* extra query.
|
|
5
|
+
*/
|
|
6
|
+
export interface Refund {
|
|
7
|
+
id: string;
|
|
8
|
+
amount: number;
|
|
9
|
+
stripe_pi_id: string;
|
|
10
|
+
status: 'created' | 'processing' | 'succeeded' | 'failed' | 'canceled' | 'requires_action' | 'in_transit' | 'deposited';
|
|
11
|
+
time_created: number;
|
|
12
|
+
time_updated: number | null;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { LineItem } from '../../types/api/LineItem';
|
|
2
2
|
export interface ServiceMonth extends LineItem {
|
|
3
3
|
line_item_type: 'SERVICE_MONTH';
|
|
4
|
+
job_id: string | null;
|
|
5
|
+
job_name: string;
|
|
6
|
+
job_address: string;
|
|
4
7
|
bill_id: string | null;
|
|
5
8
|
tasks: string[];
|
|
6
9
|
task_names: string[];
|
package/dist/types/api.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * from '../types/api/Address';
|
|
|
7
7
|
export * from '../types/api/Avro';
|
|
8
8
|
export * from '../types/api/Bill';
|
|
9
9
|
export * from '../types/api/BillPayment';
|
|
10
|
+
export * from '../types/api/Refund';
|
|
10
11
|
export * from '../types/api/BillUser';
|
|
11
12
|
export * from '../types/api/Break';
|
|
12
13
|
export * from '../types/api/CatalogItem';
|
package/dist/types/api.js
CHANGED
|
@@ -4,6 +4,7 @@ export * from '../types/api/Address';
|
|
|
4
4
|
export * from '../types/api/Avro';
|
|
5
5
|
export * from '../types/api/Bill';
|
|
6
6
|
export * from '../types/api/BillPayment';
|
|
7
|
+
export * from '../types/api/Refund';
|
|
7
8
|
export * from '../types/api/BillUser';
|
|
8
9
|
export * from '../types/api/Break';
|
|
9
10
|
export * from '../types/api/CatalogItem';
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const AVRO_JS_VERSION = "0.0.
|
|
1
|
+
export declare const AVRO_JS_VERSION = "0.0.89";
|
package/dist/version.js
CHANGED