first commit
This commit is contained in:
@@ -0,0 +1,405 @@
|
||||
import { GroupPlans } from '../../../../../types/subscription/dashboard/group-plans'
|
||||
import { Plan } from '../../../../../types/subscription/plan'
|
||||
|
||||
const features = {
|
||||
student: {
|
||||
collaborators: 6,
|
||||
dropbox: true,
|
||||
versioning: true,
|
||||
github: true,
|
||||
templates: true,
|
||||
references: true,
|
||||
referencesSearch: true,
|
||||
gitBridge: true,
|
||||
zotero: true,
|
||||
mendeley: true,
|
||||
compileTimeout: 240,
|
||||
compileGroup: 'priority',
|
||||
trackChanges: true,
|
||||
symbolPalette: true,
|
||||
},
|
||||
personal: {
|
||||
collaborators: 1,
|
||||
dropbox: true,
|
||||
versioning: true,
|
||||
github: true,
|
||||
gitBridge: true,
|
||||
templates: true,
|
||||
references: true,
|
||||
referencesSearch: true,
|
||||
zotero: true,
|
||||
mendeley: true,
|
||||
compileTimeout: 240,
|
||||
compileGroup: 'priority',
|
||||
trackChanges: false,
|
||||
symbolPalette: true,
|
||||
},
|
||||
collaborator: {
|
||||
collaborators: 10,
|
||||
dropbox: true,
|
||||
versioning: true,
|
||||
github: true,
|
||||
templates: true,
|
||||
references: true,
|
||||
referencesSearch: true,
|
||||
zotero: true,
|
||||
gitBridge: true,
|
||||
mendeley: true,
|
||||
compileTimeout: 240,
|
||||
compileGroup: 'priority',
|
||||
trackChanges: true,
|
||||
symbolPalette: true,
|
||||
},
|
||||
professional: {
|
||||
collaborators: -1,
|
||||
dropbox: true,
|
||||
versioning: true,
|
||||
github: true,
|
||||
templates: true,
|
||||
references: true,
|
||||
referencesSearch: true,
|
||||
zotero: true,
|
||||
gitBridge: true,
|
||||
mendeley: true,
|
||||
compileTimeout: 240,
|
||||
compileGroup: 'priority',
|
||||
trackChanges: true,
|
||||
symbolPalette: true,
|
||||
},
|
||||
}
|
||||
|
||||
const studentAccounts: Array<Plan> = [
|
||||
{
|
||||
planCode: 'student',
|
||||
name: 'Student',
|
||||
price_in_cents: 1000,
|
||||
features: features.student,
|
||||
featureDescription: [],
|
||||
},
|
||||
{
|
||||
planCode: 'student-annual',
|
||||
name: 'Student Annual',
|
||||
price_in_cents: 9900,
|
||||
annual: true,
|
||||
features: features.student,
|
||||
featureDescription: [],
|
||||
},
|
||||
{
|
||||
planCode: 'student_free_trial',
|
||||
name: 'Student',
|
||||
price_in_cents: 800,
|
||||
features: features.student,
|
||||
hideFromUsers: true,
|
||||
featureDescription: [],
|
||||
},
|
||||
{
|
||||
planCode: 'student_free_trial_7_days',
|
||||
name: 'Student',
|
||||
price_in_cents: 1000,
|
||||
features: features.student,
|
||||
hideFromUsers: true,
|
||||
featureDescription: [],
|
||||
},
|
||||
]
|
||||
|
||||
const individualMonthlyPlans: Array<Plan> = [
|
||||
{
|
||||
planCode: 'paid-personal',
|
||||
name: 'Personal',
|
||||
price_in_cents: 1500,
|
||||
features: features.personal,
|
||||
featureDescription: [],
|
||||
},
|
||||
{
|
||||
planCode: 'paid-personal_free_trial_7_days',
|
||||
name: 'Personal (Hidden)',
|
||||
price_in_cents: 1500,
|
||||
features: features.personal,
|
||||
featureDescription: [],
|
||||
hideFromUsers: true,
|
||||
},
|
||||
{
|
||||
planCode: 'collaborator',
|
||||
name: 'Standard (Collaborator)',
|
||||
price_in_cents: 2300,
|
||||
features: features.collaborator,
|
||||
featureDescription: [],
|
||||
},
|
||||
{
|
||||
planCode: 'professional',
|
||||
name: 'Professional',
|
||||
price_in_cents: 4500,
|
||||
features: features.professional,
|
||||
featureDescription: [],
|
||||
},
|
||||
{
|
||||
planCode: 'collaborator_free_trial',
|
||||
name: 'Standard (Collaborator) (Hidden)',
|
||||
price_in_cents: 1900,
|
||||
features: features.collaborator,
|
||||
hideFromUsers: true,
|
||||
featureDescription: [],
|
||||
},
|
||||
{
|
||||
planCode: 'collaborator_free_trial_14_days',
|
||||
name: 'Standard (Collaborator) (Hidden)',
|
||||
price_in_cents: 1900,
|
||||
features: features.collaborator,
|
||||
hideFromUsers: true,
|
||||
featureDescription: [],
|
||||
},
|
||||
{
|
||||
planCode: 'collaborator_free_trial_7_days',
|
||||
name: 'Standard (Collaborator) (Hidden)',
|
||||
price_in_cents: 2300,
|
||||
features: features.collaborator,
|
||||
hideFromUsers: true,
|
||||
featureDescription: [],
|
||||
},
|
||||
{
|
||||
planCode: 'collaborator-annual_free_trial',
|
||||
name: 'Standard (Collaborator) Annual (Hidden)',
|
||||
price_in_cents: 18000,
|
||||
features: features.collaborator,
|
||||
hideFromUsers: true,
|
||||
featureDescription: [],
|
||||
},
|
||||
{
|
||||
planCode: 'professional_free_trial',
|
||||
name: 'Professional (Hidden)',
|
||||
price_in_cents: 3000,
|
||||
features: features.professional,
|
||||
hideFromUsers: true,
|
||||
featureDescription: [],
|
||||
},
|
||||
{
|
||||
planCode: 'professional_free_trial_7_days',
|
||||
name: 'Professional (Hidden)',
|
||||
price_in_cents: 4500,
|
||||
features: features.professional,
|
||||
hideFromUsers: true,
|
||||
featureDescription: [],
|
||||
},
|
||||
]
|
||||
|
||||
const individualAnnualPlans: Array<Plan> = [
|
||||
{
|
||||
planCode: 'paid-personal-annual',
|
||||
name: 'Personal Annual',
|
||||
price_in_cents: 13900,
|
||||
annual: true,
|
||||
features: features.personal,
|
||||
featureDescription: [],
|
||||
},
|
||||
{
|
||||
planCode: 'collaborator-annual',
|
||||
name: 'Standard (Collaborator) Annual',
|
||||
price_in_cents: 21900,
|
||||
annual: true,
|
||||
features: features.collaborator,
|
||||
featureDescription: [],
|
||||
},
|
||||
{
|
||||
planCode: 'professional-annual',
|
||||
name: 'Professional Annual',
|
||||
price_in_cents: 42900,
|
||||
annual: true,
|
||||
features: features.professional,
|
||||
featureDescription: [],
|
||||
},
|
||||
]
|
||||
|
||||
export const plans = [
|
||||
...studentAccounts,
|
||||
...individualMonthlyPlans,
|
||||
...individualAnnualPlans,
|
||||
]
|
||||
|
||||
export const groupPlans: GroupPlans = {
|
||||
plans: [
|
||||
{
|
||||
display: 'Standard',
|
||||
code: 'collaborator',
|
||||
},
|
||||
{
|
||||
display: 'Professional',
|
||||
code: 'professional',
|
||||
},
|
||||
],
|
||||
sizes: ['2', '3', '4', '5', '10', '20'],
|
||||
}
|
||||
|
||||
export const groupPriceByUsageTypeAndSize = {
|
||||
educational: {
|
||||
professional: {
|
||||
EUR: {
|
||||
'2': {
|
||||
price_in_cents: 51600,
|
||||
},
|
||||
'3': {
|
||||
price_in_cents: 77400,
|
||||
},
|
||||
'4': {
|
||||
price_in_cents: 103200,
|
||||
},
|
||||
'5': {
|
||||
price_in_cents: 129000,
|
||||
},
|
||||
'10': {
|
||||
price_in_cents: 143000,
|
||||
},
|
||||
'20': {
|
||||
price_in_cents: 264000,
|
||||
},
|
||||
},
|
||||
USD: {
|
||||
'2': {
|
||||
price_in_cents: 55800,
|
||||
},
|
||||
'3': {
|
||||
price_in_cents: 83700,
|
||||
},
|
||||
'4': {
|
||||
price_in_cents: 111600,
|
||||
},
|
||||
'5': {
|
||||
price_in_cents: 139500,
|
||||
},
|
||||
'10': {
|
||||
price_in_cents: 155000,
|
||||
},
|
||||
'20': {
|
||||
price_in_cents: 286000,
|
||||
},
|
||||
},
|
||||
},
|
||||
collaborator: {
|
||||
EUR: {
|
||||
'2': {
|
||||
price_in_cents: 25000,
|
||||
},
|
||||
'3': {
|
||||
price_in_cents: 37500,
|
||||
},
|
||||
'4': {
|
||||
price_in_cents: 50000,
|
||||
},
|
||||
'5': {
|
||||
price_in_cents: 62500,
|
||||
},
|
||||
'10': {
|
||||
price_in_cents: 69000,
|
||||
},
|
||||
'20': {
|
||||
price_in_cents: 128000,
|
||||
},
|
||||
},
|
||||
USD: {
|
||||
'2': {
|
||||
price_in_cents: 27800,
|
||||
},
|
||||
'3': {
|
||||
price_in_cents: 41700,
|
||||
},
|
||||
'4': {
|
||||
price_in_cents: 55600,
|
||||
},
|
||||
'5': {
|
||||
price_in_cents: 69500,
|
||||
},
|
||||
'10': {
|
||||
price_in_cents: 77000,
|
||||
},
|
||||
'20': {
|
||||
price_in_cents: 142000,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
enterprise: {
|
||||
professional: {
|
||||
EUR: {
|
||||
'2': {
|
||||
price_in_cents: 51600,
|
||||
},
|
||||
'3': {
|
||||
price_in_cents: 77400,
|
||||
},
|
||||
'4': {
|
||||
price_in_cents: 103200,
|
||||
},
|
||||
'5': {
|
||||
price_in_cents: 129000,
|
||||
},
|
||||
'10': {
|
||||
price_in_cents: 239000,
|
||||
},
|
||||
'20': {
|
||||
price_in_cents: 442000,
|
||||
},
|
||||
},
|
||||
USD: {
|
||||
'2': {
|
||||
price_in_cents: 55800,
|
||||
},
|
||||
'3': {
|
||||
price_in_cents: 83700,
|
||||
},
|
||||
'4': {
|
||||
price_in_cents: 111600,
|
||||
},
|
||||
'5': {
|
||||
price_in_cents: 139500,
|
||||
},
|
||||
'10': {
|
||||
price_in_cents: 259000,
|
||||
},
|
||||
'20': {
|
||||
price_in_cents: 478000,
|
||||
},
|
||||
},
|
||||
},
|
||||
collaborator: {
|
||||
EUR: {
|
||||
'2': {
|
||||
price_in_cents: 25000,
|
||||
},
|
||||
'3': {
|
||||
price_in_cents: 37500,
|
||||
},
|
||||
'4': {
|
||||
price_in_cents: 50000,
|
||||
},
|
||||
'5': {
|
||||
price_in_cents: 62500,
|
||||
},
|
||||
'10': {
|
||||
price_in_cents: 116000,
|
||||
},
|
||||
'20': {
|
||||
price_in_cents: 214000,
|
||||
},
|
||||
},
|
||||
USD: {
|
||||
'2': {
|
||||
price_in_cents: 27800,
|
||||
},
|
||||
'3': {
|
||||
price_in_cents: 41700,
|
||||
},
|
||||
'4': {
|
||||
price_in_cents: 55600,
|
||||
},
|
||||
'5': {
|
||||
price_in_cents: 69500,
|
||||
},
|
||||
'10': {
|
||||
price_in_cents: 129000,
|
||||
},
|
||||
'20': {
|
||||
price_in_cents: 238000,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,503 @@
|
||||
import {
|
||||
CustomSubscription,
|
||||
GroupSubscription,
|
||||
PaidSubscription,
|
||||
} from '../../../../../types/subscription/dashboard/subscription'
|
||||
import dateformat from 'dateformat'
|
||||
|
||||
const today = new Date()
|
||||
const oneYearFromToday = new Date().setFullYear(today.getFullYear() + 1)
|
||||
const nextPaymentDueAt = dateformat(oneYearFromToday, 'dS mmmm yyyy')
|
||||
const nextPaymentDueDate = dateformat(oneYearFromToday, 'dS mmmm yyyy')
|
||||
const sevenDaysFromToday = new Date().setDate(today.getDate() + 7)
|
||||
const sevenDaysFromTodayFormatted = dateformat(
|
||||
sevenDaysFromToday,
|
||||
'dS mmmm yyyy'
|
||||
)
|
||||
|
||||
export const annualActiveSubscription: PaidSubscription = {
|
||||
manager_ids: ['abc123'],
|
||||
member_ids: [],
|
||||
invited_emails: [],
|
||||
groupPlan: false,
|
||||
membersLimit: 0,
|
||||
_id: 'def456',
|
||||
admin_id: 'abc123',
|
||||
teamInvites: [],
|
||||
planCode: 'collaborator-annual',
|
||||
recurlySubscription_id: 'ghi789',
|
||||
plan: {
|
||||
planCode: 'collaborator-annual',
|
||||
name: 'Standard (Collaborator) Annual',
|
||||
price_in_cents: 21900,
|
||||
annual: true,
|
||||
featureDescription: [],
|
||||
},
|
||||
payment: {
|
||||
taxRate: 0,
|
||||
billingDetailsLink: '/user/subscription/recurly/billing-details',
|
||||
accountManagementLink: '/user/subscription/recurly/account-management',
|
||||
additionalLicenses: 0,
|
||||
totalLicenses: 0,
|
||||
nextPaymentDueAt,
|
||||
nextPaymentDueDate,
|
||||
currency: 'USD',
|
||||
state: 'active',
|
||||
trialEndsAtFormatted: null,
|
||||
trialEndsAt: null,
|
||||
activeCoupons: [],
|
||||
accountEmail: 'fake@example.com',
|
||||
hasPastDueInvoice: false,
|
||||
displayPrice: '$199.00',
|
||||
planOnlyDisplayPrice: '',
|
||||
addOns: [],
|
||||
addOnDisplayPricesWithoutAdditionalLicense: {},
|
||||
},
|
||||
}
|
||||
|
||||
export const annualActiveSubscriptionEuro: PaidSubscription = {
|
||||
manager_ids: ['abc123'],
|
||||
member_ids: [],
|
||||
invited_emails: [],
|
||||
groupPlan: false,
|
||||
membersLimit: 0,
|
||||
_id: 'def456',
|
||||
admin_id: 'abc123',
|
||||
teamInvites: [],
|
||||
planCode: 'collaborator-annual',
|
||||
recurlySubscription_id: 'ghi789',
|
||||
plan: {
|
||||
planCode: 'collaborator-annual',
|
||||
name: 'Standard (Collaborator) Annual',
|
||||
price_in_cents: 21900,
|
||||
annual: true,
|
||||
featureDescription: [],
|
||||
},
|
||||
payment: {
|
||||
taxRate: 0.24,
|
||||
billingDetailsLink: '/user/subscription/recurly/billing-details',
|
||||
accountManagementLink: '/user/subscription/recurly/account-management',
|
||||
additionalLicenses: 0,
|
||||
totalLicenses: 0,
|
||||
nextPaymentDueAt,
|
||||
nextPaymentDueDate,
|
||||
currency: 'EUR',
|
||||
state: 'active',
|
||||
trialEndsAtFormatted: null,
|
||||
trialEndsAt: null,
|
||||
activeCoupons: [],
|
||||
accountEmail: 'fake@example.com',
|
||||
hasPastDueInvoice: false,
|
||||
displayPrice: '€221.96',
|
||||
planOnlyDisplayPrice: '',
|
||||
addOns: [],
|
||||
addOnDisplayPricesWithoutAdditionalLicense: {},
|
||||
},
|
||||
}
|
||||
|
||||
export const annualActiveSubscriptionPro: PaidSubscription = {
|
||||
manager_ids: ['abc123'],
|
||||
member_ids: [],
|
||||
invited_emails: [],
|
||||
groupPlan: false,
|
||||
membersLimit: 0,
|
||||
_id: 'def456',
|
||||
admin_id: 'abc123',
|
||||
teamInvites: [],
|
||||
planCode: 'professional',
|
||||
recurlySubscription_id: 'ghi789',
|
||||
plan: {
|
||||
planCode: 'professional',
|
||||
name: 'Professional',
|
||||
price_in_cents: 4500,
|
||||
featureDescription: [],
|
||||
},
|
||||
payment: {
|
||||
taxRate: 0,
|
||||
billingDetailsLink: '/user/subscription/recurly/billing-details',
|
||||
accountManagementLink: '/user/subscription/recurly/account-management',
|
||||
additionalLicenses: 0,
|
||||
totalLicenses: 0,
|
||||
nextPaymentDueAt,
|
||||
nextPaymentDueDate,
|
||||
currency: 'USD',
|
||||
state: 'active',
|
||||
trialEndsAtFormatted: null,
|
||||
trialEndsAt: null,
|
||||
activeCoupons: [],
|
||||
accountEmail: 'fake@example.com',
|
||||
hasPastDueInvoice: false,
|
||||
displayPrice: '$42.00',
|
||||
planOnlyDisplayPrice: '',
|
||||
addOns: [],
|
||||
addOnDisplayPricesWithoutAdditionalLicense: {},
|
||||
},
|
||||
}
|
||||
|
||||
export const pastDueExpiredSubscription: PaidSubscription = {
|
||||
manager_ids: ['abc123'],
|
||||
member_ids: [],
|
||||
invited_emails: [],
|
||||
groupPlan: false,
|
||||
membersLimit: 0,
|
||||
_id: 'def456',
|
||||
admin_id: 'abc123',
|
||||
teamInvites: [],
|
||||
planCode: 'collaborator-annual',
|
||||
recurlySubscription_id: 'ghi789',
|
||||
plan: {
|
||||
planCode: 'collaborator-annual',
|
||||
name: 'Standard (Collaborator) Annual',
|
||||
price_in_cents: 21900,
|
||||
annual: true,
|
||||
featureDescription: [],
|
||||
},
|
||||
payment: {
|
||||
taxRate: 0,
|
||||
billingDetailsLink: '/user/subscription/recurly/billing-details',
|
||||
accountManagementLink: '/user/subscription/recurly/account-management',
|
||||
additionalLicenses: 0,
|
||||
totalLicenses: 0,
|
||||
nextPaymentDueAt,
|
||||
nextPaymentDueDate,
|
||||
currency: 'USD',
|
||||
state: 'expired',
|
||||
trialEndsAtFormatted: null,
|
||||
trialEndsAt: null,
|
||||
activeCoupons: [],
|
||||
accountEmail: 'fake@example.com',
|
||||
hasPastDueInvoice: true,
|
||||
displayPrice: '$199.00',
|
||||
planOnlyDisplayPrice: '',
|
||||
addOns: [],
|
||||
addOnDisplayPricesWithoutAdditionalLicense: {},
|
||||
},
|
||||
}
|
||||
|
||||
export const canceledSubscription: PaidSubscription = {
|
||||
manager_ids: ['abc123'],
|
||||
member_ids: [],
|
||||
invited_emails: [],
|
||||
groupPlan: false,
|
||||
membersLimit: 0,
|
||||
_id: 'def456',
|
||||
admin_id: 'abc123',
|
||||
teamInvites: [],
|
||||
planCode: 'collaborator-annual',
|
||||
recurlySubscription_id: 'ghi789',
|
||||
plan: {
|
||||
planCode: 'collaborator-annual',
|
||||
name: 'Standard (Collaborator) Annual',
|
||||
price_in_cents: 21900,
|
||||
annual: true,
|
||||
featureDescription: [],
|
||||
},
|
||||
payment: {
|
||||
taxRate: 0,
|
||||
billingDetailsLink: '/user/subscription/recurly/billing-details',
|
||||
accountManagementLink: '/user/subscription/recurly/account-management',
|
||||
additionalLicenses: 0,
|
||||
totalLicenses: 0,
|
||||
nextPaymentDueAt,
|
||||
nextPaymentDueDate,
|
||||
currency: 'USD',
|
||||
state: 'canceled',
|
||||
trialEndsAtFormatted: null,
|
||||
trialEndsAt: null,
|
||||
activeCoupons: [],
|
||||
accountEmail: 'fake@example.com',
|
||||
hasPastDueInvoice: false,
|
||||
displayPrice: '$199.00',
|
||||
planOnlyDisplayPrice: '',
|
||||
addOns: [],
|
||||
addOnDisplayPricesWithoutAdditionalLicense: {},
|
||||
},
|
||||
}
|
||||
|
||||
export const pendingSubscriptionChange: PaidSubscription = {
|
||||
manager_ids: ['abc123'],
|
||||
member_ids: [],
|
||||
invited_emails: [],
|
||||
groupPlan: false,
|
||||
membersLimit: 0,
|
||||
_id: 'def456',
|
||||
admin_id: 'abc123',
|
||||
teamInvites: [],
|
||||
planCode: 'collaborator-annual',
|
||||
recurlySubscription_id: 'ghi789',
|
||||
plan: {
|
||||
planCode: 'collaborator-annual',
|
||||
name: 'Standard (Collaborator) Annual',
|
||||
price_in_cents: 21900,
|
||||
annual: true,
|
||||
featureDescription: [],
|
||||
},
|
||||
payment: {
|
||||
taxRate: 0,
|
||||
billingDetailsLink: '/user/subscription/recurly/billing-details',
|
||||
accountManagementLink: '/user/subscription/recurly/account-management',
|
||||
additionalLicenses: 0,
|
||||
totalLicenses: 0,
|
||||
nextPaymentDueAt,
|
||||
nextPaymentDueDate,
|
||||
currency: 'USD',
|
||||
state: 'active',
|
||||
trialEndsAtFormatted: null,
|
||||
trialEndsAt: null,
|
||||
activeCoupons: [],
|
||||
accountEmail: 'fake@example.com',
|
||||
hasPastDueInvoice: false,
|
||||
displayPrice: '$199.00',
|
||||
planOnlyDisplayPrice: '',
|
||||
addOns: [],
|
||||
addOnDisplayPricesWithoutAdditionalLicense: {},
|
||||
},
|
||||
pendingPlan: {
|
||||
planCode: 'professional-annual',
|
||||
name: 'Professional Annual',
|
||||
price_in_cents: 42900,
|
||||
annual: true,
|
||||
featureDescription: [],
|
||||
},
|
||||
}
|
||||
|
||||
export const groupActiveSubscription: GroupSubscription = {
|
||||
manager_ids: ['abc123'],
|
||||
member_ids: ['abc123'],
|
||||
invited_emails: [],
|
||||
groupPlan: true,
|
||||
teamName: 'GAS',
|
||||
membersLimit: 10,
|
||||
_id: 'bcd567',
|
||||
admin_id: 'abc123',
|
||||
teamInvites: [],
|
||||
planCode: 'group_collaborator_10_enterprise',
|
||||
recurlySubscription_id: 'ghi789',
|
||||
plan: {
|
||||
planCode: 'group_collaborator_10_enterprise',
|
||||
name: 'Overleaf Standard (Collaborator) - Group Account (10 licenses) - Enterprise',
|
||||
hideFromUsers: true,
|
||||
price_in_cents: 129000,
|
||||
annual: true,
|
||||
groupPlan: true,
|
||||
membersLimit: 10,
|
||||
membersLimitAddOn: 'additional-license',
|
||||
},
|
||||
payment: {
|
||||
taxRate: 0,
|
||||
billingDetailsLink: '/user/subscription/recurly/billing-details',
|
||||
accountManagementLink: '/user/subscription/recurly/account-management',
|
||||
additionalLicenses: 0,
|
||||
totalLicenses: 10,
|
||||
nextPaymentDueAt,
|
||||
nextPaymentDueDate,
|
||||
currency: 'USD',
|
||||
state: 'active',
|
||||
trialEndsAtFormatted: null,
|
||||
trialEndsAt: null,
|
||||
activeCoupons: [],
|
||||
accountEmail: 'fake@example.com',
|
||||
hasPastDueInvoice: false,
|
||||
displayPrice: '$1290.00',
|
||||
planOnlyDisplayPrice: '',
|
||||
addOns: [],
|
||||
addOnDisplayPricesWithoutAdditionalLicense: {},
|
||||
},
|
||||
}
|
||||
|
||||
export const groupActiveSubscriptionWithPendingLicenseChange: GroupSubscription =
|
||||
{
|
||||
manager_ids: ['abc123'],
|
||||
member_ids: ['abc123'],
|
||||
invited_emails: [],
|
||||
groupPlan: true,
|
||||
teamName: 'GASWPLC',
|
||||
membersLimit: 10,
|
||||
_id: 'def456',
|
||||
admin_id: 'abc123',
|
||||
teamInvites: [],
|
||||
planCode: 'group_collaborator_10_enterprise',
|
||||
recurlySubscription_id: 'ghi789',
|
||||
plan: {
|
||||
planCode: 'group_collaborator_10_enterprise',
|
||||
name: 'Overleaf Standard (Collaborator) - Group Account (10 licenses) - Enterprise',
|
||||
hideFromUsers: true,
|
||||
price_in_cents: 129000,
|
||||
annual: true,
|
||||
groupPlan: true,
|
||||
membersLimit: 10,
|
||||
membersLimitAddOn: 'additional-license',
|
||||
},
|
||||
payment: {
|
||||
taxRate: 0,
|
||||
billingDetailsLink: '/user/subscription/recurly/billing-details',
|
||||
accountManagementLink: '/user/subscription/recurly/account-management',
|
||||
additionalLicenses: 11,
|
||||
totalLicenses: 21,
|
||||
nextPaymentDueAt,
|
||||
nextPaymentDueDate,
|
||||
currency: 'USD',
|
||||
state: 'active',
|
||||
trialEndsAtFormatted: null,
|
||||
trialEndsAt: null,
|
||||
activeCoupons: [],
|
||||
accountEmail: 'fake@example.com',
|
||||
hasPastDueInvoice: false,
|
||||
displayPrice: '$2967.00',
|
||||
pendingAdditionalLicenses: 13,
|
||||
pendingTotalLicenses: 23,
|
||||
planOnlyDisplayPrice: '',
|
||||
addOns: [],
|
||||
addOnDisplayPricesWithoutAdditionalLicense: {},
|
||||
},
|
||||
pendingPlan: {
|
||||
planCode: 'group_collaborator_10_enterprise',
|
||||
name: 'Overleaf Standard (Collaborator) - Group Account (10 licenses) - Enterprise',
|
||||
hideFromUsers: true,
|
||||
price_in_cents: 129000,
|
||||
annual: true,
|
||||
groupPlan: true,
|
||||
membersLimit: 10,
|
||||
membersLimitAddOn: 'additional-license',
|
||||
},
|
||||
}
|
||||
|
||||
export const trialSubscription: PaidSubscription = {
|
||||
manager_ids: ['abc123'],
|
||||
member_ids: [],
|
||||
invited_emails: [],
|
||||
groupPlan: false,
|
||||
membersLimit: 0,
|
||||
_id: 'def456',
|
||||
admin_id: 'abc123',
|
||||
teamInvites: [],
|
||||
planCode: 'paid-personal_free_trial_7_days',
|
||||
recurlySubscription_id: 'ghi789',
|
||||
plan: {
|
||||
planCode: 'paid-personal_free_trial_7_days',
|
||||
name: 'Personal',
|
||||
price_in_cents: 1500,
|
||||
featureDescription: [],
|
||||
hideFromUsers: true,
|
||||
},
|
||||
payment: {
|
||||
taxRate: 0,
|
||||
billingDetailsLink: '/user/subscription/recurly/billing-details',
|
||||
accountManagementLink: '/user/subscription/recurly/account-management',
|
||||
additionalLicenses: 0,
|
||||
totalLicenses: 0,
|
||||
nextPaymentDueAt: sevenDaysFromTodayFormatted,
|
||||
nextPaymentDueDate: sevenDaysFromTodayFormatted,
|
||||
currency: 'USD',
|
||||
state: 'active',
|
||||
trialEndsAtFormatted: sevenDaysFromTodayFormatted,
|
||||
trialEndsAt: new Date(sevenDaysFromToday).toString(),
|
||||
activeCoupons: [],
|
||||
accountEmail: 'fake@example.com',
|
||||
hasPastDueInvoice: false,
|
||||
displayPrice: '$14.00',
|
||||
planOnlyDisplayPrice: '',
|
||||
addOns: [],
|
||||
addOnDisplayPricesWithoutAdditionalLicense: {},
|
||||
},
|
||||
}
|
||||
|
||||
export const customSubscription: CustomSubscription = {
|
||||
manager_ids: ['abc123'],
|
||||
member_ids: [],
|
||||
invited_emails: [],
|
||||
groupPlan: false,
|
||||
membersLimit: 0,
|
||||
_id: 'def456',
|
||||
admin_id: 'abc123',
|
||||
teamInvites: [],
|
||||
planCode: 'collaborator-annual',
|
||||
recurlySubscription_id: 'ghi789',
|
||||
plan: {
|
||||
planCode: 'collaborator-annual',
|
||||
name: 'Standard (Collaborator) Annual',
|
||||
price_in_cents: 21900,
|
||||
annual: true,
|
||||
featureDescription: [],
|
||||
},
|
||||
customAccount: true,
|
||||
}
|
||||
|
||||
export const trialCollaboratorSubscription: PaidSubscription = {
|
||||
manager_ids: ['abc123'],
|
||||
member_ids: [],
|
||||
invited_emails: [],
|
||||
groupPlan: false,
|
||||
membersLimit: 0,
|
||||
_id: 'def456',
|
||||
admin_id: 'abc123',
|
||||
teamInvites: [],
|
||||
planCode: 'collaborator_free_trial_7_days',
|
||||
recurlySubscription_id: 'ghi789',
|
||||
plan: {
|
||||
planCode: 'collaborator_free_trial_7_days',
|
||||
name: 'Standard (Collaborator)',
|
||||
price_in_cents: 2300,
|
||||
featureDescription: [],
|
||||
hideFromUsers: true,
|
||||
},
|
||||
payment: {
|
||||
taxRate: 0,
|
||||
billingDetailsLink: '/user/subscription/recurly/billing-details',
|
||||
accountManagementLink: '/user/subscription/recurly/account-management',
|
||||
additionalLicenses: 0,
|
||||
totalLicenses: 0,
|
||||
nextPaymentDueAt: sevenDaysFromTodayFormatted,
|
||||
nextPaymentDueDate: sevenDaysFromTodayFormatted,
|
||||
currency: 'USD',
|
||||
state: 'active',
|
||||
trialEndsAtFormatted: sevenDaysFromTodayFormatted,
|
||||
trialEndsAt: new Date(sevenDaysFromToday).toString(),
|
||||
activeCoupons: [],
|
||||
accountEmail: 'foo@example.com',
|
||||
hasPastDueInvoice: false,
|
||||
displayPrice: '$21.00',
|
||||
planOnlyDisplayPrice: '',
|
||||
addOns: [],
|
||||
addOnDisplayPricesWithoutAdditionalLicense: {},
|
||||
},
|
||||
}
|
||||
|
||||
export const monthlyActiveCollaborator: PaidSubscription = {
|
||||
manager_ids: ['abc123'],
|
||||
member_ids: [],
|
||||
invited_emails: [],
|
||||
groupPlan: false,
|
||||
membersLimit: 0,
|
||||
_id: 'def456',
|
||||
admin_id: 'abc123',
|
||||
teamInvites: [],
|
||||
planCode: 'collaborator',
|
||||
recurlySubscription_id: 'ghi789',
|
||||
plan: {
|
||||
planCode: 'collaborator',
|
||||
name: 'Standard (Collaborator)',
|
||||
price_in_cents: 212300900,
|
||||
featureDescription: [],
|
||||
},
|
||||
payment: {
|
||||
taxRate: 0,
|
||||
billingDetailsLink: '/user/subscription/recurly/billing-details',
|
||||
accountManagementLink: '/user/subscription/recurly/account-management',
|
||||
additionalLicenses: 0,
|
||||
totalLicenses: 0,
|
||||
nextPaymentDueAt,
|
||||
nextPaymentDueDate,
|
||||
currency: 'USD',
|
||||
state: 'active',
|
||||
trialEndsAtFormatted: null,
|
||||
trialEndsAt: null,
|
||||
activeCoupons: [],
|
||||
accountEmail: 'foo@example.com',
|
||||
hasPastDueInvoice: false,
|
||||
displayPrice: '$21.00',
|
||||
planOnlyDisplayPrice: '',
|
||||
addOns: [],
|
||||
addOnDisplayPricesWithoutAdditionalLicense: {},
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user