@go-avro/avro-js 0.0.88 → 0.0.90
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/types/api/Bill.d.ts +2 -0
- package/dist/types/api/Label.d.ts +1 -0
- package/dist/types/api/Label.js +16 -1
- 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
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[];
|
package/dist/types/api/Label.js
CHANGED
|
@@ -1 +1,16 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export const resolveLabels = (labels, ...refGroups) => {
|
|
2
|
+
const seen = new Set();
|
|
3
|
+
const resolved = [];
|
|
4
|
+
for (const refs of refGroups) {
|
|
5
|
+
for (const ref of refs ?? []) {
|
|
6
|
+
if (!ref)
|
|
7
|
+
continue;
|
|
8
|
+
const label = labels?.find((l) => l.id === ref || l.name === ref);
|
|
9
|
+
if (label && !seen.has(label.id)) {
|
|
10
|
+
seen.add(label.id);
|
|
11
|
+
resolved.push(label);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return resolved;
|
|
16
|
+
};
|
|
@@ -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.90";
|
package/dist/version.js
CHANGED