-
Notifications
You must be signed in to change notification settings - Fork 114
/
plansContext.js
82 lines (77 loc) · 1.63 KB
/
plansContext.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/**
* @typedef {'free'|'pro'|'lite'} StoragePrice
*/
/**
* @typedef {object} StorageSubscription
* @property {StoragePrice|Plan} price
*/
/**
* @typedef {object} StripeTier
* @property {number|null} flatAmount
* @property {number|null} unitAmount
* @property {number|null} upTo
*/
/**
* @typedef {object} Plan
* @property {string} id
* @property {string} label
* @property {boolean} isPreferred
* @property {string|null} description
* @property {string|null} bandwidth
* @property {StripeTier[]} [tiers]
*/
export const freePlan = {
id: /** @type {const} */ ('free'),
description: 'You are currently on the free tier. You can use our service up to 5GiB without being charged.',
label: 'Free',
bandwidth: '10',
isPreferred: false,
tiers: [
{
flatAmount: 0,
unitAmount: 0,
upTo: 5,
},
],
};
export const plans = [
freePlan,
{
id: /** @type {const} */ ('lite'),
description: 'For those that want to take advantage of more storage',
label: 'Lite',
bandwidth: '60',
isPreferred: false,
tiers: [
{
flatAmount: 300,
unitAmount: 0,
upTo: 30,
},
{
flatAmount: null,
unitAmount: 10,
upTo: null,
},
],
},
{
id: /** @type {const} */ ('pro'),
description: 'Our lowest price per GiB stored. For those with use cases that require scale.',
label: 'Expert',
bandwidth: '240',
isPreferred: false,
tiers: [
{
flatAmount: 1000,
unitAmount: null,
upTo: 120,
},
{
flatAmount: null,
unitAmount: 8,
upTo: null,
},
],
},
];