@drawbridge/drawbridge-utils 0.0.92 → 0.0.93
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/dist/plans.cjs +55 -0
- package/dist/plans.d.cts +56 -0
- package/dist/plans.d.ts +56 -0
- package/dist/plans.js +55 -0
- package/package.json +1 -1
package/dist/plans.cjs
CHANGED
|
@@ -420,6 +420,61 @@ var plans = {
|
|
|
420
420
|
overages: { actions: "1.5" },
|
|
421
421
|
title: "Elite",
|
|
422
422
|
conversion: 0.5
|
|
423
|
+
},
|
|
424
|
+
// Negotiated tier. Unlike the four sellable plans it has NO catalog price:
|
|
425
|
+
// each enterprise subscription bills from its own Stripe price, minted
|
|
426
|
+
// under STRIPE_PRODUCT_ENTERPRISE and recorded on items.plan.price.
|
|
427
|
+
//
|
|
428
|
+
// That absent price is the whole marker — this entry carries no flag of its
|
|
429
|
+
// own, deliberately. A plan with no stripePriceId cannot be sold self-serve
|
|
430
|
+
// because subscribe and change would hand Stripe `price : undefined`, so
|
|
431
|
+
// "is it selectable" reads straight off the thing that makes it true. Two
|
|
432
|
+
// flags were considered and dropped: `status : drafted | published` (it
|
|
433
|
+
// collides with subscription.status and organization.status, which extend.js
|
|
434
|
+
// attaches to the same payload) and `type : default | custom` (its one real
|
|
435
|
+
// job — catching a sellable plan whose STRIPE_PRICE_* env went missing — is
|
|
436
|
+
// already done by assertEnv at api boot). Negotiated-ness is recorded where
|
|
437
|
+
// it actually varies: subscription.type on the document, set by the admin.
|
|
438
|
+
//
|
|
439
|
+
// Every value below is a FALLBACK, not the deal. Real allowances come from
|
|
440
|
+
// subscription.overrides per customer. They deliberately mirror Elite
|
|
441
|
+
// rather than being infinite or zero: a half-configured enterprise
|
|
442
|
+
// subscription then degrades to the best sellable tier — a known-good,
|
|
443
|
+
// billable state — instead of billing nothing or granting everything.
|
|
444
|
+
//
|
|
445
|
+
// Placed LAST so the array-position direction logic in drawbridge-api
|
|
446
|
+
// (organization-subscription.js `plans.findIndex`) reads a move onto
|
|
447
|
+
// enterprise as an upgrade and a move off it as a downgrade.
|
|
448
|
+
DBENTERPRISE: {
|
|
449
|
+
features: all.features([
|
|
450
|
+
organization.advertisements.key,
|
|
451
|
+
organization.analytics.key,
|
|
452
|
+
organization.members.key,
|
|
453
|
+
organization.subdomain.key,
|
|
454
|
+
page.slug.key
|
|
455
|
+
]),
|
|
456
|
+
limits: all.limits({ actions: 1e5, members: infinite, storage: gigabyte * 100 }),
|
|
457
|
+
marketing: {
|
|
458
|
+
description: "Negotiated terms tailored to your organization.",
|
|
459
|
+
features: [
|
|
460
|
+
"Analytics",
|
|
461
|
+
"Custom subdomain / URLs",
|
|
462
|
+
"Confirmation page ads",
|
|
463
|
+
"Negotiated pricing and limits"
|
|
464
|
+
],
|
|
465
|
+
limits: [
|
|
466
|
+
["Actions per month", "Custom"],
|
|
467
|
+
["Affiliates", "Unlimited"],
|
|
468
|
+
["Brands", "Unlimited"],
|
|
469
|
+
["Campaigns", "Unlimited"],
|
|
470
|
+
["Pages", "Unlimited"],
|
|
471
|
+
["Members", "Custom"],
|
|
472
|
+
["Storage", "Custom"]
|
|
473
|
+
]
|
|
474
|
+
},
|
|
475
|
+
overages: { actions: "1.5" },
|
|
476
|
+
title: "Enterprise",
|
|
477
|
+
conversion: 0.5
|
|
423
478
|
}
|
|
424
479
|
};
|
|
425
480
|
var conversionRate = (subscription) => {
|
package/dist/plans.d.cts
CHANGED
|
@@ -192,6 +192,62 @@ const plans = {
|
|
|
192
192
|
overages : { actions : '1.5' },
|
|
193
193
|
title : 'Elite',
|
|
194
194
|
conversion : 0.5
|
|
195
|
+
},
|
|
196
|
+
|
|
197
|
+
// Negotiated tier. Unlike the four sellable plans it has NO catalog price:
|
|
198
|
+
// each enterprise subscription bills from its own Stripe price, minted
|
|
199
|
+
// under STRIPE_PRODUCT_ENTERPRISE and recorded on items.plan.price.
|
|
200
|
+
//
|
|
201
|
+
// That absent price is the whole marker — this entry carries no flag of its
|
|
202
|
+
// own, deliberately. A plan with no stripePriceId cannot be sold self-serve
|
|
203
|
+
// because subscribe and change would hand Stripe `price : undefined`, so
|
|
204
|
+
// "is it selectable" reads straight off the thing that makes it true. Two
|
|
205
|
+
// flags were considered and dropped: `status : drafted | published` (it
|
|
206
|
+
// collides with subscription.status and organization.status, which extend.js
|
|
207
|
+
// attaches to the same payload) and `type : default | custom` (its one real
|
|
208
|
+
// job — catching a sellable plan whose STRIPE_PRICE_* env went missing — is
|
|
209
|
+
// already done by assertEnv at api boot). Negotiated-ness is recorded where
|
|
210
|
+
// it actually varies: subscription.type on the document, set by the admin.
|
|
211
|
+
//
|
|
212
|
+
// Every value below is a FALLBACK, not the deal. Real allowances come from
|
|
213
|
+
// subscription.overrides per customer. They deliberately mirror Elite
|
|
214
|
+
// rather than being infinite or zero: a half-configured enterprise
|
|
215
|
+
// subscription then degrades to the best sellable tier — a known-good,
|
|
216
|
+
// billable state — instead of billing nothing or granting everything.
|
|
217
|
+
//
|
|
218
|
+
// Placed LAST so the array-position direction logic in drawbridge-api
|
|
219
|
+
// (organization-subscription.js `plans.findIndex`) reads a move onto
|
|
220
|
+
// enterprise as an upgrade and a move off it as a downgrade.
|
|
221
|
+
DBENTERPRISE : {
|
|
222
|
+
features : all.features([
|
|
223
|
+
organization.advertisements.key,
|
|
224
|
+
organization.analytics.key,
|
|
225
|
+
organization.members.key,
|
|
226
|
+
organization.subdomain.key,
|
|
227
|
+
page.slug.key
|
|
228
|
+
]),
|
|
229
|
+
limits : all.limits({ actions : 100000, members : infinite, storage : gigabyte * 100 }),
|
|
230
|
+
marketing : {
|
|
231
|
+
description : 'Negotiated terms tailored to your organization.',
|
|
232
|
+
features : [
|
|
233
|
+
'Analytics',
|
|
234
|
+
'Custom subdomain / URLs',
|
|
235
|
+
'Confirmation page ads',
|
|
236
|
+
'Negotiated pricing and limits'
|
|
237
|
+
],
|
|
238
|
+
limits : [
|
|
239
|
+
[ 'Actions per month', 'Custom' ],
|
|
240
|
+
[ 'Affiliates', 'Unlimited' ],
|
|
241
|
+
[ 'Brands', 'Unlimited' ],
|
|
242
|
+
[ 'Campaigns', 'Unlimited' ],
|
|
243
|
+
[ 'Pages', 'Unlimited' ],
|
|
244
|
+
[ 'Members', 'Custom' ],
|
|
245
|
+
[ 'Storage', 'Custom' ]
|
|
246
|
+
]
|
|
247
|
+
},
|
|
248
|
+
overages : { actions : '1.5' },
|
|
249
|
+
title : 'Enterprise',
|
|
250
|
+
conversion : 0.5
|
|
195
251
|
}
|
|
196
252
|
};
|
|
197
253
|
|
package/dist/plans.d.ts
CHANGED
|
@@ -192,6 +192,62 @@ const plans = {
|
|
|
192
192
|
overages : { actions : '1.5' },
|
|
193
193
|
title : 'Elite',
|
|
194
194
|
conversion : 0.5
|
|
195
|
+
},
|
|
196
|
+
|
|
197
|
+
// Negotiated tier. Unlike the four sellable plans it has NO catalog price:
|
|
198
|
+
// each enterprise subscription bills from its own Stripe price, minted
|
|
199
|
+
// under STRIPE_PRODUCT_ENTERPRISE and recorded on items.plan.price.
|
|
200
|
+
//
|
|
201
|
+
// That absent price is the whole marker — this entry carries no flag of its
|
|
202
|
+
// own, deliberately. A plan with no stripePriceId cannot be sold self-serve
|
|
203
|
+
// because subscribe and change would hand Stripe `price : undefined`, so
|
|
204
|
+
// "is it selectable" reads straight off the thing that makes it true. Two
|
|
205
|
+
// flags were considered and dropped: `status : drafted | published` (it
|
|
206
|
+
// collides with subscription.status and organization.status, which extend.js
|
|
207
|
+
// attaches to the same payload) and `type : default | custom` (its one real
|
|
208
|
+
// job — catching a sellable plan whose STRIPE_PRICE_* env went missing — is
|
|
209
|
+
// already done by assertEnv at api boot). Negotiated-ness is recorded where
|
|
210
|
+
// it actually varies: subscription.type on the document, set by the admin.
|
|
211
|
+
//
|
|
212
|
+
// Every value below is a FALLBACK, not the deal. Real allowances come from
|
|
213
|
+
// subscription.overrides per customer. They deliberately mirror Elite
|
|
214
|
+
// rather than being infinite or zero: a half-configured enterprise
|
|
215
|
+
// subscription then degrades to the best sellable tier — a known-good,
|
|
216
|
+
// billable state — instead of billing nothing or granting everything.
|
|
217
|
+
//
|
|
218
|
+
// Placed LAST so the array-position direction logic in drawbridge-api
|
|
219
|
+
// (organization-subscription.js `plans.findIndex`) reads a move onto
|
|
220
|
+
// enterprise as an upgrade and a move off it as a downgrade.
|
|
221
|
+
DBENTERPRISE : {
|
|
222
|
+
features : all.features([
|
|
223
|
+
organization.advertisements.key,
|
|
224
|
+
organization.analytics.key,
|
|
225
|
+
organization.members.key,
|
|
226
|
+
organization.subdomain.key,
|
|
227
|
+
page.slug.key
|
|
228
|
+
]),
|
|
229
|
+
limits : all.limits({ actions : 100000, members : infinite, storage : gigabyte * 100 }),
|
|
230
|
+
marketing : {
|
|
231
|
+
description : 'Negotiated terms tailored to your organization.',
|
|
232
|
+
features : [
|
|
233
|
+
'Analytics',
|
|
234
|
+
'Custom subdomain / URLs',
|
|
235
|
+
'Confirmation page ads',
|
|
236
|
+
'Negotiated pricing and limits'
|
|
237
|
+
],
|
|
238
|
+
limits : [
|
|
239
|
+
[ 'Actions per month', 'Custom' ],
|
|
240
|
+
[ 'Affiliates', 'Unlimited' ],
|
|
241
|
+
[ 'Brands', 'Unlimited' ],
|
|
242
|
+
[ 'Campaigns', 'Unlimited' ],
|
|
243
|
+
[ 'Pages', 'Unlimited' ],
|
|
244
|
+
[ 'Members', 'Custom' ],
|
|
245
|
+
[ 'Storage', 'Custom' ]
|
|
246
|
+
]
|
|
247
|
+
},
|
|
248
|
+
overages : { actions : '1.5' },
|
|
249
|
+
title : 'Enterprise',
|
|
250
|
+
conversion : 0.5
|
|
195
251
|
}
|
|
196
252
|
};
|
|
197
253
|
|
package/dist/plans.js
CHANGED
|
@@ -383,6 +383,61 @@ var plans = {
|
|
|
383
383
|
overages: { actions: "1.5" },
|
|
384
384
|
title: "Elite",
|
|
385
385
|
conversion: 0.5
|
|
386
|
+
},
|
|
387
|
+
// Negotiated tier. Unlike the four sellable plans it has NO catalog price:
|
|
388
|
+
// each enterprise subscription bills from its own Stripe price, minted
|
|
389
|
+
// under STRIPE_PRODUCT_ENTERPRISE and recorded on items.plan.price.
|
|
390
|
+
//
|
|
391
|
+
// That absent price is the whole marker — this entry carries no flag of its
|
|
392
|
+
// own, deliberately. A plan with no stripePriceId cannot be sold self-serve
|
|
393
|
+
// because subscribe and change would hand Stripe `price : undefined`, so
|
|
394
|
+
// "is it selectable" reads straight off the thing that makes it true. Two
|
|
395
|
+
// flags were considered and dropped: `status : drafted | published` (it
|
|
396
|
+
// collides with subscription.status and organization.status, which extend.js
|
|
397
|
+
// attaches to the same payload) and `type : default | custom` (its one real
|
|
398
|
+
// job — catching a sellable plan whose STRIPE_PRICE_* env went missing — is
|
|
399
|
+
// already done by assertEnv at api boot). Negotiated-ness is recorded where
|
|
400
|
+
// it actually varies: subscription.type on the document, set by the admin.
|
|
401
|
+
//
|
|
402
|
+
// Every value below is a FALLBACK, not the deal. Real allowances come from
|
|
403
|
+
// subscription.overrides per customer. They deliberately mirror Elite
|
|
404
|
+
// rather than being infinite or zero: a half-configured enterprise
|
|
405
|
+
// subscription then degrades to the best sellable tier — a known-good,
|
|
406
|
+
// billable state — instead of billing nothing or granting everything.
|
|
407
|
+
//
|
|
408
|
+
// Placed LAST so the array-position direction logic in drawbridge-api
|
|
409
|
+
// (organization-subscription.js `plans.findIndex`) reads a move onto
|
|
410
|
+
// enterprise as an upgrade and a move off it as a downgrade.
|
|
411
|
+
DBENTERPRISE: {
|
|
412
|
+
features: all.features([
|
|
413
|
+
organization.advertisements.key,
|
|
414
|
+
organization.analytics.key,
|
|
415
|
+
organization.members.key,
|
|
416
|
+
organization.subdomain.key,
|
|
417
|
+
page.slug.key
|
|
418
|
+
]),
|
|
419
|
+
limits: all.limits({ actions: 1e5, members: infinite, storage: gigabyte * 100 }),
|
|
420
|
+
marketing: {
|
|
421
|
+
description: "Negotiated terms tailored to your organization.",
|
|
422
|
+
features: [
|
|
423
|
+
"Analytics",
|
|
424
|
+
"Custom subdomain / URLs",
|
|
425
|
+
"Confirmation page ads",
|
|
426
|
+
"Negotiated pricing and limits"
|
|
427
|
+
],
|
|
428
|
+
limits: [
|
|
429
|
+
["Actions per month", "Custom"],
|
|
430
|
+
["Affiliates", "Unlimited"],
|
|
431
|
+
["Brands", "Unlimited"],
|
|
432
|
+
["Campaigns", "Unlimited"],
|
|
433
|
+
["Pages", "Unlimited"],
|
|
434
|
+
["Members", "Custom"],
|
|
435
|
+
["Storage", "Custom"]
|
|
436
|
+
]
|
|
437
|
+
},
|
|
438
|
+
overages: { actions: "1.5" },
|
|
439
|
+
title: "Enterprise",
|
|
440
|
+
conversion: 0.5
|
|
386
441
|
}
|
|
387
442
|
};
|
|
388
443
|
var conversionRate = (subscription) => {
|
package/package.json
CHANGED