weave-typescript 0.4.5 → 0.5.1

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.
@@ -0,0 +1,92 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ import { Discount, PaymentMethod } from "./subscription.pb";
3
+ export declare const protobufPackage = "weaveapi.payment.v1";
4
+ export interface Invoice {
5
+ /** Stripe invoice ID */
6
+ id: string;
7
+ /** Invoice number */
8
+ number: string;
9
+ /** draft, open, paid, void, uncollectible */
10
+ status: string;
11
+ /** Amounts */
12
+ subtotalCents: number;
13
+ taxCents: number;
14
+ totalCents: number;
15
+ amountPaidCents: number;
16
+ amountDueCents: number;
17
+ currency: string;
18
+ /** Dates */
19
+ createdAt: Date | undefined;
20
+ periodStart: Date | undefined;
21
+ periodEnd: Date | undefined;
22
+ dueDate: Date | undefined;
23
+ paidAt: Date | undefined;
24
+ /** Line items */
25
+ lineItems: InvoiceLineItem[];
26
+ /** Payment */
27
+ paymentMethod: PaymentMethod | undefined;
28
+ paymentIntentId: string;
29
+ /** Files */
30
+ pdfUrl: string;
31
+ hostedInvoiceUrl: string;
32
+ /** Discount */
33
+ discount: Discount | undefined;
34
+ /** Tax */
35
+ taxRates: TaxRate[];
36
+ taxId: string;
37
+ /** Metadata */
38
+ metadata: {
39
+ [key: string]: string;
40
+ };
41
+ }
42
+ export interface Invoice_MetadataEntry {
43
+ key: string;
44
+ value: string;
45
+ }
46
+ export interface InvoiceLineItem {
47
+ id: string;
48
+ description: string;
49
+ amountCents: number;
50
+ currency: string;
51
+ quantity: number;
52
+ unitAmountCents: number;
53
+ /** Period for subscription items */
54
+ periodStart: Date | undefined;
55
+ periodEnd: Date | undefined;
56
+ /** Product/Price info */
57
+ productId: string;
58
+ priceId: string;
59
+ /** Proration */
60
+ proration: boolean;
61
+ prorationDetails: string;
62
+ }
63
+ export interface TaxRate {
64
+ id: string;
65
+ displayName: string;
66
+ jurisdiction: string;
67
+ percentage: number;
68
+ inclusive: boolean;
69
+ }
70
+ export declare const Invoice: MessageFns<Invoice>;
71
+ export declare const Invoice_MetadataEntry: MessageFns<Invoice_MetadataEntry>;
72
+ export declare const InvoiceLineItem: MessageFns<InvoiceLineItem>;
73
+ export declare const TaxRate: MessageFns<TaxRate>;
74
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
75
+ export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
76
+ [K in keyof T]?: DeepPartial<T[K]>;
77
+ } : Partial<T>;
78
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
79
+ export type Exact<P, I extends P> = P extends Builtin ? P : P & {
80
+ [K in keyof P]: Exact<P[K], I[K]>;
81
+ } & {
82
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
83
+ };
84
+ export interface MessageFns<T> {
85
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
86
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
87
+ fromJSON(object: any): T;
88
+ toJSON(message: T): unknown;
89
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
90
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
91
+ }
92
+ export {};