mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) add appsumo endpoints with stub implementations
Summary: This adds appsumo /token and /notification endpoints, with some tests. The stub implementation is sufficient for AppSumo activation to succeed (when exposed via port forwarding for testing). It needs fleshing out: * Implement upgrade/downgrade/refund and stripe subscription. * Implement custom landing page and flow. Test Plan: added tests Reviewers: dsagal, georgegevoian Reviewed By: dsagal Subscribers: alexmojaki Differential Revision: https://phab.getgrist.com/D2864
This commit is contained in:
@@ -12,6 +12,13 @@ interface BillingAccountStatus {
|
||||
message?: string;
|
||||
}
|
||||
|
||||
// A structure for billing options relevant to an external authority, for sites
|
||||
// created outside of Grist's regular billing flow.
|
||||
export interface ExternalBillingOptions {
|
||||
authority: string; // The name of the external authority.
|
||||
invoiceId?: string; // An id of an invoice or other external billing context.
|
||||
}
|
||||
|
||||
/**
|
||||
* This relates organizations to products. It holds any stripe information
|
||||
* needed to be able to update and pay for the product that applies to the
|
||||
@@ -49,6 +56,12 @@ export class BillingAccount extends BaseEntity {
|
||||
@Column({name: 'stripe_plan_id', type: String, nullable: true})
|
||||
public stripePlanId: string | null;
|
||||
|
||||
@Column({name: 'external_id', type: String, nullable: true})
|
||||
public externalId: string | null;
|
||||
|
||||
@Column({name: 'external_options', type: nativeValues.jsonEntityType, nullable: true})
|
||||
public externalOptions: ExternalBillingOptions | null;
|
||||
|
||||
@OneToMany(type => BillingAccountManager, manager => manager.billingAccount)
|
||||
public managers: BillingAccountManager[];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user