@hed-hog/billing 0.0.2 → 0.0.285
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/README.md +420 -0
- package/dist/billing-contracts.controller.d.ts +85 -4
- package/dist/billing-contracts.controller.d.ts.map +1 -1
- package/dist/billing-coupons.controller.d.ts +60 -4
- package/dist/billing-coupons.controller.d.ts.map +1 -1
- package/dist/billing-dashboard.controller.d.ts +20 -5
- package/dist/billing-dashboard.controller.d.ts.map +1 -1
- package/dist/billing-entitlements.controller.d.ts +28 -2
- package/dist/billing-entitlements.controller.d.ts.map +1 -1
- package/dist/billing-gateways.controller.d.ts +18 -2
- package/dist/billing-gateways.controller.d.ts.map +1 -1
- package/dist/billing-invoices.controller.d.ts +56 -2
- package/dist/billing-invoices.controller.d.ts.map +1 -1
- package/dist/billing-offers.controller.d.ts +61 -4
- package/dist/billing-offers.controller.d.ts.map +1 -1
- package/dist/billing-orders.controller.d.ts +39 -2
- package/dist/billing-orders.controller.d.ts.map +1 -1
- package/dist/billing-payments.controller.d.ts +16 -1
- package/dist/billing-payments.controller.d.ts.map +1 -1
- package/dist/billing-prices.controller.d.ts +80 -4
- package/dist/billing-prices.controller.d.ts.map +1 -1
- package/dist/billing-products.controller.d.ts +62 -4
- package/dist/billing-products.controller.d.ts.map +1 -1
- package/dist/billing-subscriptions.controller.d.ts +138 -5
- package/dist/billing-subscriptions.controller.d.ts.map +1 -1
- package/dist/billing.service.d.ts +663 -39
- package/dist/billing.service.d.ts.map +1 -1
- package/dist/billing.service.js +135 -16
- package/dist/billing.service.js.map +1 -1
- package/hedhog/data/menu.yaml +1 -1
- package/hedhog/frontend/app/contracts/page.tsx.ejs +68 -64
- package/hedhog/frontend/app/coupons/page.tsx.ejs +81 -77
- package/hedhog/frontend/app/entitlements/page.tsx.ejs +59 -58
- package/hedhog/frontend/app/gateways/page.tsx.ejs +125 -57
- package/hedhog/frontend/app/invoices/page.tsx.ejs +49 -43
- package/hedhog/frontend/app/offers/page.tsx.ejs +68 -64
- package/hedhog/frontend/app/orders/page.tsx.ejs +47 -46
- package/hedhog/frontend/app/page.tsx.ejs +186 -186
- package/hedhog/frontend/app/payments/page.tsx.ejs +51 -45
- package/hedhog/frontend/app/prices/page.tsx.ejs +81 -75
- package/hedhog/frontend/app/products/page.tsx.ejs +79 -73
- package/hedhog/frontend/app/refunds/page.tsx.ejs +50 -44
- package/hedhog/frontend/app/reports/page.tsx.ejs +1 -1
- package/hedhog/frontend/app/seats/page.tsx.ejs +826 -0
- package/hedhog/frontend/app/subscriptions/page.tsx.ejs +95 -90
- package/hedhog/frontend/app/webhooks/page.tsx.ejs +47 -39
- package/hedhog/frontend/messages/en.json +640 -551
- package/hedhog/frontend/messages/pt.json +652 -563
- package/hedhog/table/billing_payment_method.yaml +1 -1
- package/package.json +4 -3
- package/src/billing.service.ts +299 -17
|
@@ -2,7 +2,23 @@ import { BillingService } from './billing.service';
|
|
|
2
2
|
export declare class BillingGatewaysController {
|
|
3
3
|
private readonly billingService;
|
|
4
4
|
constructor(billingService: BillingService);
|
|
5
|
-
list(): Promise<
|
|
6
|
-
|
|
5
|
+
list(): Promise<{
|
|
6
|
+
name: string;
|
|
7
|
+
id: number;
|
|
8
|
+
created_at: Date;
|
|
9
|
+
updated_at: Date;
|
|
10
|
+
slug: string;
|
|
11
|
+
is_active: boolean;
|
|
12
|
+
config_json: string | null;
|
|
13
|
+
}[]>;
|
|
14
|
+
update(slug: string, data: Record<string, unknown>): Promise<{
|
|
15
|
+
name: string;
|
|
16
|
+
id: number;
|
|
17
|
+
created_at: Date;
|
|
18
|
+
updated_at: Date;
|
|
19
|
+
slug: string;
|
|
20
|
+
is_active: boolean;
|
|
21
|
+
config_json: string | null;
|
|
22
|
+
}>;
|
|
7
23
|
}
|
|
8
24
|
//# sourceMappingURL=billing-gateways.controller.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing-gateways.controller.d.ts","sourceRoot":"","sources":["../src/billing-gateways.controller.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,qBAEa,yBAAyB;IACxB,OAAO,CAAC,QAAQ,CAAC,cAAc;gBAAd,cAAc,EAAE,cAAc;IAG3D,IAAI
|
|
1
|
+
{"version":3,"file":"billing-gateways.controller.d.ts","sourceRoot":"","sources":["../src/billing-gateways.controller.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,qBAEa,yBAAyB;IACxB,OAAO,CAAC,QAAQ,CAAC,cAAc;gBAAd,cAAc,EAAE,cAAc;IAG3D,IAAI;;;;;;;;;IAKJ,MAAM,CAAgB,IAAI,EAAE,MAAM,EAAU,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;;;;;CAG1E"}
|
|
@@ -12,7 +12,61 @@ export declare class BillingInvoicesController {
|
|
|
12
12
|
next: number;
|
|
13
13
|
data: any[];
|
|
14
14
|
}>;
|
|
15
|
-
get(id: number): Promise<
|
|
16
|
-
|
|
15
|
+
get(id: number): Promise<{
|
|
16
|
+
billing_invoice_item: {
|
|
17
|
+
id: number;
|
|
18
|
+
description: string;
|
|
19
|
+
created_at: Date;
|
|
20
|
+
quantity: number;
|
|
21
|
+
invoice_id: number;
|
|
22
|
+
unit_amount_cents: number;
|
|
23
|
+
total_amount_cents: number;
|
|
24
|
+
}[];
|
|
25
|
+
billing_payment: {
|
|
26
|
+
currency: string;
|
|
27
|
+
id: number;
|
|
28
|
+
provider: string | null;
|
|
29
|
+
created_at: Date;
|
|
30
|
+
updated_at: Date;
|
|
31
|
+
status: import("@prisma/client").$Enums.billing_payment_status_enum;
|
|
32
|
+
amount_cents: number;
|
|
33
|
+
contact_id: number | null;
|
|
34
|
+
order_id: number | null;
|
|
35
|
+
paid_at: Date | null;
|
|
36
|
+
invoice_id: number | null;
|
|
37
|
+
method_type: import("@prisma/client").$Enums.billing_payment_method_type_enum;
|
|
38
|
+
external_transaction_id: string | null;
|
|
39
|
+
raw_response: string | null;
|
|
40
|
+
}[];
|
|
41
|
+
} & {
|
|
42
|
+
currency: string;
|
|
43
|
+
id: number;
|
|
44
|
+
created_at: Date;
|
|
45
|
+
updated_at: Date;
|
|
46
|
+
status: import("@prisma/client").$Enums.billing_invoice_status_enum;
|
|
47
|
+
contact_id: number | null;
|
|
48
|
+
subscription_id: number | null;
|
|
49
|
+
order_id: number | null;
|
|
50
|
+
invoice_number: string | null;
|
|
51
|
+
subtotal_cents: number;
|
|
52
|
+
total_cents: number;
|
|
53
|
+
due_date: Date | null;
|
|
54
|
+
paid_at: Date | null;
|
|
55
|
+
}>;
|
|
56
|
+
create(data: Record<string, unknown>): Promise<{
|
|
57
|
+
currency: string;
|
|
58
|
+
id: number;
|
|
59
|
+
created_at: Date;
|
|
60
|
+
updated_at: Date;
|
|
61
|
+
status: import("@prisma/client").$Enums.billing_invoice_status_enum;
|
|
62
|
+
contact_id: number | null;
|
|
63
|
+
subscription_id: number | null;
|
|
64
|
+
order_id: number | null;
|
|
65
|
+
invoice_number: string | null;
|
|
66
|
+
subtotal_cents: number;
|
|
67
|
+
total_cents: number;
|
|
68
|
+
due_date: Date | null;
|
|
69
|
+
paid_at: Date | null;
|
|
70
|
+
}>;
|
|
17
71
|
}
|
|
18
72
|
//# sourceMappingURL=billing-invoices.controller.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing-invoices.controller.d.ts","sourceRoot":"","sources":["../src/billing-invoices.controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,aAAa,EAAE,MAAM,yBAAyB,CAAC;AASpE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,qBAEa,yBAAyB;IACxB,OAAO,CAAC,QAAQ,CAAC,cAAc;gBAAd,cAAc,EAAE,cAAc;IAG3D,IAAI,CAAe,gBAAgB,EAAE,aAAa;;;;;;;;;IAKlD,GAAG,CAA4B,EAAE,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"billing-invoices.controller.d.ts","sourceRoot":"","sources":["../src/billing-invoices.controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,aAAa,EAAE,MAAM,yBAAyB,CAAC;AASpE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,qBAEa,yBAAyB;IACxB,OAAO,CAAC,QAAQ,CAAC,cAAc;gBAAd,cAAc,EAAE,cAAc;IAG3D,IAAI,CAAe,gBAAgB,EAAE,aAAa;;;;;;;;;IAKlD,GAAG,CAA4B,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKzC,MAAM,CAAS,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;;;;;;;;;;;CAG7C"}
|
|
@@ -14,9 +14,66 @@ export declare class BillingOffersController {
|
|
|
14
14
|
next: number;
|
|
15
15
|
data: any[];
|
|
16
16
|
}>;
|
|
17
|
-
get(id: number): Promise<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
get(id: number): Promise<{
|
|
18
|
+
billing_offer_price: ({
|
|
19
|
+
billing_price: {
|
|
20
|
+
currency: string;
|
|
21
|
+
name: string;
|
|
22
|
+
id: number;
|
|
23
|
+
created_at: Date;
|
|
24
|
+
updated_at: Date;
|
|
25
|
+
amount_cents: number;
|
|
26
|
+
starts_at: Date | null;
|
|
27
|
+
ends_at: Date | null;
|
|
28
|
+
product_id: number;
|
|
29
|
+
is_active: boolean;
|
|
30
|
+
billing_type: import("@prisma/client").$Enums.billing_price_billing_type_enum;
|
|
31
|
+
interval_unit: import("@prisma/client").$Enums.billing_price_interval_unit_enum | null;
|
|
32
|
+
interval_count: number;
|
|
33
|
+
trial_days: number;
|
|
34
|
+
setup_fee_cents: number;
|
|
35
|
+
};
|
|
36
|
+
} & {
|
|
37
|
+
id: number;
|
|
38
|
+
created_at: Date;
|
|
39
|
+
offer_id: number;
|
|
40
|
+
price_id: number;
|
|
41
|
+
})[];
|
|
42
|
+
} & {
|
|
43
|
+
code: string;
|
|
44
|
+
name: string;
|
|
45
|
+
id: number;
|
|
46
|
+
description: string | null;
|
|
47
|
+
created_at: Date;
|
|
48
|
+
updated_at: Date;
|
|
49
|
+
status: import("@prisma/client").$Enums.billing_offer_status_enum;
|
|
50
|
+
}>;
|
|
51
|
+
create(dto: CreateOfferDto): Promise<{
|
|
52
|
+
code: string;
|
|
53
|
+
name: string;
|
|
54
|
+
id: number;
|
|
55
|
+
description: string | null;
|
|
56
|
+
created_at: Date;
|
|
57
|
+
updated_at: Date;
|
|
58
|
+
status: import("@prisma/client").$Enums.billing_offer_status_enum;
|
|
59
|
+
}>;
|
|
60
|
+
update(id: number, dto: UpdateOfferDto): Promise<{
|
|
61
|
+
code: string;
|
|
62
|
+
name: string;
|
|
63
|
+
id: number;
|
|
64
|
+
description: string | null;
|
|
65
|
+
created_at: Date;
|
|
66
|
+
updated_at: Date;
|
|
67
|
+
status: import("@prisma/client").$Enums.billing_offer_status_enum;
|
|
68
|
+
}>;
|
|
69
|
+
remove(id: number): Promise<{
|
|
70
|
+
code: string;
|
|
71
|
+
name: string;
|
|
72
|
+
id: number;
|
|
73
|
+
description: string | null;
|
|
74
|
+
created_at: Date;
|
|
75
|
+
updated_at: Date;
|
|
76
|
+
status: import("@prisma/client").$Enums.billing_offer_status_enum;
|
|
77
|
+
}>;
|
|
21
78
|
}
|
|
22
79
|
//# sourceMappingURL=billing-offers.controller.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing-offers.controller.d.ts","sourceRoot":"","sources":["../src/billing-offers.controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAWpE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,qBAEa,uBAAuB;IACtB,OAAO,CAAC,QAAQ,CAAC,cAAc;gBAAd,cAAc,EAAE,cAAc;IAG3D,IAAI,CAAe,gBAAgB,EAAE,aAAa;;;;;;;;;IAKlD,GAAG,CAA4B,EAAE,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"billing-offers.controller.d.ts","sourceRoot":"","sources":["../src/billing-offers.controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAWpE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,qBAEa,uBAAuB;IACtB,OAAO,CAAC,QAAQ,CAAC,cAAc;gBAAd,cAAc,EAAE,cAAc;IAG3D,IAAI,CAAe,gBAAgB,EAAE,aAAa;;;;;;;;;IAKlD,GAAG,CAA4B,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKzC,MAAM,CAAS,GAAG,EAAE,cAAc;;;;;;;;;IAKlC,MAAM,CAA4B,EAAE,EAAE,MAAM,EAAU,GAAG,EAAE,cAAc;;;;;;;;;IAKzE,MAAM,CAA4B,EAAE,EAAE,MAAM;;;;;;;;;CAG7C"}
|
|
@@ -13,7 +13,44 @@ export declare class BillingOrdersController {
|
|
|
13
13
|
next: number;
|
|
14
14
|
data: any[];
|
|
15
15
|
}>;
|
|
16
|
-
get(id: number): Promise<
|
|
17
|
-
|
|
16
|
+
get(id: number): Promise<{
|
|
17
|
+
billing_order_item: {
|
|
18
|
+
id: number;
|
|
19
|
+
description: string | null;
|
|
20
|
+
created_at: Date;
|
|
21
|
+
quantity: number;
|
|
22
|
+
order_id: number;
|
|
23
|
+
unit_amount_cents: number;
|
|
24
|
+
total_amount_cents: number;
|
|
25
|
+
price_id: number | null;
|
|
26
|
+
}[];
|
|
27
|
+
} & {
|
|
28
|
+
currency: string;
|
|
29
|
+
id: number;
|
|
30
|
+
created_at: Date;
|
|
31
|
+
updated_at: Date;
|
|
32
|
+
status: import("@prisma/client").$Enums.billing_order_status_enum;
|
|
33
|
+
contact_id: number | null;
|
|
34
|
+
subtotal_cents: number;
|
|
35
|
+
total_cents: number;
|
|
36
|
+
company_contact_id: number | null;
|
|
37
|
+
discount_cents: number;
|
|
38
|
+
source: string | null;
|
|
39
|
+
notes: string | null;
|
|
40
|
+
}>;
|
|
41
|
+
create(dto: CreateOrderDto): Promise<{
|
|
42
|
+
currency: string;
|
|
43
|
+
id: number;
|
|
44
|
+
created_at: Date;
|
|
45
|
+
updated_at: Date;
|
|
46
|
+
status: import("@prisma/client").$Enums.billing_order_status_enum;
|
|
47
|
+
contact_id: number | null;
|
|
48
|
+
subtotal_cents: number;
|
|
49
|
+
total_cents: number;
|
|
50
|
+
company_contact_id: number | null;
|
|
51
|
+
discount_cents: number;
|
|
52
|
+
source: string | null;
|
|
53
|
+
notes: string | null;
|
|
54
|
+
}>;
|
|
18
55
|
}
|
|
19
56
|
//# sourceMappingURL=billing-orders.controller.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing-orders.controller.d.ts","sourceRoot":"","sources":["../src/billing-orders.controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,aAAa,EAAE,MAAM,yBAAyB,CAAC;AASpE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,qBAEa,uBAAuB;IACtB,OAAO,CAAC,QAAQ,CAAC,cAAc;gBAAd,cAAc,EAAE,cAAc;IAG3D,IAAI,CAAe,gBAAgB,EAAE,aAAa;;;;;;;;;IAKlD,GAAG,CAA4B,EAAE,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"billing-orders.controller.d.ts","sourceRoot":"","sources":["../src/billing-orders.controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,aAAa,EAAE,MAAM,yBAAyB,CAAC;AASpE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,qBAEa,uBAAuB;IACtB,OAAO,CAAC,QAAQ,CAAC,cAAc;gBAAd,cAAc,EAAE,cAAc;IAG3D,IAAI,CAAe,gBAAgB,EAAE,aAAa;;;;;;;;;IAKlD,GAAG,CAA4B,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;IAKzC,MAAM,CAAS,GAAG,EAAE,cAAc;;;;;;;;;;;;;;CAGnC"}
|
|
@@ -12,6 +12,21 @@ export declare class BillingPaymentsController {
|
|
|
12
12
|
next: number;
|
|
13
13
|
data: any[];
|
|
14
14
|
}>;
|
|
15
|
-
get(id: number): Promise<
|
|
15
|
+
get(id: number): Promise<{
|
|
16
|
+
currency: string;
|
|
17
|
+
id: number;
|
|
18
|
+
provider: string | null;
|
|
19
|
+
created_at: Date;
|
|
20
|
+
updated_at: Date;
|
|
21
|
+
status: import("@prisma/client").$Enums.billing_payment_status_enum;
|
|
22
|
+
amount_cents: number;
|
|
23
|
+
contact_id: number | null;
|
|
24
|
+
order_id: number | null;
|
|
25
|
+
paid_at: Date | null;
|
|
26
|
+
invoice_id: number | null;
|
|
27
|
+
method_type: import("@prisma/client").$Enums.billing_payment_method_type_enum;
|
|
28
|
+
external_transaction_id: string | null;
|
|
29
|
+
raw_response: string | null;
|
|
30
|
+
}>;
|
|
16
31
|
}
|
|
17
32
|
//# sourceMappingURL=billing-payments.controller.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing-payments.controller.d.ts","sourceRoot":"","sources":["../src/billing-payments.controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAEpE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,qBAEa,yBAAyB;IACxB,OAAO,CAAC,QAAQ,CAAC,cAAc;gBAAd,cAAc,EAAE,cAAc;IAG3D,IAAI,CAAe,gBAAgB,EAAE,aAAa;;;;;;;;;IAKlD,GAAG,CAA4B,EAAE,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"billing-payments.controller.d.ts","sourceRoot":"","sources":["../src/billing-payments.controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAEpE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,qBAEa,yBAAyB;IACxB,OAAO,CAAC,QAAQ,CAAC,cAAc;gBAAd,cAAc,EAAE,cAAc;IAG3D,IAAI,CAAe,gBAAgB,EAAE,aAAa;;;;;;;;;IAKlD,GAAG,CAA4B,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;;CAG1C"}
|
|
@@ -14,9 +14,85 @@ export declare class BillingPricesController {
|
|
|
14
14
|
next: number;
|
|
15
15
|
data: any[];
|
|
16
16
|
}>;
|
|
17
|
-
get(id: number): Promise<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
get(id: number): Promise<{
|
|
18
|
+
billing_product: {
|
|
19
|
+
code: string | null;
|
|
20
|
+
name: string;
|
|
21
|
+
id: number;
|
|
22
|
+
description: string | null;
|
|
23
|
+
created_at: Date;
|
|
24
|
+
updated_at: Date;
|
|
25
|
+
is_active: boolean;
|
|
26
|
+
product_type: import("@prisma/client").$Enums.billing_product_product_type_enum;
|
|
27
|
+
category: string | null;
|
|
28
|
+
};
|
|
29
|
+
} & {
|
|
30
|
+
currency: string;
|
|
31
|
+
name: string;
|
|
32
|
+
id: number;
|
|
33
|
+
created_at: Date;
|
|
34
|
+
updated_at: Date;
|
|
35
|
+
amount_cents: number;
|
|
36
|
+
starts_at: Date | null;
|
|
37
|
+
ends_at: Date | null;
|
|
38
|
+
product_id: number;
|
|
39
|
+
is_active: boolean;
|
|
40
|
+
billing_type: import("@prisma/client").$Enums.billing_price_billing_type_enum;
|
|
41
|
+
interval_unit: import("@prisma/client").$Enums.billing_price_interval_unit_enum | null;
|
|
42
|
+
interval_count: number;
|
|
43
|
+
trial_days: number;
|
|
44
|
+
setup_fee_cents: number;
|
|
45
|
+
}>;
|
|
46
|
+
create(dto: CreatePriceDto): Promise<{
|
|
47
|
+
currency: string;
|
|
48
|
+
name: string;
|
|
49
|
+
id: number;
|
|
50
|
+
created_at: Date;
|
|
51
|
+
updated_at: Date;
|
|
52
|
+
amount_cents: number;
|
|
53
|
+
starts_at: Date | null;
|
|
54
|
+
ends_at: Date | null;
|
|
55
|
+
product_id: number;
|
|
56
|
+
is_active: boolean;
|
|
57
|
+
billing_type: import("@prisma/client").$Enums.billing_price_billing_type_enum;
|
|
58
|
+
interval_unit: import("@prisma/client").$Enums.billing_price_interval_unit_enum | null;
|
|
59
|
+
interval_count: number;
|
|
60
|
+
trial_days: number;
|
|
61
|
+
setup_fee_cents: number;
|
|
62
|
+
}>;
|
|
63
|
+
update(id: number, dto: UpdatePriceDto): Promise<{
|
|
64
|
+
currency: string;
|
|
65
|
+
name: string;
|
|
66
|
+
id: number;
|
|
67
|
+
created_at: Date;
|
|
68
|
+
updated_at: Date;
|
|
69
|
+
amount_cents: number;
|
|
70
|
+
starts_at: Date | null;
|
|
71
|
+
ends_at: Date | null;
|
|
72
|
+
product_id: number;
|
|
73
|
+
is_active: boolean;
|
|
74
|
+
billing_type: import("@prisma/client").$Enums.billing_price_billing_type_enum;
|
|
75
|
+
interval_unit: import("@prisma/client").$Enums.billing_price_interval_unit_enum | null;
|
|
76
|
+
interval_count: number;
|
|
77
|
+
trial_days: number;
|
|
78
|
+
setup_fee_cents: number;
|
|
79
|
+
}>;
|
|
80
|
+
remove(id: number): Promise<{
|
|
81
|
+
currency: string;
|
|
82
|
+
name: string;
|
|
83
|
+
id: number;
|
|
84
|
+
created_at: Date;
|
|
85
|
+
updated_at: Date;
|
|
86
|
+
amount_cents: number;
|
|
87
|
+
starts_at: Date | null;
|
|
88
|
+
ends_at: Date | null;
|
|
89
|
+
product_id: number;
|
|
90
|
+
is_active: boolean;
|
|
91
|
+
billing_type: import("@prisma/client").$Enums.billing_price_billing_type_enum;
|
|
92
|
+
interval_unit: import("@prisma/client").$Enums.billing_price_interval_unit_enum | null;
|
|
93
|
+
interval_count: number;
|
|
94
|
+
trial_days: number;
|
|
95
|
+
setup_fee_cents: number;
|
|
96
|
+
}>;
|
|
21
97
|
}
|
|
22
98
|
//# sourceMappingURL=billing-prices.controller.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing-prices.controller.d.ts","sourceRoot":"","sources":["../src/billing-prices.controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAWpE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,qBAEa,uBAAuB;IACtB,OAAO,CAAC,QAAQ,CAAC,cAAc;gBAAd,cAAc,EAAE,cAAc;IAG3D,IAAI,CAAe,gBAAgB,EAAE,aAAa;;;;;;;;;IAKlD,GAAG,CAA4B,EAAE,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"billing-prices.controller.d.ts","sourceRoot":"","sources":["../src/billing-prices.controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAWpE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,qBAEa,uBAAuB;IACtB,OAAO,CAAC,QAAQ,CAAC,cAAc;gBAAd,cAAc,EAAE,cAAc;IAG3D,IAAI,CAAe,gBAAgB,EAAE,aAAa;;;;;;;;;IAKlD,GAAG,CAA4B,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKzC,MAAM,CAAS,GAAG,EAAE,cAAc;;;;;;;;;;;;;;;;;IAKlC,MAAM,CAA4B,EAAE,EAAE,MAAM,EAAU,GAAG,EAAE,cAAc;;;;;;;;;;;;;;;;;IAKzE,MAAM,CAA4B,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;;;CAG7C"}
|
|
@@ -14,9 +14,67 @@ export declare class BillingProductsController {
|
|
|
14
14
|
next: number;
|
|
15
15
|
data: any[];
|
|
16
16
|
}>;
|
|
17
|
-
get(id: number): Promise<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
get(id: number): Promise<{
|
|
18
|
+
billing_price: {
|
|
19
|
+
currency: string;
|
|
20
|
+
name: string;
|
|
21
|
+
id: number;
|
|
22
|
+
created_at: Date;
|
|
23
|
+
updated_at: Date;
|
|
24
|
+
amount_cents: number;
|
|
25
|
+
starts_at: Date | null;
|
|
26
|
+
ends_at: Date | null;
|
|
27
|
+
product_id: number;
|
|
28
|
+
is_active: boolean;
|
|
29
|
+
billing_type: import("@prisma/client").$Enums.billing_price_billing_type_enum;
|
|
30
|
+
interval_unit: import("@prisma/client").$Enums.billing_price_interval_unit_enum | null;
|
|
31
|
+
interval_count: number;
|
|
32
|
+
trial_days: number;
|
|
33
|
+
setup_fee_cents: number;
|
|
34
|
+
}[];
|
|
35
|
+
} & {
|
|
36
|
+
code: string | null;
|
|
37
|
+
name: string;
|
|
38
|
+
id: number;
|
|
39
|
+
description: string | null;
|
|
40
|
+
created_at: Date;
|
|
41
|
+
updated_at: Date;
|
|
42
|
+
is_active: boolean;
|
|
43
|
+
product_type: import("@prisma/client").$Enums.billing_product_product_type_enum;
|
|
44
|
+
category: string | null;
|
|
45
|
+
}>;
|
|
46
|
+
create(dto: CreateProductDto): Promise<{
|
|
47
|
+
code: string | null;
|
|
48
|
+
name: string;
|
|
49
|
+
id: number;
|
|
50
|
+
description: string | null;
|
|
51
|
+
created_at: Date;
|
|
52
|
+
updated_at: Date;
|
|
53
|
+
is_active: boolean;
|
|
54
|
+
product_type: import("@prisma/client").$Enums.billing_product_product_type_enum;
|
|
55
|
+
category: string | null;
|
|
56
|
+
}>;
|
|
57
|
+
update(id: number, dto: UpdateProductDto): Promise<{
|
|
58
|
+
code: string | null;
|
|
59
|
+
name: string;
|
|
60
|
+
id: number;
|
|
61
|
+
description: string | null;
|
|
62
|
+
created_at: Date;
|
|
63
|
+
updated_at: Date;
|
|
64
|
+
is_active: boolean;
|
|
65
|
+
product_type: import("@prisma/client").$Enums.billing_product_product_type_enum;
|
|
66
|
+
category: string | null;
|
|
67
|
+
}>;
|
|
68
|
+
remove(id: number): Promise<{
|
|
69
|
+
code: string | null;
|
|
70
|
+
name: string;
|
|
71
|
+
id: number;
|
|
72
|
+
description: string | null;
|
|
73
|
+
created_at: Date;
|
|
74
|
+
updated_at: Date;
|
|
75
|
+
is_active: boolean;
|
|
76
|
+
product_type: import("@prisma/client").$Enums.billing_product_product_type_enum;
|
|
77
|
+
category: string | null;
|
|
78
|
+
}>;
|
|
21
79
|
}
|
|
22
80
|
//# sourceMappingURL=billing-products.controller.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing-products.controller.d.ts","sourceRoot":"","sources":["../src/billing-products.controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAWpE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,qBAEa,yBAAyB;IACxB,OAAO,CAAC,QAAQ,CAAC,cAAc;gBAAd,cAAc,EAAE,cAAc;IAG3D,IAAI,CAAe,gBAAgB,EAAE,aAAa;;;;;;;;;IAKlD,GAAG,CAA4B,EAAE,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"billing-products.controller.d.ts","sourceRoot":"","sources":["../src/billing-products.controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAWpE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,qBAEa,yBAAyB;IACxB,OAAO,CAAC,QAAQ,CAAC,cAAc;gBAAd,cAAc,EAAE,cAAc;IAG3D,IAAI,CAAe,gBAAgB,EAAE,aAAa;;;;;;;;;IAKlD,GAAG,CAA4B,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKzC,MAAM,CAAS,GAAG,EAAE,gBAAgB;;;;;;;;;;;IAKpC,MAAM,CAA4B,EAAE,EAAE,MAAM,EAAU,GAAG,EAAE,gBAAgB;;;;;;;;;;;IAK3E,MAAM,CAA4B,EAAE,EAAE,MAAM;;;;;;;;;;;CAG7C"}
|
|
@@ -13,10 +13,143 @@ export declare class BillingSubscriptionsController {
|
|
|
13
13
|
next: number;
|
|
14
14
|
data: any[];
|
|
15
15
|
}>;
|
|
16
|
-
get(id: number): Promise<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
get(id: number): Promise<{
|
|
17
|
+
billing_product: {
|
|
18
|
+
code: string | null;
|
|
19
|
+
name: string;
|
|
20
|
+
id: number;
|
|
21
|
+
description: string | null;
|
|
22
|
+
created_at: Date;
|
|
23
|
+
updated_at: Date;
|
|
24
|
+
is_active: boolean;
|
|
25
|
+
product_type: import("@prisma/client").$Enums.billing_product_product_type_enum;
|
|
26
|
+
category: string | null;
|
|
27
|
+
};
|
|
28
|
+
billing_invoice: {
|
|
29
|
+
currency: string;
|
|
30
|
+
id: number;
|
|
31
|
+
created_at: Date;
|
|
32
|
+
updated_at: Date;
|
|
33
|
+
status: import("@prisma/client").$Enums.billing_invoice_status_enum;
|
|
34
|
+
contact_id: number | null;
|
|
35
|
+
subscription_id: number | null;
|
|
36
|
+
order_id: number | null;
|
|
37
|
+
invoice_number: string | null;
|
|
38
|
+
subtotal_cents: number;
|
|
39
|
+
total_cents: number;
|
|
40
|
+
due_date: Date | null;
|
|
41
|
+
paid_at: Date | null;
|
|
42
|
+
}[];
|
|
43
|
+
billing_price: {
|
|
44
|
+
currency: string;
|
|
45
|
+
name: string;
|
|
46
|
+
id: number;
|
|
47
|
+
created_at: Date;
|
|
48
|
+
updated_at: Date;
|
|
49
|
+
amount_cents: number;
|
|
50
|
+
starts_at: Date | null;
|
|
51
|
+
ends_at: Date | null;
|
|
52
|
+
product_id: number;
|
|
53
|
+
is_active: boolean;
|
|
54
|
+
billing_type: import("@prisma/client").$Enums.billing_price_billing_type_enum;
|
|
55
|
+
interval_unit: import("@prisma/client").$Enums.billing_price_interval_unit_enum | null;
|
|
56
|
+
interval_count: number;
|
|
57
|
+
trial_days: number;
|
|
58
|
+
setup_fee_cents: number;
|
|
59
|
+
};
|
|
60
|
+
billing_subscription_item: {
|
|
61
|
+
id: number;
|
|
62
|
+
created_at: Date;
|
|
63
|
+
updated_at: Date;
|
|
64
|
+
quantity: number;
|
|
65
|
+
subscription_id: number;
|
|
66
|
+
price_id: number;
|
|
67
|
+
is_active: boolean;
|
|
68
|
+
}[];
|
|
69
|
+
} & {
|
|
70
|
+
id: number;
|
|
71
|
+
created_at: Date;
|
|
72
|
+
updated_at: Date;
|
|
73
|
+
status: import("@prisma/client").$Enums.billing_subscription_status_enum;
|
|
74
|
+
contact_id: number | null;
|
|
75
|
+
product_id: number | null;
|
|
76
|
+
price_id: number | null;
|
|
77
|
+
gateway: string | null;
|
|
78
|
+
gateway_subscription_id: string | null;
|
|
79
|
+
started_at: Date | null;
|
|
80
|
+
trial_ends_at: Date | null;
|
|
81
|
+
current_period_start: Date | null;
|
|
82
|
+
current_period_end: Date | null;
|
|
83
|
+
cancel_at_period_end: boolean;
|
|
84
|
+
canceled_at: Date | null;
|
|
85
|
+
}>;
|
|
86
|
+
create(dto: CreateSubscriptionDto): Promise<{
|
|
87
|
+
id: number;
|
|
88
|
+
created_at: Date;
|
|
89
|
+
updated_at: Date;
|
|
90
|
+
status: import("@prisma/client").$Enums.billing_subscription_status_enum;
|
|
91
|
+
contact_id: number | null;
|
|
92
|
+
product_id: number | null;
|
|
93
|
+
price_id: number | null;
|
|
94
|
+
gateway: string | null;
|
|
95
|
+
gateway_subscription_id: string | null;
|
|
96
|
+
started_at: Date | null;
|
|
97
|
+
trial_ends_at: Date | null;
|
|
98
|
+
current_period_start: Date | null;
|
|
99
|
+
current_period_end: Date | null;
|
|
100
|
+
cancel_at_period_end: boolean;
|
|
101
|
+
canceled_at: Date | null;
|
|
102
|
+
}>;
|
|
103
|
+
cancel(id: number): Promise<{
|
|
104
|
+
id: number;
|
|
105
|
+
created_at: Date;
|
|
106
|
+
updated_at: Date;
|
|
107
|
+
status: import("@prisma/client").$Enums.billing_subscription_status_enum;
|
|
108
|
+
contact_id: number | null;
|
|
109
|
+
product_id: number | null;
|
|
110
|
+
price_id: number | null;
|
|
111
|
+
gateway: string | null;
|
|
112
|
+
gateway_subscription_id: string | null;
|
|
113
|
+
started_at: Date | null;
|
|
114
|
+
trial_ends_at: Date | null;
|
|
115
|
+
current_period_start: Date | null;
|
|
116
|
+
current_period_end: Date | null;
|
|
117
|
+
cancel_at_period_end: boolean;
|
|
118
|
+
canceled_at: Date | null;
|
|
119
|
+
}>;
|
|
120
|
+
pause(id: number): Promise<{
|
|
121
|
+
id: number;
|
|
122
|
+
created_at: Date;
|
|
123
|
+
updated_at: Date;
|
|
124
|
+
status: import("@prisma/client").$Enums.billing_subscription_status_enum;
|
|
125
|
+
contact_id: number | null;
|
|
126
|
+
product_id: number | null;
|
|
127
|
+
price_id: number | null;
|
|
128
|
+
gateway: string | null;
|
|
129
|
+
gateway_subscription_id: string | null;
|
|
130
|
+
started_at: Date | null;
|
|
131
|
+
trial_ends_at: Date | null;
|
|
132
|
+
current_period_start: Date | null;
|
|
133
|
+
current_period_end: Date | null;
|
|
134
|
+
cancel_at_period_end: boolean;
|
|
135
|
+
canceled_at: Date | null;
|
|
136
|
+
}>;
|
|
137
|
+
resume(id: number): Promise<{
|
|
138
|
+
id: number;
|
|
139
|
+
created_at: Date;
|
|
140
|
+
updated_at: Date;
|
|
141
|
+
status: import("@prisma/client").$Enums.billing_subscription_status_enum;
|
|
142
|
+
contact_id: number | null;
|
|
143
|
+
product_id: number | null;
|
|
144
|
+
price_id: number | null;
|
|
145
|
+
gateway: string | null;
|
|
146
|
+
gateway_subscription_id: string | null;
|
|
147
|
+
started_at: Date | null;
|
|
148
|
+
trial_ends_at: Date | null;
|
|
149
|
+
current_period_start: Date | null;
|
|
150
|
+
current_period_end: Date | null;
|
|
151
|
+
cancel_at_period_end: boolean;
|
|
152
|
+
canceled_at: Date | null;
|
|
153
|
+
}>;
|
|
21
154
|
}
|
|
22
155
|
//# sourceMappingURL=billing-subscriptions.controller.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing-subscriptions.controller.d.ts","sourceRoot":"","sources":["../src/billing-subscriptions.controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAUpE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,qBAEa,8BAA8B;IAC7B,OAAO,CAAC,QAAQ,CAAC,cAAc;gBAAd,cAAc,EAAE,cAAc;IAG3D,IAAI,CAAe,gBAAgB,EAAE,aAAa;;;;;;;;;IAKlD,GAAG,CAA4B,EAAE,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"billing-subscriptions.controller.d.ts","sourceRoot":"","sources":["../src/billing-subscriptions.controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAUpE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,qBAEa,8BAA8B;IAC7B,OAAO,CAAC,QAAQ,CAAC,cAAc;gBAAd,cAAc,EAAE,cAAc;IAG3D,IAAI,CAAe,gBAAgB,EAAE,aAAa;;;;;;;;;IAKlD,GAAG,CAA4B,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAKzC,MAAM,CAAS,GAAG,EAAE,qBAAqB;;;;;;;;;;;;;;;;;IAKzC,MAAM,CAA4B,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;;;IAK5C,KAAK,CAA4B,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;;;IAK3C,MAAM,CAA4B,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;;;CAG7C"}
|