(core) add free team site product

Summary:
This adds a Feature object that is an approximation of what we
plan for free team sites. It includes restrictions that are not
yet implemented, and an endpoint for testing.

Test Plan: added a test

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3243
This commit is contained in:
Paul Fitzpatrick
2022-02-02 14:30:50 -05:00
parent 64abfcb0ac
commit 4890a1fe89
4 changed files with 43 additions and 3 deletions

View File

@@ -24,6 +24,21 @@ export const teamFeatures: Features = {
maxSharesPerDoc: 2
};
/**
* A summary of features available in free team sites.
* At time of writing, this is a placeholder, as free sites are fleshed out.
*/
export const teamFreeFeatures: Features = {
workspaces: true,
vanityDomain: true,
maxSharesPerWorkspace: 0, // all workspace shares need to be org members.
maxSharesPerDoc: 2,
maxDocsPerOrg: 20,
snapshotWindow: { count: 1, unit: 'month' },
baseMaxRowsPerDocument: 5000,
baseMaxApiUnitsPerDocumentPerDay: 5000
};
/**
* A summary of features used in unrestricted grandfathered accounts, and also
* in some test settings.
@@ -101,6 +116,10 @@ const PRODUCTS: IProduct[] = [
name: 'suspended',
features: suspendedFeatures,
},
{
name: 'teamFree',
features: teamFreeFeatures,
},
];
/**
@@ -112,7 +131,8 @@ export function getDefaultProductNames() {
teamInitial: 'stub', // Team site starts off on a limited plan, requiring subscription.
teamCancel: 'suspended', // Team site that has been 'turned off'.
team: 'team', // Functional team site.
};
teamFree: 'teamFree',
};
}
/**